diff --git a/src/docs/Alert.md b/src/docs/Alert.md index 7749cd3..26118f0 100644 --- a/src/docs/Alert.md +++ b/src/docs/Alert.md @@ -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] diff --git a/src/notehub_py/models/alert.py b/src/notehub_py/models/alert.py index 607fa85..2ba0e9f 100644 --- a/src/notehub_py/models/alert.py +++ b/src/notehub_py/models/alert.py @@ -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") @@ -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): @@ -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"), diff --git a/src/test/test_alert.py b/src/test/test_alert.py index 2d85181..86273a8 100644 --- a/src/test/test_alert.py +++ b/src/test/test_alert.py @@ -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, diff --git a/src/test/test_get_alerts200_response.py b/src/test/test_get_alerts200_response.py index bef5cda..fefd86a 100644 --- a/src/test/test_get_alerts200_response.py +++ b/src/test/test_get_alerts200_response.py @@ -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, @@ -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,