Skip to content

Commit

Permalink
deps: generate fresh library from openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
paigen11 committed Aug 1, 2024
1 parent 3d455c0 commit d31504f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/docs/Alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uid** | **str** | Alert UID | [optional]
**monitor_uid** | **str** | Monitor UID | [optional]
**monitor_name** | **str** | Monitor Name | [optional]
**device_uid** | **str** | Device UID | [optional]
**created_at** | **int** | The time the alert was created | [optional]
**value** | **float** | The value that triggered the alert | [optional]
Expand Down
4 changes: 3 additions & 1 deletion src/notehub_py/models/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Alert(BaseModel):
""" # noqa: E501
uid: Optional[StrictStr] = Field(default=None, description="Alert UID")
monitor_uid: Optional[StrictStr] = Field(default=None, description="Monitor UID")
monitor_name: Optional[StrictStr] = Field(default=None, description="Monitor Name")
device_uid: Optional[StrictStr] = Field(default=None, description="Device UID")
created_at: Optional[StrictInt] = Field(default=None, description="The time the alert was created")
value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The value that triggered the alert")
Expand All @@ -40,7 +41,7 @@ class Alert(BaseModel):
source: Optional[StrictStr] = Field(default=None, description="The UID of the source of the alert")
data: Optional[List[AlertDataInner]] = None
notifications: Optional[List[AlertNotificationsInner]] = None
__properties: ClassVar[List[str]] = ["uid", "monitor_uid", "device_uid", "created_at", "value", "resolved", "version", "alert_source", "source", "data", "notifications"]
__properties: ClassVar[List[str]] = ["uid", "monitor_uid", "monitor_name", "device_uid", "created_at", "value", "resolved", "version", "alert_source", "source", "data", "notifications"]

@field_validator('alert_source')
def alert_source_validate_enum(cls, value):
Expand Down Expand Up @@ -119,6 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"uid": obj.get("uid"),
"monitor_uid": obj.get("monitor_uid"),
"monitor_name": obj.get("monitor_name"),
"device_uid": obj.get("device_uid"),
"created_at": obj.get("created_at"),
"value": obj.get("value"),
Expand Down
1 change: 1 addition & 0 deletions src/test/test_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> Alert:
return Alert(
uid = '',
monitor_uid = '',
monitor_name = '',
device_uid = '',
created_at = 56,
value = 1.337,
Expand Down
2 changes: 2 additions & 0 deletions src/test/test_get_alerts200_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def make_instance(self, include_optional) -> GetAlerts200Response:
notehub_py.models.alert.Alert(
uid = '',
monitor_uid = '',
monitor_name = '',
device_uid = '',
created_at = 56,
value = 1.337,
Expand Down Expand Up @@ -71,6 +72,7 @@ def make_instance(self, include_optional) -> GetAlerts200Response:
notehub_py.models.alert.Alert(
uid = '',
monitor_uid = '',
monitor_name = '',
device_uid = '',
created_at = 56,
value = 1.337,
Expand Down

0 comments on commit d31504f

Please sign in to comment.