Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions rootly_sdk/models/new_heartbeat_data_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class NewHeartbeatDataAttributes:
description (None | str | Unset): The description of the heartbeat
alert_description (None | str | Unset): Description of alerts triggered when heartbeat expires.
alert_urgency_id (None | str | Unset): Urgency of alerts triggered when heartbeat expires.
owner_group_ids (list[str] | Unset): List of team IDs that own this heartbeat
enabled (bool | Unset): Whether to trigger alerts when heartbeat is expired.
"""

Expand All @@ -44,6 +45,7 @@ class NewHeartbeatDataAttributes:
description: None | str | Unset = UNSET
alert_description: None | str | Unset = UNSET
alert_urgency_id: None | str | Unset = UNSET
owner_group_ids: list[str] | Unset = UNSET
enabled: bool | Unset = UNSET

def to_dict(self) -> dict[str, Any]:
Expand Down Expand Up @@ -77,6 +79,10 @@ def to_dict(self) -> dict[str, Any]:
else:
alert_urgency_id = self.alert_urgency_id

owner_group_ids: list[str] | Unset = UNSET
if not isinstance(self.owner_group_ids, Unset):
owner_group_ids = self.owner_group_ids

enabled = self.enabled

field_dict: dict[str, Any] = {}
Expand All @@ -97,6 +103,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["alert_description"] = alert_description
if alert_urgency_id is not UNSET:
field_dict["alert_urgency_id"] = alert_urgency_id
if owner_group_ids is not UNSET:
field_dict["owner_group_ids"] = owner_group_ids
if enabled is not UNSET:
field_dict["enabled"] = enabled

Expand Down Expand Up @@ -146,6 +154,8 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset:

alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET))

owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET))

enabled = d.pop("enabled", UNSET)

new_heartbeat_data_attributes = cls(
Expand All @@ -158,6 +168,7 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset:
description=description,
alert_description=alert_description,
alert_urgency_id=alert_urgency_id,
owner_group_ids=owner_group_ids,
enabled=enabled,
)

Expand Down
11 changes: 11 additions & 0 deletions rootly_sdk/models/update_heartbeat_data_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class UpdateHeartbeatDataAttributes:
notification_target_id (str | Unset):
notification_target_type (UpdateHeartbeatDataAttributesNotificationTargetType | Unset): The type of the
notification target. Please contact support if you encounter issues using `Functionality` as a target type.
owner_group_ids (list[str] | Unset): List of team IDs that own this heartbeat
enabled (bool | Unset): Whether to trigger alerts when heartbeat is expired.
"""

Expand All @@ -44,6 +45,7 @@ class UpdateHeartbeatDataAttributes:
interval_unit: UpdateHeartbeatDataAttributesIntervalUnit | Unset = UNSET
notification_target_id: str | Unset = UNSET
notification_target_type: UpdateHeartbeatDataAttributesNotificationTargetType | Unset = UNSET
owner_group_ids: list[str] | Unset = UNSET
enabled: bool | Unset = UNSET

def to_dict(self) -> dict[str, Any]:
Expand Down Expand Up @@ -81,6 +83,10 @@ def to_dict(self) -> dict[str, Any]:
if not isinstance(self.notification_target_type, Unset):
notification_target_type = self.notification_target_type

owner_group_ids: list[str] | Unset = UNSET
if not isinstance(self.owner_group_ids, Unset):
owner_group_ids = self.owner_group_ids

enabled = self.enabled

field_dict: dict[str, Any] = {}
Expand All @@ -104,6 +110,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["notification_target_id"] = notification_target_id
if notification_target_type is not UNSET:
field_dict["notification_target_type"] = notification_target_type
if owner_group_ids is not UNSET:
field_dict["owner_group_ids"] = owner_group_ids
if enabled is not UNSET:
field_dict["enabled"] = enabled

Expand Down Expand Up @@ -163,6 +171,8 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset:
_notification_target_type
)

owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET))

enabled = d.pop("enabled", UNSET)

update_heartbeat_data_attributes = cls(
Expand All @@ -175,6 +185,7 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset:
interval_unit=interval_unit,
notification_target_id=notification_target_id,
notification_target_type=notification_target_type,
owner_group_ids=owner_group_ids,
enabled=enabled,
)

Expand Down