Skip to content

Commit

Permalink
#226: Update generated models
Browse files Browse the repository at this point in the history
  • Loading branch information
priscavdsluis committed Sep 27, 2022
1 parent 9e71187 commit a3fe4bd
Show file tree
Hide file tree
Showing 10 changed files with 1,961 additions and 2,668 deletions.
6 changes: 3 additions & 3 deletions hydrolib/core/io/rtc/rtcDataConfig/generated/_.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# generated by datamodel-codegen:
# filename: rtcDataConfig.json
# timestamp: 2022-09-27T13:10:33+00:00
# timestamp: 2022-09-27T13:22:03+00:00

from __future__ import annotations

from pydantic import BaseModel
from hydrolib.core.io.rtc.basemodel import RtcBaseModel

from . import RtcDataConfigComplexType


class RtcDataConfig(BaseModel):
class RtcDataConfig(RtcBaseModel):
class Config:
allow_population_by_field_name = True

Expand Down
55 changes: 28 additions & 27 deletions hydrolib/core/io/rtc/rtcDataConfig/generated/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# generated by datamodel-codegen:
# filename: rtcDataConfig.json
# timestamp: 2022-09-27T13:10:33+00:00
# timestamp: 2022-09-27T13:22:03+00:00

from __future__ import annotations

from enum import Enum
from typing import Any, List, Optional, Union

from pydantic import BaseModel, Extra, Field
from hydrolib.core.io.rtc.basemodel import RtcBaseModel
from pydantic import Extra, Field

from . import _

Expand All @@ -23,42 +24,42 @@ class EnsembleModeEnumStringType(str, Enum):
INDEPENDENT = 'INDEPENDENT'


class ExternalBooleanSimpleTypeItem(BaseModel):
class ExternalBooleanSimpleTypeItem(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: str = Field(..., regex='^([\\$][\\(-_a-z]+[\\$])$')


class ExternalBooleanSimpleType(BaseModel):
class ExternalBooleanSimpleType(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: Union[bool, ExternalBooleanSimpleTypeItem]


class ExternalIntegerSimpleTypeItem(BaseModel):
class ExternalIntegerSimpleTypeItem(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: str = Field(..., regex='^([\\$][\\(-_a-z]+[\\$])$')


class ExternalIntegerSimpleType(BaseModel):
class ExternalIntegerSimpleType(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: Union[int, ExternalIntegerSimpleTypeItem]


class ExternalParameterSimpleTypeItem(BaseModel):
class ExternalParameterSimpleTypeItem(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: str = Field(..., regex='^([#-\\$][\\(-_a-z]+[#-\\$])$')


class ExternalParameterSimpleType(BaseModel):
class ExternalParameterSimpleType(RtcBaseModel):
class Config:
allow_population_by_field_name = True

Expand Down Expand Up @@ -92,14 +93,14 @@ class SeparatorEnumStringType(str, Enum):
__2 = ';'


class TimeSeriesSimpleType(BaseModel):
class TimeSeriesSimpleType(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: str = Field(..., min_length=1)


class TimeZoneSimpleType(BaseModel):
class TimeZoneSimpleType(RtcBaseModel):
class Config:
allow_population_by_field_name = True

Expand All @@ -123,7 +124,7 @@ class VariableTypeEnumStringType(str, Enum):
TIMEINSTANCE = 'TIMEINSTANCE'


class DateType(BaseModel):
class DateType(RtcBaseModel):
class Config:
allow_population_by_field_name = True

Expand Down Expand Up @@ -152,35 +153,35 @@ class TimeStepUnitEnumStringType(str, Enum):
week = 'week'


class TimeType(BaseModel):
class TimeType(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: str = Field(..., regex='^([\\d][\\d]\\:[\\d][\\d]\\:[\\d][\\d])$')


class XsBoolean(BaseModel):
class XsBoolean(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: bool


class XsPositiveInteger(BaseModel):
class XsPositiveInteger(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: int = Field(..., ge=1)


class XsString(BaseModel):
class XsString(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: str


class CSVTimeSeriesFileComplexType(BaseModel):
class CSVTimeSeriesFileComplexType(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True
Expand All @@ -190,7 +191,7 @@ class Config:
attr_delimiter: Optional[SeparatorEnumStringType] = None


class DateTimeComplexType(BaseModel):
class DateTimeComplexType(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True
Expand All @@ -199,7 +200,7 @@ class Config:
attr_time: TimeType


class OpenMIExchangeItemComplexType(BaseModel):
class OpenMIExchangeItemComplexType(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True
Expand All @@ -213,7 +214,7 @@ class Config:
unit: UnitEnumStringType = Field(..., description='Selection of supported units')


class PITimeSeriesExportFileComplexType(BaseModel):
class PITimeSeriesExportFileComplexType(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True
Expand All @@ -228,7 +229,7 @@ class Config:
)


class PITimeSeriesImportFileComplexType(BaseModel):
class PITimeSeriesImportFileComplexType(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True
Expand All @@ -242,7 +243,7 @@ class Config:
)


class TimeStepComplexType(BaseModel):
class TimeStepComplexType(RtcBaseModel):
"""
The timeunit element has three attributes, unit and devider and multiplier.
the unit is second, minute, hour, week, month year.
Expand All @@ -258,7 +259,7 @@ class Config:
attr_unit: TimeStepUnitEnumStringType


class PITimeSeriesComplexType(BaseModel):
class PITimeSeriesComplexType(RtcBaseModel):
"""
The header is used to specify the link to the location
and the contents
Expand Down Expand Up @@ -291,7 +292,7 @@ class Config:
)


class RtcTimeSeriesComplexType(BaseModel):
class RtcTimeSeriesComplexType(RtcBaseModel):
"""
The header is used to specify the link to the location
and the contents
Expand All @@ -314,7 +315,7 @@ class Config:
)


class RtcSeriesExportComplexType(BaseModel):
class RtcSeriesExportComplexType(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True
Expand All @@ -327,7 +328,7 @@ class Config:
timeSeries: List[RtcTimeSeriesComplexType] = Field(..., min_items=1)


class RtcSeriesImportComplexType(BaseModel):
class RtcSeriesImportComplexType(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True
Expand All @@ -336,7 +337,7 @@ class Config:
timeSeries: List[RtcTimeSeriesComplexType] = Field(..., min_items=1)


class RtcDataConfigComplexType(BaseModel):
class RtcDataConfigComplexType(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True
Expand All @@ -351,7 +352,7 @@ class Config:
)


class Model(BaseModel):
class Model(RtcBaseModel):
"""
JSON Schema generated by XMLSpy v2019 rel. 3 sp1 (x64) (http://www.altova.com)
"""
Expand Down
12 changes: 6 additions & 6 deletions hydrolib/core/io/rtc/rtcToolsConfig/generated/_.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# generated by datamodel-codegen:
# filename: rtcToolsConfig.json
# timestamp: 2022-09-27T13:06:58+00:00
# timestamp: 2022-09-27T13:24:09+00:00

from __future__ import annotations

from pydantic import BaseModel
from hydrolib.core.io.rtc.basemodel import RtcBaseModel

from . import RtcRtcToolsConfigComplexType
from . import RtcToolsConfigComplexType


class RtcRtcToolsConfig(BaseModel):
class RtcToolsConfig(RtcBaseModel):
class Config:
allow_population_by_field_name = True

__root__: RtcRtcToolsConfigComplexType
__root__: RtcToolsConfigComplexType


RtcRtcToolsConfig.update_forward_refs()
RtcToolsConfig.update_forward_refs()
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# generated by datamodel-codegen:
# filename: rtcToolsConfig.json
# timestamp: 2022-09-27T13:24:09+00:00

from __future__ import annotations

from typing import Optional

from hydrolib.core.io.rtc.basemodel import RtcBaseModel
from pydantic import Extra, Field

from ... import ExternalParameterSimpleType, XsBoolean


class Field1(RtcBaseModel):
class Config:
extra = Extra.forbid
allow_population_by_field_name = True

_: Optional[ExternalParameterSimpleType] = Field(None, alias='$')
attr_useAbsoluteAsSpillCap: Optional[XsBoolean] = None
Loading

0 comments on commit a3fe4bd

Please sign in to comment.