terra.models.v2.menstruation

 1#  Copyright 2022 Terra Enabling Developers Limited
 2#
 3#  Licensed under the Apache License, Version 2.0 (the "License");
 4#  you may not use this file except in compliance with the License.
 5#  You may obtain a copy of the License at
 6#
 7#      http://www.apache.org/licenses/LICENSE-2.0
 8#
 9#  Unless required by applicable law or agreed to in writing, software
10#  distributed under the License is distributed on an "AS IS" BASIS,
11#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12#  See the License for the specific language governing permissions and
13#  limitations under the License.
14import dataclasses
15import typing
16
17from terra.models import base_model
18from terra.models.v2 import samples as samples_
19
20__all__ = ["Menstruation"]
21
22
23@dataclasses.dataclass
24class Metadata(base_model.TerraDataModel):
25    start_time: typing.Optional[str] = dataclasses.field(default=None)
26    end_time: typing.Optional[str] = dataclasses.field(default=None)
27
28
29@dataclasses.dataclass
30class MenstruationData(base_model.TerraDataModel):
31    period_start_date: typing.Optional[str] = dataclasses.field(default=None)
32    day_in_cycle: typing.Optional[int] = dataclasses.field(default=None)
33    period_length_days: typing.Optional[int] = dataclasses.field(default=None)
34    current_phase: typing.Optional[int] = dataclasses.field(default=None)
35    length_of_current_phase_days: typing.Optional[int] = dataclasses.field(default=None)
36    days_until_next_phase: typing.Optional[int] = dataclasses.field(default=None)
37    predicted_cycle_length_days: typing.Optional[int] = dataclasses.field(default=None)
38    is_predicted_cycle: typing.Optional[str] = dataclasses.field(default=None)
39    cycle_length_days: typing.Optional[str] = dataclasses.field(default=None)
40    last_updated_time: typing.Optional[str] = dataclasses.field(default=None)
41    menstruation_flow: typing.List[samples_.MenstruationFlowSample] = dataclasses.field(default_factory=list)
42
43
44@dataclasses.dataclass
45class Menstruation(base_model.TerraDataModel):
46    metadata: Metadata = dataclasses.field(default_factory=Metadata)
47    menstruation_data: MenstruationData = dataclasses.field(default_factory=MenstruationData)
@dataclasses.dataclass
class Menstruation(terra.models.base_model.TerraDataModel):
45@dataclasses.dataclass
46class Menstruation(base_model.TerraDataModel):
47    metadata: Metadata = dataclasses.field(default_factory=Metadata)
48    menstruation_data: MenstruationData = dataclasses.field(default_factory=MenstruationData)

Menstruation(metadata: terra.models.v2.menstruation.Metadata = , menstruation_data: terra.models.v2.menstruation.MenstruationData = )

Menstruation( metadata: terra.models.v2.menstruation.Metadata = <factory>, menstruation_data: terra.models.v2.menstruation.MenstruationData = <factory>)