diff --git a/.gitignore b/.gitignore index 79a2c3d7..73dc337f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ dmypy.json /coverage.xml /.coverage + +# Serena +.serena/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 645e8fd4..cc25935d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.4.0] - 2026-07-20 + +### Added +- New AI Chat endpoints (create, stream, list session messages, delete session) +- New Shift Coverage Requests endpoints (create, read, delete, list) +- New Workflow Action Item Form Field Conditions endpoints (create, read, update, delete, list) +- Bulk operations for catalog entities, environments, functionalities, services, and teams (bulk upsert and bulk delete) +- New Meeting Recordings actions: import, delete standalone, start recording session, list all +- Alert escalation and snooze actions (`escalate_alert`, `snooze_alert`) +- Alert receipt endpoint (`get_receipt`) +- Alert events feed endpoint (`list_alert_events_feed`) +- New Google Chat workflow task types: create/rename/archive spaces, change space privacy, update space description, invite to space, send messages and attachments +- New workflow task type: `InviteToMicrosoftTeamsChannelRootlyTaskParams` — invite users to Microsoft Teams channels via Rootly +- New workflow task type: `AttachRetrospectivePdfToJiraIssueTaskParams` — attach retrospective PDFs to Jira issues +- Edge connector filters support (`CreateEdgeConnectorBodyDataAttributesFilters`) +- `owner_group_ids` field on heartbeat, alerts source, functionality, and schedule models for team-scoped API key support +- GitHub issue task params: labels mode support (`update_github_issue_task_params_labels_mode`) + +### Changed +- Regenerated client from latest OpenAPI specification +- httpx minimum version bumped from `>=0.20.0` to `>=0.23.0` +- 428 new model files, 28 removed models (consolidated upstream) + +### Fixed +- Applied nullable enum fix to all model files via `tools/fix_nullable_enums.py` + ## [1.3.0] - 2026-04-21 ### Added diff --git a/Makefile b/Makefile index 69ce471e..94d22b41 100644 --- a/Makefile +++ b/Makefile @@ -41,8 +41,10 @@ regenerate: --config tools/config.yaml @echo "Applying nullable enum fix..." @python tools/fix_nullable_enums.py + @echo "Fixing lint errors..." + @ruff check --fix rootly_sdk/ @echo "Formatting patched files..." - @ruff format rootly_sdk/models/ + @ruff format rootly_sdk/ test: python -c "import rootly_sdk; print('SDK imports successfully')" diff --git a/pyproject.toml b/pyproject.toml index dc679cd7..0c87f93c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rootly" -version = "1.3.0" +version = "1.4.0" description = "A client library for accessing Rootly API v1" authors = [] readme = "README.md" @@ -11,13 +11,10 @@ include = ["CHANGELOG.md", "rootly_sdk/py.typed"] [tool.poetry.dependencies] python = "^3.10" -httpx = ">=0.20.0,<0.29.0" +httpx = ">=0.23.0,<0.29.0" attrs = ">=22.2.0" python-dateutil = "^2.8.0" -[tool.poetry.group.dev.dependencies] -ruff = ">=0.15.0" - [build-system] requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/rootly_sdk/api/ai_chat/__init__.py b/rootly_sdk/api/ai_chat/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/ai_chat/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/ai_chat/create_ai_chat.py b/rootly_sdk/api/ai_chat/create_ai_chat.py new file mode 100644 index 00000000..a1b78093 --- /dev/null +++ b/rootly_sdk/api/ai_chat/create_ai_chat.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any, cast +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_chat_response import AiChatResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["message"] = message + + json_session_id: str | Unset = UNSET + if not isinstance(session_id, Unset): + json_session_id = str(session_id) + params["session_id"] = json_session_id + + json_incident_id: str | Unset = UNSET + if not isinstance(incident_id, Unset): + json_incident_id = str(incident_id) + params["incident_id"] = json_incident_id + + json_alert_id: str | Unset = UNSET + if not isinstance(alert_id, Unset): + json_alert_id = str(alert_id) + params["alert_id"] = json_alert_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/ai/chat", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AiChatResponse | Any | None: + if response.status_code == 200: + response_200 = AiChatResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + + if response.status_code == 422: + response_422 = cast(Any, None) + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiChatResponse | Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, +) -> Response[AiChatResponse | Any]: + """Send AI chat message + + Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation + to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API + key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiChatResponse | Any] + """ + + kwargs = _get_kwargs( + message=message, + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, +) -> AiChatResponse | Any | None: + """Send AI chat message + + Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation + to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API + key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiChatResponse | Any + """ + + return sync_detailed( + client=client, + message=message, + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, +) -> Response[AiChatResponse | Any]: + """Send AI chat message + + Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation + to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API + key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiChatResponse | Any] + """ + + kwargs = _get_kwargs( + message=message, + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, +) -> AiChatResponse | Any | None: + """Send AI chat message + + Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation + to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API + key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiChatResponse | Any + """ + + return ( + await asyncio_detailed( + client=client, + message=message, + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, + ) + ).parsed diff --git a/rootly_sdk/api/ai_chat/delete_ai_chat_session.py b/rootly_sdk/api/ai_chat/delete_ai_chat_session.py new file mode 100644 index 00000000..810d9b1e --- /dev/null +++ b/rootly_sdk/api/ai_chat/delete_ai_chat_session.py @@ -0,0 +1,108 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/ai/chat/sessions/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 204: + return None + + if response.status_code == 404: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete AI chat session + + Permanently deletes an AI chat session and all its messages. Requires `ai.chat:write` OAuth scope or + an API key. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete AI chat session + + Permanently deletes an AI chat session and all its messages. Requires `ai.chat:write` OAuth scope or + an API key. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py b/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py new file mode 100644 index 00000000..8f13b2d4 --- /dev/null +++ b/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ai_chat_session_message_list import AiChatSessionMessageList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + session_id: UUID, + *, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/ai/chat/sessions/{session_id}/messages".format( + session_id=quote(str(session_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiChatSessionMessageList | Any | None: + if response.status_code == 200: + response_200 = AiChatSessionMessageList.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = cast(Any, None) + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiChatSessionMessageList | Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + session_id: UUID, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> Response[AiChatSessionMessageList | Any]: + """List AI chat session messages + + Returns the user and assistant message history for a session, paginated and chronologically ordered. + Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. + + Args: + session_id (UUID): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiChatSessionMessageList | Any] + """ + + kwargs = _get_kwargs( + session_id=session_id, + pagenumber=pagenumber, + pagesize=pagesize, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + session_id: UUID, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> AiChatSessionMessageList | Any | None: + """List AI chat session messages + + Returns the user and assistant message history for a session, paginated and chronologically ordered. + Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. + + Args: + session_id (UUID): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiChatSessionMessageList | Any + """ + + return sync_detailed( + session_id=session_id, + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + ).parsed + + +async def asyncio_detailed( + session_id: UUID, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> Response[AiChatSessionMessageList | Any]: + """List AI chat session messages + + Returns the user and assistant message history for a session, paginated and chronologically ordered. + Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. + + Args: + session_id (UUID): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AiChatSessionMessageList | Any] + """ + + kwargs = _get_kwargs( + session_id=session_id, + pagenumber=pagenumber, + pagesize=pagesize, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + session_id: UUID, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> AiChatSessionMessageList | Any | None: + """List AI chat session messages + + Returns the user and assistant message history for a session, paginated and chronologically ordered. + Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. + + Args: + session_id (UUID): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AiChatSessionMessageList | Any + """ + + return ( + await asyncio_detailed( + session_id=session_id, + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/ai_chat/stream_ai_chat.py b/rootly_sdk/api/ai_chat/stream_ai_chat.py new file mode 100644 index 00000000..db3d600b --- /dev/null +++ b/rootly_sdk/api/ai_chat/stream_ai_chat.py @@ -0,0 +1,153 @@ +from http import HTTPStatus +from typing import Any +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["message"] = message + + json_session_id: str | Unset = UNSET + if not isinstance(session_id, Unset): + json_session_id = str(session_id) + params["session_id"] = json_session_id + + json_incident_id: str | Unset = UNSET + if not isinstance(incident_id, Unset): + json_incident_id = str(incident_id) + params["incident_id"] = json_incident_id + + json_alert_id: str | Unset = UNSET + if not isinstance(alert_id, Unset): + json_alert_id = str(alert_id) + params["alert_id"] = json_alert_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/ai/chat/stream", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 403: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, +) -> Response[Any]: + """Stream AI chat response (SSE) + + Send a message and receive the AI response as a Server-Sent Events stream. Optionally bind to an + incident or alert for context. Events: `session_id` (initial), `text` (content chunks), + `task_update` (tool progress), `error`, `done` (terminal with status). Requires `ai.chat:write` + OAuth scope or an API key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + message=message, + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, +) -> Response[Any]: + """Stream AI chat response (SSE) + + Send a message and receive the AI response as a Server-Sent Events stream. Optionally bind to an + incident or alert for context. Events: `session_id` (initial), `text` (content chunks), + `task_update` (tool progress), `error`, `done` (terminal with status). Requires `ai.chat:write` + OAuth scope or an API key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + message=message, + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/alert_events/list_alert_events_feed.py b/rootly_sdk/api/alert_events/list_alert_events_feed.py new file mode 100644 index 00000000..b9a7a95a --- /dev/null +++ b/rootly_sdk/api/alert_events/list_alert_events_feed.py @@ -0,0 +1,341 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.alert_event_feed_list import AlertEventFeedList +from ...models.list_alert_events_feed_filteraction import ( + ListAlertEventsFeedFilteraction, +) +from ...models.list_alert_events_feed_filterkind import ( + ListAlertEventsFeedFilterkind, +) +from ...models.list_alert_events_feed_sort import ListAlertEventsFeedSort +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: str | Unset = UNSET, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["include"] = include + + params["page[size]"] = pagesize + + params["page[after]"] = pageafter + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + json_filterkind: str | Unset = UNSET + if not isinstance(filterkind, Unset): + json_filterkind = filterkind + + params["filter[kind]"] = json_filterkind + + json_filteraction: str | Unset = UNSET + if not isinstance(filteraction, Unset): + json_filteraction = filteraction + + params["filter[action]"] = json_filteraction + + params["filter[alert_id]"] = filteralert_id + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/alert_events", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventFeedList | None: + if response.status_code == 200: + response_200 = AlertEventFeedList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertEventFeedList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[AlertEventFeedList]: + """List alert events across alerts + + Returns a flat list of alert events across all alerts the requester can access. Designed for + periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to + stream forward. + + Args: + include (str | Unset): + pagesize (int | Unset): + pageafter (str | Unset): + sort (ListAlertEventsFeedSort | Unset): + filterkind (ListAlertEventsFeedFilterkind | Unset): + filteraction (ListAlertEventsFeedFilteraction | Unset): + filteralert_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AlertEventFeedList] + """ + + kwargs = _get_kwargs( + include=include, + pagesize=pagesize, + pageafter=pageafter, + sort=sort, + filterkind=filterkind, + filteraction=filteraction, + filteralert_id=filteralert_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> AlertEventFeedList | None: + """List alert events across alerts + + Returns a flat list of alert events across all alerts the requester can access. Designed for + periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to + stream forward. + + Args: + include (str | Unset): + pagesize (int | Unset): + pageafter (str | Unset): + sort (ListAlertEventsFeedSort | Unset): + filterkind (ListAlertEventsFeedFilterkind | Unset): + filteraction (ListAlertEventsFeedFilteraction | Unset): + filteralert_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AlertEventFeedList + """ + + return sync_detailed( + client=client, + include=include, + pagesize=pagesize, + pageafter=pageafter, + sort=sort, + filterkind=filterkind, + filteraction=filteraction, + filteralert_id=filteralert_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[AlertEventFeedList]: + """List alert events across alerts + + Returns a flat list of alert events across all alerts the requester can access. Designed for + periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to + stream forward. + + Args: + include (str | Unset): + pagesize (int | Unset): + pageafter (str | Unset): + sort (ListAlertEventsFeedSort | Unset): + filterkind (ListAlertEventsFeedFilterkind | Unset): + filteraction (ListAlertEventsFeedFilteraction | Unset): + filteralert_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AlertEventFeedList] + """ + + kwargs = _get_kwargs( + include=include, + pagesize=pagesize, + pageafter=pageafter, + sort=sort, + filterkind=filterkind, + filteraction=filteraction, + filteralert_id=filteralert_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> AlertEventFeedList | None: + """List alert events across alerts + + Returns a flat list of alert events across all alerts the requester can access. Designed for + periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to + stream forward. + + Args: + include (str | Unset): + pagesize (int | Unset): + pageafter (str | Unset): + sort (ListAlertEventsFeedSort | Unset): + filterkind (ListAlertEventsFeedFilterkind | Unset): + filteraction (ListAlertEventsFeedFilteraction | Unset): + filteralert_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AlertEventFeedList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagesize=pagesize, + pageafter=pageafter, + sort=sort, + filterkind=filterkind, + filteraction=filteraction, + filteralert_id=filteralert_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/alert_fields/list_alert_fields.py b/rootly_sdk/api/alert_fields/list_alert_fields.py index 73d8a746..3215ff00 100644 --- a/rootly_sdk/api/alert_fields/list_alert_fields.py +++ b/rootly_sdk/api/alert_fields/list_alert_fields.py @@ -21,6 +21,14 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -46,6 +54,22 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -93,6 +117,14 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertFieldList]: """List alert fields @@ -110,6 +142,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): sort (str | Unset): Raises: @@ -131,6 +171,14 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, sort=sort, ) @@ -154,6 +202,14 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertFieldList | None: """List alert fields @@ -171,6 +227,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): sort (str | Unset): Raises: @@ -193,6 +257,14 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, sort=sort, ).parsed @@ -210,6 +282,14 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertFieldList]: """List alert fields @@ -227,6 +307,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): sort (str | Unset): Raises: @@ -248,6 +336,14 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, sort=sort, ) @@ -269,6 +365,14 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertFieldList | None: """List alert fields @@ -286,6 +390,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): sort (str | Unset): Raises: @@ -309,6 +421,14 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/alert_groups/list_alert_groups.py b/rootly_sdk/api/alert_groups/list_alert_groups.py index 0b409151..a7d416e0 100644 --- a/rootly_sdk/api/alert_groups/list_alert_groups.py +++ b/rootly_sdk/api/alert_groups/list_alert_groups.py @@ -12,12 +12,36 @@ def _get_kwargs( *, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} params["include"] = include + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -54,6 +78,14 @@ def sync_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> Response[AlertGroupList]: """List alert groups @@ -61,6 +93,14 @@ def sync_detailed( Args: include (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -72,6 +112,14 @@ def sync_detailed( kwargs = _get_kwargs( include=include, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = client.get_httpx_client().request( @@ -85,6 +133,14 @@ def sync( *, client: AuthenticatedClient, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> AlertGroupList | None: """List alert groups @@ -92,6 +148,14 @@ def sync( Args: include (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,6 +168,14 @@ def sync( return sync_detailed( client=client, include=include, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ).parsed @@ -111,6 +183,14 @@ async def asyncio_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> Response[AlertGroupList]: """List alert groups @@ -118,6 +198,14 @@ async def asyncio_detailed( Args: include (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,6 +217,14 @@ async def asyncio_detailed( kwargs = _get_kwargs( include=include, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -140,6 +236,14 @@ async def asyncio( *, client: AuthenticatedClient, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> AlertGroupList | None: """List alert groups @@ -147,6 +251,14 @@ async def asyncio( Args: include (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -160,5 +272,13 @@ async def asyncio( await asyncio_detailed( client=client, include=include, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) ).parsed diff --git a/rootly_sdk/api/alert_routes/list_alert_routes.py b/rootly_sdk/api/alert_routes/list_alert_routes.py index 5bc4f2e3..45ccfeeb 100644 --- a/rootly_sdk/api/alert_routes/list_alert_routes.py +++ b/rootly_sdk/api/alert_routes/list_alert_routes.py @@ -16,6 +16,14 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -29,6 +37,22 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -79,6 +103,14 @@ def sync_detailed( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertRouteList | ErrorsList]: """List alert routes @@ -92,6 +124,14 @@ def sync_detailed( pagesize (int | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -107,6 +147,14 @@ def sync_detailed( pagesize=pagesize, filtersearch=filtersearch, filtername=filtername, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) @@ -124,6 +172,14 @@ def sync( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertRouteList | ErrorsList | None: """List alert routes @@ -137,6 +193,14 @@ def sync( pagesize (int | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -153,6 +217,14 @@ def sync( pagesize=pagesize, filtersearch=filtersearch, filtername=filtername, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ).parsed @@ -164,6 +236,14 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertRouteList | ErrorsList]: """List alert routes @@ -177,6 +257,14 @@ async def asyncio_detailed( pagesize (int | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -192,6 +280,14 @@ async def asyncio_detailed( pagesize=pagesize, filtersearch=filtersearch, filtername=filtername, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) @@ -207,6 +303,14 @@ async def asyncio( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertRouteList | ErrorsList | None: """List alert routes @@ -220,6 +324,14 @@ async def asyncio( pagesize (int | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -237,6 +349,14 @@ async def asyncio( pagesize=pagesize, filtersearch=filtersearch, filtername=filtername, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/alert_routing_rules/list_alert_routing_rules.py b/rootly_sdk/api/alert_routing_rules/list_alert_routing_rules.py index fa385d56..19c93281 100644 --- a/rootly_sdk/api/alert_routing_rules/list_alert_routing_rules.py +++ b/rootly_sdk/api/alert_routing_rules/list_alert_routing_rules.py @@ -20,6 +20,14 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -43,6 +51,22 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -91,6 +115,14 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertRoutingRuleList]: """List alert routing rules @@ -109,6 +141,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -129,6 +169,14 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) @@ -151,6 +199,14 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertRoutingRuleList | None: """List alert routing rules @@ -169,6 +225,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -190,6 +254,14 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ).parsed @@ -206,6 +278,14 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertRoutingRuleList]: """List alert routing rules @@ -224,6 +304,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -244,6 +332,14 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) @@ -264,6 +360,14 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertRoutingRuleList | None: """List alert routing rules @@ -282,6 +386,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -304,6 +416,14 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/alert_sources/list_alerts_sources.py b/rootly_sdk/api/alert_sources/list_alerts_sources.py index c055971e..39744362 100644 --- a/rootly_sdk/api/alert_sources/list_alerts_sources.py +++ b/rootly_sdk/api/alert_sources/list_alerts_sources.py @@ -18,6 +18,7 @@ def _get_kwargs( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -37,6 +38,8 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[enabled]"] = filterenabled + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -81,6 +84,7 @@ def sync_detailed( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertsSourceList]: """List alert sources @@ -95,6 +99,7 @@ def sync_detailed( filterstatuses (str | Unset): filtersource_types (str | Unset): filtername (str | Unset): + filterenabled (bool | Unset): sort (str | Unset): Raises: @@ -113,6 +118,7 @@ def sync_detailed( filterstatuses=filterstatuses, filtersource_types=filtersource_types, filtername=filtername, + filterenabled=filterenabled, sort=sort, ) @@ -133,6 +139,7 @@ def sync( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertsSourceList | None: """List alert sources @@ -147,6 +154,7 @@ def sync( filterstatuses (str | Unset): filtersource_types (str | Unset): filtername (str | Unset): + filterenabled (bool | Unset): sort (str | Unset): Raises: @@ -166,6 +174,7 @@ def sync( filterstatuses=filterstatuses, filtersource_types=filtersource_types, filtername=filtername, + filterenabled=filterenabled, sort=sort, ).parsed @@ -180,6 +189,7 @@ async def asyncio_detailed( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertsSourceList]: """List alert sources @@ -194,6 +204,7 @@ async def asyncio_detailed( filterstatuses (str | Unset): filtersource_types (str | Unset): filtername (str | Unset): + filterenabled (bool | Unset): sort (str | Unset): Raises: @@ -212,6 +223,7 @@ async def asyncio_detailed( filterstatuses=filterstatuses, filtersource_types=filtersource_types, filtername=filtername, + filterenabled=filterenabled, sort=sort, ) @@ -230,6 +242,7 @@ async def asyncio( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertsSourceList | None: """List alert sources @@ -244,6 +257,7 @@ async def asyncio( filterstatuses (str | Unset): filtersource_types (str | Unset): filtername (str | Unset): + filterenabled (bool | Unset): sort (str | Unset): Raises: @@ -264,6 +278,7 @@ async def asyncio( filterstatuses=filterstatuses, filtersource_types=filtersource_types, filtername=filtername, + filterenabled=filterenabled, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py index e29c4393..a4455d0f 100644 --- a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py +++ b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py @@ -20,6 +20,10 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -43,6 +47,14 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -89,6 +101,10 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertUrgencyList]: """List alert urgencies @@ -105,6 +121,10 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -125,6 +145,10 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) @@ -147,6 +171,10 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertUrgencyList | None: """List alert urgencies @@ -163,6 +191,10 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -184,6 +216,10 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ).parsed @@ -200,6 +236,10 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AlertUrgencyList]: """List alert urgencies @@ -216,6 +256,10 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -236,6 +280,10 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) @@ -256,6 +304,10 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AlertUrgencyList | None: """List alert urgencies @@ -272,6 +324,10 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -294,6 +350,10 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/alerts/escalate_alert.py b/rootly_sdk/api/alerts/escalate_alert.py new file mode 100644 index 00000000..c4a33380 --- /dev/null +++ b/rootly_sdk/api/alerts/escalate_alert.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.alert_response import AlertResponse +from ...models.errors_list import ErrorsList +from ...models.escalate_alert import EscalateAlert +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + id: str, + *, + body: EscalateAlert | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/alerts/{id}/escalate".format( + id=quote(str(id), safe=""), + ), + } + + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = AlertResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ErrorsList.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, + body: EscalateAlert | Unset = UNSET, +) -> Response[AlertResponse | ErrorsList]: + """Escalates an alert + + Escalates a specific alert to the next or specified level in its escalation policy + + Args: + id (str): + body (EscalateAlert | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AlertResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, + body: EscalateAlert | Unset = UNSET, +) -> AlertResponse | ErrorsList | None: + """Escalates an alert + + Escalates a specific alert to the next or specified level in its escalation policy + + Args: + id (str): + body (EscalateAlert | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AlertResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: EscalateAlert | Unset = UNSET, +) -> Response[AlertResponse | ErrorsList]: + """Escalates an alert + + Escalates a specific alert to the next or specified level in its escalation policy + + Args: + id (str): + body (EscalateAlert | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AlertResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + body: EscalateAlert | Unset = UNSET, +) -> AlertResponse | ErrorsList | None: + """Escalates an alert + + Escalates a specific alert to the next or specified level in its escalation policy + + Args: + id (str): + body (EscalateAlert | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AlertResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/get_receipt.py b/rootly_sdk/api/alerts/get_receipt.py new file mode 100644 index 00000000..0cd00675 --- /dev/null +++ b/rootly_sdk/api/alerts/get_receipt.py @@ -0,0 +1,167 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.receipt import Receipt +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/alerts/receipts/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | Receipt | None: + if response.status_code == 200: + response_200 = Receipt.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = cast(Any, None) + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | Receipt]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any | Receipt]: + """Get a receipt + + Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) + failure reason and referenced resource. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | Receipt] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> Any | Receipt | None: + """Get a receipt + + Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) + failure reason and referenced resource. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | Receipt + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any | Receipt]: + """Get a receipt + + Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) + failure reason and referenced resource. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | Receipt] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> Any | Receipt | None: + """Get a receipt + + Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) + failure reason and referenced resource. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | Receipt + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/list_alerts.py b/rootly_sdk/api/alerts/list_alerts.py index 02d855d6..6e36af8d 100644 --- a/rootly_sdk/api/alerts/list_alerts.py +++ b/rootly_sdk/api/alerts/list_alerts.py @@ -31,6 +31,34 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, @@ -80,6 +108,62 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[updated_at][gt]"] = filterupdated_atgt + + params["filter[updated_at][gte]"] = filterupdated_atgte + + params["filter[updated_at][lt]"] = filterupdated_atlt + + params["filter[updated_at][lte]"] = filterupdated_atlte + + params["filter[status][eq]"] = filterstatuseq + + params["filter[status][not_eq]"] = filterstatusnot_eq + + params["filter[status][in]"] = filterstatusin + + params["filter[status][not_in]"] = filterstatusnot_in + + params["filter[source][eq]"] = filtersourceeq + + params["filter[source][not_eq]"] = filtersourcenot_eq + + params["filter[source][in]"] = filtersourcein + + params["filter[source][not_in]"] = filtersourcenot_in + + params["filter[services][eq]"] = filterserviceseq + + params["filter[services][not_eq]"] = filterservicesnot_eq + + params["filter[services][in]"] = filterservicesin + + params["filter[services][not_in]"] = filterservicesnot_in + + params["filter[groups][eq]"] = filtergroupseq + + params["filter[groups][not_eq]"] = filtergroupsnot_eq + + params["filter[groups][in]"] = filtergroupsin + + params["filter[groups][not_in]"] = filtergroupsnot_in + + params["filter[environments][eq]"] = filterenvironmentseq + + params["filter[environments][not_eq]"] = filterenvironmentsnot_eq + + params["filter[environments][in]"] = filterenvironmentsin + + params["filter[environments][not_in]"] = filterenvironmentsnot_in + + params["filter[labels][eq]"] = filterlabelseq + + params["filter[labels][not_eq]"] = filterlabelsnot_eq + + params["filter[labels][in]"] = filterlabelsin + + params["filter[labels][not_in]"] = filterlabelsnot_in + params["page[after]"] = pageafter params["page[number]"] = pagenumber @@ -140,6 +224,34 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, @@ -168,6 +280,34 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterupdated_atgt (str | Unset): + filterupdated_atgte (str | Unset): + filterupdated_atlt (str | Unset): + filterupdated_atlte (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filtergroupseq (str | Unset): + filtergroupsnot_eq (str | Unset): + filtergroupsin (str | Unset): + filtergroupsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -200,6 +340,34 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filtergroupseq=filtergroupseq, + filtergroupsnot_eq=filtergroupsnot_eq, + filtergroupsin=filtergroupsin, + filtergroupsnot_in=filtergroupsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, @@ -234,6 +402,34 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, @@ -262,6 +458,34 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterupdated_atgt (str | Unset): + filterupdated_atgte (str | Unset): + filterupdated_atlt (str | Unset): + filterupdated_atlte (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filtergroupseq (str | Unset): + filtergroupsnot_eq (str | Unset): + filtergroupsin (str | Unset): + filtergroupsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -295,6 +519,34 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filtergroupseq=filtergroupseq, + filtergroupsnot_eq=filtergroupsnot_eq, + filtergroupsin=filtergroupsin, + filtergroupsnot_in=filtergroupsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, @@ -323,6 +575,34 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, @@ -351,6 +631,34 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterupdated_atgt (str | Unset): + filterupdated_atgte (str | Unset): + filterupdated_atlt (str | Unset): + filterupdated_atlte (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filtergroupseq (str | Unset): + filtergroupsnot_eq (str | Unset): + filtergroupsin (str | Unset): + filtergroupsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -383,6 +691,34 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filtergroupseq=filtergroupseq, + filtergroupsnot_eq=filtergroupsnot_eq, + filtergroupsin=filtergroupsin, + filtergroupsnot_in=filtergroupsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, @@ -415,6 +751,34 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, @@ -443,6 +807,34 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterupdated_atgt (str | Unset): + filterupdated_atgte (str | Unset): + filterupdated_atlt (str | Unset): + filterupdated_atlte (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filtergroupseq (str | Unset): + filtergroupsnot_eq (str | Unset): + filtergroupsin (str | Unset): + filtergroupsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -477,6 +869,34 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filtergroupseq=filtergroupseq, + filtergroupsnot_eq=filtergroupsnot_eq, + filtergroupsin=filtergroupsin, + filtergroupsnot_in=filtergroupsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, diff --git a/rootly_sdk/api/alerts/snooze_alert.py b/rootly_sdk/api/alerts/snooze_alert.py new file mode 100644 index 00000000..cf592ccd --- /dev/null +++ b/rootly_sdk/api/alerts/snooze_alert.py @@ -0,0 +1,200 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.alert_response import AlertResponse +from ...models.errors_list import ErrorsList +from ...models.snooze_alert import SnoozeAlert +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: SnoozeAlert, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/alerts/{id}/snooze".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = AlertResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = ErrorsList.from_dict(response.json()) + + return response_400 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, + body: SnoozeAlert, +) -> Response[AlertResponse | ErrorsList]: + """Snoozes an alert + + Snoozes a specific alert by id, extending the acknowledgment timeout + + Args: + id (str): + body (SnoozeAlert): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AlertResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, + body: SnoozeAlert, +) -> AlertResponse | ErrorsList | None: + """Snoozes an alert + + Snoozes a specific alert by id, extending the acknowledgment timeout + + Args: + id (str): + body (SnoozeAlert): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AlertResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: SnoozeAlert, +) -> Response[AlertResponse | ErrorsList]: + """Snoozes an alert + + Snoozes a specific alert by id, extending the acknowledgment timeout + + Args: + id (str): + body (SnoozeAlert): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AlertResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + body: SnoozeAlert, +) -> AlertResponse | ErrorsList | None: + """Snoozes an alert + + Snoozes a specific alert by id, extending the acknowledgment timeout + + Args: + id (str): + body (SnoozeAlert): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AlertResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/audits/list_audits.py b/rootly_sdk/api/audits/list_audits.py index d4d6bab5..fce7f754 100644 --- a/rootly_sdk/api/audits/list_audits.py +++ b/rootly_sdk/api/audits/list_audits.py @@ -22,6 +22,22 @@ def _get_kwargs( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -49,6 +65,38 @@ def _get_kwargs( params["filter[item_type]"] = filteritem_type + params["filter[user_id][eq]"] = filteruser_ideq + + params["filter[user_id][not_eq]"] = filteruser_idnot_eq + + params["filter[user_id][in]"] = filteruser_idin + + params["filter[user_id][not_in]"] = filteruser_idnot_in + + params["filter[api_key_id][eq]"] = filterapi_key_ideq + + params["filter[api_key_id][not_eq]"] = filterapi_key_idnot_eq + + params["filter[api_key_id][in]"] = filterapi_key_idin + + params["filter[api_key_id][not_in]"] = filterapi_key_idnot_in + + params["filter[source][eq]"] = filtersourceeq + + params["filter[source][not_eq]"] = filtersourcenot_eq + + params["filter[source][in]"] = filtersourcein + + params["filter[source][not_in]"] = filtersourcenot_in + + params["filter[item_type][eq]"] = filteritem_typeeq + + params["filter[item_type][not_eq]"] = filteritem_typenot_eq + + params["filter[item_type][in]"] = filteritem_typein + + params["filter[item_type][not_in]"] = filteritem_typenot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -97,6 +145,22 @@ def sync_detailed( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AuditsList]: """List audits @@ -115,6 +179,22 @@ def sync_detailed( filterapi_key_id (str | Unset): filtersource (str | Unset): filteritem_type (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterapi_key_ideq (str | Unset): + filterapi_key_idnot_eq (str | Unset): + filterapi_key_idin (str | Unset): + filterapi_key_idnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filteritem_typeeq (str | Unset): + filteritem_typenot_eq (str | Unset): + filteritem_typein (str | Unset): + filteritem_typenot_in (str | Unset): sort (str | Unset): Raises: @@ -137,6 +217,22 @@ def sync_detailed( filterapi_key_id=filterapi_key_id, filtersource=filtersource, filteritem_type=filteritem_type, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterapi_key_ideq=filterapi_key_ideq, + filterapi_key_idnot_eq=filterapi_key_idnot_eq, + filterapi_key_idin=filterapi_key_idin, + filterapi_key_idnot_in=filterapi_key_idnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filteritem_typeeq=filteritem_typeeq, + filteritem_typenot_eq=filteritem_typenot_eq, + filteritem_typein=filteritem_typein, + filteritem_typenot_in=filteritem_typenot_in, sort=sort, ) @@ -161,6 +257,22 @@ def sync( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AuditsList | None: """List audits @@ -179,6 +291,22 @@ def sync( filterapi_key_id (str | Unset): filtersource (str | Unset): filteritem_type (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterapi_key_ideq (str | Unset): + filterapi_key_idnot_eq (str | Unset): + filterapi_key_idin (str | Unset): + filterapi_key_idnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filteritem_typeeq (str | Unset): + filteritem_typenot_eq (str | Unset): + filteritem_typein (str | Unset): + filteritem_typenot_in (str | Unset): sort (str | Unset): Raises: @@ -202,6 +330,22 @@ def sync( filterapi_key_id=filterapi_key_id, filtersource=filtersource, filteritem_type=filteritem_type, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterapi_key_ideq=filterapi_key_ideq, + filterapi_key_idnot_eq=filterapi_key_idnot_eq, + filterapi_key_idin=filterapi_key_idin, + filterapi_key_idnot_in=filterapi_key_idnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filteritem_typeeq=filteritem_typeeq, + filteritem_typenot_eq=filteritem_typenot_eq, + filteritem_typein=filteritem_typein, + filteritem_typenot_in=filteritem_typenot_in, sort=sort, ).parsed @@ -220,6 +364,22 @@ async def asyncio_detailed( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[AuditsList]: """List audits @@ -238,6 +398,22 @@ async def asyncio_detailed( filterapi_key_id (str | Unset): filtersource (str | Unset): filteritem_type (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterapi_key_ideq (str | Unset): + filterapi_key_idnot_eq (str | Unset): + filterapi_key_idin (str | Unset): + filterapi_key_idnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filteritem_typeeq (str | Unset): + filteritem_typenot_eq (str | Unset): + filteritem_typein (str | Unset): + filteritem_typenot_in (str | Unset): sort (str | Unset): Raises: @@ -260,6 +436,22 @@ async def asyncio_detailed( filterapi_key_id=filterapi_key_id, filtersource=filtersource, filteritem_type=filteritem_type, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterapi_key_ideq=filterapi_key_ideq, + filterapi_key_idnot_eq=filterapi_key_idnot_eq, + filterapi_key_idin=filterapi_key_idin, + filterapi_key_idnot_in=filterapi_key_idnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filteritem_typeeq=filteritem_typeeq, + filteritem_typenot_eq=filteritem_typenot_eq, + filteritem_typein=filteritem_typein, + filteritem_typenot_in=filteritem_typenot_in, sort=sort, ) @@ -282,6 +474,22 @@ async def asyncio( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> AuditsList | None: """List audits @@ -300,6 +508,22 @@ async def asyncio( filterapi_key_id (str | Unset): filtersource (str | Unset): filteritem_type (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterapi_key_ideq (str | Unset): + filterapi_key_idnot_eq (str | Unset): + filterapi_key_idin (str | Unset): + filterapi_key_idnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filteritem_typeeq (str | Unset): + filteritem_typenot_eq (str | Unset): + filteritem_typein (str | Unset): + filteritem_typenot_in (str | Unset): sort (str | Unset): Raises: @@ -324,6 +548,22 @@ async def asyncio( filterapi_key_id=filterapi_key_id, filtersource=filtersource, filteritem_type=filteritem_type, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterapi_key_ideq=filterapi_key_ideq, + filterapi_key_idnot_eq=filterapi_key_idnot_eq, + filterapi_key_idin=filterapi_key_idin, + filterapi_key_idnot_in=filterapi_key_idnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filteritem_typeeq=filteritem_typeeq, + filteritem_typenot_eq=filteritem_typenot_eq, + filteritem_typein=filteritem_typein, + filteritem_typenot_in=filteritem_typenot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py b/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py new file mode 100644 index 00000000..2e7b988d --- /dev/null +++ b/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_destroy_catalog_entities_response import BulkDestroyCatalogEntitiesResponse +from ...models.bulk_destroy_catalog_entities_type_0 import BulkDestroyCatalogEntitiesType0 +from ...models.bulk_destroy_catalog_entities_type_1 import BulkDestroyCatalogEntitiesType1 +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + catalog_id: str, + *, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/catalogs/{catalog_id}/entities/bulk_delete".format( + catalog_id=quote(str(catalog_id), safe=""), + ), + } + + if isinstance(body, BulkDestroyCatalogEntitiesType0): + _kwargs["json"] = body.to_dict() + else: + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyCatalogEntitiesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkDestroyCatalogEntitiesResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyCatalogEntitiesResponse.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, +) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: + """Bulk delete Catalog Entities + + Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + catalog_id (str): + body (BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific entities) or + managed_by (prune all managed entities not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + catalog_id=catalog_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, +) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: + """Bulk delete Catalog Entities + + Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + catalog_id (str): + body (BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific entities) or + managed_by (prune all managed entities not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList + """ + + return sync_detailed( + catalog_id=catalog_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, +) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: + """Bulk delete Catalog Entities + + Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + catalog_id (str): + body (BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific entities) or + managed_by (prune all managed entities not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + catalog_id=catalog_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, +) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: + """Bulk delete Catalog Entities + + Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + catalog_id (str): + body (BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific entities) or + managed_by (prune all managed entities not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList + """ + + return ( + await asyncio_detailed( + catalog_id=catalog_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py b/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py new file mode 100644 index 00000000..586bef40 --- /dev/null +++ b/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py @@ -0,0 +1,216 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_upsert_catalog_entities import BulkUpsertCatalogEntities +from ...models.bulk_upsert_catalog_entities_error import BulkUpsertCatalogEntitiesError +from ...models.bulk_upsert_catalog_entities_response import BulkUpsertCatalogEntitiesResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + catalog_id: str, + *, + body: BulkUpsertCatalogEntities, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/catalogs/{catalog_id}/entities/bulk_upsert".format( + catalog_id=quote(str(catalog_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertCatalogEntitiesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkUpsertCatalogEntitiesError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertCatalogEntitiesError.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkUpsertCatalogEntities, +) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: + """Bulk upsert Catalog Entities + + Create or update multiple catalog entities by external_id. Only attributes present in the payload + are written (managed-fields semantics). Transactional: all succeed or all fail. + + Args: + catalog_id (str): + body (BulkUpsertCatalogEntities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + catalog_id=catalog_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkUpsertCatalogEntities, +) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: + """Bulk upsert Catalog Entities + + Create or update multiple catalog entities by external_id. Only attributes present in the payload + are written (managed-fields semantics). Transactional: all succeed or all fail. + + Args: + catalog_id (str): + body (BulkUpsertCatalogEntities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList + """ + + return sync_detailed( + catalog_id=catalog_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkUpsertCatalogEntities, +) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: + """Bulk upsert Catalog Entities + + Create or update multiple catalog entities by external_id. Only attributes present in the payload + are written (managed-fields semantics). Transactional: all succeed or all fail. + + Args: + catalog_id (str): + body (BulkUpsertCatalogEntities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + catalog_id=catalog_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkUpsertCatalogEntities, +) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: + """Bulk upsert Catalog Entities + + Create or update multiple catalog entities by external_id. Only attributes present in the payload + are written (managed-fields semantics). Transactional: all succeed or all fail. + + Args: + catalog_id (str): + body (BulkUpsertCatalogEntities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + catalog_id=catalog_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/list_catalog_entities.py b/rootly_sdk/api/catalog_entities/list_catalog_entities.py index f9685565..82ca16de 100644 --- a/rootly_sdk/api/catalog_entities/list_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/list_catalog_entities.py @@ -22,10 +22,25 @@ def _get_kwargs( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -52,6 +67,12 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[backstage_id]"] = filterbackstage_id + + params["filter[external_id]"] = filterexternal_id + + params["filter[managed_by]"] = filtermanaged_by + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -60,6 +81,30 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[managed_by][eq]"] = filtermanaged_byeq + + params["filter[managed_by][not_eq]"] = filtermanaged_bynot_eq + + params["filter[managed_by][in]"] = filtermanaged_byin + + params["filter[managed_by][not_in]"] = filtermanaged_bynot_in + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -105,10 +150,25 @@ def sync_detailed( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> Response[CatalogEntityList]: """List Catalog Entities @@ -123,10 +183,25 @@ def sync_detailed( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterbackstage_id (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -145,10 +220,25 @@ def sync_detailed( filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, + filterbackstage_id=filterbackstage_id, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) response = client.get_httpx_client().request( @@ -169,10 +259,25 @@ def sync( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> CatalogEntityList | None: """List Catalog Entities @@ -187,10 +292,25 @@ def sync( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterbackstage_id (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -210,10 +330,25 @@ def sync( filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, + filterbackstage_id=filterbackstage_id, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ).parsed @@ -228,10 +363,25 @@ async def asyncio_detailed( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> Response[CatalogEntityList]: """List Catalog Entities @@ -246,10 +396,25 @@ async def asyncio_detailed( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterbackstage_id (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -268,10 +433,25 @@ async def asyncio_detailed( filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, + filterbackstage_id=filterbackstage_id, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -290,10 +470,25 @@ async def asyncio( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> CatalogEntityList | None: """List Catalog Entities @@ -308,10 +503,25 @@ async def asyncio( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterbackstage_id (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -332,9 +542,24 @@ async def asyncio( filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, + filterbackstage_id=filterbackstage_id, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) ).parsed diff --git a/rootly_sdk/api/catalogs/list_catalogs.py b/rootly_sdk/api/catalogs/list_catalogs.py index 8305bec5..47f483e2 100644 --- a/rootly_sdk/api/catalogs/list_catalogs.py +++ b/rootly_sdk/api/catalogs/list_catalogs.py @@ -20,10 +20,24 @@ def _get_kwargs( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -50,6 +64,10 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[external_id]"] = filterexternal_id + + params["filter[managed_by]"] = filtermanaged_by + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -58,6 +76,30 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[managed_by][eq]"] = filtermanaged_byeq + + params["filter[managed_by][not_eq]"] = filtermanaged_bynot_eq + + params["filter[managed_by][in]"] = filtermanaged_byin + + params["filter[managed_by][not_in]"] = filtermanaged_bynot_in + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -100,10 +142,24 @@ def sync_detailed( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> Response[CatalogList]: """List catalogs @@ -117,10 +173,24 @@ def sync_detailed( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -138,10 +208,24 @@ def sync_detailed( filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) response = client.get_httpx_client().request( @@ -161,10 +245,24 @@ def sync( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> CatalogList | None: """List catalogs @@ -178,10 +276,24 @@ def sync( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -200,10 +312,24 @@ def sync( filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ).parsed @@ -217,10 +343,24 @@ async def asyncio_detailed( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> Response[CatalogList]: """List catalogs @@ -234,10 +374,24 @@ async def asyncio_detailed( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -255,10 +409,24 @@ async def asyncio_detailed( filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -276,10 +444,24 @@ async def asyncio( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, ) -> CatalogList | None: """List catalogs @@ -293,10 +475,24 @@ async def asyncio( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -316,9 +512,23 @@ async def asyncio( filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) ).parsed diff --git a/rootly_sdk/api/causes/list_causes.py b/rootly_sdk/api/causes/list_causes.py index 4c7ee7f4..183d88e9 100644 --- a/rootly_sdk/api/causes/list_causes.py +++ b/rootly_sdk/api/causes/list_causes.py @@ -21,6 +21,14 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -45,6 +53,22 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -90,6 +114,14 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> Response[CauseList]: """List causes @@ -106,6 +138,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,6 +166,14 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = client.get_httpx_client().request( @@ -148,6 +196,14 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> CauseList | None: """List causes @@ -164,6 +220,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -185,6 +249,14 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ).parsed @@ -201,6 +273,14 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> Response[CauseList]: """List causes @@ -217,6 +297,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -237,6 +325,14 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -257,6 +353,14 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> CauseList | None: """List causes @@ -273,6 +377,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -295,5 +407,13 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) ).parsed diff --git a/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py b/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py index a31e3002..3d059a21 100644 --- a/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py +++ b/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py @@ -25,6 +25,22 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -61,6 +77,38 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[label][eq]"] = filterlabeleq + + params["filter[label][not_eq]"] = filterlabelnot_eq + + params["filter[label][in]"] = filterlabelin + + params["filter[label][not_in]"] = filterlabelnot_in + + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + + params["filter[enabled][eq]"] = filterenabledeq + + params["filter[enabled][not_eq]"] = filterenablednot_eq + + params["filter[enabled][in]"] = filterenabledin + + params["filter[enabled][not_in]"] = filterenablednot_in + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -108,6 +156,22 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> Response[CustomFieldList]: """[DEPRECATED] List Custom Fields @@ -126,6 +190,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filterlabeleq (str | Unset): + filterlabelnot_eq (str | Unset): + filterlabelin (str | Unset): + filterlabelnot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,6 +228,22 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filterlabeleq=filterlabeleq, + filterlabelnot_eq=filterlabelnot_eq, + filterlabelin=filterlabelin, + filterlabelnot_in=filterlabelnot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) response = client.get_httpx_client().request( @@ -172,6 +268,22 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> CustomFieldList | None: """[DEPRECATED] List Custom Fields @@ -190,6 +302,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filterlabeleq (str | Unset): + filterlabelnot_eq (str | Unset): + filterlabelin (str | Unset): + filterlabelnot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -213,6 +341,22 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filterlabeleq=filterlabeleq, + filterlabelnot_eq=filterlabelnot_eq, + filterlabelin=filterlabelin, + filterlabelnot_in=filterlabelnot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ).parsed @@ -231,6 +375,22 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> Response[CustomFieldList]: """[DEPRECATED] List Custom Fields @@ -249,6 +409,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filterlabeleq (str | Unset): + filterlabelnot_eq (str | Unset): + filterlabelin (str | Unset): + filterlabelnot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -271,6 +447,22 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filterlabeleq=filterlabeleq, + filterlabelnot_eq=filterlabelnot_eq, + filterlabelin=filterlabelin, + filterlabelnot_in=filterlabelnot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -293,6 +485,22 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> CustomFieldList | None: """[DEPRECATED] List Custom Fields @@ -311,6 +519,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filterlabeleq (str | Unset): + filterlabelnot_eq (str | Unset): + filterlabelin (str | Unset): + filterlabelnot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -335,5 +559,21 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filterlabeleq=filterlabeleq, + filterlabelnot_eq=filterlabelnot_eq, + filterlabelin=filterlabelin, + filterlabelnot_in=filterlabelnot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) ).parsed diff --git a/rootly_sdk/api/environments/bulk_delete_environments.py b/rootly_sdk/api/environments/bulk_delete_environments.py new file mode 100644 index 00000000..7a889981 --- /dev/null +++ b/rootly_sdk/api/environments/bulk_delete_environments.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_destroy_environments_response import BulkDestroyEnvironmentsResponse +from ...models.bulk_destroy_environments_type_0 import BulkDestroyEnvironmentsType0 +from ...models.bulk_destroy_environments_type_1 import BulkDestroyEnvironmentsType1 +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + *, + body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/environments/bulk_delete", + } + + if isinstance(body, BulkDestroyEnvironmentsType0): + _kwargs["json"] = body.to_dict() + else: + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyEnvironmentsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkDestroyEnvironmentsResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyEnvironmentsResponse.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, +) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: + """Bulk delete Environments + + Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1): Two mutually exclusive + modes. Pass exactly one of: external_ids (delete specific records) or managed_by (prune + all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, +) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: + """Bulk delete Environments + + Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1): Two mutually exclusive + modes. Pass exactly one of: external_ids (delete specific records) or managed_by (prune + all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, +) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: + """Bulk delete Environments + + Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1): Two mutually exclusive + modes. Pass exactly one of: external_ids (delete specific records) or managed_by (prune + all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, +) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: + """Bulk delete Environments + + Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1): Two mutually exclusive + modes. Pass exactly one of: external_ids (delete specific records) or managed_by (prune + all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/environments/bulk_upsert_environments.py b/rootly_sdk/api/environments/bulk_upsert_environments.py new file mode 100644 index 00000000..32b2cd6c --- /dev/null +++ b/rootly_sdk/api/environments/bulk_upsert_environments.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_upsert_environments import BulkUpsertEnvironments +from ...models.bulk_upsert_environments_error import BulkUpsertEnvironmentsError +from ...models.bulk_upsert_environments_response import BulkUpsertEnvironmentsResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + *, + body: BulkUpsertEnvironments, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/environments/bulk_upsert", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertEnvironmentsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkUpsertEnvironmentsError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertEnvironmentsError.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertEnvironments, +) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: + """Bulk upsert Environments + + Create or update multiple environments by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertEnvironments): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BulkUpsertEnvironments, +) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: + """Bulk upsert Environments + + Create or update multiple environments by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertEnvironments): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertEnvironments, +) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: + """Bulk upsert Environments + + Create or update multiple environments by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertEnvironments): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BulkUpsertEnvironments, +) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: + """Bulk upsert Environments + + Create or update multiple environments by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertEnvironments): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/environments/list_environments.py b/rootly_sdk/api/environments/list_environments.py index 00b27f3b..20855cd6 100644 --- a/rootly_sdk/api/environments/list_environments.py +++ b/rootly_sdk/api/environments/list_environments.py @@ -22,6 +22,18 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -49,6 +61,30 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[color][eq]"] = filtercoloreq + + params["filter[color][not_eq]"] = filtercolornot_eq + + params["filter[color][in]"] = filtercolorin + + params["filter[color][not_in]"] = filtercolornot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -97,6 +133,18 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[EnvironmentList]: """List environments @@ -115,6 +163,18 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -137,6 +197,18 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) @@ -161,6 +233,18 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> EnvironmentList | None: """List environments @@ -179,6 +263,18 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -202,6 +298,18 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ).parsed @@ -220,6 +328,18 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[EnvironmentList]: """List environments @@ -238,6 +358,18 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -260,6 +392,18 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) @@ -282,6 +426,18 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> EnvironmentList | None: """List environments @@ -300,6 +456,18 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -324,6 +492,18 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/escalation_paths/list_escalation_paths.py b/rootly_sdk/api/escalation_paths/list_escalation_paths.py index 9f958994..43a4fcd8 100644 --- a/rootly_sdk/api/escalation_paths/list_escalation_paths.py +++ b/rootly_sdk/api/escalation_paths/list_escalation_paths.py @@ -7,6 +7,9 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.escalation_policy_path_list import EscalationPolicyPathList +from ...models.list_escalation_paths_filterpath_type import ( + ListEscalationPathsFilterpathType, +) from ...models.list_escalation_paths_include import ListEscalationPathsInclude from ...types import UNSET, Response, Unset @@ -15,6 +18,7 @@ def _get_kwargs( escalation_policy_id: str, *, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> dict[str, Any]: @@ -27,6 +31,12 @@ def _get_kwargs( params["include"] = json_include + json_filterpath_type: str | Unset = UNSET + if not isinstance(filterpath_type, Unset): + json_filterpath_type = filterpath_type + + params["filter[path_type]"] = json_filterpath_type + params["page[number]"] = pagenumber params["page[size]"] = pagesize @@ -74,6 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyPathList]: @@ -84,6 +95,7 @@ def sync_detailed( Args: escalation_policy_id (str): include (ListEscalationPathsInclude | Unset): + filterpath_type (ListEscalationPathsFilterpathType | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -98,6 +110,7 @@ def sync_detailed( kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, include=include, + filterpath_type=filterpath_type, pagenumber=pagenumber, pagesize=pagesize, ) @@ -114,6 +127,7 @@ def sync( *, client: AuthenticatedClient, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> EscalationPolicyPathList | None: @@ -124,6 +138,7 @@ def sync( Args: escalation_policy_id (str): include (ListEscalationPathsInclude | Unset): + filterpath_type (ListEscalationPathsFilterpathType | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -139,6 +154,7 @@ def sync( escalation_policy_id=escalation_policy_id, client=client, include=include, + filterpath_type=filterpath_type, pagenumber=pagenumber, pagesize=pagesize, ).parsed @@ -149,6 +165,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyPathList]: @@ -159,6 +176,7 @@ async def asyncio_detailed( Args: escalation_policy_id (str): include (ListEscalationPathsInclude | Unset): + filterpath_type (ListEscalationPathsFilterpathType | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -173,6 +191,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, include=include, + filterpath_type=filterpath_type, pagenumber=pagenumber, pagesize=pagesize, ) @@ -187,6 +206,7 @@ async def asyncio( *, client: AuthenticatedClient, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> EscalationPolicyPathList | None: @@ -197,6 +217,7 @@ async def asyncio( Args: escalation_policy_id (str): include (ListEscalationPathsInclude | Unset): + filterpath_type (ListEscalationPathsFilterpathType | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -213,6 +234,7 @@ async def asyncio( escalation_policy_id=escalation_policy_id, client=client, include=include, + filterpath_type=filterpath_type, pagenumber=pagenumber, pagesize=pagesize, ) diff --git a/rootly_sdk/api/escalation_policies/list_escalation_policies.py b/rootly_sdk/api/escalation_policies/list_escalation_policies.py index f30361c9..28e01db1 100644 --- a/rootly_sdk/api/escalation_policies/list_escalation_policies.py +++ b/rootly_sdk/api/escalation_policies/list_escalation_policies.py @@ -17,10 +17,19 @@ def _get_kwargs( include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> dict[str, Any]: @@ -37,6 +46,8 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[team_ids]"] = filterteam_ids + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -45,6 +56,22 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[team_ids][eq]"] = filterteam_idseq + + params["filter[team_ids][not_eq]"] = filterteam_idsnot_eq + + params["filter[team_ids][in]"] = filterteam_idsin + + params["filter[team_ids][not_in]"] = filterteam_idsnot_in + params["page[number]"] = pagenumber params["page[size]"] = pagesize @@ -89,10 +116,19 @@ def sync_detailed( include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyList]: @@ -104,10 +140,19 @@ def sync_detailed( include (ListEscalationPoliciesInclude | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterteam_ids (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -123,10 +168,19 @@ def sync_detailed( include=include, filtersearch=filtersearch, filtername=filtername, + filterteam_ids=filterteam_ids, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, pagenumber=pagenumber, pagesize=pagesize, ) @@ -144,10 +198,19 @@ def sync( include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> EscalationPolicyList | None: @@ -159,10 +222,19 @@ def sync( include (ListEscalationPoliciesInclude | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterteam_ids (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -179,10 +251,19 @@ def sync( include=include, filtersearch=filtersearch, filtername=filtername, + filterteam_ids=filterteam_ids, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, pagenumber=pagenumber, pagesize=pagesize, ).parsed @@ -194,10 +275,19 @@ async def asyncio_detailed( include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyList]: @@ -209,10 +299,19 @@ async def asyncio_detailed( include (ListEscalationPoliciesInclude | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterteam_ids (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -228,10 +327,19 @@ async def asyncio_detailed( include=include, filtersearch=filtersearch, filtername=filtername, + filterteam_ids=filterteam_ids, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, pagenumber=pagenumber, pagesize=pagesize, ) @@ -247,10 +355,19 @@ async def asyncio( include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> EscalationPolicyList | None: @@ -262,10 +379,19 @@ async def asyncio( include (ListEscalationPoliciesInclude | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterteam_ids (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -283,10 +409,19 @@ async def asyncio( include=include, filtersearch=filtersearch, filtername=filtername, + filterteam_ids=filterteam_ids, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, pagenumber=pagenumber, pagesize=pagesize, ) diff --git a/rootly_sdk/api/form_field_placements/update_form_field_placement.py b/rootly_sdk/api/form_field_placements/update_form_field_placement.py index 441e2ba2..47e84275 100644 --- a/rootly_sdk/api/form_field_placements/update_form_field_placement.py +++ b/rootly_sdk/api/form_field_placements/update_form_field_placement.py @@ -47,6 +47,11 @@ def _parse_response( return response_404 + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: diff --git a/rootly_sdk/api/form_field_positions/create_form_field_position.py b/rootly_sdk/api/form_field_positions/create_form_field_position.py index efd7a94f..baa834ef 100644 --- a/rootly_sdk/api/form_field_positions/create_form_field_position.py +++ b/rootly_sdk/api/form_field_positions/create_form_field_position.py @@ -47,6 +47,11 @@ def _parse_response( return response_401 + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: diff --git a/rootly_sdk/api/form_field_positions/update_form_field_position.py b/rootly_sdk/api/form_field_positions/update_form_field_position.py index 3500e73b..71c94ee0 100644 --- a/rootly_sdk/api/form_field_positions/update_form_field_position.py +++ b/rootly_sdk/api/form_field_positions/update_form_field_position.py @@ -47,6 +47,11 @@ def _parse_response( return response_404 + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: diff --git a/rootly_sdk/api/form_fields/list_form_fields.py b/rootly_sdk/api/form_fields/list_form_fields.py index 71e05703..737edc91 100644 --- a/rootly_sdk/api/form_fields/list_form_fields.py +++ b/rootly_sdk/api/form_fields/list_form_fields.py @@ -24,6 +24,22 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -56,6 +72,38 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + + params["filter[enabled][eq]"] = filterenabledeq + + params["filter[enabled][not_eq]"] = filterenablednot_eq + + params["filter[enabled][in]"] = filterenabledin + + params["filter[enabled][not_in]"] = filterenablednot_in + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -103,6 +151,22 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> Response[FormFieldList]: """List Form Fields @@ -121,6 +185,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,6 +223,22 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) response = client.get_httpx_client().request( @@ -167,6 +263,22 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> FormFieldList | None: """List Form Fields @@ -185,6 +297,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -208,6 +336,22 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ).parsed @@ -226,6 +370,22 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> Response[FormFieldList]: """List Form Fields @@ -244,6 +404,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -266,6 +442,22 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -288,6 +480,22 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, ) -> FormFieldList | None: """List Form Fields @@ -306,6 +514,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -330,5 +554,21 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) ).parsed diff --git a/rootly_sdk/api/functionalities/bulk_delete_functionalities.py b/rootly_sdk/api/functionalities/bulk_delete_functionalities.py new file mode 100644 index 00000000..9889d1b6 --- /dev/null +++ b/rootly_sdk/api/functionalities/bulk_delete_functionalities.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_destroy_functionalities_response import BulkDestroyFunctionalitiesResponse +from ...models.bulk_destroy_functionalities_type_0 import BulkDestroyFunctionalitiesType0 +from ...models.bulk_destroy_functionalities_type_1 import BulkDestroyFunctionalitiesType1 +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + *, + body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/functionalities/bulk_delete", + } + + if isinstance(body, BulkDestroyFunctionalitiesType0): + _kwargs["json"] = body.to_dict() + else: + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyFunctionalitiesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkDestroyFunctionalitiesResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyFunctionalitiesResponse.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, +) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: + """Bulk delete Functionalities + + Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific records) or managed_by + (prune all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, +) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: + """Bulk delete Functionalities + + Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific records) or managed_by + (prune all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, +) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: + """Bulk delete Functionalities + + Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific records) or managed_by + (prune all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, +) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: + """Bulk delete Functionalities + + Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific records) or managed_by + (prune all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py b/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py new file mode 100644 index 00000000..f2e88ac0 --- /dev/null +++ b/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_upsert_functionalities import BulkUpsertFunctionalities +from ...models.bulk_upsert_functionalities_error import BulkUpsertFunctionalitiesError +from ...models.bulk_upsert_functionalities_response import BulkUpsertFunctionalitiesResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + *, + body: BulkUpsertFunctionalities, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/functionalities/bulk_upsert", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertFunctionalitiesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkUpsertFunctionalitiesError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertFunctionalitiesError.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertFunctionalities, +) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: + """Bulk upsert Functionalities + + Create or update multiple functionalities by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertFunctionalities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BulkUpsertFunctionalities, +) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: + """Bulk upsert Functionalities + + Create or update multiple functionalities by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertFunctionalities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertFunctionalities, +) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: + """Bulk upsert Functionalities + + Create or update multiple functionalities by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertFunctionalities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BulkUpsertFunctionalities, +) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: + """Bulk upsert Functionalities + + Create or update multiple functionalities by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertFunctionalities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/list_functionalities.py b/rootly_sdk/api/functionalities/list_functionalities.py index 173cc880..d00ffd21 100644 --- a/rootly_sdk/api/functionalities/list_functionalities.py +++ b/rootly_sdk/api/functionalities/list_functionalities.py @@ -25,6 +25,14 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -58,6 +66,22 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -109,6 +133,14 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[FunctionalityList]: """List functionalities @@ -130,6 +162,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -155,6 +195,14 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, sort=sort, ) @@ -182,6 +230,14 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> FunctionalityList | None: """List functionalities @@ -203,6 +259,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -229,6 +293,14 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, sort=sort, ).parsed @@ -250,6 +322,14 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[FunctionalityList]: """List functionalities @@ -271,6 +351,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -296,6 +384,14 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, sort=sort, ) @@ -321,6 +417,14 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> FunctionalityList | None: """List functionalities @@ -342,6 +446,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -369,6 +481,14 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/incident_action_items/list_all_incident_action_items.py b/rootly_sdk/api/incident_action_items/list_all_incident_action_items.py index 3e7f1a04..9fdcf45a 100644 --- a/rootly_sdk/api/incident_action_items/list_all_incident_action_items.py +++ b/rootly_sdk/api/incident_action_items/list_all_incident_action_items.py @@ -30,6 +30,22 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -73,6 +89,38 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + + params["filter[priority][eq]"] = filterpriorityeq + + params["filter[priority][not_eq]"] = filterprioritynot_eq + + params["filter[priority][in]"] = filterpriorityin + + params["filter[priority][not_in]"] = filterprioritynot_in + + params["filter[status][eq]"] = filterstatuseq + + params["filter[status][not_eq]"] = filterstatusnot_eq + + params["filter[status][in]"] = filterstatusin + + params["filter[status][not_in]"] = filterstatusnot_in + + params["filter[incident_status][eq]"] = filterincident_statuseq + + params["filter[incident_status][not_eq]"] = filterincident_statusnot_eq + + params["filter[incident_status][in]"] = filterincident_statusin + + params["filter[incident_status][not_in]"] = filterincident_statusnot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -131,6 +179,22 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[IncidentActionItemList]: """List all action items for an organization @@ -157,6 +221,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterpriorityeq (str | Unset): + filterprioritynot_eq (str | Unset): + filterpriorityin (str | Unset): + filterprioritynot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterincident_statuseq (str | Unset): + filterincident_statusnot_eq (str | Unset): + filterincident_statusin (str | Unset): + filterincident_statusnot_in (str | Unset): sort (str | Unset): Raises: @@ -187,6 +267,22 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterpriorityeq=filterpriorityeq, + filterprioritynot_eq=filterprioritynot_eq, + filterpriorityin=filterpriorityin, + filterprioritynot_in=filterprioritynot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterincident_statuseq=filterincident_statuseq, + filterincident_statusnot_eq=filterincident_statusnot_eq, + filterincident_statusin=filterincident_statusin, + filterincident_statusnot_in=filterincident_statusnot_in, sort=sort, ) @@ -219,6 +315,22 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> IncidentActionItemList | None: """List all action items for an organization @@ -245,6 +357,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterpriorityeq (str | Unset): + filterprioritynot_eq (str | Unset): + filterpriorityin (str | Unset): + filterprioritynot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterincident_statuseq (str | Unset): + filterincident_statusnot_eq (str | Unset): + filterincident_statusin (str | Unset): + filterincident_statusnot_in (str | Unset): sort (str | Unset): Raises: @@ -276,6 +404,22 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterpriorityeq=filterpriorityeq, + filterprioritynot_eq=filterprioritynot_eq, + filterpriorityin=filterpriorityin, + filterprioritynot_in=filterprioritynot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterincident_statuseq=filterincident_statuseq, + filterincident_statusnot_eq=filterincident_statusnot_eq, + filterincident_statusin=filterincident_statusin, + filterincident_statusnot_in=filterincident_statusnot_in, sort=sort, ).parsed @@ -302,6 +446,22 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[IncidentActionItemList]: """List all action items for an organization @@ -328,6 +488,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterpriorityeq (str | Unset): + filterprioritynot_eq (str | Unset): + filterpriorityin (str | Unset): + filterprioritynot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterincident_statuseq (str | Unset): + filterincident_statusnot_eq (str | Unset): + filterincident_statusin (str | Unset): + filterincident_statusnot_in (str | Unset): sort (str | Unset): Raises: @@ -358,6 +534,22 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterpriorityeq=filterpriorityeq, + filterprioritynot_eq=filterprioritynot_eq, + filterpriorityin=filterpriorityin, + filterprioritynot_in=filterprioritynot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterincident_statuseq=filterincident_statuseq, + filterincident_statusnot_eq=filterincident_statusnot_eq, + filterincident_statusin=filterincident_statusin, + filterincident_statusnot_in=filterincident_statusnot_in, sort=sort, ) @@ -388,6 +580,22 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> IncidentActionItemList | None: """List all action items for an organization @@ -414,6 +622,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterpriorityeq (str | Unset): + filterprioritynot_eq (str | Unset): + filterpriorityin (str | Unset): + filterprioritynot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterincident_statuseq (str | Unset): + filterincident_statusnot_eq (str | Unset): + filterincident_statusin (str | Unset): + filterincident_statusnot_in (str | Unset): sort (str | Unset): Raises: @@ -446,6 +670,22 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterpriorityeq=filterpriorityeq, + filterprioritynot_eq=filterprioritynot_eq, + filterpriorityin=filterpriorityin, + filterprioritynot_in=filterprioritynot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterincident_statuseq=filterincident_statuseq, + filterincident_statusnot_eq=filterincident_statusnot_eq, + filterincident_statusin=filterincident_statusin, + filterincident_statusnot_in=filterincident_statusnot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/incident_roles/list_incident_roles.py b/rootly_sdk/api/incident_roles/list_incident_roles.py index d89b6966..3d27e9e4 100644 --- a/rootly_sdk/api/incident_roles/list_incident_roles.py +++ b/rootly_sdk/api/incident_roles/list_incident_roles.py @@ -21,6 +21,18 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -46,6 +58,30 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[enabled][eq]"] = filterenabledeq + + params["filter[enabled][not_eq]"] = filterenablednot_eq + + params["filter[enabled][in]"] = filterenabledin + + params["filter[enabled][not_in]"] = filterenablednot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -93,6 +129,18 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[IncidentRoleList]: """List incident roles @@ -110,6 +158,18 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): sort (str | Unset): Raises: @@ -131,6 +191,18 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, sort=sort, ) @@ -154,6 +226,18 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> IncidentRoleList | None: """List incident roles @@ -171,6 +255,18 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): sort (str | Unset): Raises: @@ -193,6 +289,18 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, sort=sort, ).parsed @@ -210,6 +318,18 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[IncidentRoleList]: """List incident roles @@ -227,6 +347,18 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): sort (str | Unset): Raises: @@ -248,6 +380,18 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, sort=sort, ) @@ -269,6 +413,18 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> IncidentRoleList | None: """List incident roles @@ -286,6 +442,18 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): sort (str | Unset): Raises: @@ -309,6 +477,18 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/incident_types/list_incident_types.py b/rootly_sdk/api/incident_types/list_incident_types.py index 6dc328d1..ba2eeaf3 100644 --- a/rootly_sdk/api/incident_types/list_incident_types.py +++ b/rootly_sdk/api/incident_types/list_incident_types.py @@ -21,6 +21,18 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -46,6 +58,30 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[color][eq]"] = filtercoloreq + + params["filter[color][not_eq]"] = filtercolornot_eq + + params["filter[color][in]"] = filtercolorin + + params["filter[color][not_in]"] = filtercolornot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -93,6 +129,18 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[IncidentTypeList]: """List incident types @@ -110,6 +158,18 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -131,6 +191,18 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) @@ -154,6 +226,18 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> IncidentTypeList | None: """List incident types @@ -171,6 +255,18 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -193,6 +289,18 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ).parsed @@ -210,6 +318,18 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[IncidentTypeList]: """List incident types @@ -227,6 +347,18 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -248,6 +380,18 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) @@ -269,6 +413,18 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> IncidentTypeList | None: """List incident types @@ -286,6 +442,18 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -309,6 +477,18 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/incidents/list_incidents.py b/rootly_sdk/api/incidents/list_incidents.py index 7def7400..f320a9cc 100644 --- a/rootly_sdk/api/incidents/list_incidents.py +++ b/rootly_sdk/api/incidents/list_incidents.py @@ -5,6 +5,7 @@ from ... import errors from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList from ...models.incident_list import IncidentList from ...models.list_incidents_include import ListIncidentsInclude from ...models.list_incidents_sort import ListIncidentsSort @@ -13,6 +14,7 @@ def _get_kwargs( *, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -40,6 +42,7 @@ def _get_kwargs( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -76,12 +79,110 @@ def _get_kwargs( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} + params["page[after]"] = pageafter + params["page[number]"] = pagenumber params["page[size]"] = pagesize @@ -136,6 +237,8 @@ def _get_kwargs( params["filter[slack_channel_id]"] = filterslack_channel_id + params["filter[sequential_id]"] = filtersequential_id + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -208,6 +311,198 @@ def _get_kwargs( params["filter[in_triage_at][lte]"] = filterin_triage_atlte + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + + params["filter[status][eq]"] = filterstatuseq + + params["filter[status][not_eq]"] = filterstatusnot_eq + + params["filter[status][in]"] = filterstatusin + + params["filter[status][not_in]"] = filterstatusnot_in + + params["filter[private][eq]"] = filterprivateeq + + params["filter[private][not_eq]"] = filterprivatenot_eq + + params["filter[private][in]"] = filterprivatein + + params["filter[private][not_in]"] = filterprivatenot_in + + params["filter[user_id][eq]"] = filteruser_ideq + + params["filter[user_id][not_eq]"] = filteruser_idnot_eq + + params["filter[user_id][in]"] = filteruser_idin + + params["filter[user_id][not_in]"] = filteruser_idnot_in + + params["filter[severity][eq]"] = filterseverityeq + + params["filter[severity][not_eq]"] = filterseveritynot_eq + + params["filter[severity][in]"] = filterseverityin + + params["filter[severity][not_in]"] = filterseveritynot_in + + params["filter[severity_id][eq]"] = filterseverity_ideq + + params["filter[severity_id][not_eq]"] = filterseverity_idnot_eq + + params["filter[severity_id][in]"] = filterseverity_idin + + params["filter[severity_id][not_in]"] = filterseverity_idnot_in + + params["filter[labels][eq]"] = filterlabelseq + + params["filter[labels][not_eq]"] = filterlabelsnot_eq + + params["filter[labels][in]"] = filterlabelsin + + params["filter[labels][not_in]"] = filterlabelsnot_in + + params["filter[zendesk_ticket_id][eq]"] = filterzendesk_ticket_ideq + + params["filter[zendesk_ticket_id][not_eq]"] = filterzendesk_ticket_idnot_eq + + params["filter[zendesk_ticket_id][in]"] = filterzendesk_ticket_idin + + params["filter[zendesk_ticket_id][not_in]"] = filterzendesk_ticket_idnot_in + + params["filter[sequential_id][eq]"] = filtersequential_ideq + + params["filter[sequential_id][not_eq]"] = filtersequential_idnot_eq + + params["filter[sequential_id][in]"] = filtersequential_idin + + params["filter[sequential_id][not_in]"] = filtersequential_idnot_in + + params["filter[types][eq]"] = filtertypeseq + + params["filter[types][not_eq]"] = filtertypesnot_eq + + params["filter[types][in]"] = filtertypesin + + params["filter[types][not_in]"] = filtertypesnot_in + + params["filter[type_ids][eq]"] = filtertype_idseq + + params["filter[type_ids][not_eq]"] = filtertype_idsnot_eq + + params["filter[type_ids][in]"] = filtertype_idsin + + params["filter[type_ids][not_in]"] = filtertype_idsnot_in + + params["filter[environments][eq]"] = filterenvironmentseq + + params["filter[environments][not_eq]"] = filterenvironmentsnot_eq + + params["filter[environments][in]"] = filterenvironmentsin + + params["filter[environments][not_in]"] = filterenvironmentsnot_in + + params["filter[environment_ids][eq]"] = filterenvironment_idseq + + params["filter[environment_ids][not_eq]"] = filterenvironment_idsnot_eq + + params["filter[environment_ids][in]"] = filterenvironment_idsin + + params["filter[environment_ids][not_in]"] = filterenvironment_idsnot_in + + params["filter[services][eq]"] = filterserviceseq + + params["filter[services][not_eq]"] = filterservicesnot_eq + + params["filter[services][in]"] = filterservicesin + + params["filter[services][not_in]"] = filterservicesnot_in + + params["filter[service_ids][eq]"] = filterservice_idseq + + params["filter[service_ids][not_eq]"] = filterservice_idsnot_eq + + params["filter[service_ids][in]"] = filterservice_idsin + + params["filter[service_ids][not_in]"] = filterservice_idsnot_in + + params["filter[service_names][eq]"] = filterservice_nameseq + + params["filter[service_names][not_eq]"] = filterservice_namesnot_eq + + params["filter[service_names][in]"] = filterservice_namesin + + params["filter[service_names][not_in]"] = filterservice_namesnot_in + + params["filter[functionalities][eq]"] = filterfunctionalitieseq + + params["filter[functionalities][not_eq]"] = filterfunctionalitiesnot_eq + + params["filter[functionalities][in]"] = filterfunctionalitiesin + + params["filter[functionalities][not_in]"] = filterfunctionalitiesnot_in + + params["filter[functionality_ids][eq]"] = filterfunctionality_idseq + + params["filter[functionality_ids][not_eq]"] = filterfunctionality_idsnot_eq + + params["filter[functionality_ids][in]"] = filterfunctionality_idsin + + params["filter[functionality_ids][not_in]"] = filterfunctionality_idsnot_in + + params["filter[functionality_names][eq]"] = filterfunctionality_nameseq + + params["filter[functionality_names][not_eq]"] = filterfunctionality_namesnot_eq + + params["filter[functionality_names][in]"] = filterfunctionality_namesin + + params["filter[functionality_names][not_in]"] = filterfunctionality_namesnot_in + + params["filter[causes][eq]"] = filtercauseseq + + params["filter[causes][not_eq]"] = filtercausesnot_eq + + params["filter[causes][in]"] = filtercausesin + + params["filter[causes][not_in]"] = filtercausesnot_in + + params["filter[cause_ids][eq]"] = filtercause_idseq + + params["filter[cause_ids][not_eq]"] = filtercause_idsnot_eq + + params["filter[cause_ids][in]"] = filtercause_idsin + + params["filter[cause_ids][not_in]"] = filtercause_idsnot_in + + params["filter[teams][eq]"] = filterteamseq + + params["filter[teams][not_eq]"] = filterteamsnot_eq + + params["filter[teams][in]"] = filterteamsin + + params["filter[teams][not_in]"] = filterteamsnot_in + + params["filter[team_ids][eq]"] = filterteam_idseq + + params["filter[team_ids][not_eq]"] = filterteam_idsnot_eq + + params["filter[team_ids][in]"] = filterteam_idsin + + params["filter[team_ids][not_in]"] = filterteam_idsnot_in + + params["filter[team_names][eq]"] = filterteam_nameseq + + params["filter[team_names][not_eq]"] = filterteam_namesnot_eq + + params["filter[team_names][in]"] = filterteam_namesin + + params["filter[team_names][not_in]"] = filterteam_namesnot_in + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -231,19 +526,28 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentList | None: if response.status_code == 200: response_200 = IncidentList.from_dict(response.json()) return response_200 + if response.status_code == 400: + response_400 = ErrorsList.from_dict(response.json()) + + return response_400 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -255,6 +559,7 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -282,6 +587,7 @@ def sync_detailed( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -318,14 +624,111 @@ def sync_detailed( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, -) -> Response[IncidentList]: +) -> Response[ErrorsList | IncidentList]: """List incidents List incidents Args: + pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): filtersearch (str | Unset): @@ -353,6 +756,7 @@ def sync_detailed( filtercause_ids (str | Unset): filtercustom_field_selected_option_ids (str | Unset): filterslack_channel_id (str | Unset): + filtersequential_id (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): @@ -389,6 +793,102 @@ def sync_detailed( filterin_triage_atgte (str | Unset): filterin_triage_atlt (str | Unset): filterin_triage_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterprivateeq (str | Unset): + filterprivatenot_eq (str | Unset): + filterprivatein (str | Unset): + filterprivatenot_in (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filterseverity_ideq (str | Unset): + filterseverity_idnot_eq (str | Unset): + filterseverity_idin (str | Unset): + filterseverity_idnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterzendesk_ticket_ideq (str | Unset): + filterzendesk_ticket_idnot_eq (str | Unset): + filterzendesk_ticket_idin (str | Unset): + filterzendesk_ticket_idnot_in (str | Unset): + filtersequential_ideq (str | Unset): + filtersequential_idnot_eq (str | Unset): + filtersequential_idin (str | Unset): + filtersequential_idnot_in (str | Unset): + filtertypeseq (str | Unset): + filtertypesnot_eq (str | Unset): + filtertypesin (str | Unset): + filtertypesnot_in (str | Unset): + filtertype_idseq (str | Unset): + filtertype_idsnot_eq (str | Unset): + filtertype_idsin (str | Unset): + filtertype_idsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterenvironment_idseq (str | Unset): + filterenvironment_idsnot_eq (str | Unset): + filterenvironment_idsin (str | Unset): + filterenvironment_idsnot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterservice_idseq (str | Unset): + filterservice_idsnot_eq (str | Unset): + filterservice_idsin (str | Unset): + filterservice_idsnot_in (str | Unset): + filterservice_nameseq (str | Unset): + filterservice_namesnot_eq (str | Unset): + filterservice_namesin (str | Unset): + filterservice_namesnot_in (str | Unset): + filterfunctionalitieseq (str | Unset): + filterfunctionalitiesnot_eq (str | Unset): + filterfunctionalitiesin (str | Unset): + filterfunctionalitiesnot_in (str | Unset): + filterfunctionality_idseq (str | Unset): + filterfunctionality_idsnot_eq (str | Unset): + filterfunctionality_idsin (str | Unset): + filterfunctionality_idsnot_in (str | Unset): + filterfunctionality_nameseq (str | Unset): + filterfunctionality_namesnot_eq (str | Unset): + filterfunctionality_namesin (str | Unset): + filterfunctionality_namesnot_in (str | Unset): + filtercauseseq (str | Unset): + filtercausesnot_eq (str | Unset): + filtercausesin (str | Unset): + filtercausesnot_in (str | Unset): + filtercause_idseq (str | Unset): + filtercause_idsnot_eq (str | Unset): + filtercause_idsin (str | Unset): + filtercause_idsnot_in (str | Unset): + filterteamseq (str | Unset): + filterteamsnot_eq (str | Unset): + filterteamsin (str | Unset): + filterteamsnot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): + filterteam_nameseq (str | Unset): + filterteam_namesnot_eq (str | Unset): + filterteam_namesin (str | Unset): + filterteam_namesnot_in (str | Unset): sort (ListIncidentsSort | Unset): include (ListIncidentsInclude | Unset): @@ -397,10 +897,11 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[IncidentList] + Response[ErrorsList | IncidentList] """ kwargs = _get_kwargs( + pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, filtersearch=filtersearch, @@ -428,6 +929,7 @@ def sync_detailed( filtercause_ids=filtercause_ids, filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, filterslack_channel_id=filterslack_channel_id, + filtersequential_id=filtersequential_id, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, @@ -464,6 +966,102 @@ def sync_detailed( filterin_triage_atgte=filterin_triage_atgte, filterin_triage_atlt=filterin_triage_atlt, filterin_triage_atlte=filterin_triage_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterprivateeq=filterprivateeq, + filterprivatenot_eq=filterprivatenot_eq, + filterprivatein=filterprivatein, + filterprivatenot_in=filterprivatenot_in, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filterseverity_ideq=filterseverity_ideq, + filterseverity_idnot_eq=filterseverity_idnot_eq, + filterseverity_idin=filterseverity_idin, + filterseverity_idnot_in=filterseverity_idnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, + filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, + filterzendesk_ticket_idin=filterzendesk_ticket_idin, + filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, + filtersequential_ideq=filtersequential_ideq, + filtersequential_idnot_eq=filtersequential_idnot_eq, + filtersequential_idin=filtersequential_idin, + filtersequential_idnot_in=filtersequential_idnot_in, + filtertypeseq=filtertypeseq, + filtertypesnot_eq=filtertypesnot_eq, + filtertypesin=filtertypesin, + filtertypesnot_in=filtertypesnot_in, + filtertype_idseq=filtertype_idseq, + filtertype_idsnot_eq=filtertype_idsnot_eq, + filtertype_idsin=filtertype_idsin, + filtertype_idsnot_in=filtertype_idsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterenvironment_idseq=filterenvironment_idseq, + filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, + filterenvironment_idsin=filterenvironment_idsin, + filterenvironment_idsnot_in=filterenvironment_idsnot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterservice_idseq=filterservice_idseq, + filterservice_idsnot_eq=filterservice_idsnot_eq, + filterservice_idsin=filterservice_idsin, + filterservice_idsnot_in=filterservice_idsnot_in, + filterservice_nameseq=filterservice_nameseq, + filterservice_namesnot_eq=filterservice_namesnot_eq, + filterservice_namesin=filterservice_namesin, + filterservice_namesnot_in=filterservice_namesnot_in, + filterfunctionalitieseq=filterfunctionalitieseq, + filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, + filterfunctionalitiesin=filterfunctionalitiesin, + filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, + filterfunctionality_idseq=filterfunctionality_idseq, + filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, + filterfunctionality_idsin=filterfunctionality_idsin, + filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, + filterfunctionality_nameseq=filterfunctionality_nameseq, + filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, + filterfunctionality_namesin=filterfunctionality_namesin, + filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, + filtercauseseq=filtercauseseq, + filtercausesnot_eq=filtercausesnot_eq, + filtercausesin=filtercausesin, + filtercausesnot_in=filtercausesnot_in, + filtercause_idseq=filtercause_idseq, + filtercause_idsnot_eq=filtercause_idsnot_eq, + filtercause_idsin=filtercause_idsin, + filtercause_idsnot_in=filtercause_idsnot_in, + filterteamseq=filterteamseq, + filterteamsnot_eq=filterteamsnot_eq, + filterteamsin=filterteamsin, + filterteamsnot_in=filterteamsnot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + filterteam_nameseq=filterteam_nameseq, + filterteam_namesnot_eq=filterteam_namesnot_eq, + filterteam_namesin=filterteam_namesin, + filterteam_namesnot_in=filterteam_namesnot_in, sort=sort, include=include, ) @@ -478,6 +1076,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -505,6 +1104,7 @@ def sync( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -541,14 +1141,111 @@ def sync( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, -) -> IncidentList | None: +) -> ErrorsList | IncidentList | None: """List incidents List incidents Args: + pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): filtersearch (str | Unset): @@ -576,6 +1273,7 @@ def sync( filtercause_ids (str | Unset): filtercustom_field_selected_option_ids (str | Unset): filterslack_channel_id (str | Unset): + filtersequential_id (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): @@ -612,6 +1310,102 @@ def sync( filterin_triage_atgte (str | Unset): filterin_triage_atlt (str | Unset): filterin_triage_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterprivateeq (str | Unset): + filterprivatenot_eq (str | Unset): + filterprivatein (str | Unset): + filterprivatenot_in (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filterseverity_ideq (str | Unset): + filterseverity_idnot_eq (str | Unset): + filterseverity_idin (str | Unset): + filterseverity_idnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterzendesk_ticket_ideq (str | Unset): + filterzendesk_ticket_idnot_eq (str | Unset): + filterzendesk_ticket_idin (str | Unset): + filterzendesk_ticket_idnot_in (str | Unset): + filtersequential_ideq (str | Unset): + filtersequential_idnot_eq (str | Unset): + filtersequential_idin (str | Unset): + filtersequential_idnot_in (str | Unset): + filtertypeseq (str | Unset): + filtertypesnot_eq (str | Unset): + filtertypesin (str | Unset): + filtertypesnot_in (str | Unset): + filtertype_idseq (str | Unset): + filtertype_idsnot_eq (str | Unset): + filtertype_idsin (str | Unset): + filtertype_idsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterenvironment_idseq (str | Unset): + filterenvironment_idsnot_eq (str | Unset): + filterenvironment_idsin (str | Unset): + filterenvironment_idsnot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterservice_idseq (str | Unset): + filterservice_idsnot_eq (str | Unset): + filterservice_idsin (str | Unset): + filterservice_idsnot_in (str | Unset): + filterservice_nameseq (str | Unset): + filterservice_namesnot_eq (str | Unset): + filterservice_namesin (str | Unset): + filterservice_namesnot_in (str | Unset): + filterfunctionalitieseq (str | Unset): + filterfunctionalitiesnot_eq (str | Unset): + filterfunctionalitiesin (str | Unset): + filterfunctionalitiesnot_in (str | Unset): + filterfunctionality_idseq (str | Unset): + filterfunctionality_idsnot_eq (str | Unset): + filterfunctionality_idsin (str | Unset): + filterfunctionality_idsnot_in (str | Unset): + filterfunctionality_nameseq (str | Unset): + filterfunctionality_namesnot_eq (str | Unset): + filterfunctionality_namesin (str | Unset): + filterfunctionality_namesnot_in (str | Unset): + filtercauseseq (str | Unset): + filtercausesnot_eq (str | Unset): + filtercausesin (str | Unset): + filtercausesnot_in (str | Unset): + filtercause_idseq (str | Unset): + filtercause_idsnot_eq (str | Unset): + filtercause_idsin (str | Unset): + filtercause_idsnot_in (str | Unset): + filterteamseq (str | Unset): + filterteamsnot_eq (str | Unset): + filterteamsin (str | Unset): + filterteamsnot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): + filterteam_nameseq (str | Unset): + filterteam_namesnot_eq (str | Unset): + filterteam_namesin (str | Unset): + filterteam_namesnot_in (str | Unset): sort (ListIncidentsSort | Unset): include (ListIncidentsInclude | Unset): @@ -620,11 +1414,12 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - IncidentList + ErrorsList | IncidentList """ return sync_detailed( client=client, + pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, filtersearch=filtersearch, @@ -652,6 +1447,7 @@ def sync( filtercause_ids=filtercause_ids, filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, filterslack_channel_id=filterslack_channel_id, + filtersequential_id=filtersequential_id, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, @@ -688,6 +1484,102 @@ def sync( filterin_triage_atgte=filterin_triage_atgte, filterin_triage_atlt=filterin_triage_atlt, filterin_triage_atlte=filterin_triage_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterprivateeq=filterprivateeq, + filterprivatenot_eq=filterprivatenot_eq, + filterprivatein=filterprivatein, + filterprivatenot_in=filterprivatenot_in, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filterseverity_ideq=filterseverity_ideq, + filterseverity_idnot_eq=filterseverity_idnot_eq, + filterseverity_idin=filterseverity_idin, + filterseverity_idnot_in=filterseverity_idnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, + filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, + filterzendesk_ticket_idin=filterzendesk_ticket_idin, + filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, + filtersequential_ideq=filtersequential_ideq, + filtersequential_idnot_eq=filtersequential_idnot_eq, + filtersequential_idin=filtersequential_idin, + filtersequential_idnot_in=filtersequential_idnot_in, + filtertypeseq=filtertypeseq, + filtertypesnot_eq=filtertypesnot_eq, + filtertypesin=filtertypesin, + filtertypesnot_in=filtertypesnot_in, + filtertype_idseq=filtertype_idseq, + filtertype_idsnot_eq=filtertype_idsnot_eq, + filtertype_idsin=filtertype_idsin, + filtertype_idsnot_in=filtertype_idsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterenvironment_idseq=filterenvironment_idseq, + filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, + filterenvironment_idsin=filterenvironment_idsin, + filterenvironment_idsnot_in=filterenvironment_idsnot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterservice_idseq=filterservice_idseq, + filterservice_idsnot_eq=filterservice_idsnot_eq, + filterservice_idsin=filterservice_idsin, + filterservice_idsnot_in=filterservice_idsnot_in, + filterservice_nameseq=filterservice_nameseq, + filterservice_namesnot_eq=filterservice_namesnot_eq, + filterservice_namesin=filterservice_namesin, + filterservice_namesnot_in=filterservice_namesnot_in, + filterfunctionalitieseq=filterfunctionalitieseq, + filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, + filterfunctionalitiesin=filterfunctionalitiesin, + filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, + filterfunctionality_idseq=filterfunctionality_idseq, + filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, + filterfunctionality_idsin=filterfunctionality_idsin, + filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, + filterfunctionality_nameseq=filterfunctionality_nameseq, + filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, + filterfunctionality_namesin=filterfunctionality_namesin, + filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, + filtercauseseq=filtercauseseq, + filtercausesnot_eq=filtercausesnot_eq, + filtercausesin=filtercausesin, + filtercausesnot_in=filtercausesnot_in, + filtercause_idseq=filtercause_idseq, + filtercause_idsnot_eq=filtercause_idsnot_eq, + filtercause_idsin=filtercause_idsin, + filtercause_idsnot_in=filtercause_idsnot_in, + filterteamseq=filterteamseq, + filterteamsnot_eq=filterteamsnot_eq, + filterteamsin=filterteamsin, + filterteamsnot_in=filterteamsnot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + filterteam_nameseq=filterteam_nameseq, + filterteam_namesnot_eq=filterteam_namesnot_eq, + filterteam_namesin=filterteam_namesin, + filterteam_namesnot_in=filterteam_namesnot_in, sort=sort, include=include, ).parsed @@ -696,6 +1588,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -723,6 +1616,7 @@ async def asyncio_detailed( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -759,14 +1653,111 @@ async def asyncio_detailed( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, -) -> Response[IncidentList]: +) -> Response[ErrorsList | IncidentList]: """List incidents List incidents Args: + pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): filtersearch (str | Unset): @@ -794,6 +1785,7 @@ async def asyncio_detailed( filtercause_ids (str | Unset): filtercustom_field_selected_option_ids (str | Unset): filterslack_channel_id (str | Unset): + filtersequential_id (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): @@ -830,6 +1822,102 @@ async def asyncio_detailed( filterin_triage_atgte (str | Unset): filterin_triage_atlt (str | Unset): filterin_triage_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterprivateeq (str | Unset): + filterprivatenot_eq (str | Unset): + filterprivatein (str | Unset): + filterprivatenot_in (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filterseverity_ideq (str | Unset): + filterseverity_idnot_eq (str | Unset): + filterseverity_idin (str | Unset): + filterseverity_idnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterzendesk_ticket_ideq (str | Unset): + filterzendesk_ticket_idnot_eq (str | Unset): + filterzendesk_ticket_idin (str | Unset): + filterzendesk_ticket_idnot_in (str | Unset): + filtersequential_ideq (str | Unset): + filtersequential_idnot_eq (str | Unset): + filtersequential_idin (str | Unset): + filtersequential_idnot_in (str | Unset): + filtertypeseq (str | Unset): + filtertypesnot_eq (str | Unset): + filtertypesin (str | Unset): + filtertypesnot_in (str | Unset): + filtertype_idseq (str | Unset): + filtertype_idsnot_eq (str | Unset): + filtertype_idsin (str | Unset): + filtertype_idsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterenvironment_idseq (str | Unset): + filterenvironment_idsnot_eq (str | Unset): + filterenvironment_idsin (str | Unset): + filterenvironment_idsnot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterservice_idseq (str | Unset): + filterservice_idsnot_eq (str | Unset): + filterservice_idsin (str | Unset): + filterservice_idsnot_in (str | Unset): + filterservice_nameseq (str | Unset): + filterservice_namesnot_eq (str | Unset): + filterservice_namesin (str | Unset): + filterservice_namesnot_in (str | Unset): + filterfunctionalitieseq (str | Unset): + filterfunctionalitiesnot_eq (str | Unset): + filterfunctionalitiesin (str | Unset): + filterfunctionalitiesnot_in (str | Unset): + filterfunctionality_idseq (str | Unset): + filterfunctionality_idsnot_eq (str | Unset): + filterfunctionality_idsin (str | Unset): + filterfunctionality_idsnot_in (str | Unset): + filterfunctionality_nameseq (str | Unset): + filterfunctionality_namesnot_eq (str | Unset): + filterfunctionality_namesin (str | Unset): + filterfunctionality_namesnot_in (str | Unset): + filtercauseseq (str | Unset): + filtercausesnot_eq (str | Unset): + filtercausesin (str | Unset): + filtercausesnot_in (str | Unset): + filtercause_idseq (str | Unset): + filtercause_idsnot_eq (str | Unset): + filtercause_idsin (str | Unset): + filtercause_idsnot_in (str | Unset): + filterteamseq (str | Unset): + filterteamsnot_eq (str | Unset): + filterteamsin (str | Unset): + filterteamsnot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): + filterteam_nameseq (str | Unset): + filterteam_namesnot_eq (str | Unset): + filterteam_namesin (str | Unset): + filterteam_namesnot_in (str | Unset): sort (ListIncidentsSort | Unset): include (ListIncidentsInclude | Unset): @@ -838,10 +1926,11 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[IncidentList] + Response[ErrorsList | IncidentList] """ kwargs = _get_kwargs( + pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, filtersearch=filtersearch, @@ -869,6 +1958,7 @@ async def asyncio_detailed( filtercause_ids=filtercause_ids, filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, filterslack_channel_id=filterslack_channel_id, + filtersequential_id=filtersequential_id, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, @@ -905,6 +1995,102 @@ async def asyncio_detailed( filterin_triage_atgte=filterin_triage_atgte, filterin_triage_atlt=filterin_triage_atlt, filterin_triage_atlte=filterin_triage_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterprivateeq=filterprivateeq, + filterprivatenot_eq=filterprivatenot_eq, + filterprivatein=filterprivatein, + filterprivatenot_in=filterprivatenot_in, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filterseverity_ideq=filterseverity_ideq, + filterseverity_idnot_eq=filterseverity_idnot_eq, + filterseverity_idin=filterseverity_idin, + filterseverity_idnot_in=filterseverity_idnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, + filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, + filterzendesk_ticket_idin=filterzendesk_ticket_idin, + filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, + filtersequential_ideq=filtersequential_ideq, + filtersequential_idnot_eq=filtersequential_idnot_eq, + filtersequential_idin=filtersequential_idin, + filtersequential_idnot_in=filtersequential_idnot_in, + filtertypeseq=filtertypeseq, + filtertypesnot_eq=filtertypesnot_eq, + filtertypesin=filtertypesin, + filtertypesnot_in=filtertypesnot_in, + filtertype_idseq=filtertype_idseq, + filtertype_idsnot_eq=filtertype_idsnot_eq, + filtertype_idsin=filtertype_idsin, + filtertype_idsnot_in=filtertype_idsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterenvironment_idseq=filterenvironment_idseq, + filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, + filterenvironment_idsin=filterenvironment_idsin, + filterenvironment_idsnot_in=filterenvironment_idsnot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterservice_idseq=filterservice_idseq, + filterservice_idsnot_eq=filterservice_idsnot_eq, + filterservice_idsin=filterservice_idsin, + filterservice_idsnot_in=filterservice_idsnot_in, + filterservice_nameseq=filterservice_nameseq, + filterservice_namesnot_eq=filterservice_namesnot_eq, + filterservice_namesin=filterservice_namesin, + filterservice_namesnot_in=filterservice_namesnot_in, + filterfunctionalitieseq=filterfunctionalitieseq, + filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, + filterfunctionalitiesin=filterfunctionalitiesin, + filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, + filterfunctionality_idseq=filterfunctionality_idseq, + filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, + filterfunctionality_idsin=filterfunctionality_idsin, + filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, + filterfunctionality_nameseq=filterfunctionality_nameseq, + filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, + filterfunctionality_namesin=filterfunctionality_namesin, + filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, + filtercauseseq=filtercauseseq, + filtercausesnot_eq=filtercausesnot_eq, + filtercausesin=filtercausesin, + filtercausesnot_in=filtercausesnot_in, + filtercause_idseq=filtercause_idseq, + filtercause_idsnot_eq=filtercause_idsnot_eq, + filtercause_idsin=filtercause_idsin, + filtercause_idsnot_in=filtercause_idsnot_in, + filterteamseq=filterteamseq, + filterteamsnot_eq=filterteamsnot_eq, + filterteamsin=filterteamsin, + filterteamsnot_in=filterteamsnot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + filterteam_nameseq=filterteam_nameseq, + filterteam_namesnot_eq=filterteam_namesnot_eq, + filterteam_namesin=filterteam_namesin, + filterteam_namesnot_in=filterteam_namesnot_in, sort=sort, include=include, ) @@ -917,6 +2103,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -944,6 +2131,7 @@ async def asyncio( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -980,14 +2168,111 @@ async def asyncio( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, -) -> IncidentList | None: +) -> ErrorsList | IncidentList | None: """List incidents List incidents Args: + pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): filtersearch (str | Unset): @@ -1015,6 +2300,7 @@ async def asyncio( filtercause_ids (str | Unset): filtercustom_field_selected_option_ids (str | Unset): filterslack_channel_id (str | Unset): + filtersequential_id (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): @@ -1051,6 +2337,102 @@ async def asyncio( filterin_triage_atgte (str | Unset): filterin_triage_atlt (str | Unset): filterin_triage_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterprivateeq (str | Unset): + filterprivatenot_eq (str | Unset): + filterprivatein (str | Unset): + filterprivatenot_in (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filterseverity_ideq (str | Unset): + filterseverity_idnot_eq (str | Unset): + filterseverity_idin (str | Unset): + filterseverity_idnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterzendesk_ticket_ideq (str | Unset): + filterzendesk_ticket_idnot_eq (str | Unset): + filterzendesk_ticket_idin (str | Unset): + filterzendesk_ticket_idnot_in (str | Unset): + filtersequential_ideq (str | Unset): + filtersequential_idnot_eq (str | Unset): + filtersequential_idin (str | Unset): + filtersequential_idnot_in (str | Unset): + filtertypeseq (str | Unset): + filtertypesnot_eq (str | Unset): + filtertypesin (str | Unset): + filtertypesnot_in (str | Unset): + filtertype_idseq (str | Unset): + filtertype_idsnot_eq (str | Unset): + filtertype_idsin (str | Unset): + filtertype_idsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterenvironment_idseq (str | Unset): + filterenvironment_idsnot_eq (str | Unset): + filterenvironment_idsin (str | Unset): + filterenvironment_idsnot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterservice_idseq (str | Unset): + filterservice_idsnot_eq (str | Unset): + filterservice_idsin (str | Unset): + filterservice_idsnot_in (str | Unset): + filterservice_nameseq (str | Unset): + filterservice_namesnot_eq (str | Unset): + filterservice_namesin (str | Unset): + filterservice_namesnot_in (str | Unset): + filterfunctionalitieseq (str | Unset): + filterfunctionalitiesnot_eq (str | Unset): + filterfunctionalitiesin (str | Unset): + filterfunctionalitiesnot_in (str | Unset): + filterfunctionality_idseq (str | Unset): + filterfunctionality_idsnot_eq (str | Unset): + filterfunctionality_idsin (str | Unset): + filterfunctionality_idsnot_in (str | Unset): + filterfunctionality_nameseq (str | Unset): + filterfunctionality_namesnot_eq (str | Unset): + filterfunctionality_namesin (str | Unset): + filterfunctionality_namesnot_in (str | Unset): + filtercauseseq (str | Unset): + filtercausesnot_eq (str | Unset): + filtercausesin (str | Unset): + filtercausesnot_in (str | Unset): + filtercause_idseq (str | Unset): + filtercause_idsnot_eq (str | Unset): + filtercause_idsin (str | Unset): + filtercause_idsnot_in (str | Unset): + filterteamseq (str | Unset): + filterteamsnot_eq (str | Unset): + filterteamsin (str | Unset): + filterteamsnot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): + filterteam_nameseq (str | Unset): + filterteam_namesnot_eq (str | Unset): + filterteam_namesin (str | Unset): + filterteam_namesnot_in (str | Unset): sort (ListIncidentsSort | Unset): include (ListIncidentsInclude | Unset): @@ -1059,12 +2441,13 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - IncidentList + ErrorsList | IncidentList """ return ( await asyncio_detailed( client=client, + pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, filtersearch=filtersearch, @@ -1092,6 +2475,7 @@ async def asyncio( filtercause_ids=filtercause_ids, filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, filterslack_channel_id=filterslack_channel_id, + filtersequential_id=filtersequential_id, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, @@ -1128,6 +2512,102 @@ async def asyncio( filterin_triage_atgte=filterin_triage_atgte, filterin_triage_atlt=filterin_triage_atlt, filterin_triage_atlte=filterin_triage_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterprivateeq=filterprivateeq, + filterprivatenot_eq=filterprivatenot_eq, + filterprivatein=filterprivatein, + filterprivatenot_in=filterprivatenot_in, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filterseverity_ideq=filterseverity_ideq, + filterseverity_idnot_eq=filterseverity_idnot_eq, + filterseverity_idin=filterseverity_idin, + filterseverity_idnot_in=filterseverity_idnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, + filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, + filterzendesk_ticket_idin=filterzendesk_ticket_idin, + filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, + filtersequential_ideq=filtersequential_ideq, + filtersequential_idnot_eq=filtersequential_idnot_eq, + filtersequential_idin=filtersequential_idin, + filtersequential_idnot_in=filtersequential_idnot_in, + filtertypeseq=filtertypeseq, + filtertypesnot_eq=filtertypesnot_eq, + filtertypesin=filtertypesin, + filtertypesnot_in=filtertypesnot_in, + filtertype_idseq=filtertype_idseq, + filtertype_idsnot_eq=filtertype_idsnot_eq, + filtertype_idsin=filtertype_idsin, + filtertype_idsnot_in=filtertype_idsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterenvironment_idseq=filterenvironment_idseq, + filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, + filterenvironment_idsin=filterenvironment_idsin, + filterenvironment_idsnot_in=filterenvironment_idsnot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterservice_idseq=filterservice_idseq, + filterservice_idsnot_eq=filterservice_idsnot_eq, + filterservice_idsin=filterservice_idsin, + filterservice_idsnot_in=filterservice_idsnot_in, + filterservice_nameseq=filterservice_nameseq, + filterservice_namesnot_eq=filterservice_namesnot_eq, + filterservice_namesin=filterservice_namesin, + filterservice_namesnot_in=filterservice_namesnot_in, + filterfunctionalitieseq=filterfunctionalitieseq, + filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, + filterfunctionalitiesin=filterfunctionalitiesin, + filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, + filterfunctionality_idseq=filterfunctionality_idseq, + filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, + filterfunctionality_idsin=filterfunctionality_idsin, + filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, + filterfunctionality_nameseq=filterfunctionality_nameseq, + filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, + filterfunctionality_namesin=filterfunctionality_namesin, + filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, + filtercauseseq=filtercauseseq, + filtercausesnot_eq=filtercausesnot_eq, + filtercausesin=filtercausesin, + filtercausesnot_in=filtercausesnot_in, + filtercause_idseq=filtercause_idseq, + filtercause_idsnot_eq=filtercause_idsnot_eq, + filtercause_idsin=filtercause_idsin, + filtercause_idsnot_in=filtercause_idsnot_in, + filterteamseq=filterteamseq, + filterteamsnot_eq=filterteamsnot_eq, + filterteamsin=filterteamsin, + filterteamsnot_in=filterteamsnot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + filterteam_nameseq=filterteam_nameseq, + filterteam_namesnot_eq=filterteam_namesnot_eq, + filterteam_namesin=filterteam_namesin, + filterteam_namesnot_in=filterteam_namesnot_in, sort=sort, include=include, ) diff --git a/rootly_sdk/api/meeting_recordings/create_meeting_recording.py b/rootly_sdk/api/meeting_recordings/create_meeting_recording.py index c4235f68..567609c4 100644 --- a/rootly_sdk/api/meeting_recordings/create_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/create_meeting_recording.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx @@ -9,6 +9,7 @@ from ...models.create_meeting_recording_platform import ( CreateMeetingRecordingPlatform, ) +from ...models.meeting_recording_response import MeetingRecordingResponse from ...types import UNSET, Response, Unset @@ -39,12 +40,17 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 201: - return None + response_201 = MeetingRecordingResponse.from_dict(response.json()) + + return response_201 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -52,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +74,7 @@ def sync_detailed( *, client: AuthenticatedClient, platform: CreateMeetingRecordingPlatform | Unset = UNSET, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Create meeting recording Invite a recording bot to the incident's meeting. If no previous recordings exist for the platform, @@ -82,7 +90,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -97,12 +105,43 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + incident_id: str, + *, + client: AuthenticatedClient, + platform: CreateMeetingRecordingPlatform | Unset = UNSET, +) -> Any | MeetingRecordingResponse | None: + """Create meeting recording + + Invite a recording bot to the incident's meeting. If no previous recordings exist for the platform, + a new bot is invited (session 1). If previous sessions exist, a new session is created (re-invite). + The bot joins the meeting, records audio/video, and generates a transcript when the session ends. + + Args: + incident_id (str): + platform (CreateMeetingRecordingPlatform | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + incident_id=incident_id, + client=client, + platform=platform, + ).parsed + + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, platform: CreateMeetingRecordingPlatform | Unset = UNSET, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Create meeting recording Invite a recording bot to the incident's meeting. If no previous recordings exist for the platform, @@ -118,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -129,3 +168,36 @@ async def asyncio_detailed( response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + + +async def asyncio( + incident_id: str, + *, + client: AuthenticatedClient, + platform: CreateMeetingRecordingPlatform | Unset = UNSET, +) -> Any | MeetingRecordingResponse | None: + """Create meeting recording + + Invite a recording bot to the incident's meeting. If no previous recordings exist for the platform, + a new bot is invited (session 1). If previous sessions exist, a new session is created (re-invite). + The bot joins the meeting, records audio/video, and generates a transcript when the session ends. + + Args: + incident_id (str): + platform (CreateMeetingRecordingPlatform | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + platform=platform, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py index 2197b87e..d1b80dd8 100644 --- a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py @@ -1,11 +1,12 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client +from ...models.meeting_recording_response import MeetingRecordingResponse from ...types import Response @@ -23,12 +24,17 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +57,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Delete a meeting recording Delete a meeting recording. Only completed or failed recordings can be deleted. Active recordings @@ -63,7 +71,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -77,11 +85,38 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Delete a meeting recording + + Delete a meeting recording. Only completed or failed recordings can be deleted. Active recordings + (pending, recording, paused) must be stopped first. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Delete a meeting recording Delete a meeting recording. Only completed or failed recordings can be deleted. Active recordings @@ -95,7 +130,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -105,3 +140,32 @@ async def asyncio_detailed( response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Delete a meeting recording + + Delete a meeting recording. Only completed or failed recordings can be deleted. Active recordings + (pending, recording, paused) must be stopped first. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py index 70ad4341..b673907a 100644 --- a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py @@ -1,11 +1,12 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client +from ...models.meeting_recording_response import MeetingRecordingResponse from ...types import Response @@ -23,12 +24,17 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +57,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Delete video from a meeting recording Delete only the video file from a meeting recording. The transcript, summary, and all metadata are @@ -63,7 +71,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -77,11 +85,38 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Delete video from a meeting recording + + Delete only the video file from a meeting recording. The transcript, summary, and all metadata are + preserved. Only non-active recordings with an attached video can have their video deleted. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Delete video from a meeting recording Delete only the video file from a meeting recording. The transcript, summary, and all metadata are @@ -95,7 +130,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -105,3 +140,32 @@ async def asyncio_detailed( response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Delete video from a meeting recording + + Delete only the video file from a meeting recording. The transcript, summary, and all metadata are + preserved. Only non-active recordings with an attached video can have their video deleted. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py new file mode 100644 index 00000000..92892c14 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py @@ -0,0 +1,112 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/meeting_recordings/{id}/delete_session".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 204: + return None + + if response.status_code == 404: + return None + + if response.status_code == 422: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete a standalone meeting recording + + Delete a standalone meeting recording (not linked to an incident). Only the recording owner can + delete it. Active recordings (pending, recording, paused) must be stopped first. Returns 404 for + incident-linked recordings or recordings owned by another user. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete a standalone meeting recording + + Delete a standalone meeting recording (not linked to an incident). Only the recording owner can + delete it. Active recordings (pending, recording, paused) must be stopped first. Returns 404 for + incident-linked recordings or recordings owned by another user. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/meeting_recordings/get_meeting_recording.py b/rootly_sdk/api/meeting_recordings/get_meeting_recording.py index b1cfebd0..a32f12ff 100644 --- a/rootly_sdk/api/meeting_recordings/get_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/get_meeting_recording.py @@ -1,34 +1,54 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...models.get_meeting_recording_include import GetMeetingRecordingInclude +from ...models.meeting_recording_response import MeetingRecordingResponse +from ...types import UNSET, Response, Unset def _get_kwargs( id: str, + *, + include: GetMeetingRecordingInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/meeting_recordings/{id}".format( id=quote(str(id), safe=""), ), + "params": params, } return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + return response_200 if response.status_code == 404: - return None + response_404 = cast(Any, None) + return response_404 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +56,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +71,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: + include: GetMeetingRecordingInclude | Unset = UNSET, +) -> Response[Any | MeetingRecordingResponse]: """Get a meeting recording Retrieve a single meeting recording session including its status, duration, speaker count, word @@ -57,17 +80,19 @@ def sync_detailed( Args: id (str): + include (GetMeetingRecordingInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( id=id, + include=include, ) response = client.get_httpx_client().request( @@ -77,11 +102,42 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, + include: GetMeetingRecordingInclude | Unset = UNSET, +) -> Any | MeetingRecordingResponse | None: + """Get a meeting recording + + Retrieve a single meeting recording session including its status, duration, speaker count, word + count, and transcript summary. + + Args: + id (str): + include (GetMeetingRecordingInclude | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + id=id, + client=client, + include=include, + ).parsed + + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: + include: GetMeetingRecordingInclude | Unset = UNSET, +) -> Response[Any | MeetingRecordingResponse]: """Get a meeting recording Retrieve a single meeting recording session including its status, duration, speaker count, word @@ -89,19 +145,53 @@ async def asyncio_detailed( Args: id (str): + include (GetMeetingRecordingInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( id=id, + include=include, ) response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + include: GetMeetingRecordingInclude | Unset = UNSET, +) -> Any | MeetingRecordingResponse | None: + """Get a meeting recording + + Retrieve a single meeting recording session including its status, duration, speaker count, word + count, and transcript summary. + + Args: + id (str): + include (GetMeetingRecordingInclude | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/import_meeting_recording.py b/rootly_sdk/api/meeting_recordings/import_meeting_recording.py new file mode 100644 index 00000000..121345b4 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/import_meeting_recording.py @@ -0,0 +1,201 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.import_meeting_recording import ImportMeetingRecording +from ...models.meeting_recording_response import MeetingRecordingResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + incident_id: str, + *, + body: ImportMeetingRecording | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/incidents/{incident_id}/meeting_recordings/import".format( + incident_id=quote(str(incident_id), safe=""), + ), + } + + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: + if response.status_code == 201: + response_201 = MeetingRecordingResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = cast(Any, None) + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + incident_id: str, + *, + client: AuthenticatedClient, + body: ImportMeetingRecording | Unset = UNSET, +) -> Response[Any | MeetingRecordingResponse]: + """Import a meeting recording + + Import an externally captured meeting recording and attach it to an incident. Video and transcript + are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings + endpoint invites a bot — this endpoint handles recordings that were captured outside of the bot + flow. + + Args: + incident_id (str): + body (ImportMeetingRecording | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | MeetingRecordingResponse] + """ + + kwargs = _get_kwargs( + incident_id=incident_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + incident_id: str, + *, + client: AuthenticatedClient, + body: ImportMeetingRecording | Unset = UNSET, +) -> Any | MeetingRecordingResponse | None: + """Import a meeting recording + + Import an externally captured meeting recording and attach it to an incident. Video and transcript + are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings + endpoint invites a bot — this endpoint handles recordings that were captured outside of the bot + flow. + + Args: + incident_id (str): + body (ImportMeetingRecording | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + incident_id=incident_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + incident_id: str, + *, + client: AuthenticatedClient, + body: ImportMeetingRecording | Unset = UNSET, +) -> Response[Any | MeetingRecordingResponse]: + """Import a meeting recording + + Import an externally captured meeting recording and attach it to an incident. Video and transcript + are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings + endpoint invites a bot — this endpoint handles recordings that were captured outside of the bot + flow. + + Args: + incident_id (str): + body (ImportMeetingRecording | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | MeetingRecordingResponse] + """ + + kwargs = _get_kwargs( + incident_id=incident_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + incident_id: str, + *, + client: AuthenticatedClient, + body: ImportMeetingRecording | Unset = UNSET, +) -> Any | MeetingRecordingResponse | None: + """Import a meeting recording + + Import an externally captured meeting recording and attach it to an incident. Video and transcript + are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings + endpoint invites a bot — this endpoint handles recordings that were captured outside of the bot + flow. + + Args: + incident_id (str): + body (ImportMeetingRecording | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py index 28c334a2..1e6a2067 100644 --- a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py @@ -1,11 +1,12 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client +from ...models.meeting_recording_response import MeetingRecordingResponse from ...types import Response @@ -23,12 +24,17 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +57,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Leave a meeting call Remove the recording bot from the meeting entirely. Unlike stop, this immediately disconnects the @@ -64,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -78,11 +86,39 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Leave a meeting call + + Remove the recording bot from the meeting entirely. Unlike stop, this immediately disconnects the + bot. The session will transition to analyzing and then completed once transcript processing + finishes. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Leave a meeting call Remove the recording bot from the meeting entirely. Unlike stop, this immediately disconnects the @@ -97,7 +133,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -107,3 +143,33 @@ async def asyncio_detailed( response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Leave a meeting call + + Remove the recording bot from the meeting entirely. Unlike stop, this immediately disconnects the + bot. The session will transition to analyzing and then completed once transcript processing + finishes. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py b/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py new file mode 100644 index 00000000..65341cd2 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.meeting_recording_list import MeetingRecordingList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["status"] = status + + params["platform"] = platform + + params["created_by"] = created_by + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/meeting_recordings", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> MeetingRecordingList | None: + if response.status_code == 200: + response_200 = MeetingRecordingList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[MeetingRecordingList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, +) -> Response[MeetingRecordingList]: + """List all meeting recordings + + List meeting recordings across the organization. Returns the current user's standalone recordings + plus incident-backed recordings the user can access. Supports filtering by status, platform, and + created_by. + + Args: + status (str | Unset): + platform (str | Unset): + created_by (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[MeetingRecordingList] + """ + + kwargs = _get_kwargs( + status=status, + platform=platform, + created_by=created_by, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, +) -> MeetingRecordingList | None: + """List all meeting recordings + + List meeting recordings across the organization. Returns the current user's standalone recordings + plus incident-backed recordings the user can access. Supports filtering by status, platform, and + created_by. + + Args: + status (str | Unset): + platform (str | Unset): + created_by (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + MeetingRecordingList + """ + + return sync_detailed( + client=client, + status=status, + platform=platform, + created_by=created_by, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, +) -> Response[MeetingRecordingList]: + """List all meeting recordings + + List meeting recordings across the organization. Returns the current user's standalone recordings + plus incident-backed recordings the user can access. Supports filtering by status, platform, and + created_by. + + Args: + status (str | Unset): + platform (str | Unset): + created_by (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[MeetingRecordingList] + """ + + kwargs = _get_kwargs( + status=status, + platform=platform, + created_by=created_by, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, +) -> MeetingRecordingList | None: + """List all meeting recordings + + List meeting recordings across the organization. Returns the current user's standalone recordings + plus incident-backed recordings the user can access. Supports filtering by status, platform, and + created_by. + + Args: + status (str | Unset): + platform (str | Unset): + created_by (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + MeetingRecordingList + """ + + return ( + await asyncio_detailed( + client=client, + status=status, + platform=platform, + created_by=created_by, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py b/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py index 5deca74e..ad7f07dc 100644 --- a/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py @@ -1,11 +1,12 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client +from ...models.meeting_recording_response import MeetingRecordingResponse from ...types import Response @@ -23,12 +24,17 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +57,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Pause a meeting recording Pause an active recording session. The bot remains in the meeting but stops capturing audio/video. @@ -63,7 +71,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -77,11 +85,38 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Pause a meeting recording + + Pause an active recording session. The bot remains in the meeting but stops capturing audio/video. + Use the resume endpoint to continue recording. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Pause a meeting recording Pause an active recording session. The bot remains in the meeting but stops capturing audio/video. @@ -95,7 +130,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -105,3 +140,32 @@ async def asyncio_detailed( response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Pause a meeting recording + + Pause an active recording session. The bot remains in the meeting but stops capturing audio/video. + Use the resume endpoint to continue recording. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py index 11c21c66..867ec697 100644 --- a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py @@ -1,11 +1,12 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client +from ...models.meeting_recording_response import MeetingRecordingResponse from ...types import Response @@ -23,12 +24,17 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +57,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Resume a meeting recording Resume a paused recording session. The bot continues capturing audio/video from the meeting. @@ -62,7 +70,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -76,11 +84,37 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Resume a meeting recording + + Resume a paused recording session. The bot continues capturing audio/video from the meeting. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Resume a meeting recording Resume a paused recording session. The bot continues capturing audio/video from the meeting. @@ -93,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -103,3 +137,31 @@ async def asyncio_detailed( response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Resume a meeting recording + + Resume a paused recording session. The bot continues capturing audio/video from the meeting. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/start_recording_session.py b/rootly_sdk/api/meeting_recordings/start_recording_session.py new file mode 100644 index 00000000..21addcf5 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/start_recording_session.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.start_session_request import StartSessionRequest +from ...models.start_session_response import StartSessionResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: StartSessionRequest | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/meeting_recordings/start_session", + } + + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | StartSessionResponse | None: + if response.status_code == 201: + response_201 = StartSessionResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = cast(Any, None) + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | StartSessionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: StartSessionRequest | Unset = UNSET, +) -> Response[Any | StartSessionResponse]: + """Start a recording session + + Start a new desktop recording session. The server creates a recording record and returns a stream + token the desktop client uses to send audio. No provider-specific configuration is needed from the + client. + + Args: + body (StartSessionRequest | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | StartSessionResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: StartSessionRequest | Unset = UNSET, +) -> Any | StartSessionResponse | None: + """Start a recording session + + Start a new desktop recording session. The server creates a recording record and returns a stream + token the desktop client uses to send audio. No provider-specific configuration is needed from the + client. + + Args: + body (StartSessionRequest | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | StartSessionResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: StartSessionRequest | Unset = UNSET, +) -> Response[Any | StartSessionResponse]: + """Start a recording session + + Start a new desktop recording session. The server creates a recording record and returns a stream + token the desktop client uses to send audio. No provider-specific configuration is needed from the + client. + + Args: + body (StartSessionRequest | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | StartSessionResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: StartSessionRequest | Unset = UNSET, +) -> Any | StartSessionResponse | None: + """Start a recording session + + Start a new desktop recording session. The server creates a recording record and returns a stream + token the desktop client uses to send audio. No provider-specific configuration is needed from the + client. + + Args: + body (StartSessionRequest | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | StartSessionResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py index d17057a9..4b59b83a 100644 --- a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py @@ -1,11 +1,12 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client +from ...models.meeting_recording_response import MeetingRecordingResponse from ...types import Response @@ -23,12 +24,17 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +57,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Stop a meeting recording Stop an active or paused recording. The bot finishes processing, generates a transcript, and the @@ -64,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -78,11 +86,39 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Stop a meeting recording + + Stop an active or paused recording. The bot finishes processing, generates a transcript, and the + session status transitions to completed. This is irreversible — to record again, create a new + session. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: +) -> Response[Any | MeetingRecordingResponse]: """Stop a meeting recording Stop an active or paused recording. The bot finishes processing, generates a transcript, and the @@ -97,7 +133,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] + Response[Any | MeetingRecordingResponse] """ kwargs = _get_kwargs( @@ -107,3 +143,33 @@ async def asyncio_detailed( response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> Any | MeetingRecordingResponse | None: + """Stop a meeting recording + + Stop an active or paused recording. The bot finishes processing, generates a transcript, and the + session status transitions to completed. This is irreversible — to record again, create a new + session. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/on_calls/list_oncalls.py b/rootly_sdk/api/on_calls/list_oncalls.py index 16c945b8..4d9fca2e 100644 --- a/rootly_sdk/api/on_calls/list_oncalls.py +++ b/rootly_sdk/api/on_calls/list_oncalls.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any import httpx @@ -7,6 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.list_oncalls_include import ListOncallsInclude +from ...models.oncall_list import OncallList from ...types import UNSET, Response, Unset @@ -64,9 +65,12 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OncallList | None: if response.status_code == 200: - response_200 = cast(Any, None) + response_200 = OncallList.from_dict(response.json()) + return response_200 if response.status_code == 401: @@ -85,7 +89,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OncallList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -108,7 +114,7 @@ def sync_detailed( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, -) -> Response[Any | ErrorsList]: +) -> Response[ErrorsList | OncallList]: """List on-calls List who is currently on-call, with support for filtering by escalation policy, schedule, and user. @@ -132,7 +138,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any | ErrorsList] + Response[ErrorsList | OncallList] """ kwargs = _get_kwargs( @@ -170,7 +176,7 @@ def sync( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, -) -> Any | ErrorsList | None: +) -> ErrorsList | OncallList | None: """List on-calls List who is currently on-call, with support for filtering by escalation policy, schedule, and user. @@ -194,7 +200,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Any | ErrorsList + ErrorsList | OncallList """ return sync_detailed( @@ -227,7 +233,7 @@ async def asyncio_detailed( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, -) -> Response[Any | ErrorsList]: +) -> Response[ErrorsList | OncallList]: """List on-calls List who is currently on-call, with support for filtering by escalation policy, schedule, and user. @@ -251,7 +257,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any | ErrorsList] + Response[ErrorsList | OncallList] """ kwargs = _get_kwargs( @@ -287,7 +293,7 @@ async def asyncio( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, -) -> Any | ErrorsList | None: +) -> ErrorsList | OncallList | None: """List on-calls List who is currently on-call, with support for filtering by escalation policy, schedule, and user. @@ -311,7 +317,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Any | ErrorsList + ErrorsList | OncallList """ return ( diff --git a/rootly_sdk/api/override_shifts/create_override_shift.py b/rootly_sdk/api/override_shifts/create_override_shift.py index e208220a..ec336dd4 100644 --- a/rootly_sdk/api/override_shifts/create_override_shift.py +++ b/rootly_sdk/api/override_shifts/create_override_shift.py @@ -37,6 +37,11 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response ) -> ErrorsList | OverrideShiftResponse | None: + if response.status_code == 200: + response_200 = OverrideShiftResponse.from_dict(response.json()) + + return response_200 + if response.status_code == 201: response_201 = OverrideShiftResponse.from_dict(response.json()) @@ -78,7 +83,9 @@ def sync_detailed( """creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the - specified time range, they will be automatically deleted and replaced by the new override. + specified time range, they will be automatically deleted and replaced by the new override. This + endpoint is idempotent: re-sending an identical override (same user and same start/end time) returns + the existing override with a 200 status and does not recreate it. Args: schedule_id (str): @@ -113,7 +120,9 @@ def sync( """creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the - specified time range, they will be automatically deleted and replaced by the new override. + specified time range, they will be automatically deleted and replaced by the new override. This + endpoint is idempotent: re-sending an identical override (same user and same start/end time) returns + the existing override with a 200 status and does not recreate it. Args: schedule_id (str): @@ -143,7 +152,9 @@ async def asyncio_detailed( """creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the - specified time range, they will be automatically deleted and replaced by the new override. + specified time range, they will be automatically deleted and replaced by the new override. This + endpoint is idempotent: re-sending an identical override (same user and same start/end time) returns + the existing override with a 200 status and does not recreate it. Args: schedule_id (str): @@ -176,7 +187,9 @@ async def asyncio( """creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the - specified time range, they will be automatically deleted and replaced by the new override. + specified time range, they will be automatically deleted and replaced by the new override. This + endpoint is idempotent: re-sending an identical override (same user and same start/end time) returns + the existing override with a 200 status and does not recreate it. Args: schedule_id (str): diff --git a/rootly_sdk/api/pulses/list_pulses.py b/rootly_sdk/api/pulses/list_pulses.py index 45c9eeef..1603a528 100644 --- a/rootly_sdk/api/pulses/list_pulses.py +++ b/rootly_sdk/api/pulses/list_pulses.py @@ -29,6 +29,26 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> dict[str, Any]: @@ -71,6 +91,46 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[source][eq]"] = filtersourceeq + + params["filter[source][not_eq]"] = filtersourcenot_eq + + params["filter[source][in]"] = filtersourcein + + params["filter[source][not_in]"] = filtersourcenot_in + + params["filter[services][eq]"] = filterserviceseq + + params["filter[services][not_eq]"] = filterservicesnot_eq + + params["filter[services][in]"] = filterservicesin + + params["filter[services][not_in]"] = filterservicesnot_in + + params["filter[environments][eq]"] = filterenvironmentseq + + params["filter[environments][not_eq]"] = filterenvironmentsnot_eq + + params["filter[environments][in]"] = filterenvironmentsin + + params["filter[environments][not_in]"] = filterenvironmentsnot_in + + params["filter[labels][eq]"] = filterlabelseq + + params["filter[labels][not_eq]"] = filterlabelsnot_eq + + params["filter[labels][in]"] = filterlabelsin + + params["filter[labels][not_in]"] = filterlabelsnot_in + + params["filter[refs][eq]"] = filterrefseq + + params["filter[refs][not_eq]"] = filterrefsnot_eq + + params["filter[refs][in]"] = filterrefsin + + params["filter[refs][not_in]"] = filterrefsnot_in + params["page[number]"] = pagenumber params["page[size]"] = pagesize @@ -128,6 +188,26 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> Response[PulseList]: @@ -154,6 +234,26 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterrefseq (str | Unset): + filterrefsnot_eq (str | Unset): + filterrefsin (str | Unset): + filterrefsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -184,6 +284,26 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterrefseq=filterrefseq, + filterrefsnot_eq=filterrefsnot_eq, + filterrefsin=filterrefsin, + filterrefsnot_in=filterrefsnot_in, pagenumber=pagenumber, pagesize=pagesize, ) @@ -216,6 +336,26 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> PulseList | None: @@ -242,6 +382,26 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterrefseq (str | Unset): + filterrefsnot_eq (str | Unset): + filterrefsin (str | Unset): + filterrefsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -273,6 +433,26 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterrefseq=filterrefseq, + filterrefsnot_eq=filterrefsnot_eq, + filterrefsin=filterrefsin, + filterrefsnot_in=filterrefsnot_in, pagenumber=pagenumber, pagesize=pagesize, ).parsed @@ -299,6 +479,26 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> Response[PulseList]: @@ -325,6 +525,26 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterrefseq (str | Unset): + filterrefsnot_eq (str | Unset): + filterrefsin (str | Unset): + filterrefsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -355,6 +575,26 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterrefseq=filterrefseq, + filterrefsnot_eq=filterrefsnot_eq, + filterrefsin=filterrefsin, + filterrefsnot_in=filterrefsnot_in, pagenumber=pagenumber, pagesize=pagesize, ) @@ -385,6 +625,26 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> PulseList | None: @@ -411,6 +671,26 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterrefseq (str | Unset): + filterrefsnot_eq (str | Unset): + filterrefsin (str | Unset): + filterrefsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -443,6 +723,26 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterrefseq=filterrefseq, + filterrefsnot_eq=filterrefsnot_eq, + filterrefsin=filterrefsin, + filterrefsnot_in=filterrefsnot_in, pagenumber=pagenumber, pagesize=pagesize, ) diff --git a/rootly_sdk/api/schedules/list_schedules.py b/rootly_sdk/api/schedules/list_schedules.py index bec7bb90..a10d4e91 100644 --- a/rootly_sdk/api/schedules/list_schedules.py +++ b/rootly_sdk/api/schedules/list_schedules.py @@ -18,6 +18,10 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> dict[str, Any]: @@ -38,6 +42,14 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + params["page[number]"] = pagenumber params["page[size]"] = pagesize @@ -84,6 +96,10 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> Response[ScheduleList]: @@ -99,6 +115,10 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -118,6 +138,10 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, pagenumber=pagenumber, pagesize=pagesize, ) @@ -139,6 +163,10 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> ScheduleList | None: @@ -154,6 +182,10 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -174,6 +206,10 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, pagenumber=pagenumber, pagesize=pagesize, ).parsed @@ -189,6 +225,10 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> Response[ScheduleList]: @@ -204,6 +244,10 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -223,6 +267,10 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, pagenumber=pagenumber, pagesize=pagesize, ) @@ -242,6 +290,10 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, ) -> ScheduleList | None: @@ -257,6 +309,10 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -278,6 +334,10 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, pagenumber=pagenumber, pagesize=pagesize, ) diff --git a/rootly_sdk/api/services/bulk_delete_services.py b/rootly_sdk/api/services/bulk_delete_services.py new file mode 100644 index 00000000..cb45739c --- /dev/null +++ b/rootly_sdk/api/services/bulk_delete_services.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_destroy_services_response import BulkDestroyServicesResponse +from ...models.bulk_destroy_services_type_0 import BulkDestroyServicesType0 +from ...models.bulk_destroy_services_type_1 import BulkDestroyServicesType1 +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + *, + body: BulkDestroyServicesType0 | BulkDestroyServicesType1, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/services/bulk_delete", + } + + if isinstance(body, BulkDestroyServicesType0): + _kwargs["json"] = body.to_dict() + else: + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyServicesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkDestroyServicesResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyServicesResponse.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyServicesType0 | BulkDestroyServicesType1, +) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: + """Bulk delete Services + + Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyServicesType0 | BulkDestroyServicesType1): Two mutually exclusive modes. + Pass exactly one of: external_ids (delete specific records) or managed_by (prune all + managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BulkDestroyServicesType0 | BulkDestroyServicesType1, +) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: + """Bulk delete Services + + Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyServicesType0 | BulkDestroyServicesType1): Two mutually exclusive modes. + Pass exactly one of: external_ids (delete specific records) or managed_by (prune all + managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyServicesType0 | BulkDestroyServicesType1, +) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: + """Bulk delete Services + + Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyServicesType0 | BulkDestroyServicesType1): Two mutually exclusive modes. + Pass exactly one of: external_ids (delete specific records) or managed_by (prune all + managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BulkDestroyServicesType0 | BulkDestroyServicesType1, +) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: + """Bulk delete Services + + Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyServicesType0 | BulkDestroyServicesType1): Two mutually exclusive modes. + Pass exactly one of: external_ids (delete specific records) or managed_by (prune all + managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/services/bulk_upsert_services.py b/rootly_sdk/api/services/bulk_upsert_services.py new file mode 100644 index 00000000..c1aaa566 --- /dev/null +++ b/rootly_sdk/api/services/bulk_upsert_services.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_upsert_services import BulkUpsertServices +from ...models.bulk_upsert_services_error import BulkUpsertServicesError +from ...models.bulk_upsert_services_response import BulkUpsertServicesResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + *, + body: BulkUpsertServices, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/services/bulk_upsert", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertServicesResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkUpsertServicesError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertServicesError.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertServices, +) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: + """Bulk upsert Services + + Create or update multiple services by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertServices): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BulkUpsertServices, +) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: + """Bulk upsert Services + + Create or update multiple services by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertServices): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertServices, +) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: + """Bulk upsert Services + + Create or update multiple services by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertServices): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BulkUpsertServices, +) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: + """Bulk upsert Services + + Create or update multiple services by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertServices): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/services/list_services.py b/rootly_sdk/api/services/list_services.py index cb6db677..0bec2c70 100644 --- a/rootly_sdk/api/services/list_services.py +++ b/rootly_sdk/api/services/list_services.py @@ -27,6 +27,22 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -64,6 +80,38 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[alert_broadcast_enabled][eq]"] = filteralert_broadcast_enabledeq + + params["filter[alert_broadcast_enabled][not_eq]"] = filteralert_broadcast_enablednot_eq + + params["filter[alert_broadcast_enabled][in]"] = filteralert_broadcast_enabledin + + params["filter[alert_broadcast_enabled][not_in]"] = filteralert_broadcast_enablednot_in + + params["filter[incident_broadcast_enabled][eq]"] = filterincident_broadcast_enabledeq + + params["filter[incident_broadcast_enabled][not_eq]"] = filterincident_broadcast_enablednot_eq + + params["filter[incident_broadcast_enabled][in]"] = filterincident_broadcast_enabledin + + params["filter[incident_broadcast_enabled][not_in]"] = filterincident_broadcast_enablednot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -117,6 +165,22 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[ServiceList]: """List services @@ -140,6 +204,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -167,6 +247,22 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, sort=sort, ) @@ -196,6 +292,22 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> ServiceList | None: """List services @@ -219,6 +331,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -247,6 +375,22 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, sort=sort, ).parsed @@ -270,6 +414,22 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[ServiceList]: """List services @@ -293,6 +453,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -320,6 +496,22 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, sort=sort, ) @@ -347,6 +539,22 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> ServiceList | None: """List services @@ -370,6 +578,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -399,6 +623,22 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/severities/list_severities.py b/rootly_sdk/api/severities/list_severities.py index 852c9a44..8102f620 100644 --- a/rootly_sdk/api/severities/list_severities.py +++ b/rootly_sdk/api/severities/list_severities.py @@ -23,6 +23,22 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -52,6 +68,38 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[severity][eq]"] = filterseverityeq + + params["filter[severity][not_eq]"] = filterseveritynot_eq + + params["filter[severity][in]"] = filterseverityin + + params["filter[severity][not_in]"] = filterseveritynot_in + + params["filter[color][eq]"] = filtercoloreq + + params["filter[color][not_eq]"] = filtercolornot_eq + + params["filter[color][in]"] = filtercolorin + + params["filter[color][not_in]"] = filtercolornot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -101,6 +149,22 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[SeverityList]: """List severities @@ -120,6 +184,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -143,6 +223,22 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) @@ -168,6 +264,22 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> SeverityList | None: """List severities @@ -187,6 +299,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -211,6 +339,22 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ).parsed @@ -230,6 +374,22 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[SeverityList]: """List severities @@ -249,6 +409,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -272,6 +448,22 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) @@ -295,6 +487,22 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> SeverityList | None: """List severities @@ -314,6 +522,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -339,6 +563,22 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/__init__.py b/rootly_sdk/api/shift_coverage_requests/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py new file mode 100644 index 00000000..422f1a19 --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.new_shift_coverage_request import NewShiftCoverageRequest +from ...models.shift_coverage_request_list import ShiftCoverageRequestList +from ...types import Response + + +def _get_kwargs( + schedule_id: str, + *, + body: NewShiftCoverageRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/schedules/{schedule_id}/shift_coverage_requests".format( + schedule_id=quote(str(schedule_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ShiftCoverageRequestList | None: + if response.status_code == 201: + response_201 = ShiftCoverageRequestList.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ShiftCoverageRequestList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + schedule_id: str, + *, + client: AuthenticatedClient, + body: NewShiftCoverageRequest, +) -> Response[ErrorsList | ShiftCoverageRequestList]: + """creates shift coverage requests + + Creates coverage requests for the shifts overlapping the requested time range. A range can span + multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be + created; the response is always a list. A coverage request broadcasts to schedule members so someone + can volunteer to cover the shift. + + Args: + schedule_id (str): + body (NewShiftCoverageRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | ShiftCoverageRequestList] + """ + + kwargs = _get_kwargs( + schedule_id=schedule_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + schedule_id: str, + *, + client: AuthenticatedClient, + body: NewShiftCoverageRequest, +) -> ErrorsList | ShiftCoverageRequestList | None: + """creates shift coverage requests + + Creates coverage requests for the shifts overlapping the requested time range. A range can span + multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be + created; the response is always a list. A coverage request broadcasts to schedule members so someone + can volunteer to cover the shift. + + Args: + schedule_id (str): + body (NewShiftCoverageRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | ShiftCoverageRequestList + """ + + return sync_detailed( + schedule_id=schedule_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + schedule_id: str, + *, + client: AuthenticatedClient, + body: NewShiftCoverageRequest, +) -> Response[ErrorsList | ShiftCoverageRequestList]: + """creates shift coverage requests + + Creates coverage requests for the shifts overlapping the requested time range. A range can span + multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be + created; the response is always a list. A coverage request broadcasts to schedule members so someone + can volunteer to cover the shift. + + Args: + schedule_id (str): + body (NewShiftCoverageRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | ShiftCoverageRequestList] + """ + + kwargs = _get_kwargs( + schedule_id=schedule_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + schedule_id: str, + *, + client: AuthenticatedClient, + body: NewShiftCoverageRequest, +) -> ErrorsList | ShiftCoverageRequestList | None: + """creates shift coverage requests + + Creates coverage requests for the shifts overlapping the requested time range. A range can span + multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be + created; the response is always a list. A coverage request broadcasts to schedule members so someone + can volunteer to cover the shift. + + Args: + schedule_id (str): + body (NewShiftCoverageRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | ShiftCoverageRequestList + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py new file mode 100644 index 00000000..af89d0d5 --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py @@ -0,0 +1,163 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.shift_coverage_request_response import ShiftCoverageRequestResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/shift_coverage_requests/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ShiftCoverageRequestResponse | None: + if response.status_code == 200: + response_200 = ShiftCoverageRequestResponse.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ShiftCoverageRequestResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ShiftCoverageRequestResponse]: + """deletes a shift coverage request + + Deletes a shift coverage request. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ShiftCoverageRequestResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> ShiftCoverageRequestResponse | None: + """deletes a shift coverage request + + Deletes a shift coverage request. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ShiftCoverageRequestResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ShiftCoverageRequestResponse]: + """deletes a shift coverage request + + Deletes a shift coverage request. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ShiftCoverageRequestResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> ShiftCoverageRequestResponse | None: + """deletes a shift coverage request + + Deletes a shift coverage request. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ShiftCoverageRequestResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py new file mode 100644 index 00000000..b841df57 --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py @@ -0,0 +1,163 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.shift_coverage_request_response import ShiftCoverageRequestResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/shift_coverage_requests/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ShiftCoverageRequestResponse | None: + if response.status_code == 200: + response_200 = ShiftCoverageRequestResponse.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ShiftCoverageRequestResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ShiftCoverageRequestResponse]: + """retrieves a shift coverage request + + Retrieves a specific shift coverage request. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ShiftCoverageRequestResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> ShiftCoverageRequestResponse | None: + """retrieves a shift coverage request + + Retrieves a specific shift coverage request. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ShiftCoverageRequestResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ShiftCoverageRequestResponse]: + """retrieves a shift coverage request + + Retrieves a specific shift coverage request. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ShiftCoverageRequestResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> ShiftCoverageRequestResponse | None: + """retrieves a shift coverage request + + Retrieves a specific shift coverage request. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ShiftCoverageRequestResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py b/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py new file mode 100644 index 00000000..62355c3a --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py @@ -0,0 +1,163 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.shift_coverage_request_list import ShiftCoverageRequestList +from ...types import Response + + +def _get_kwargs( + schedule_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/schedules/{schedule_id}/shift_coverage_requests".format( + schedule_id=quote(str(schedule_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ShiftCoverageRequestList | None: + if response.status_code == 200: + response_200 = ShiftCoverageRequestList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ShiftCoverageRequestList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + schedule_id: str, + *, + client: AuthenticatedClient, +) -> Response[ShiftCoverageRequestList]: + """list shift coverage requests + + List active shift coverage requests for a schedule. + + Args: + schedule_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ShiftCoverageRequestList] + """ + + kwargs = _get_kwargs( + schedule_id=schedule_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + schedule_id: str, + *, + client: AuthenticatedClient, +) -> ShiftCoverageRequestList | None: + """list shift coverage requests + + List active shift coverage requests for a schedule. + + Args: + schedule_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ShiftCoverageRequestList + """ + + return sync_detailed( + schedule_id=schedule_id, + client=client, + ).parsed + + +async def asyncio_detailed( + schedule_id: str, + *, + client: AuthenticatedClient, +) -> Response[ShiftCoverageRequestList]: + """list shift coverage requests + + List active shift coverage requests for a schedule. + + Args: + schedule_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ShiftCoverageRequestList] + """ + + kwargs = _get_kwargs( + schedule_id=schedule_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + schedule_id: str, + *, + client: AuthenticatedClient, +) -> ShiftCoverageRequestList | None: + """list shift coverage requests + + List active shift coverage requests for a schedule. + + Args: + schedule_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ShiftCoverageRequestList + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/sl_as/list_sl_as.py b/rootly_sdk/api/sl_as/list_sl_as.py index 38524d80..d7f57b0a 100644 --- a/rootly_sdk/api/sl_as/list_sl_as.py +++ b/rootly_sdk/api/sl_as/list_sl_as.py @@ -20,6 +20,14 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -43,6 +51,22 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -89,6 +113,14 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[SlaList]: """List SLAs @@ -105,6 +137,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -125,6 +165,14 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) @@ -147,6 +195,14 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> SlaList | None: """List SLAs @@ -163,6 +219,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -184,6 +248,14 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ).parsed @@ -200,6 +272,14 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[SlaList]: """List SLAs @@ -216,6 +296,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -236,6 +324,14 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) @@ -256,6 +352,14 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> SlaList | None: """List SLAs @@ -272,6 +376,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -294,6 +406,14 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/status_pages/list_status_pages.py b/rootly_sdk/api/status_pages/list_status_pages.py index 09701011..1e11a52a 100644 --- a/rootly_sdk/api/status_pages/list_status_pages.py +++ b/rootly_sdk/api/status_pages/list_status_pages.py @@ -21,6 +21,14 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -46,6 +54,22 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -93,6 +117,14 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[StatusPageList]: """List status pages @@ -110,6 +142,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -131,6 +171,14 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, sort=sort, ) @@ -154,6 +202,14 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> StatusPageList | None: """List status pages @@ -171,6 +227,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -193,6 +257,14 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, sort=sort, ).parsed @@ -210,6 +282,14 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[StatusPageList]: """List status pages @@ -227,6 +307,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -248,6 +336,14 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, sort=sort, ) @@ -269,6 +365,14 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> StatusPageList | None: """List status pages @@ -286,6 +390,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -309,6 +421,14 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/teams/bulk_delete_groups.py b/rootly_sdk/api/teams/bulk_delete_groups.py new file mode 100644 index 00000000..dc3ee765 --- /dev/null +++ b/rootly_sdk/api/teams/bulk_delete_groups.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_destroy_teams_response import BulkDestroyTeamsResponse +from ...models.bulk_destroy_teams_type_0 import BulkDestroyTeamsType0 +from ...models.bulk_destroy_teams_type_1 import BulkDestroyTeamsType1 +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + *, + body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/teams/bulk_delete", + } + + if isinstance(body, BulkDestroyTeamsType0): + _kwargs["json"] = body.to_dict() + else: + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyTeamsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkDestroyTeamsResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyTeamsResponse.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, +) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: + """Bulk delete Teams + + Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyTeamsType0 | BulkDestroyTeamsType1): Two mutually exclusive modes. Pass + exactly one of: external_ids (delete specific records) or managed_by (prune all managed + records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, +) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: + """Bulk delete Teams + + Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyTeamsType0 | BulkDestroyTeamsType1): Two mutually exclusive modes. Pass + exactly one of: external_ids (delete specific records) or managed_by (prune all managed + records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, +) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: + """Bulk delete Teams + + Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyTeamsType0 | BulkDestroyTeamsType1): Two mutually exclusive modes. Pass + exactly one of: external_ids (delete specific records) or managed_by (prune all managed + records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, +) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: + """Bulk delete Teams + + Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyTeamsType0 | BulkDestroyTeamsType1): Two mutually exclusive modes. Pass + exactly one of: external_ids (delete specific records) or managed_by (prune all managed + records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/teams/bulk_upsert_groups.py b/rootly_sdk/api/teams/bulk_upsert_groups.py new file mode 100644 index 00000000..406c76f5 --- /dev/null +++ b/rootly_sdk/api/teams/bulk_upsert_groups.py @@ -0,0 +1,212 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.bulk_upsert_teams import BulkUpsertTeams +from ...models.bulk_upsert_teams_error import BulkUpsertTeamsError +from ...models.bulk_upsert_teams_response import BulkUpsertTeamsResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + *, + body: BulkUpsertTeams, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/teams/bulk_upsert", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertTeamsResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + + def _parse_response_422(data: object) -> BulkUpsertTeamsError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertTeamsError.from_dict(data) + + return response_422_type_1 + + response_422 = _parse_response_422(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertTeams, +) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: + """Bulk upsert Teams + + Create or update multiple teams by external_id. Only attributes present in the payload are written + (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both + create and update capability across the resource scope (team/org-scoped); record-scoped principals + cannot use this endpoint (they receive 404), which also prevents the create-vs-update branch from + leaking whether an external_id exists. + + Args: + body (BulkUpsertTeams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BulkUpsertTeams, +) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: + """Bulk upsert Teams + + Create or update multiple teams by external_id. Only attributes present in the payload are written + (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both + create and update capability across the resource scope (team/org-scoped); record-scoped principals + cannot use this endpoint (they receive 404), which also prevents the create-vs-update branch from + leaking whether an external_id exists. + + Args: + body (BulkUpsertTeams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertTeams, +) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: + """Bulk upsert Teams + + Create or update multiple teams by external_id. Only attributes present in the payload are written + (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both + create and update capability across the resource scope (team/org-scoped); record-scoped principals + cannot use this endpoint (they receive 404), which also prevents the create-vs-update branch from + leaking whether an external_id exists. + + Args: + body (BulkUpsertTeams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BulkUpsertTeams, +) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: + """Bulk upsert Teams + + Create or update multiple teams by external_id. Only attributes present in the payload are written + (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both + create and update capability across the resource scope (team/org-scoped); record-scoped principals + cannot use this endpoint (they receive 404), which also prevents the create-vs-update branch from + leaking whether an external_id exists. + + Args: + body (BulkUpsertTeams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/teams/list_teams.py b/rootly_sdk/api/teams/list_teams.py index b0fed6ca..8ae9cdb6 100644 --- a/rootly_sdk/api/teams/list_teams.py +++ b/rootly_sdk/api/teams/list_teams.py @@ -29,6 +29,26 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> dict[str, Any]: @@ -72,6 +92,46 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[color][eq]"] = filtercoloreq + + params["filter[color][not_eq]"] = filtercolornot_eq + + params["filter[color][in]"] = filtercolorin + + params["filter[color][not_in]"] = filtercolornot_in + + params["filter[alert_broadcast_enabled][eq]"] = filteralert_broadcast_enabledeq + + params["filter[alert_broadcast_enabled][not_eq]"] = filteralert_broadcast_enablednot_eq + + params["filter[alert_broadcast_enabled][in]"] = filteralert_broadcast_enabledin + + params["filter[alert_broadcast_enabled][not_in]"] = filteralert_broadcast_enablednot_in + + params["filter[incident_broadcast_enabled][eq]"] = filterincident_broadcast_enabledeq + + params["filter[incident_broadcast_enabled][not_eq]"] = filterincident_broadcast_enablednot_eq + + params["filter[incident_broadcast_enabled][in]"] = filterincident_broadcast_enabledin + + params["filter[incident_broadcast_enabled][not_in]"] = filterincident_broadcast_enablednot_in + params["sort"] = sort params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -126,6 +186,26 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[TeamList]: """List teams @@ -150,6 +230,26 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -178,6 +278,26 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, sort=sort, ) @@ -208,6 +328,26 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> TeamList | None: """List teams @@ -232,6 +372,26 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -261,6 +421,26 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, sort=sort, ).parsed @@ -285,6 +465,26 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> Response[TeamList]: """List teams @@ -309,6 +509,26 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -337,6 +557,26 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, sort=sort, ) @@ -365,6 +605,26 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, ) -> TeamList | None: """List teams @@ -389,6 +649,26 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -419,6 +699,26 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, sort=sort, ) ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..6f1732ff --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.new_workflow_action_item_form_field_condition import NewWorkflowActionItemFormFieldCondition +from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + *, + body: NewWorkflowActionItemFormFieldCondition, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/workflows/{workflow_id}/action_item_form_field_conditions".format( + workflow_id=quote(str(workflow_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + if response.status_code == 201: + response_201 = WorkflowActionItemFormFieldConditionResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + body: NewWorkflowActionItemFormFieldCondition, +) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """Creates a workflow action item form field condition + + Creates a new workflow action item form field condition from provided data + + Args: + workflow_id (str): + body (NewWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, + body: NewWorkflowActionItemFormFieldCondition, +) -> Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """Creates a workflow action item form field condition + + Creates a new workflow action item form field condition from provided data + + Args: + workflow_id (str): + body (NewWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse + """ + + return sync_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + body: NewWorkflowActionItemFormFieldCondition, +) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """Creates a workflow action item form field condition + + Creates a new workflow action item form field condition from provided data + + Args: + workflow_id (str): + body (NewWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, + body: NewWorkflowActionItemFormFieldCondition, +) -> Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """Creates a workflow action item form field condition + + Creates a new workflow action item form field condition from provided data + + Args: + workflow_id (str): + body (NewWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..fac3f287 --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/workflow_action_item_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + if response.status_code == 200: + response_200 = WorkflowActionItemFormFieldConditionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """Delete a workflow action item form field condition + + Delete a specific workflow action item form field condition by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """Delete a workflow action item form field condition + + Delete a specific workflow action item form field condition by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | WorkflowActionItemFormFieldConditionResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """Delete a workflow action item form field condition + + Delete a specific workflow action item form field condition by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """Delete a workflow action item form field condition + + Delete a specific workflow action item form field condition by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | WorkflowActionItemFormFieldConditionResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..b9d2d505 --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/workflow_action_item_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + if response.status_code == 200: + response_200 = WorkflowActionItemFormFieldConditionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """Retrieves a workflow action item form field condition + + Retrieves a specific workflow action item form field condition by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """Retrieves a workflow action item form field condition + + Retrieves a specific workflow action item form field condition by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | WorkflowActionItemFormFieldConditionResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """Retrieves a workflow action item form field condition + + Retrieves a specific workflow action item form field condition by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """Retrieves a workflow action item form field condition + + Retrieves a specific workflow action item form field condition by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | WorkflowActionItemFormFieldConditionResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py new file mode 100644 index 00000000..f1e23abb --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.workflow_action_item_form_field_condition_list import WorkflowActionItemFormFieldConditionList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workflow_id: str, + *, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["include"] = include + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/workflows/{workflow_id}/action_item_form_field_conditions".format( + workflow_id=quote(str(workflow_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> WorkflowActionItemFormFieldConditionList | None: + if response.status_code == 200: + response_200 = WorkflowActionItemFormFieldConditionList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[WorkflowActionItemFormFieldConditionList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> Response[WorkflowActionItemFormFieldConditionList]: + """List workflow action item form field conditions + + List workflow action item form field conditions + + Args: + workflow_id (str): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[WorkflowActionItemFormFieldConditionList] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> WorkflowActionItemFormFieldConditionList | None: + """List workflow action item form field conditions + + List workflow action item form field conditions + + Args: + workflow_id (str): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + WorkflowActionItemFormFieldConditionList + """ + + return sync_detailed( + workflow_id=workflow_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> Response[WorkflowActionItemFormFieldConditionList]: + """List workflow action item form field conditions + + List workflow action item form field conditions + + Args: + workflow_id (str): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[WorkflowActionItemFormFieldConditionList] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> WorkflowActionItemFormFieldConditionList | None: + """List workflow action item form field conditions + + List workflow action item form field conditions + + Args: + workflow_id (str): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + WorkflowActionItemFormFieldConditionList + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..d85c85c9 --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.update_workflow_action_item_form_field_condition import UpdateWorkflowActionItemFormFieldCondition +from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UpdateWorkflowActionItemFormFieldCondition, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/v1/workflow_action_item_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + if response.status_code == 200: + response_200 = WorkflowActionItemFormFieldConditionResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateWorkflowActionItemFormFieldCondition, +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """Update a workflow action item form field condition + + Update a specific workflow action item form field condition by id + + Args: + id (str): + body (UpdateWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, + body: UpdateWorkflowActionItemFormFieldCondition, +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """Update a workflow action item form field condition + + Update a specific workflow action item form field condition by id + + Args: + id (str): + body (UpdateWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | WorkflowActionItemFormFieldConditionResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateWorkflowActionItemFormFieldCondition, +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """Update a workflow action item form field condition + + Update a specific workflow action item form field condition by id + + Args: + id (str): + body (UpdateWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + body: UpdateWorkflowActionItemFormFieldCondition, +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """Update a workflow action item form field condition + + Update a specific workflow action item form field condition by id + + Args: + id (str): + body (UpdateWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | WorkflowActionItemFormFieldConditionResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py index dad27df0..cc404c3a 100644 --- a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py +++ b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py @@ -19,6 +19,14 @@ def _get_kwargs( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -35,6 +43,22 @@ def _get_kwargs( params["filter[slug]"] = filterslug + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -79,6 +103,14 @@ def sync_detailed( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, ) -> Response[WorkflowTaskList]: """List workflow tasks @@ -92,6 +124,14 @@ def sync_detailed( filtersearch (str | Unset): filtername (str | Unset): filterslug (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,6 +149,14 @@ def sync_detailed( filtersearch=filtersearch, filtername=filtername, filterslug=filterslug, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, ) response = client.get_httpx_client().request( @@ -128,6 +176,14 @@ def sync( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, ) -> WorkflowTaskList | None: """List workflow tasks @@ -141,6 +197,14 @@ def sync( filtersearch (str | Unset): filtername (str | Unset): filterslug (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -159,6 +223,14 @@ def sync( filtersearch=filtersearch, filtername=filtername, filterslug=filterslug, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, ).parsed @@ -172,6 +244,14 @@ async def asyncio_detailed( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, ) -> Response[WorkflowTaskList]: """List workflow tasks @@ -185,6 +265,14 @@ async def asyncio_detailed( filtersearch (str | Unset): filtername (str | Unset): filterslug (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -202,6 +290,14 @@ async def asyncio_detailed( filtersearch=filtersearch, filtername=filtername, filterslug=filterslug, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -219,6 +315,14 @@ async def asyncio( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, ) -> WorkflowTaskList | None: """List workflow tasks @@ -232,6 +336,14 @@ async def asyncio( filtersearch (str | Unset): filtername (str | Unset): filterslug (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -251,5 +363,13 @@ async def asyncio( filtersearch=filtersearch, filtername=filtername, filterslug=filterslug, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, ) ).parsed diff --git a/rootly_sdk/api/workflows/list_workflows.py b/rootly_sdk/api/workflows/list_workflows.py index 3d12f3de..8b9f0bb3 100644 --- a/rootly_sdk/api/workflows/list_workflows.py +++ b/rootly_sdk/api/workflows/list_workflows.py @@ -24,6 +24,14 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -58,6 +66,22 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -104,6 +128,14 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> Response[WorkflowList]: """List workflows @@ -121,6 +153,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -142,6 +182,14 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = client.get_httpx_client().request( @@ -165,6 +213,14 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> WorkflowList | None: """List workflows @@ -182,6 +238,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -204,6 +268,14 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ).parsed @@ -221,6 +293,14 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> Response[WorkflowList]: """List workflows @@ -238,6 +318,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -259,6 +347,14 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -280,6 +376,14 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, ) -> WorkflowList | None: """List workflows @@ -297,6 +401,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -320,5 +432,13 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) ).parsed diff --git a/rootly_sdk/models/__init__.py b/rootly_sdk/models/__init__.py index 4bd273e9..52d5e241 100644 --- a/rootly_sdk/models/__init__.py +++ b/rootly_sdk/models/__init__.py @@ -26,11 +26,11 @@ ActionItemTriggerParamsIncidentActionItemStatusesItem, ) from .action_item_trigger_params_incident_condition import ActionItemTriggerParamsIncidentCondition -from .action_item_trigger_params_incident_condition_acknowledged_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1, +from .action_item_trigger_params_incident_condition_acknowledged_at import ( + ActionItemTriggerParamsIncidentConditionAcknowledgedAt, ) -from .action_item_trigger_params_incident_condition_detected_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionDetectedAtType1, +from .action_item_trigger_params_incident_condition_detected_at import ( + ActionItemTriggerParamsIncidentConditionDetectedAt, ) from .action_item_trigger_params_incident_condition_environment import ( ActionItemTriggerParamsIncidentConditionEnvironment, @@ -46,25 +46,22 @@ ActionItemTriggerParamsIncidentConditionIncidentType, ) from .action_item_trigger_params_incident_condition_kind import ActionItemTriggerParamsIncidentConditionKind -from .action_item_trigger_params_incident_condition_mitigated_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionMitigatedAtType1, +from .action_item_trigger_params_incident_condition_label import ActionItemTriggerParamsIncidentConditionLabel +from .action_item_trigger_params_incident_condition_mitigated_at import ( + ActionItemTriggerParamsIncidentConditionMitigatedAt, ) -from .action_item_trigger_params_incident_condition_resolved_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionResolvedAtType1, +from .action_item_trigger_params_incident_condition_resolved_at import ( + ActionItemTriggerParamsIncidentConditionResolvedAt, ) from .action_item_trigger_params_incident_condition_service import ActionItemTriggerParamsIncidentConditionService from .action_item_trigger_params_incident_condition_severity import ActionItemTriggerParamsIncidentConditionSeverity -from .action_item_trigger_params_incident_condition_started_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionStartedAtType1, -) +from .action_item_trigger_params_incident_condition_started_at import ActionItemTriggerParamsIncidentConditionStartedAt from .action_item_trigger_params_incident_condition_status import ActionItemTriggerParamsIncidentConditionStatus from .action_item_trigger_params_incident_condition_sub_status import ActionItemTriggerParamsIncidentConditionSubStatus -from .action_item_trigger_params_incident_condition_summary_type_1 import ( - ActionItemTriggerParamsIncidentConditionSummaryType1, -) +from .action_item_trigger_params_incident_condition_summary import ActionItemTriggerParamsIncidentConditionSummary from .action_item_trigger_params_incident_condition_visibility import ActionItemTriggerParamsIncidentConditionVisibility -from .action_item_trigger_params_incident_conditional_inactivity_type_1 import ( - ActionItemTriggerParamsIncidentConditionalInactivityType1, +from .action_item_trigger_params_incident_conditional_inactivity import ( + ActionItemTriggerParamsIncidentConditionalInactivity, ) from .action_item_trigger_params_incident_kinds_item import ActionItemTriggerParamsIncidentKindsItem from .action_item_trigger_params_incident_statuses_item import ActionItemTriggerParamsIncidentStatusesItem @@ -79,9 +76,13 @@ from .add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams from .add_microsoft_teams_chat_tab_task_params_chat import AddMicrosoftTeamsChatTabTaskParamsChat from .add_microsoft_teams_chat_tab_task_params_task_type import AddMicrosoftTeamsChatTabTaskParamsTaskType +from .add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 +from .add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from .add_role_task_params import AddRoleTaskParams from .add_role_task_params_assigned_to_user import AddRoleTaskParamsAssignedToUser from .add_role_task_params_task_type import AddRoleTaskParamsTaskType +from .add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 +from .add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from .add_subscribers import AddSubscribers from .add_subscribers_data import AddSubscribersData from .add_subscribers_data_attributes import AddSubscribersDataAttributes @@ -91,11 +92,29 @@ from .add_to_timeline_task_params import AddToTimelineTaskParams from .add_to_timeline_task_params_post_to_slack_channels_item import AddToTimelineTaskParamsPostToSlackChannelsItem from .add_to_timeline_task_params_task_type import AddToTimelineTaskParamsTaskType +from .ai_chat_response import AiChatResponse +from .ai_chat_response_data import AiChatResponseData +from .ai_chat_response_data_attributes import AiChatResponseDataAttributes +from .ai_chat_response_data_attributes_status import AiChatResponseDataAttributesStatus +from .ai_chat_response_data_type import AiChatResponseDataType +from .ai_chat_session_message import AiChatSessionMessage +from .ai_chat_session_message_list import AiChatSessionMessageList +from .ai_chat_session_message_list_meta import AiChatSessionMessageListMeta +from .ai_chat_session_message_role import AiChatSessionMessageRole from .alert import Alert -from .alert_alert_field_values_attributes_item_type_0 import AlertAlertFieldValuesAttributesItemType0 +from .alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item +from .alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item from .alert_data_type_0 import AlertDataType0 from .alert_event import AlertEvent from .alert_event_action import AlertEventAction +from .alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 +from .alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data +from .alert_event_escalation_target_type_0_data_attributes import AlertEventEscalationTargetType0DataAttributes +from .alert_event_feed_list import AlertEventFeedList +from .alert_event_feed_list_data_item import AlertEventFeedListDataItem +from .alert_event_feed_list_data_item_type import AlertEventFeedListDataItemType +from .alert_event_feed_meta import AlertEventFeedMeta +from .alert_event_incident_type_0 import AlertEventIncidentType0 from .alert_event_kind import AlertEventKind from .alert_event_list import AlertEventList from .alert_event_list_data_item import AlertEventListDataItem @@ -103,6 +122,9 @@ from .alert_event_response import AlertEventResponse from .alert_event_response_data import AlertEventResponseData from .alert_event_response_data_type import AlertEventResponseDataType +from .alert_event_schedule_type_0 import AlertEventScheduleType0 +from .alert_event_schedule_type_0_escalation_policies_item import AlertEventScheduleType0EscalationPoliciesItem +from .alert_event_user import AlertEventUser from .alert_field import AlertField from .alert_field_list import AlertFieldList from .alert_field_list_data_item import AlertFieldListDataItem @@ -130,12 +152,11 @@ from .alert_labels_item_type_0 import AlertLabelsItemType0 from .alert_list import AlertList from .alert_list_data_item import AlertListDataItem -from .alert_list_data_item_source import AlertListDataItemSource from .alert_list_data_item_type import AlertListDataItemType from .alert_noise import AlertNoise +from .alert_notification_target_type import AlertNotificationTargetType from .alert_response import AlertResponse from .alert_response_data import AlertResponseData -from .alert_response_data_source import AlertResponseDataSource from .alert_response_data_type import AlertResponseDataType from .alert_route import AlertRoute from .alert_route_list import AlertRouteList @@ -191,7 +212,6 @@ from .alert_routing_rule_response_data_type import AlertRoutingRuleResponseDataType from .alert_routing_rule_target_type_0 import AlertRoutingRuleTargetType0 from .alert_routing_rule_target_type_0_target_type import AlertRoutingRuleTargetType0TargetType -from .alert_source import AlertSource from .alert_status import AlertStatus from .alert_trigger_params import AlertTriggerParams from .alert_trigger_params_alert_condition import AlertTriggerParamsAlertCondition @@ -284,6 +304,9 @@ from .api_key_with_token_response_data import ApiKeyWithTokenResponseData from .api_key_with_token_response_data_attributes import ApiKeyWithTokenResponseDataAttributes from .api_key_with_token_response_data_type import ApiKeyWithTokenResponseDataType +from .archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams +from .archive_google_chat_spaces_task_params_spaces_item import ArchiveGoogleChatSpacesTaskParamsSpacesItem +from .archive_google_chat_spaces_task_params_task_type import ArchiveGoogleChatSpacesTaskParamsTaskType from .archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from .archive_microsoft_teams_channels_task_params_channels_item import ( ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem, @@ -307,6 +330,13 @@ AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem, ) from .attach_datadog_dashboards_task_params_task_type import AttachDatadogDashboardsTaskParamsTaskType +from .attach_retrospective_pdf_to_jira_issue_task_params import AttachRetrospectivePdfToJiraIssueTaskParams +from .attach_retrospective_pdf_to_jira_issue_task_params_integration import ( + AttachRetrospectivePdfToJiraIssueTaskParamsIntegration, +) +from .attach_retrospective_pdf_to_jira_issue_task_params_task_type import ( + AttachRetrospectivePdfToJiraIssueTaskParamsTaskType, +) from .audit import Audit from .audit_item_type import AuditItemType from .audit_object_changes_type_0 import AuditObjectChangesType0 @@ -327,6 +357,10 @@ from .auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams from .auto_assign_role_opsgenie_task_params_schedule import AutoAssignRoleOpsgenieTaskParamsSchedule from .auto_assign_role_opsgenie_task_params_task_type import AutoAssignRoleOpsgenieTaskParamsTaskType +from .auto_assign_role_pagerduty_task_params_type_0_schedule import AutoAssignRolePagerdutyTaskParamsType0Schedule +from .auto_assign_role_pagerduty_task_params_type_1_escalation_policy import ( + AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy, +) from .auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from .auto_assign_role_rootly_task_params_escalation_policy_target import ( AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget, @@ -339,6 +373,71 @@ from .auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from .auto_assign_role_victor_ops_task_params_task_type import AutoAssignRoleVictorOpsTaskParamsTaskType from .auto_assign_role_victor_ops_task_params_team import AutoAssignRoleVictorOpsTaskParamsTeam +from .bulk_destroy_catalog_entities_response import BulkDestroyCatalogEntitiesResponse +from .bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData +from .bulk_destroy_catalog_entities_type_0 import BulkDestroyCatalogEntitiesType0 +from .bulk_destroy_catalog_entities_type_1 import BulkDestroyCatalogEntitiesType1 +from .bulk_destroy_catalog_entities_type_1_managed_by import BulkDestroyCatalogEntitiesType1ManagedBy +from .bulk_destroy_environments_response import BulkDestroyEnvironmentsResponse +from .bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData +from .bulk_destroy_environments_type_0 import BulkDestroyEnvironmentsType0 +from .bulk_destroy_environments_type_1 import BulkDestroyEnvironmentsType1 +from .bulk_destroy_environments_type_1_managed_by import BulkDestroyEnvironmentsType1ManagedBy +from .bulk_destroy_functionalities_response import BulkDestroyFunctionalitiesResponse +from .bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData +from .bulk_destroy_functionalities_type_0 import BulkDestroyFunctionalitiesType0 +from .bulk_destroy_functionalities_type_1 import BulkDestroyFunctionalitiesType1 +from .bulk_destroy_functionalities_type_1_managed_by import BulkDestroyFunctionalitiesType1ManagedBy +from .bulk_destroy_services_response import BulkDestroyServicesResponse +from .bulk_destroy_services_response_data import BulkDestroyServicesResponseData +from .bulk_destroy_services_type_0 import BulkDestroyServicesType0 +from .bulk_destroy_services_type_1 import BulkDestroyServicesType1 +from .bulk_destroy_services_type_1_managed_by import BulkDestroyServicesType1ManagedBy +from .bulk_destroy_teams_response import BulkDestroyTeamsResponse +from .bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData +from .bulk_destroy_teams_type_0 import BulkDestroyTeamsType0 +from .bulk_destroy_teams_type_1 import BulkDestroyTeamsType1 +from .bulk_destroy_teams_type_1_managed_by import BulkDestroyTeamsType1ManagedBy +from .bulk_upsert_catalog_entities import BulkUpsertCatalogEntities +from .bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem +from .bulk_upsert_catalog_entities_entities_item_fields_item import BulkUpsertCatalogEntitiesEntitiesItemFieldsItem +from .bulk_upsert_catalog_entities_error import BulkUpsertCatalogEntitiesError +from .bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem +from .bulk_upsert_catalog_entities_response import BulkUpsertCatalogEntitiesResponse +from .bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem +from .bulk_upsert_catalog_entities_response_data_item_type import BulkUpsertCatalogEntitiesResponseDataItemType +from .bulk_upsert_environments import BulkUpsertEnvironments +from .bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem +from .bulk_upsert_environments_entities_item_fields_item import BulkUpsertEnvironmentsEntitiesItemFieldsItem +from .bulk_upsert_environments_error import BulkUpsertEnvironmentsError +from .bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem +from .bulk_upsert_environments_response import BulkUpsertEnvironmentsResponse +from .bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem +from .bulk_upsert_environments_response_data_item_type import BulkUpsertEnvironmentsResponseDataItemType +from .bulk_upsert_functionalities import BulkUpsertFunctionalities +from .bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem +from .bulk_upsert_functionalities_entities_item_fields_item import BulkUpsertFunctionalitiesEntitiesItemFieldsItem +from .bulk_upsert_functionalities_error import BulkUpsertFunctionalitiesError +from .bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem +from .bulk_upsert_functionalities_response import BulkUpsertFunctionalitiesResponse +from .bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem +from .bulk_upsert_functionalities_response_data_item_type import BulkUpsertFunctionalitiesResponseDataItemType +from .bulk_upsert_services import BulkUpsertServices +from .bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem +from .bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem +from .bulk_upsert_services_error import BulkUpsertServicesError +from .bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem +from .bulk_upsert_services_response import BulkUpsertServicesResponse +from .bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem +from .bulk_upsert_services_response_data_item_type import BulkUpsertServicesResponseDataItemType +from .bulk_upsert_teams import BulkUpsertTeams +from .bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem +from .bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem +from .bulk_upsert_teams_error import BulkUpsertTeamsError +from .bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem +from .bulk_upsert_teams_response import BulkUpsertTeamsResponse +from .bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem +from .bulk_upsert_teams_response_data_item_type import BulkUpsertTeamsResponseDataItemType from .call_people_task_params import CallPeopleTaskParams from .call_people_task_params_task_type import CallPeopleTaskParamsTaskType from .cancel_incident import CancelIncident @@ -397,6 +496,7 @@ from .catalog_entity_list import CatalogEntityList from .catalog_entity_list_data_item import CatalogEntityListDataItem from .catalog_entity_list_data_item_type import CatalogEntityListDataItemType +from .catalog_entity_managed_by import CatalogEntityManagedBy from .catalog_entity_properties_item import CatalogEntityPropertiesItem from .catalog_entity_property import CatalogEntityProperty from .catalog_entity_property_key import CatalogEntityPropertyKey @@ -415,6 +515,7 @@ from .catalog_field_list import CatalogFieldList from .catalog_field_list_data_item import CatalogFieldListDataItem from .catalog_field_list_data_item_type import CatalogFieldListDataItemType +from .catalog_field_managed_by import CatalogFieldManagedBy from .catalog_field_response import CatalogFieldResponse from .catalog_field_response_data import CatalogFieldResponseData from .catalog_field_response_data_type import CatalogFieldResponseDataType @@ -422,12 +523,14 @@ from .catalog_list import CatalogList from .catalog_list_data_item import CatalogListDataItem from .catalog_list_data_item_type import CatalogListDataItemType +from .catalog_managed_by import CatalogManagedBy from .catalog_property import CatalogProperty from .catalog_property_catalog_type import CatalogPropertyCatalogType from .catalog_property_kind import CatalogPropertyKind from .catalog_property_list import CatalogPropertyList from .catalog_property_list_data_item import CatalogPropertyListDataItem from .catalog_property_list_data_item_type import CatalogPropertyListDataItemType +from .catalog_property_managed_by import CatalogPropertyManagedBy from .catalog_property_response import CatalogPropertyResponse from .catalog_property_response_data import CatalogPropertyResponseData from .catalog_property_response_data_type import CatalogPropertyResponseDataType @@ -442,6 +545,9 @@ from .cause_response import CauseResponse from .cause_response_data import CauseResponseData from .cause_response_data_type import CauseResponseDataType +from .change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams +from .change_google_chat_space_privacy_task_params_space import ChangeGoogleChatSpacePrivacyTaskParamsSpace +from .change_google_chat_space_privacy_task_params_task_type import ChangeGoogleChatSpacePrivacyTaskParamsTaskType from .change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from .change_slack_channel_privacy_task_params_channel import ChangeSlackChannelPrivacyTaskParamsChannel from .change_slack_channel_privacy_task_params_privacy import ChangeSlackChannelPrivacyTaskParamsPrivacy @@ -554,6 +660,7 @@ from .create_edge_connector_body import CreateEdgeConnectorBody from .create_edge_connector_body_data import CreateEdgeConnectorBodyData from .create_edge_connector_body_data_attributes import CreateEdgeConnectorBodyDataAttributes +from .create_edge_connector_body_data_attributes_filters import CreateEdgeConnectorBodyDataAttributesFilters from .create_edge_connector_body_data_attributes_status import CreateEdgeConnectorBodyDataAttributesStatus from .create_edge_connector_body_data_type import CreateEdgeConnectorBodyDataType from .create_github_issue_task_params import CreateGithubIssueTaskParams @@ -579,6 +686,8 @@ CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem, ) from .create_google_calendar_event_task_params_task_type import CreateGoogleCalendarEventTaskParamsTaskType +from .create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams +from .create_google_chat_space_task_params_task_type import CreateGoogleChatSpaceTaskParamsTaskType from .create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from .create_google_docs_page_task_params_drive import CreateGoogleDocsPageTaskParamsDrive from .create_google_docs_page_task_params_parent_folder import CreateGoogleDocsPageTaskParamsParentFolder @@ -707,6 +816,8 @@ from .create_sharepoint_page_task_params_parent_folder import CreateSharepointPageTaskParamsParentFolder from .create_sharepoint_page_task_params_site import CreateSharepointPageTaskParamsSite from .create_sharepoint_page_task_params_task_type import CreateSharepointPageTaskParamsTaskType +from .create_shortcut_story_task_params_type_0_project import CreateShortcutStoryTaskParamsType0Project +from .create_shortcut_story_task_params_type_1_workflow_state import CreateShortcutStoryTaskParamsType1WorkflowState from .create_shortcut_task_task_params import CreateShortcutTaskTaskParams from .create_shortcut_task_task_params_completion import CreateShortcutTaskTaskParamsCompletion from .create_shortcut_task_task_params_task_type import CreateShortcutTaskTaskParamsTaskType @@ -844,6 +955,7 @@ from .environment_list import EnvironmentList from .environment_list_data_item import EnvironmentListDataItem from .environment_list_data_item_type import EnvironmentListDataItemType +from .environment_managed_by import EnvironmentManagedBy from .environment_properties_type_0_item import EnvironmentPropertiesType0Item from .environment_response import EnvironmentResponse from .environment_response_data import EnvironmentResponseData @@ -852,22 +964,10 @@ from .environment_slack_channels_type_0_item import EnvironmentSlackChannelsType0Item from .errors_list import ErrorsList from .errors_list_errors_item import ErrorsListErrorsItem -from .escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency -from .escalation_path_rule_alert_urgency_rule_type import EscalationPathRuleAlertUrgencyRuleType -from .escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow -from .escalation_path_rule_deferral_window_rule_type import EscalationPathRuleDeferralWindowRuleType -from .escalation_path_rule_deferral_window_time_blocks_item import EscalationPathRuleDeferralWindowTimeBlocksItem -from .escalation_path_rule_deferral_window_time_zone import EscalationPathRuleDeferralWindowTimeZone -from .escalation_path_rule_field import EscalationPathRuleField -from .escalation_path_rule_field_operator import EscalationPathRuleFieldOperator -from .escalation_path_rule_field_rule_type import EscalationPathRuleFieldRuleType -from .escalation_path_rule_json_path import EscalationPathRuleJsonPath -from .escalation_path_rule_json_path_operator import EscalationPathRuleJsonPathOperator -from .escalation_path_rule_json_path_rule_type import EscalationPathRuleJsonPathRuleType -from .escalation_path_rule_service import EscalationPathRuleService -from .escalation_path_rule_service_rule_type import EscalationPathRuleServiceRuleType -from .escalation_path_rule_working_hour import EscalationPathRuleWorkingHour -from .escalation_path_rule_working_hour_rule_type import EscalationPathRuleWorkingHourRuleType +from .escalate_alert import EscalateAlert +from .escalate_alert_data import EscalateAlertData +from .escalate_alert_data_attributes import EscalateAlertDataAttributes +from .escalate_alert_data_type import EscalateAlertDataType from .escalation_policy import EscalationPolicy from .escalation_policy_business_hours_type_0 import EscalationPolicyBusinessHoursType0 from .escalation_policy_business_hours_type_0_days_type_0_item import EscalationPolicyBusinessHoursType0DaysType0Item @@ -905,6 +1005,76 @@ from .escalation_policy_path_response import EscalationPolicyPathResponse from .escalation_policy_path_response_data import EscalationPolicyPathResponseData from .escalation_policy_path_response_data_type import EscalationPolicyPathResponseDataType +from .escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 +from .escalation_policy_path_rules_item_type_0_rule_type import EscalationPolicyPathRulesItemType0RuleType +from .escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 +from .escalation_policy_path_rules_item_type_1_rule_type import EscalationPolicyPathRulesItemType1RuleType +from .escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 +from .escalation_policy_path_rules_item_type_2_operator import EscalationPolicyPathRulesItemType2Operator +from .escalation_policy_path_rules_item_type_2_rule_type import EscalationPolicyPathRulesItemType2RuleType +from .escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 +from .escalation_policy_path_rules_item_type_3_operator import EscalationPolicyPathRulesItemType3Operator +from .escalation_policy_path_rules_item_type_3_rule_type import EscalationPolicyPathRulesItemType3RuleType +from .escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 +from .escalation_policy_path_rules_item_type_4_rule_type import EscalationPolicyPathRulesItemType4RuleType +from .escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 +from .escalation_policy_path_rules_item_type_5_rule_type import EscalationPolicyPathRulesItemType5RuleType +from .escalation_policy_path_rules_item_type_5_time_blocks_item import EscalationPolicyPathRulesItemType5TimeBlocksItem +from .escalation_policy_path_rules_item_type_5_time_zone import EscalationPolicyPathRulesItemType5TimeZone +from .escalation_policy_path_rules_item_type_6 import EscalationPolicyPathRulesItemType6 +from .escalation_policy_path_rules_item_type_6_operator import EscalationPolicyPathRulesItemType6Operator +from .escalation_policy_path_rules_item_type_6_rule_type import EscalationPolicyPathRulesItemType6RuleType +from .escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 +from .escalation_policy_path_rules_item_type_7_operator import EscalationPolicyPathRulesItemType7Operator +from .escalation_policy_path_rules_item_type_7_rule_type import EscalationPolicyPathRulesItemType7RuleType +from .escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 +from .escalation_policy_path_rules_item_type_8_type_0_rule_type import EscalationPolicyPathRulesItemType8Type0RuleType +from .escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 +from .escalation_policy_path_rules_item_type_8_type_1_rule_type import EscalationPolicyPathRulesItemType8Type1RuleType +from .escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 +from .escalation_policy_path_rules_item_type_8_type_2_operator import EscalationPolicyPathRulesItemType8Type2Operator +from .escalation_policy_path_rules_item_type_8_type_2_rule_type import EscalationPolicyPathRulesItemType8Type2RuleType +from .escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 +from .escalation_policy_path_rules_item_type_8_type_3_operator import EscalationPolicyPathRulesItemType8Type3Operator +from .escalation_policy_path_rules_item_type_8_type_3_rule_type import EscalationPolicyPathRulesItemType8Type3RuleType +from .escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 +from .escalation_policy_path_rules_item_type_8_type_4_rule_type import EscalationPolicyPathRulesItemType8Type4RuleType +from .escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 +from .escalation_policy_path_rules_item_type_8_type_5_rule_type import EscalationPolicyPathRulesItemType8Type5RuleType +from .escalation_policy_path_rules_item_type_8_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType8Type5TimeBlocksItem, +) +from .escalation_policy_path_rules_item_type_8_type_5_time_zone import EscalationPolicyPathRulesItemType8Type5TimeZone +from .escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 +from .escalation_policy_path_rules_item_type_8_type_6_operator import EscalationPolicyPathRulesItemType8Type6Operator +from .escalation_policy_path_rules_item_type_8_type_6_rule_type import EscalationPolicyPathRulesItemType8Type6RuleType +from .escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 +from .escalation_policy_path_rules_item_type_8_type_7_operator import EscalationPolicyPathRulesItemType8Type7Operator +from .escalation_policy_path_rules_item_type_8_type_7_rule_type import EscalationPolicyPathRulesItemType8Type7RuleType +from .escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 +from .escalation_policy_path_rules_item_type_9_type_0_rule_type import EscalationPolicyPathRulesItemType9Type0RuleType +from .escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 +from .escalation_policy_path_rules_item_type_9_type_1_rule_type import EscalationPolicyPathRulesItemType9Type1RuleType +from .escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 +from .escalation_policy_path_rules_item_type_9_type_2_operator import EscalationPolicyPathRulesItemType9Type2Operator +from .escalation_policy_path_rules_item_type_9_type_2_rule_type import EscalationPolicyPathRulesItemType9Type2RuleType +from .escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 +from .escalation_policy_path_rules_item_type_9_type_3_operator import EscalationPolicyPathRulesItemType9Type3Operator +from .escalation_policy_path_rules_item_type_9_type_3_rule_type import EscalationPolicyPathRulesItemType9Type3RuleType +from .escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 +from .escalation_policy_path_rules_item_type_9_type_4_rule_type import EscalationPolicyPathRulesItemType9Type4RuleType +from .escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 +from .escalation_policy_path_rules_item_type_9_type_5_rule_type import EscalationPolicyPathRulesItemType9Type5RuleType +from .escalation_policy_path_rules_item_type_9_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType9Type5TimeBlocksItem, +) +from .escalation_policy_path_rules_item_type_9_type_5_time_zone import EscalationPolicyPathRulesItemType9Type5TimeZone +from .escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 +from .escalation_policy_path_rules_item_type_9_type_6_operator import EscalationPolicyPathRulesItemType9Type6Operator +from .escalation_policy_path_rules_item_type_9_type_6_rule_type import EscalationPolicyPathRulesItemType9Type6RuleType +from .escalation_policy_path_rules_item_type_9_type_7 import EscalationPolicyPathRulesItemType9Type7 +from .escalation_policy_path_rules_item_type_9_type_7_operator import EscalationPolicyPathRulesItemType9Type7Operator +from .escalation_policy_path_rules_item_type_9_type_7_rule_type import EscalationPolicyPathRulesItemType9Type7RuleType from .escalation_policy_path_time_restriction_time_zone import EscalationPolicyPathTimeRestrictionTimeZone from .escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem from .escalation_policy_path_time_restrictions_item_end_day import EscalationPolicyPathTimeRestrictionsItemEndDay @@ -974,6 +1144,7 @@ from .functionality_list import FunctionalityList from .functionality_list_data_item import FunctionalityListDataItem from .functionality_list_data_item_type import FunctionalityListDataItemType +from .functionality_managed_by import FunctionalityManagedBy from .functionality_properties_type_0_item import FunctionalityPropertiesType0Item from .functionality_response import FunctionalityResponse from .functionality_response_data import FunctionalityResponseData @@ -994,8 +1165,13 @@ from .get_escalation_path_include import GetEscalationPathInclude from .get_escalation_policy_include import GetEscalationPolicyInclude from .get_form_field_include import GetFormFieldInclude +from .get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 +from .get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 +from .get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 +from .get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from .get_incident_include import GetIncidentInclude from .get_incident_sub_status_include import GetIncidentSubStatusInclude +from .get_meeting_recording_include import GetMeetingRecordingInclude from .get_playbook_include import GetPlaybookInclude from .get_pulses_task_params import GetPulsesTaskParams from .get_pulses_task_params_parent_message_thread_task import GetPulsesTaskParamsParentMessageThreadTask @@ -1021,6 +1197,9 @@ from .http_client_task_params_method import HttpClientTaskParamsMethod from .http_client_task_params_post_to_slack_channels_item import HttpClientTaskParamsPostToSlackChannelsItem from .http_client_task_params_task_type import HttpClientTaskParamsTaskType +from .import_meeting_recording import ImportMeetingRecording +from .import_meeting_recording_platform import ImportMeetingRecordingPlatform +from .import_meeting_recording_source import ImportMeetingRecordingSource from .in_triage_incident import InTriageIncident from .in_triage_incident_data import InTriageIncidentData from .in_triage_incident_data_type import InTriageIncidentDataType @@ -1168,13 +1347,11 @@ from .incident_sub_status_response_data_type import IncidentSubStatusResponseDataType from .incident_trigger_params import IncidentTriggerParams from .incident_trigger_params_incident_condition import IncidentTriggerParamsIncidentCondition -from .incident_trigger_params_incident_condition_acknowledged_at_type_1 import ( - IncidentTriggerParamsIncidentConditionAcknowledgedAtType1, +from .incident_trigger_params_incident_condition_acknowledged_at import ( + IncidentTriggerParamsIncidentConditionAcknowledgedAt, ) from .incident_trigger_params_incident_condition_cause import IncidentTriggerParamsIncidentConditionCause -from .incident_trigger_params_incident_condition_detected_at_type_1 import ( - IncidentTriggerParamsIncidentConditionDetectedAtType1, -) +from .incident_trigger_params_incident_condition_detected_at import IncidentTriggerParamsIncidentConditionDetectedAt from .incident_trigger_params_incident_condition_environment import IncidentTriggerParamsIncidentConditionEnvironment from .incident_trigger_params_incident_condition_functionality import ( IncidentTriggerParamsIncidentConditionFunctionality, @@ -1185,26 +1362,17 @@ ) from .incident_trigger_params_incident_condition_incident_type import IncidentTriggerParamsIncidentConditionIncidentType from .incident_trigger_params_incident_condition_kind import IncidentTriggerParamsIncidentConditionKind -from .incident_trigger_params_incident_condition_mitigated_at_type_1 import ( - IncidentTriggerParamsIncidentConditionMitigatedAtType1, -) -from .incident_trigger_params_incident_condition_resolved_at_type_1 import ( - IncidentTriggerParamsIncidentConditionResolvedAtType1, -) +from .incident_trigger_params_incident_condition_label import IncidentTriggerParamsIncidentConditionLabel +from .incident_trigger_params_incident_condition_mitigated_at import IncidentTriggerParamsIncidentConditionMitigatedAt +from .incident_trigger_params_incident_condition_resolved_at import IncidentTriggerParamsIncidentConditionResolvedAt from .incident_trigger_params_incident_condition_service import IncidentTriggerParamsIncidentConditionService from .incident_trigger_params_incident_condition_severity import IncidentTriggerParamsIncidentConditionSeverity -from .incident_trigger_params_incident_condition_started_at_type_1 import ( - IncidentTriggerParamsIncidentConditionStartedAtType1, -) +from .incident_trigger_params_incident_condition_started_at import IncidentTriggerParamsIncidentConditionStartedAt from .incident_trigger_params_incident_condition_status import IncidentTriggerParamsIncidentConditionStatus from .incident_trigger_params_incident_condition_sub_status import IncidentTriggerParamsIncidentConditionSubStatus -from .incident_trigger_params_incident_condition_summary_type_1 import ( - IncidentTriggerParamsIncidentConditionSummaryType1, -) +from .incident_trigger_params_incident_condition_summary import IncidentTriggerParamsIncidentConditionSummary from .incident_trigger_params_incident_condition_visibility import IncidentTriggerParamsIncidentConditionVisibility -from .incident_trigger_params_incident_conditional_inactivity_type_1 import ( - IncidentTriggerParamsIncidentConditionalInactivityType1, -) +from .incident_trigger_params_incident_conditional_inactivity import IncidentTriggerParamsIncidentConditionalInactivity from .incident_trigger_params_incident_kinds_item import IncidentTriggerParamsIncidentKindsItem from .incident_trigger_params_incident_post_mortem_condition_cause import ( IncidentTriggerParamsIncidentPostMortemConditionCause, @@ -1224,6 +1392,33 @@ from .incident_user_type_0 import IncidentUserType0 from .incident_zoom_meeting_global_dial_in_numbers_type_0_item import IncidentZoomMeetingGlobalDialInNumbersType0Item from .incidents_chart_response import IncidentsChartResponse +from .incidents_chart_response_data import IncidentsChartResponseData +from .invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams +from .invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace +from .invite_to_google_chat_space_task_params_task_type import InviteToGoogleChatSpaceTaskParamsTaskType +from .invite_to_microsoft_teams_channel_rootly_task_params import InviteToMicrosoftTeamsChannelRootlyTaskParams +from .invite_to_microsoft_teams_channel_rootly_task_params_channel import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_group_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_schedule_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_service_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_task_type import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_team import InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam +from .invite_to_microsoft_teams_channel_rootly_task_params_user_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget, +) from .invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from .invite_to_microsoft_teams_channel_task_params_channel import InviteToMicrosoftTeamsChannelTaskParamsChannel from .invite_to_microsoft_teams_channel_task_params_task_type import InviteToMicrosoftTeamsChannelTaskParamsTaskType @@ -1234,6 +1429,12 @@ ) from .invite_to_slack_channel_opsgenie_task_params_schedule import InviteToSlackChannelOpsgenieTaskParamsSchedule from .invite_to_slack_channel_opsgenie_task_params_task_type import InviteToSlackChannelOpsgenieTaskParamsTaskType +from .invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy import ( + InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy, +) +from .invite_to_slack_channel_pagerduty_task_params_type_1_schedule import ( + InviteToSlackChannelPagerdutyTaskParamsType1Schedule, +) from .invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from .invite_to_slack_channel_rootly_task_params_channels_item import InviteToSlackChannelRootlyTaskParamsChannelsItem from .invite_to_slack_channel_rootly_task_params_escalation_policy_target import ( @@ -1246,6 +1447,13 @@ from .invite_to_slack_channel_rootly_task_params_service_target import InviteToSlackChannelRootlyTaskParamsServiceTarget from .invite_to_slack_channel_rootly_task_params_task_type import InviteToSlackChannelRootlyTaskParamsTaskType from .invite_to_slack_channel_rootly_task_params_user_target import InviteToSlackChannelRootlyTaskParamsUserTarget +from .invite_to_slack_channel_task_params_type_0_slack_users_item import ( + InviteToSlackChannelTaskParamsType0SlackUsersItem, +) +from .invite_to_slack_channel_task_params_type_1_slack_user_groups_item import ( + InviteToSlackChannelTaskParamsType1SlackUserGroupsItem, +) +from .invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from .invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from .invite_to_slack_channel_victor_ops_task_params_channels_item import ( InviteToSlackChannelVictorOpsTaskParamsChannelsItem, @@ -1256,7 +1464,13 @@ from .ip_ranges_response import IpRangesResponse from .ip_ranges_response_data import IpRangesResponseData from .ip_ranges_response_data_type import IpRangesResponseDataType +from .jsonapi_included_resource import JsonapiIncludedResource +from .jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes +from .jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships from .links import Links +from .list_alert_events_feed_filteraction import ListAlertEventsFeedFilteraction +from .list_alert_events_feed_filterkind import ListAlertEventsFeedFilterkind +from .list_alert_events_feed_sort import ListAlertEventsFeedSort from .list_alerts_include import ListAlertsInclude from .list_catalog_checklist_templates_include import ListCatalogChecklistTemplatesInclude from .list_catalog_checklist_templates_sort import ListCatalogChecklistTemplatesSort @@ -1273,6 +1487,7 @@ from .list_dashboards_include import ListDashboardsInclude from .list_environment_catalog_properties_include import ListEnvironmentCatalogPropertiesInclude from .list_environment_catalog_properties_sort import ListEnvironmentCatalogPropertiesSort +from .list_escalation_paths_filterpath_type import ListEscalationPathsFilterpathType from .list_escalation_paths_include import ListEscalationPathsInclude from .list_escalation_policies_include import ListEscalationPoliciesInclude from .list_form_fields_include import ListFormFieldsInclude @@ -1318,11 +1533,21 @@ from .live_call_router_response_data_type import LiveCallRouterResponseDataType from .live_call_router_waiting_music_url import LiveCallRouterWaitingMusicUrl from .meeting_recording import MeetingRecording +from .meeting_recording_detail import MeetingRecordingDetail +from .meeting_recording_detail_response import MeetingRecordingDetailResponse +from .meeting_recording_detail_response_data import MeetingRecordingDetailResponseData +from .meeting_recording_detail_response_data_type import MeetingRecordingDetailResponseDataType +from .meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 from .meeting_recording_list import MeetingRecordingList from .meeting_recording_list_data_item import MeetingRecordingListDataItem from .meeting_recording_list_data_item_type import MeetingRecordingListDataItemType from .meeting_recording_platform import MeetingRecordingPlatform +from .meeting_recording_response import MeetingRecordingResponse +from .meeting_recording_response_data import MeetingRecordingResponseData +from .meeting_recording_response_data_type import MeetingRecordingResponseDataType from .meeting_recording_status import MeetingRecordingStatus +from .meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment +from .meeting_recording_transcript_word import MeetingRecordingTranscriptWord from .meta import Meta from .mitigate_incident import MitigateIncident from .mitigate_incident_data import MitigateIncidentData @@ -1338,7 +1563,12 @@ from .new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 from .new_alert_data_attributes_noise import NewAlertDataAttributesNoise from .new_alert_data_attributes_notification_target_type import NewAlertDataAttributesNotificationTargetType -from .new_alert_data_attributes_source import NewAlertDataAttributesSource +from .new_alert_data_attributes_notification_targets_type_0_item import ( + NewAlertDataAttributesNotificationTargetsType0Item, +) +from .new_alert_data_attributes_notification_targets_type_0_item_type import ( + NewAlertDataAttributesNotificationTargetsType0ItemType, +) from .new_alert_data_attributes_status import NewAlertDataAttributesStatus from .new_alert_data_type import NewAlertDataType from .new_alert_event import NewAlertEvent @@ -1702,6 +1932,72 @@ NewEscalationPolicyPathDataAttributesNotificationType, ) from .new_escalation_policy_path_data_attributes_path_type import NewEscalationPolicyPathDataAttributesPathType +from .new_escalation_policy_path_data_attributes_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType0RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType1RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_2 import ( + NewEscalationPolicyPathDataAttributesRulesItemType2, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType2Operator, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType2RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_3 import ( + NewEscalationPolicyPathDataAttributesRulesItemType3, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType3Operator, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType3RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_4 import ( + NewEscalationPolicyPathDataAttributesRulesItemType4, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType4RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType5RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType6Operator, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType6RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_7 import ( + NewEscalationPolicyPathDataAttributesRulesItemType7, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType7Operator, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType7RuleType, +) from .new_escalation_policy_path_data_attributes_time_restriction_time_zone import ( NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, ) @@ -1782,6 +2078,9 @@ from .new_incident_action_item import NewIncidentActionItem from .new_incident_action_item_data import NewIncidentActionItemData from .new_incident_action_item_data_attributes import NewIncidentActionItemDataAttributes +from .new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item, +) from .new_incident_action_item_data_attributes_kind import NewIncidentActionItemDataAttributesKind from .new_incident_action_item_data_attributes_priority import NewIncidentActionItemDataAttributesPriority from .new_incident_action_item_data_attributes_status import NewIncidentActionItemDataAttributesStatus @@ -1922,12 +2221,18 @@ NewOnCallRoleDataAttributesApiKeysPermissionsItem, ) from .new_on_call_role_data_attributes_audits_permissions_item import NewOnCallRoleDataAttributesAuditsPermissionsItem +from .new_on_call_role_data_attributes_catalogs_permissions_item import ( + NewOnCallRoleDataAttributesCatalogsPermissionsItem, +) from .new_on_call_role_data_attributes_contacts_permissions_item import ( NewOnCallRoleDataAttributesContactsPermissionsItem, ) from .new_on_call_role_data_attributes_escalation_policies_permissions_item import ( NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, ) +from .new_on_call_role_data_attributes_functionalities_permissions_item import ( + NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem, +) from .new_on_call_role_data_attributes_groups_permissions_item import NewOnCallRoleDataAttributesGroupsPermissionsItem from .new_on_call_role_data_attributes_heartbeats_permissions_item import ( NewOnCallRoleDataAttributesHeartbeatsPermissionsItem, @@ -2067,6 +2372,7 @@ from .new_schedule import NewSchedule from .new_schedule_data import NewScheduleData from .new_schedule_data_attributes import NewScheduleDataAttributes +from .new_schedule_data_attributes_shift_report_day_of_week import NewScheduleDataAttributesShiftReportDayOfWeek from .new_schedule_data_attributes_slack_channel_type_0 import NewScheduleDataAttributesSlackChannelType0 from .new_schedule_data_attributes_slack_user_group import NewScheduleDataAttributesSlackUserGroup from .new_schedule_data_type import NewScheduleDataType @@ -2146,6 +2452,10 @@ from .new_severity_data_attributes_slack_aliases_type_0_item import NewSeverityDataAttributesSlackAliasesType0Item from .new_severity_data_attributes_slack_channels_type_0_item import NewSeverityDataAttributesSlackChannelsType0Item from .new_severity_data_type import NewSeverityDataType +from .new_shift_coverage_request import NewShiftCoverageRequest +from .new_shift_coverage_request_data import NewShiftCoverageRequestData +from .new_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes +from .new_shift_coverage_request_data_type import NewShiftCoverageRequestDataType from .new_sla import NewSla from .new_sla_data import NewSlaData from .new_sla_data_attributes import NewSlaDataAttributes @@ -2193,6 +2503,7 @@ from .new_team_data import NewTeamData from .new_team_data_attributes import NewTeamDataAttributes from .new_team_data_attributes_alert_broadcast_channel_type_0 import NewTeamDataAttributesAlertBroadcastChannelType0 +from .new_team_data_attributes_auto_add_members_scope import NewTeamDataAttributesAutoAddMembersScope from .new_team_data_attributes_incident_broadcast_channel_type_0 import ( NewTeamDataAttributesIncidentBroadcastChannelType0, ) @@ -2218,9 +2529,21 @@ from .new_webhooks_endpoint import NewWebhooksEndpoint from .new_webhooks_endpoint_data import NewWebhooksEndpointData from .new_webhooks_endpoint_data_attributes import NewWebhooksEndpointDataAttributes +from .new_webhooks_endpoint_data_attributes_custom_headers_item import ( + NewWebhooksEndpointDataAttributesCustomHeadersItem, +) from .new_webhooks_endpoint_data_attributes_event_types_item import NewWebhooksEndpointDataAttributesEventTypesItem from .new_webhooks_endpoint_data_type import NewWebhooksEndpointDataType from .new_workflow import NewWorkflow +from .new_workflow_action_item_form_field_condition import NewWorkflowActionItemFormFieldCondition +from .new_workflow_action_item_form_field_condition_data import NewWorkflowActionItemFormFieldConditionData +from .new_workflow_action_item_form_field_condition_data_attributes import ( + NewWorkflowActionItemFormFieldConditionDataAttributes, +) +from .new_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, +) +from .new_workflow_action_item_form_field_condition_data_type import NewWorkflowActionItemFormFieldConditionDataType from .new_workflow_custom_field_selection import NewWorkflowCustomFieldSelection from .new_workflow_custom_field_selection_data import NewWorkflowCustomFieldSelectionData from .new_workflow_custom_field_selection_data_attributes import NewWorkflowCustomFieldSelectionDataAttributes @@ -2282,8 +2605,10 @@ from .on_call_role_alerts_permissions_item import OnCallRoleAlertsPermissionsItem from .on_call_role_api_keys_permissions_item import OnCallRoleApiKeysPermissionsItem from .on_call_role_audits_permissions_item import OnCallRoleAuditsPermissionsItem +from .on_call_role_catalogs_permissions_item import OnCallRoleCatalogsPermissionsItem from .on_call_role_contacts_permissions_item import OnCallRoleContactsPermissionsItem from .on_call_role_escalation_policies_permissions_item import OnCallRoleEscalationPoliciesPermissionsItem +from .on_call_role_functionalities_permissions_item import OnCallRoleFunctionalitiesPermissionsItem from .on_call_role_groups_permissions_item import OnCallRoleGroupsPermissionsItem from .on_call_role_heartbeats_permissions_item import OnCallRoleHeartbeatsPermissionsItem from .on_call_role_integrations_permissions_item import OnCallRoleIntegrationsPermissionsItem @@ -2313,6 +2638,21 @@ from .on_call_shadows_list import OnCallShadowsList from .on_call_shadows_list_data_item import OnCallShadowsListDataItem from .on_call_shadows_list_data_item_type import OnCallShadowsListDataItemType +from .oncall import Oncall +from .oncall_list import OncallList +from .oncall_list_data_item import OncallListDataItem +from .oncall_list_data_item_type import OncallListDataItemType +from .oncall_notification_type import OncallNotificationType +from .oncall_relationships import OncallRelationships +from .oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy +from .oncall_relationships_escalation_policy_data_type_0 import OncallRelationshipsEscalationPolicyDataType0 +from .oncall_relationships_escalation_policy_data_type_0_type import OncallRelationshipsEscalationPolicyDataType0Type +from .oncall_relationships_schedule import OncallRelationshipsSchedule +from .oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 +from .oncall_relationships_schedule_data_type_0_type import OncallRelationshipsScheduleDataType0Type +from .oncall_relationships_user import OncallRelationshipsUser +from .oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 +from .oncall_relationships_user_data_type_0_type import OncallRelationshipsUserDataType0Type from .override_shift import OverrideShift from .override_shift_list import OverrideShiftList from .override_shift_list_data_item import OverrideShiftListDataItem @@ -2349,6 +2689,12 @@ from .page_rootly_on_call_responders_task_params_service_target import PageRootlyOnCallRespondersTaskParamsServiceTarget from .page_rootly_on_call_responders_task_params_task_type import PageRootlyOnCallRespondersTaskParamsTaskType from .page_rootly_on_call_responders_task_params_user_target import PageRootlyOnCallRespondersTaskParamsUserTarget +from .page_victor_ops_on_call_responders_task_params_type_0_users_item import ( + PageVictorOpsOnCallRespondersTaskParamsType0UsersItem, +) +from .page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item import ( + PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem, +) from .patch_alert_route import PatchAlertRoute from .patch_alert_route_data import PatchAlertRouteData from .patch_alert_route_data_attributes import PatchAlertRouteDataAttributes @@ -2401,12 +2747,12 @@ from .post_mortem_template_response_data_type import PostMortemTemplateResponseDataType from .post_mortem_trigger_params import PostMortemTriggerParams from .post_mortem_trigger_params_incident_condition import PostMortemTriggerParamsIncidentCondition -from .post_mortem_trigger_params_incident_condition_acknowledged_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1, +from .post_mortem_trigger_params_incident_condition_acknowledged_at import ( + PostMortemTriggerParamsIncidentConditionAcknowledgedAt, ) from .post_mortem_trigger_params_incident_condition_cause import PostMortemTriggerParamsIncidentConditionCause -from .post_mortem_trigger_params_incident_condition_detected_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionDetectedAtType1, +from .post_mortem_trigger_params_incident_condition_detected_at import ( + PostMortemTriggerParamsIncidentConditionDetectedAt, ) from .post_mortem_trigger_params_incident_condition_environment import ( PostMortemTriggerParamsIncidentConditionEnvironment, @@ -2422,25 +2768,22 @@ PostMortemTriggerParamsIncidentConditionIncidentType, ) from .post_mortem_trigger_params_incident_condition_kind import PostMortemTriggerParamsIncidentConditionKind -from .post_mortem_trigger_params_incident_condition_mitigated_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionMitigatedAtType1, +from .post_mortem_trigger_params_incident_condition_label import PostMortemTriggerParamsIncidentConditionLabel +from .post_mortem_trigger_params_incident_condition_mitigated_at import ( + PostMortemTriggerParamsIncidentConditionMitigatedAt, ) -from .post_mortem_trigger_params_incident_condition_resolved_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionResolvedAtType1, +from .post_mortem_trigger_params_incident_condition_resolved_at import ( + PostMortemTriggerParamsIncidentConditionResolvedAt, ) from .post_mortem_trigger_params_incident_condition_service import PostMortemTriggerParamsIncidentConditionService from .post_mortem_trigger_params_incident_condition_severity import PostMortemTriggerParamsIncidentConditionSeverity -from .post_mortem_trigger_params_incident_condition_started_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionStartedAtType1, -) +from .post_mortem_trigger_params_incident_condition_started_at import PostMortemTriggerParamsIncidentConditionStartedAt from .post_mortem_trigger_params_incident_condition_status import PostMortemTriggerParamsIncidentConditionStatus from .post_mortem_trigger_params_incident_condition_sub_status import PostMortemTriggerParamsIncidentConditionSubStatus -from .post_mortem_trigger_params_incident_condition_summary_type_1 import ( - PostMortemTriggerParamsIncidentConditionSummaryType1, -) +from .post_mortem_trigger_params_incident_condition_summary import PostMortemTriggerParamsIncidentConditionSummary from .post_mortem_trigger_params_incident_condition_visibility import PostMortemTriggerParamsIncidentConditionVisibility -from .post_mortem_trigger_params_incident_conditional_inactivity_type_1 import ( - PostMortemTriggerParamsIncidentConditionalInactivityType1, +from .post_mortem_trigger_params_incident_conditional_inactivity import ( + PostMortemTriggerParamsIncidentConditionalInactivity, ) from .post_mortem_trigger_params_incident_kinds_item import PostMortemTriggerParamsIncidentKindsItem from .post_mortem_trigger_params_incident_post_mortem_condition import ( @@ -2481,6 +2824,9 @@ from .pulse_trigger_params_pulse_condition_source import PulseTriggerParamsPulseConditionSource from .pulse_trigger_params_trigger_type import PulseTriggerParamsTriggerType from .pulse_trigger_params_triggers_item import PulseTriggerParamsTriggersItem +from .receipt import Receipt +from .receipt_reason import ReceiptReason +from .receipt_state import ReceiptState from .redis_client_task_params import RedisClientTaskParams from .redis_client_task_params_post_to_slack_channels_item import RedisClientTaskParamsPostToSlackChannelsItem from .redis_client_task_params_task_type import RedisClientTaskParamsTaskType @@ -2493,6 +2839,9 @@ from .remove_subscribers_data import RemoveSubscribersData from .remove_subscribers_data_attributes import RemoveSubscribersDataAttributes from .remove_subscribers_data_type import RemoveSubscribersDataType +from .rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams +from .rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace +from .rename_google_chat_space_task_params_task_type import RenameGoogleChatSpaceTaskParamsTaskType from .rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from .rename_microsoft_teams_channel_task_params_channel import RenameMicrosoftTeamsChannelTaskParamsChannel from .rename_microsoft_teams_channel_task_params_task_type import RenameMicrosoftTeamsChannelTaskParamsTaskType @@ -2664,6 +3013,7 @@ from .schedule_rotation_user_response import ScheduleRotationUserResponse from .schedule_rotation_user_response_data import ScheduleRotationUserResponseData from .schedule_rotation_user_response_data_type import ScheduleRotationUserResponseDataType +from .schedule_shift_report_day_of_week import ScheduleShiftReportDayOfWeek from .schedule_slack_channel_type_0 import ScheduleSlackChannelType0 from .schedule_slack_user_group_type_0 import ScheduleSlackUserGroupType0 from .secret import Secret @@ -2677,9 +3027,31 @@ from .send_dashboard_report_task_params_task_type import SendDashboardReportTaskParamsTaskType from .send_email_task_params import SendEmailTaskParams from .send_email_task_params_task_type import SendEmailTaskParamsTaskType +from .send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams +from .send_google_chat_attachments_task_params_spaces_item import SendGoogleChatAttachmentsTaskParamsSpacesItem +from .send_google_chat_attachments_task_params_task_type import SendGoogleChatAttachmentsTaskParamsTaskType +from .send_google_chat_message_task_params import SendGoogleChatMessageTaskParams +from .send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem +from .send_google_chat_message_task_params_task_type import SendGoogleChatMessageTaskParamsTaskType +from .send_microsoft_teams_blocks_task_params_type_0_channels_item import ( + SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem, +) from .send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams from .send_microsoft_teams_chat_message_task_params_chats_item import SendMicrosoftTeamsChatMessageTaskParamsChatsItem from .send_microsoft_teams_chat_message_task_params_task_type import SendMicrosoftTeamsChatMessageTaskParamsTaskType +from .send_microsoft_teams_message_task_params_type_0_channels_item import ( + SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem, +) +from .send_slack_blocks_task_params_type_0_channels_item import SendSlackBlocksTaskParamsType0ChannelsItem +from .send_slack_blocks_task_params_type_1_slack_users_item import SendSlackBlocksTaskParamsType1SlackUsersItem +from .send_slack_blocks_task_params_type_2_slack_user_groups_item import ( + SendSlackBlocksTaskParamsType2SlackUserGroupsItem, +) +from .send_slack_message_task_params_type_0_channels_item import SendSlackMessageTaskParamsType0ChannelsItem +from .send_slack_message_task_params_type_1_slack_users_item import SendSlackMessageTaskParamsType1SlackUsersItem +from .send_slack_message_task_params_type_2_slack_user_groups_item import ( + SendSlackMessageTaskParamsType2SlackUserGroupsItem, +) from .send_sms_task_params import SendSmsTaskParams from .send_sms_task_params_task_type import SendSmsTaskParamsTaskType from .send_whatsapp_message_task_params import SendWhatsappMessageTaskParams @@ -2690,6 +3062,7 @@ from .service_list import ServiceList from .service_list_data_item import ServiceListDataItem from .service_list_data_item_type import ServiceListDataItemType +from .service_managed_by import ServiceManagedBy from .service_properties_type_0_item import ServicePropertiesType0Item from .service_response import ServiceResponse from .service_response_data import ServiceResponseData @@ -2707,6 +3080,13 @@ from .severity_slack_aliases_type_0_item import SeveritySlackAliasesType0Item from .severity_slack_channels_type_0_item import SeveritySlackChannelsType0Item from .shift import Shift +from .shift_coverage_request import ShiftCoverageRequest +from .shift_coverage_request_list import ShiftCoverageRequestList +from .shift_coverage_request_list_data_item import ShiftCoverageRequestListDataItem +from .shift_coverage_request_list_data_item_type import ShiftCoverageRequestListDataItemType +from .shift_coverage_request_response import ShiftCoverageRequestResponse +from .shift_coverage_request_response_data import ShiftCoverageRequestResponseData +from .shift_coverage_request_response_data_type import ShiftCoverageRequestResponseDataType from .shift_list import ShiftList from .shift_list_data_item import ShiftListDataItem from .shift_list_data_item_type import ShiftListDataItemType @@ -2739,6 +3119,7 @@ from .sla_response import SlaResponse from .sla_response_data import SlaResponseData from .sla_response_data_type import SlaResponseDataType +from .slack_channel import SlackChannel from .snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams from .snapshot_datadog_graph_task_params_dashboards_item import SnapshotDatadogGraphTaskParamsDashboardsItem from .snapshot_datadog_graph_task_params_post_to_slack_channels_item import ( @@ -2763,6 +3144,14 @@ SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem, ) from .snapshot_new_relic_graph_task_params_task_type import SnapshotNewRelicGraphTaskParamsTaskType +from .snooze_alert import SnoozeAlert +from .snooze_alert_data import SnoozeAlertData +from .snooze_alert_data_attributes import SnoozeAlertDataAttributes +from .snooze_alert_data_type import SnoozeAlertDataType +from .start_session_request import StartSessionRequest +from .start_session_request_platform import StartSessionRequestPlatform +from .start_session_response import StartSessionResponse +from .start_session_response_data import StartSessionResponseData from .status import Status from .status_list import StatusList from .status_list_data_item import StatusListDataItem @@ -2800,10 +3189,12 @@ from .sub_status_response_data_type import SubStatusResponseDataType from .team import Team from .team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 +from .team_auto_add_members_scope import TeamAutoAddMembersScope from .team_incident_broadcast_channel_type_0 import TeamIncidentBroadcastChannelType0 from .team_list import TeamList from .team_list_data_item import TeamListDataItem from .team_list_data_item_type import TeamListDataItemType +from .team_managed_by import TeamManagedBy from .team_properties_type_0_item import TeamPropertiesType0Item from .team_response import TeamResponse from .team_response_data import TeamResponseData @@ -2843,7 +3234,6 @@ from .update_alert_data_attributes_data_type_0 import UpdateAlertDataAttributesDataType0 from .update_alert_data_attributes_labels_item_type_0 import UpdateAlertDataAttributesLabelsItemType0 from .update_alert_data_attributes_noise import UpdateAlertDataAttributesNoise -from .update_alert_data_attributes_source import UpdateAlertDataAttributesSource from .update_alert_data_type import UpdateAlertDataType from .update_alert_event import UpdateAlertEvent from .update_alert_event_data import UpdateAlertEventData @@ -3090,6 +3480,7 @@ from .update_communications_type_data_attributes import UpdateCommunicationsTypeDataAttributes from .update_communications_type_data_type import UpdateCommunicationsTypeDataType from .update_confluence_page_task_params import UpdateConfluencePageTaskParams +from .update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration from .update_confluence_page_task_params_task_type import UpdateConfluencePageTaskParamsTaskType from .update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate from .update_custom_field import UpdateCustomField @@ -3176,6 +3567,7 @@ from .update_edge_connector_body import UpdateEdgeConnectorBody from .update_edge_connector_body_data import UpdateEdgeConnectorBodyData from .update_edge_connector_body_data_attributes import UpdateEdgeConnectorBodyDataAttributes +from .update_edge_connector_body_data_attributes_filters import UpdateEdgeConnectorBodyDataAttributesFilters from .update_edge_connector_body_data_attributes_status import UpdateEdgeConnectorBodyDataAttributesStatus from .update_edge_connector_body_data_type import UpdateEdgeConnectorBodyDataType from .update_edge_connector_edge_connector import UpdateEdgeConnectorEdgeConnector @@ -3234,6 +3626,204 @@ UpdateEscalationPolicyPathDataAttributesNotificationType, ) from .update_escalation_policy_path_data_attributes_path_type import UpdateEscalationPolicyPathDataAttributesPathType +from .update_escalation_policy_path_data_attributes_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType, +) from .update_escalation_policy_path_data_attributes_time_restriction_time_zone import ( UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, ) @@ -3307,6 +3897,7 @@ from .update_github_issue_task_params_completion import UpdateGithubIssueTaskParamsCompletion from .update_github_issue_task_params_issue_type import UpdateGithubIssueTaskParamsIssueType from .update_github_issue_task_params_labels_item import UpdateGithubIssueTaskParamsLabelsItem +from .update_github_issue_task_params_labels_mode import UpdateGithubIssueTaskParamsLabelsMode from .update_github_issue_task_params_repository import UpdateGithubIssueTaskParamsRepository from .update_github_issue_task_params_task_type import UpdateGithubIssueTaskParamsTaskType from .update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams @@ -3321,6 +3912,11 @@ UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem, ) from .update_google_calendar_event_task_params_task_type import UpdateGoogleCalendarEventTaskParamsTaskType +from .update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams +from .update_google_chat_space_description_task_params_space import UpdateGoogleChatSpaceDescriptionTaskParamsSpace +from .update_google_chat_space_description_task_params_task_type import ( + UpdateGoogleChatSpaceDescriptionTaskParamsTaskType, +) from .update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from .update_google_docs_page_task_params_task_type import UpdateGoogleDocsPageTaskParamsTaskType from .update_heartbeat import UpdateHeartbeat @@ -3335,6 +3931,9 @@ from .update_incident_action_item import UpdateIncidentActionItem from .update_incident_action_item_data import UpdateIncidentActionItemData from .update_incident_action_item_data_attributes import UpdateIncidentActionItemDataAttributes +from .update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item, +) from .update_incident_action_item_data_attributes_kind import UpdateIncidentActionItemDataAttributesKind from .update_incident_action_item_data_attributes_priority import UpdateIncidentActionItemDataAttributesPriority from .update_incident_action_item_data_attributes_status import UpdateIncidentActionItemDataAttributesStatus @@ -3454,6 +4053,7 @@ ) from .update_incident_type_data_type import UpdateIncidentTypeDataType from .update_jira_issue_task_params import UpdateJiraIssueTaskParams +from .update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration from .update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority from .update_jira_issue_task_params_status import UpdateJiraIssueTaskParamsStatus from .update_jira_issue_task_params_task_type import UpdateJiraIssueTaskParamsTaskType @@ -3519,12 +4119,18 @@ from .update_on_call_role_data_attributes_audits_permissions_item import ( UpdateOnCallRoleDataAttributesAuditsPermissionsItem, ) +from .update_on_call_role_data_attributes_catalogs_permissions_item import ( + UpdateOnCallRoleDataAttributesCatalogsPermissionsItem, +) from .update_on_call_role_data_attributes_contacts_permissions_item import ( UpdateOnCallRoleDataAttributesContactsPermissionsItem, ) from .update_on_call_role_data_attributes_escalation_policies_permissions_item import ( UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, ) +from .update_on_call_role_data_attributes_functionalities_permissions_item import ( + UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem, +) from .update_on_call_role_data_attributes_groups_permissions_item import ( UpdateOnCallRoleDataAttributesGroupsPermissionsItem, ) @@ -3706,6 +4312,7 @@ from .update_schedule import UpdateSchedule from .update_schedule_data import UpdateScheduleData from .update_schedule_data_attributes import UpdateScheduleDataAttributes +from .update_schedule_data_attributes_shift_report_day_of_week import UpdateScheduleDataAttributesShiftReportDayOfWeek from .update_schedule_data_attributes_slack_channel_type_0 import UpdateScheduleDataAttributesSlackChannelType0 from .update_schedule_data_attributes_slack_user_group import UpdateScheduleDataAttributesSlackUserGroup from .update_schedule_data_type import UpdateScheduleDataType @@ -3861,6 +4468,7 @@ from .update_team_data_attributes_alert_broadcast_channel_type_0 import ( UpdateTeamDataAttributesAlertBroadcastChannelType0, ) +from .update_team_data_attributes_auto_add_members_scope import UpdateTeamDataAttributesAutoAddMembersScope from .update_team_data_attributes_incident_broadcast_channel_type_0 import ( UpdateTeamDataAttributesIncidentBroadcastChannelType0, ) @@ -3899,11 +4507,25 @@ from .update_webhooks_endpoint import UpdateWebhooksEndpoint from .update_webhooks_endpoint_data import UpdateWebhooksEndpointData from .update_webhooks_endpoint_data_attributes import UpdateWebhooksEndpointDataAttributes +from .update_webhooks_endpoint_data_attributes_custom_headers_item import ( + UpdateWebhooksEndpointDataAttributesCustomHeadersItem, +) from .update_webhooks_endpoint_data_attributes_event_types_item import ( UpdateWebhooksEndpointDataAttributesEventTypesItem, ) from .update_webhooks_endpoint_data_type import UpdateWebhooksEndpointDataType from .update_workflow import UpdateWorkflow +from .update_workflow_action_item_form_field_condition import UpdateWorkflowActionItemFormFieldCondition +from .update_workflow_action_item_form_field_condition_data import UpdateWorkflowActionItemFormFieldConditionData +from .update_workflow_action_item_form_field_condition_data_attributes import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributes, +) +from .update_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, +) +from .update_workflow_action_item_form_field_condition_data_type import ( + UpdateWorkflowActionItemFormFieldConditionDataType, +) from .update_workflow_custom_field_selection import UpdateWorkflowCustomFieldSelection from .update_workflow_custom_field_selection_data import UpdateWorkflowCustomFieldSelectionData from .update_workflow_custom_field_selection_data_attributes import UpdateWorkflowCustomFieldSelectionDataAttributes @@ -3935,6 +4557,7 @@ from .update_zendesk_ticket_task_params_priority import UpdateZendeskTicketTaskParamsPriority from .update_zendesk_ticket_task_params_task_type import UpdateZendeskTicketTaskParamsTaskType from .uptime_chart_response import UptimeChartResponse +from .uptime_chart_response_data import UptimeChartResponseData from .user import User from .user_email_address import UserEmailAddress from .user_email_address_list import UserEmailAddressList @@ -3976,6 +4599,7 @@ from .webhooks_delivery_response_data import WebhooksDeliveryResponseData from .webhooks_delivery_response_data_type import WebhooksDeliveryResponseDataType from .webhooks_endpoint import WebhooksEndpoint +from .webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem from .webhooks_endpoint_event_types_item import WebhooksEndpointEventTypesItem from .webhooks_endpoint_list import WebhooksEndpointList from .webhooks_endpoint_list_data_item import WebhooksEndpointListDataItem @@ -3984,6 +4608,20 @@ from .webhooks_endpoint_response_data import WebhooksEndpointResponseData from .webhooks_endpoint_response_data_type import WebhooksEndpointResponseDataType from .workflow import Workflow +from .workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition +from .workflow_action_item_form_field_condition_action_item_condition import ( + WorkflowActionItemFormFieldConditionActionItemCondition, +) +from .workflow_action_item_form_field_condition_list import WorkflowActionItemFormFieldConditionList +from .workflow_action_item_form_field_condition_list_data_item import WorkflowActionItemFormFieldConditionListDataItem +from .workflow_action_item_form_field_condition_list_data_item_type import ( + WorkflowActionItemFormFieldConditionListDataItemType, +) +from .workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from .workflow_action_item_form_field_condition_response_data import WorkflowActionItemFormFieldConditionResponseData +from .workflow_action_item_form_field_condition_response_data_type import ( + WorkflowActionItemFormFieldConditionResponseDataType, +) from .workflow_custom_field_selection import WorkflowCustomFieldSelection from .workflow_custom_field_selection_incident_condition import WorkflowCustomFieldSelectionIncidentCondition from .workflow_custom_field_selection_list import WorkflowCustomFieldSelectionList @@ -4044,23 +4682,24 @@ "ActionItemTriggerParamsIncidentActionItemPrioritiesItem", "ActionItemTriggerParamsIncidentActionItemStatusesItem", "ActionItemTriggerParamsIncidentCondition", - "ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1", - "ActionItemTriggerParamsIncidentConditionalInactivityType1", - "ActionItemTriggerParamsIncidentConditionDetectedAtType1", + "ActionItemTriggerParamsIncidentConditionAcknowledgedAt", + "ActionItemTriggerParamsIncidentConditionalInactivity", + "ActionItemTriggerParamsIncidentConditionDetectedAt", "ActionItemTriggerParamsIncidentConditionEnvironment", "ActionItemTriggerParamsIncidentConditionFunctionality", "ActionItemTriggerParamsIncidentConditionGroup", "ActionItemTriggerParamsIncidentConditionIncidentRoles", "ActionItemTriggerParamsIncidentConditionIncidentType", "ActionItemTriggerParamsIncidentConditionKind", - "ActionItemTriggerParamsIncidentConditionMitigatedAtType1", - "ActionItemTriggerParamsIncidentConditionResolvedAtType1", + "ActionItemTriggerParamsIncidentConditionLabel", + "ActionItemTriggerParamsIncidentConditionMitigatedAt", + "ActionItemTriggerParamsIncidentConditionResolvedAt", "ActionItemTriggerParamsIncidentConditionService", "ActionItemTriggerParamsIncidentConditionSeverity", - "ActionItemTriggerParamsIncidentConditionStartedAtType1", + "ActionItemTriggerParamsIncidentConditionStartedAt", "ActionItemTriggerParamsIncidentConditionStatus", "ActionItemTriggerParamsIncidentConditionSubStatus", - "ActionItemTriggerParamsIncidentConditionSummaryType1", + "ActionItemTriggerParamsIncidentConditionSummary", "ActionItemTriggerParamsIncidentConditionVisibility", "ActionItemTriggerParamsIncidentKindsItem", "ActionItemTriggerParamsIncidentStatusesItem", @@ -4075,9 +4714,13 @@ "AddMicrosoftTeamsChatTabTaskParams", "AddMicrosoftTeamsChatTabTaskParamsChat", "AddMicrosoftTeamsChatTabTaskParamsTaskType", + "AddMicrosoftTeamsTabTaskParamsType0", + "AddMicrosoftTeamsTabTaskParamsType1", "AddRoleTaskParams", "AddRoleTaskParamsAssignedToUser", "AddRoleTaskParamsTaskType", + "AddSlackBookmarkTaskParamsType0", + "AddSlackBookmarkTaskParamsType1", "AddSubscribers", "AddSubscribersData", "AddSubscribersDataAttributes", @@ -4087,11 +4730,29 @@ "AddToTimelineTaskParams", "AddToTimelineTaskParamsPostToSlackChannelsItem", "AddToTimelineTaskParamsTaskType", + "AiChatResponse", + "AiChatResponseData", + "AiChatResponseDataAttributes", + "AiChatResponseDataAttributesStatus", + "AiChatResponseDataType", + "AiChatSessionMessage", + "AiChatSessionMessageList", + "AiChatSessionMessageListMeta", + "AiChatSessionMessageRole", "Alert", - "AlertAlertFieldValuesAttributesItemType0", + "AlertAlertFieldValuesType0Item", + "AlertAlertingTargetsType0Item", "AlertDataType0", "AlertEvent", "AlertEventAction", + "AlertEventEscalationTargetType0", + "AlertEventEscalationTargetType0Data", + "AlertEventEscalationTargetType0DataAttributes", + "AlertEventFeedList", + "AlertEventFeedListDataItem", + "AlertEventFeedListDataItemType", + "AlertEventFeedMeta", + "AlertEventIncidentType0", "AlertEventKind", "AlertEventList", "AlertEventListDataItem", @@ -4099,6 +4760,9 @@ "AlertEventResponse", "AlertEventResponseData", "AlertEventResponseDataType", + "AlertEventScheduleType0", + "AlertEventScheduleType0EscalationPoliciesItem", + "AlertEventUser", "AlertField", "AlertFieldList", "AlertFieldListDataItem", @@ -4124,12 +4788,11 @@ "AlertLabelsItemType0", "AlertList", "AlertListDataItem", - "AlertListDataItemSource", "AlertListDataItemType", "AlertNoise", + "AlertNotificationTargetType", "AlertResponse", "AlertResponseData", - "AlertResponseDataSource", "AlertResponseDataType", "AlertRoute", "AlertRouteList", @@ -4169,7 +4832,6 @@ "AlertRoutingRuleResponseDataType", "AlertRoutingRuleTargetType0", "AlertRoutingRuleTargetType0TargetType", - "AlertSource", "AlertsSource", "AlertsSourceAlertSourceFieldsAttributesItem", "AlertsSourceAlertSourceUrgencyRulesAttributesItem", @@ -4232,6 +4894,9 @@ "ApiKeyWithTokenResponseData", "ApiKeyWithTokenResponseDataAttributes", "ApiKeyWithTokenResponseDataType", + "ArchiveGoogleChatSpacesTaskParams", + "ArchiveGoogleChatSpacesTaskParamsSpacesItem", + "ArchiveGoogleChatSpacesTaskParamsTaskType", "ArchiveMicrosoftTeamsChannelsTaskParams", "ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem", "ArchiveMicrosoftTeamsChannelsTaskParamsTaskType", @@ -4251,6 +4916,9 @@ "AttachDatadogDashboardsTaskParamsDashboardsItem", "AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem", "AttachDatadogDashboardsTaskParamsTaskType", + "AttachRetrospectivePdfToJiraIssueTaskParams", + "AttachRetrospectivePdfToJiraIssueTaskParamsIntegration", + "AttachRetrospectivePdfToJiraIssueTaskParamsTaskType", "Audit", "AuditItemType", "AuditObjectChangesType0", @@ -4271,6 +4939,8 @@ "AutoAssignRoleOpsgenieTaskParams", "AutoAssignRoleOpsgenieTaskParamsSchedule", "AutoAssignRoleOpsgenieTaskParamsTaskType", + "AutoAssignRolePagerdutyTaskParamsType0Schedule", + "AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy", "AutoAssignRoleRootlyTaskParams", "AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget", "AutoAssignRoleRootlyTaskParamsGroupTarget", @@ -4281,6 +4951,71 @@ "AutoAssignRoleVictorOpsTaskParams", "AutoAssignRoleVictorOpsTaskParamsTaskType", "AutoAssignRoleVictorOpsTaskParamsTeam", + "BulkDestroyCatalogEntitiesResponse", + "BulkDestroyCatalogEntitiesResponseData", + "BulkDestroyCatalogEntitiesType0", + "BulkDestroyCatalogEntitiesType1", + "BulkDestroyCatalogEntitiesType1ManagedBy", + "BulkDestroyEnvironmentsResponse", + "BulkDestroyEnvironmentsResponseData", + "BulkDestroyEnvironmentsType0", + "BulkDestroyEnvironmentsType1", + "BulkDestroyEnvironmentsType1ManagedBy", + "BulkDestroyFunctionalitiesResponse", + "BulkDestroyFunctionalitiesResponseData", + "BulkDestroyFunctionalitiesType0", + "BulkDestroyFunctionalitiesType1", + "BulkDestroyFunctionalitiesType1ManagedBy", + "BulkDestroyServicesResponse", + "BulkDestroyServicesResponseData", + "BulkDestroyServicesType0", + "BulkDestroyServicesType1", + "BulkDestroyServicesType1ManagedBy", + "BulkDestroyTeamsResponse", + "BulkDestroyTeamsResponseData", + "BulkDestroyTeamsType0", + "BulkDestroyTeamsType1", + "BulkDestroyTeamsType1ManagedBy", + "BulkUpsertCatalogEntities", + "BulkUpsertCatalogEntitiesEntitiesItem", + "BulkUpsertCatalogEntitiesEntitiesItemFieldsItem", + "BulkUpsertCatalogEntitiesError", + "BulkUpsertCatalogEntitiesErrorErrorsItem", + "BulkUpsertCatalogEntitiesResponse", + "BulkUpsertCatalogEntitiesResponseDataItem", + "BulkUpsertCatalogEntitiesResponseDataItemType", + "BulkUpsertEnvironments", + "BulkUpsertEnvironmentsEntitiesItem", + "BulkUpsertEnvironmentsEntitiesItemFieldsItem", + "BulkUpsertEnvironmentsError", + "BulkUpsertEnvironmentsErrorErrorsItem", + "BulkUpsertEnvironmentsResponse", + "BulkUpsertEnvironmentsResponseDataItem", + "BulkUpsertEnvironmentsResponseDataItemType", + "BulkUpsertFunctionalities", + "BulkUpsertFunctionalitiesEntitiesItem", + "BulkUpsertFunctionalitiesEntitiesItemFieldsItem", + "BulkUpsertFunctionalitiesError", + "BulkUpsertFunctionalitiesErrorErrorsItem", + "BulkUpsertFunctionalitiesResponse", + "BulkUpsertFunctionalitiesResponseDataItem", + "BulkUpsertFunctionalitiesResponseDataItemType", + "BulkUpsertServices", + "BulkUpsertServicesEntitiesItem", + "BulkUpsertServicesEntitiesItemFieldsItem", + "BulkUpsertServicesError", + "BulkUpsertServicesErrorErrorsItem", + "BulkUpsertServicesResponse", + "BulkUpsertServicesResponseDataItem", + "BulkUpsertServicesResponseDataItemType", + "BulkUpsertTeams", + "BulkUpsertTeamsEntitiesItem", + "BulkUpsertTeamsEntitiesItemFieldsItem", + "BulkUpsertTeamsError", + "BulkUpsertTeamsErrorErrorsItem", + "BulkUpsertTeamsResponse", + "BulkUpsertTeamsResponseDataItem", + "BulkUpsertTeamsResponseDataItemType", "CallPeopleTaskParams", "CallPeopleTaskParamsTaskType", "CancelIncident", @@ -4323,6 +5058,7 @@ "CatalogEntityList", "CatalogEntityListDataItem", "CatalogEntityListDataItemType", + "CatalogEntityManagedBy", "CatalogEntityPropertiesItem", "CatalogEntityProperty", "CatalogEntityPropertyKey", @@ -4341,6 +5077,7 @@ "CatalogFieldList", "CatalogFieldListDataItem", "CatalogFieldListDataItemType", + "CatalogFieldManagedBy", "CatalogFieldResponse", "CatalogFieldResponseData", "CatalogFieldResponseDataType", @@ -4348,12 +5085,14 @@ "CatalogList", "CatalogListDataItem", "CatalogListDataItemType", + "CatalogManagedBy", "CatalogProperty", "CatalogPropertyCatalogType", "CatalogPropertyKind", "CatalogPropertyList", "CatalogPropertyListDataItem", "CatalogPropertyListDataItemType", + "CatalogPropertyManagedBy", "CatalogPropertyResponse", "CatalogPropertyResponseData", "CatalogPropertyResponseDataType", @@ -4368,6 +5107,9 @@ "CauseResponse", "CauseResponseData", "CauseResponseDataType", + "ChangeGoogleChatSpacePrivacyTaskParams", + "ChangeGoogleChatSpacePrivacyTaskParamsSpace", + "ChangeGoogleChatSpacePrivacyTaskParamsTaskType", "ChangeSlackChannelPrivacyTaskParams", "ChangeSlackChannelPrivacyTaskParamsChannel", "ChangeSlackChannelPrivacyTaskParamsPrivacy", @@ -4458,6 +5200,7 @@ "CreateEdgeConnectorBody", "CreateEdgeConnectorBodyData", "CreateEdgeConnectorBodyDataAttributes", + "CreateEdgeConnectorBodyDataAttributesFilters", "CreateEdgeConnectorBodyDataAttributesStatus", "CreateEdgeConnectorBodyDataType", "CreateGithubIssueTaskParams", @@ -4473,6 +5216,8 @@ "CreateGoogleCalendarEventTaskParamsConferenceSolutionKey", "CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem", "CreateGoogleCalendarEventTaskParamsTaskType", + "CreateGoogleChatSpaceTaskParams", + "CreateGoogleChatSpaceTaskParamsTaskType", "CreateGoogleDocsPageTaskParams", "CreateGoogleDocsPageTaskParamsDrive", "CreateGoogleDocsPageTaskParamsParentFolder", @@ -4589,6 +5334,8 @@ "CreateSharepointPageTaskParamsParentFolder", "CreateSharepointPageTaskParamsSite", "CreateSharepointPageTaskParamsTaskType", + "CreateShortcutStoryTaskParamsType0Project", + "CreateShortcutStoryTaskParamsType1WorkflowState", "CreateShortcutTaskTaskParams", "CreateShortcutTaskTaskParamsCompletion", "CreateShortcutTaskTaskParamsTaskType", @@ -4704,6 +5451,7 @@ "EnvironmentList", "EnvironmentListDataItem", "EnvironmentListDataItemType", + "EnvironmentManagedBy", "EnvironmentPropertiesType0Item", "EnvironmentResponse", "EnvironmentResponseData", @@ -4712,22 +5460,10 @@ "EnvironmentSlackChannelsType0Item", "ErrorsList", "ErrorsListErrorsItem", - "EscalationPathRuleAlertUrgency", - "EscalationPathRuleAlertUrgencyRuleType", - "EscalationPathRuleDeferralWindow", - "EscalationPathRuleDeferralWindowRuleType", - "EscalationPathRuleDeferralWindowTimeBlocksItem", - "EscalationPathRuleDeferralWindowTimeZone", - "EscalationPathRuleField", - "EscalationPathRuleFieldOperator", - "EscalationPathRuleFieldRuleType", - "EscalationPathRuleJsonPath", - "EscalationPathRuleJsonPathOperator", - "EscalationPathRuleJsonPathRuleType", - "EscalationPathRuleService", - "EscalationPathRuleServiceRuleType", - "EscalationPathRuleWorkingHour", - "EscalationPathRuleWorkingHourRuleType", + "EscalateAlert", + "EscalateAlertData", + "EscalateAlertDataAttributes", + "EscalateAlertDataType", "EscalationPolicy", "EscalationPolicyBusinessHoursType0", "EscalationPolicyBusinessHoursType0DaysType0Item", @@ -4755,6 +5491,72 @@ "EscalationPolicyPathResponse", "EscalationPolicyPathResponseData", "EscalationPolicyPathResponseDataType", + "EscalationPolicyPathRulesItemType0", + "EscalationPolicyPathRulesItemType0RuleType", + "EscalationPolicyPathRulesItemType1", + "EscalationPolicyPathRulesItemType1RuleType", + "EscalationPolicyPathRulesItemType2", + "EscalationPolicyPathRulesItemType2Operator", + "EscalationPolicyPathRulesItemType2RuleType", + "EscalationPolicyPathRulesItemType3", + "EscalationPolicyPathRulesItemType3Operator", + "EscalationPolicyPathRulesItemType3RuleType", + "EscalationPolicyPathRulesItemType4", + "EscalationPolicyPathRulesItemType4RuleType", + "EscalationPolicyPathRulesItemType5", + "EscalationPolicyPathRulesItemType5RuleType", + "EscalationPolicyPathRulesItemType5TimeBlocksItem", + "EscalationPolicyPathRulesItemType5TimeZone", + "EscalationPolicyPathRulesItemType6", + "EscalationPolicyPathRulesItemType6Operator", + "EscalationPolicyPathRulesItemType6RuleType", + "EscalationPolicyPathRulesItemType7", + "EscalationPolicyPathRulesItemType7Operator", + "EscalationPolicyPathRulesItemType7RuleType", + "EscalationPolicyPathRulesItemType8Type0", + "EscalationPolicyPathRulesItemType8Type0RuleType", + "EscalationPolicyPathRulesItemType8Type1", + "EscalationPolicyPathRulesItemType8Type1RuleType", + "EscalationPolicyPathRulesItemType8Type2", + "EscalationPolicyPathRulesItemType8Type2Operator", + "EscalationPolicyPathRulesItemType8Type2RuleType", + "EscalationPolicyPathRulesItemType8Type3", + "EscalationPolicyPathRulesItemType8Type3Operator", + "EscalationPolicyPathRulesItemType8Type3RuleType", + "EscalationPolicyPathRulesItemType8Type4", + "EscalationPolicyPathRulesItemType8Type4RuleType", + "EscalationPolicyPathRulesItemType8Type5", + "EscalationPolicyPathRulesItemType8Type5RuleType", + "EscalationPolicyPathRulesItemType8Type5TimeBlocksItem", + "EscalationPolicyPathRulesItemType8Type5TimeZone", + "EscalationPolicyPathRulesItemType8Type6", + "EscalationPolicyPathRulesItemType8Type6Operator", + "EscalationPolicyPathRulesItemType8Type6RuleType", + "EscalationPolicyPathRulesItemType8Type7", + "EscalationPolicyPathRulesItemType8Type7Operator", + "EscalationPolicyPathRulesItemType8Type7RuleType", + "EscalationPolicyPathRulesItemType9Type0", + "EscalationPolicyPathRulesItemType9Type0RuleType", + "EscalationPolicyPathRulesItemType9Type1", + "EscalationPolicyPathRulesItemType9Type1RuleType", + "EscalationPolicyPathRulesItemType9Type2", + "EscalationPolicyPathRulesItemType9Type2Operator", + "EscalationPolicyPathRulesItemType9Type2RuleType", + "EscalationPolicyPathRulesItemType9Type3", + "EscalationPolicyPathRulesItemType9Type3Operator", + "EscalationPolicyPathRulesItemType9Type3RuleType", + "EscalationPolicyPathRulesItemType9Type4", + "EscalationPolicyPathRulesItemType9Type4RuleType", + "EscalationPolicyPathRulesItemType9Type5", + "EscalationPolicyPathRulesItemType9Type5RuleType", + "EscalationPolicyPathRulesItemType9Type5TimeBlocksItem", + "EscalationPolicyPathRulesItemType9Type5TimeZone", + "EscalationPolicyPathRulesItemType9Type6", + "EscalationPolicyPathRulesItemType9Type6Operator", + "EscalationPolicyPathRulesItemType9Type6RuleType", + "EscalationPolicyPathRulesItemType9Type7", + "EscalationPolicyPathRulesItemType9Type7Operator", + "EscalationPolicyPathRulesItemType9Type7RuleType", "EscalationPolicyPathTimeRestrictionsItem", "EscalationPolicyPathTimeRestrictionsItemEndDay", "EscalationPolicyPathTimeRestrictionsItemStartDay", @@ -4824,6 +5626,7 @@ "FunctionalityList", "FunctionalityListDataItem", "FunctionalityListDataItemType", + "FunctionalityManagedBy", "FunctionalityPropertiesType0Item", "FunctionalityResponse", "FunctionalityResponseData", @@ -4844,8 +5647,13 @@ "GetEscalationPathInclude", "GetEscalationPolicyInclude", "GetFormFieldInclude", + "GetGithubCommitsTaskParamsType0", + "GetGithubCommitsTaskParamsType1", + "GetGitlabCommitsTaskParamsType0", + "GetGitlabCommitsTaskParamsType1", "GetIncidentInclude", "GetIncidentSubStatusInclude", + "GetMeetingRecordingInclude", "GetPlaybookInclude", "GetPulsesTaskParams", "GetPulsesTaskParamsParentMessageThreadTask", @@ -4871,6 +5679,9 @@ "HttpClientTaskParamsMethod", "HttpClientTaskParamsPostToSlackChannelsItem", "HttpClientTaskParamsTaskType", + "ImportMeetingRecording", + "ImportMeetingRecordingPlatform", + "ImportMeetingRecordingSource", "Incident", "IncidentActionItem", "IncidentActionItemKind", @@ -4996,6 +5807,7 @@ "IncidentRoleTaskResponseData", "IncidentRoleTaskResponseDataType", "IncidentsChartResponse", + "IncidentsChartResponseData", "IncidentStartedByType0", "IncidentStatusPageEvent", "IncidentStatusPageEventList", @@ -5014,24 +5826,25 @@ "IncidentSubStatusResponseDataType", "IncidentTriggerParams", "IncidentTriggerParamsIncidentCondition", - "IncidentTriggerParamsIncidentConditionAcknowledgedAtType1", - "IncidentTriggerParamsIncidentConditionalInactivityType1", + "IncidentTriggerParamsIncidentConditionAcknowledgedAt", + "IncidentTriggerParamsIncidentConditionalInactivity", "IncidentTriggerParamsIncidentConditionCause", - "IncidentTriggerParamsIncidentConditionDetectedAtType1", + "IncidentTriggerParamsIncidentConditionDetectedAt", "IncidentTriggerParamsIncidentConditionEnvironment", "IncidentTriggerParamsIncidentConditionFunctionality", "IncidentTriggerParamsIncidentConditionGroup", "IncidentTriggerParamsIncidentConditionIncidentRoles", "IncidentTriggerParamsIncidentConditionIncidentType", "IncidentTriggerParamsIncidentConditionKind", - "IncidentTriggerParamsIncidentConditionMitigatedAtType1", - "IncidentTriggerParamsIncidentConditionResolvedAtType1", + "IncidentTriggerParamsIncidentConditionLabel", + "IncidentTriggerParamsIncidentConditionMitigatedAt", + "IncidentTriggerParamsIncidentConditionResolvedAt", "IncidentTriggerParamsIncidentConditionService", "IncidentTriggerParamsIncidentConditionSeverity", - "IncidentTriggerParamsIncidentConditionStartedAtType1", + "IncidentTriggerParamsIncidentConditionStartedAt", "IncidentTriggerParamsIncidentConditionStatus", "IncidentTriggerParamsIncidentConditionSubStatus", - "IncidentTriggerParamsIncidentConditionSummaryType1", + "IncidentTriggerParamsIncidentConditionSummary", "IncidentTriggerParamsIncidentConditionVisibility", "IncidentTriggerParamsIncidentKindsItem", "IncidentTriggerParamsIncidentPostMortemConditionCause", @@ -5052,6 +5865,18 @@ "InTriageIncident", "InTriageIncidentData", "InTriageIncidentDataType", + "InviteToGoogleChatSpaceTaskParams", + "InviteToGoogleChatSpaceTaskParamsSpace", + "InviteToGoogleChatSpaceTaskParamsTaskType", + "InviteToMicrosoftTeamsChannelRootlyTaskParams", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget", "InviteToMicrosoftTeamsChannelTaskParams", "InviteToMicrosoftTeamsChannelTaskParamsChannel", "InviteToMicrosoftTeamsChannelTaskParamsTaskType", @@ -5060,6 +5885,8 @@ "InviteToSlackChannelOpsgenieTaskParamsChannelsItem", "InviteToSlackChannelOpsgenieTaskParamsSchedule", "InviteToSlackChannelOpsgenieTaskParamsTaskType", + "InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy", + "InviteToSlackChannelPagerdutyTaskParamsType1Schedule", "InviteToSlackChannelRootlyTaskParams", "InviteToSlackChannelRootlyTaskParamsChannelsItem", "InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget", @@ -5068,6 +5895,9 @@ "InviteToSlackChannelRootlyTaskParamsServiceTarget", "InviteToSlackChannelRootlyTaskParamsTaskType", "InviteToSlackChannelRootlyTaskParamsUserTarget", + "InviteToSlackChannelTaskParamsType0SlackUsersItem", + "InviteToSlackChannelTaskParamsType1SlackUserGroupsItem", + "InviteToSlackChannelTaskParamsType2", "InviteToSlackChannelVictorOpsTaskParams", "InviteToSlackChannelVictorOpsTaskParamsChannelsItem", "InviteToSlackChannelVictorOpsTaskParamsTaskType", @@ -5076,7 +5906,13 @@ "IpRangesResponse", "IpRangesResponseData", "IpRangesResponseDataType", + "JsonapiIncludedResource", + "JsonapiIncludedResourceAttributes", + "JsonapiIncludedResourceRelationships", "Links", + "ListAlertEventsFeedFilteraction", + "ListAlertEventsFeedFilterkind", + "ListAlertEventsFeedSort", "ListAlertsInclude", "ListCatalogChecklistTemplatesInclude", "ListCatalogChecklistTemplatesSort", @@ -5093,6 +5929,7 @@ "ListDashboardsInclude", "ListEnvironmentCatalogPropertiesInclude", "ListEnvironmentCatalogPropertiesSort", + "ListEscalationPathsFilterpathType", "ListEscalationPathsInclude", "ListEscalationPoliciesInclude", "ListFormFieldsInclude", @@ -5138,11 +5975,21 @@ "LiveCallRouterResponseDataType", "LiveCallRouterWaitingMusicUrl", "MeetingRecording", + "MeetingRecordingDetail", + "MeetingRecordingDetailResponse", + "MeetingRecordingDetailResponseData", + "MeetingRecordingDetailResponseDataType", + "MeetingRecordingDetailTranscriptType1", "MeetingRecordingList", "MeetingRecordingListDataItem", "MeetingRecordingListDataItemType", "MeetingRecordingPlatform", + "MeetingRecordingResponse", + "MeetingRecordingResponseData", + "MeetingRecordingResponseDataType", "MeetingRecordingStatus", + "MeetingRecordingTranscriptSegment", + "MeetingRecordingTranscriptWord", "Meta", "MitigateIncident", "MitigateIncidentData", @@ -5155,8 +6002,9 @@ "NewAlertDataAttributesDataType0", "NewAlertDataAttributesLabelsItemType0", "NewAlertDataAttributesNoise", + "NewAlertDataAttributesNotificationTargetsType0Item", + "NewAlertDataAttributesNotificationTargetsType0ItemType", "NewAlertDataAttributesNotificationTargetType", - "NewAlertDataAttributesSource", "NewAlertDataAttributesStatus", "NewAlertDataType", "NewAlertEvent", @@ -5390,6 +6238,28 @@ "NewEscalationPolicyPathDataAttributesMatchMode", "NewEscalationPolicyPathDataAttributesNotificationType", "NewEscalationPolicyPathDataAttributesPathType", + "NewEscalationPolicyPathDataAttributesRulesItemType0", + "NewEscalationPolicyPathDataAttributesRulesItemType0RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType1", + "NewEscalationPolicyPathDataAttributesRulesItemType1RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType2", + "NewEscalationPolicyPathDataAttributesRulesItemType2Operator", + "NewEscalationPolicyPathDataAttributesRulesItemType2RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType3", + "NewEscalationPolicyPathDataAttributesRulesItemType3Operator", + "NewEscalationPolicyPathDataAttributesRulesItemType3RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType4", + "NewEscalationPolicyPathDataAttributesRulesItemType4RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType5", + "NewEscalationPolicyPathDataAttributesRulesItemType5RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem", + "NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone", + "NewEscalationPolicyPathDataAttributesRulesItemType6", + "NewEscalationPolicyPathDataAttributesRulesItemType6Operator", + "NewEscalationPolicyPathDataAttributesRulesItemType6RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType7", + "NewEscalationPolicyPathDataAttributesRulesItemType7Operator", + "NewEscalationPolicyPathDataAttributesRulesItemType7RuleType", "NewEscalationPolicyPathDataAttributesTimeRestrictionsItem", "NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay", "NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay", @@ -5450,6 +6320,7 @@ "NewIncidentActionItem", "NewIncidentActionItemData", "NewIncidentActionItemDataAttributes", + "NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item", "NewIncidentActionItemDataAttributesKind", "NewIncidentActionItemDataAttributesPriority", "NewIncidentActionItemDataAttributesStatus", @@ -5558,8 +6429,10 @@ "NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem", "NewOnCallRoleDataAttributesApiKeysPermissionsItem", "NewOnCallRoleDataAttributesAuditsPermissionsItem", + "NewOnCallRoleDataAttributesCatalogsPermissionsItem", "NewOnCallRoleDataAttributesContactsPermissionsItem", "NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem", + "NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem", "NewOnCallRoleDataAttributesGroupsPermissionsItem", "NewOnCallRoleDataAttributesHeartbeatsPermissionsItem", "NewOnCallRoleDataAttributesIntegrationsPermissionsItem", @@ -5661,6 +6534,7 @@ "NewSchedule", "NewScheduleData", "NewScheduleDataAttributes", + "NewScheduleDataAttributesShiftReportDayOfWeek", "NewScheduleDataAttributesSlackChannelType0", "NewScheduleDataAttributesSlackUserGroup", "NewScheduleDataType", @@ -5712,6 +6586,10 @@ "NewSeverityDataAttributesSlackAliasesType0Item", "NewSeverityDataAttributesSlackChannelsType0Item", "NewSeverityDataType", + "NewShiftCoverageRequest", + "NewShiftCoverageRequestData", + "NewShiftCoverageRequestDataAttributes", + "NewShiftCoverageRequestDataType", "NewSla", "NewSlaData", "NewSlaDataAttributes", @@ -5749,6 +6627,7 @@ "NewTeamData", "NewTeamDataAttributes", "NewTeamDataAttributesAlertBroadcastChannelType0", + "NewTeamDataAttributesAutoAddMembersScope", "NewTeamDataAttributesIncidentBroadcastChannelType0", "NewTeamDataAttributesPropertiesItem", "NewTeamDataAttributesSlackAliasesType0Item", @@ -5770,9 +6649,15 @@ "NewWebhooksEndpoint", "NewWebhooksEndpointData", "NewWebhooksEndpointDataAttributes", + "NewWebhooksEndpointDataAttributesCustomHeadersItem", "NewWebhooksEndpointDataAttributesEventTypesItem", "NewWebhooksEndpointDataType", "NewWorkflow", + "NewWorkflowActionItemFormFieldCondition", + "NewWorkflowActionItemFormFieldConditionData", + "NewWorkflowActionItemFormFieldConditionDataAttributes", + "NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition", + "NewWorkflowActionItemFormFieldConditionDataType", "NewWorkflowCustomFieldSelection", "NewWorkflowCustomFieldSelectionData", "NewWorkflowCustomFieldSelectionDataAttributes", @@ -5812,6 +6697,11 @@ "NewWorkflowTaskData", "NewWorkflowTaskDataAttributes", "NewWorkflowTaskDataType", + "Oncall", + "OncallList", + "OncallListDataItem", + "OncallListDataItemType", + "OncallNotificationType", "OnCallPayReport", "OnCallPayReportList", "OnCallPayReportListDataItem", @@ -5821,6 +6711,16 @@ "OnCallPayReportResponseData", "OnCallPayReportResponseDataType", "OnCallPayReportStatus", + "OncallRelationships", + "OncallRelationshipsEscalationPolicy", + "OncallRelationshipsEscalationPolicyDataType0", + "OncallRelationshipsEscalationPolicyDataType0Type", + "OncallRelationshipsSchedule", + "OncallRelationshipsScheduleDataType0", + "OncallRelationshipsScheduleDataType0Type", + "OncallRelationshipsUser", + "OncallRelationshipsUserDataType0", + "OncallRelationshipsUserDataType0Type", "OnCallRole", "OnCallRoleAlertFieldsPermissionsItem", "OnCallRoleAlertGroupsPermissionsItem", @@ -5830,8 +6730,10 @@ "OnCallRoleAlertUrgencyPermissionsItem", "OnCallRoleApiKeysPermissionsItem", "OnCallRoleAuditsPermissionsItem", + "OnCallRoleCatalogsPermissionsItem", "OnCallRoleContactsPermissionsItem", "OnCallRoleEscalationPoliciesPermissionsItem", + "OnCallRoleFunctionalitiesPermissionsItem", "OnCallRoleGroupsPermissionsItem", "OnCallRoleHeartbeatsPermissionsItem", "OnCallRoleIntegrationsPermissionsItem", @@ -5891,6 +6793,8 @@ "PageRootlyOnCallRespondersTaskParamsServiceTarget", "PageRootlyOnCallRespondersTaskParamsTaskType", "PageRootlyOnCallRespondersTaskParamsUserTarget", + "PageVictorOpsOnCallRespondersTaskParamsType0UsersItem", + "PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem", "PatchAlertRoute", "PatchAlertRouteData", "PatchAlertRouteDataAttributes", @@ -5929,24 +6833,25 @@ "PostMortemTemplateResponseDataType", "PostMortemTriggerParams", "PostMortemTriggerParamsIncidentCondition", - "PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1", - "PostMortemTriggerParamsIncidentConditionalInactivityType1", + "PostMortemTriggerParamsIncidentConditionAcknowledgedAt", + "PostMortemTriggerParamsIncidentConditionalInactivity", "PostMortemTriggerParamsIncidentConditionCause", - "PostMortemTriggerParamsIncidentConditionDetectedAtType1", + "PostMortemTriggerParamsIncidentConditionDetectedAt", "PostMortemTriggerParamsIncidentConditionEnvironment", "PostMortemTriggerParamsIncidentConditionFunctionality", "PostMortemTriggerParamsIncidentConditionGroup", "PostMortemTriggerParamsIncidentConditionIncidentRoles", "PostMortemTriggerParamsIncidentConditionIncidentType", "PostMortemTriggerParamsIncidentConditionKind", - "PostMortemTriggerParamsIncidentConditionMitigatedAtType1", - "PostMortemTriggerParamsIncidentConditionResolvedAtType1", + "PostMortemTriggerParamsIncidentConditionLabel", + "PostMortemTriggerParamsIncidentConditionMitigatedAt", + "PostMortemTriggerParamsIncidentConditionResolvedAt", "PostMortemTriggerParamsIncidentConditionService", "PostMortemTriggerParamsIncidentConditionSeverity", - "PostMortemTriggerParamsIncidentConditionStartedAtType1", + "PostMortemTriggerParamsIncidentConditionStartedAt", "PostMortemTriggerParamsIncidentConditionStatus", "PostMortemTriggerParamsIncidentConditionSubStatus", - "PostMortemTriggerParamsIncidentConditionSummaryType1", + "PostMortemTriggerParamsIncidentConditionSummary", "PostMortemTriggerParamsIncidentConditionVisibility", "PostMortemTriggerParamsIncidentKindsItem", "PostMortemTriggerParamsIncidentPostMortemCondition", @@ -5979,6 +6884,9 @@ "PulseTriggerParamsPulseConditionSource", "PulseTriggerParamsTriggersItem", "PulseTriggerParamsTriggerType", + "Receipt", + "ReceiptReason", + "ReceiptState", "RedisClientTaskParams", "RedisClientTaskParamsPostToSlackChannelsItem", "RedisClientTaskParamsTaskType", @@ -5989,6 +6897,9 @@ "RemoveSubscribersData", "RemoveSubscribersDataAttributes", "RemoveSubscribersDataType", + "RenameGoogleChatSpaceTaskParams", + "RenameGoogleChatSpaceTaskParamsSpace", + "RenameGoogleChatSpaceTaskParamsTaskType", "RenameMicrosoftTeamsChannelTaskParams", "RenameMicrosoftTeamsChannelTaskParamsChannel", "RenameMicrosoftTeamsChannelTaskParamsTaskType", @@ -6138,6 +7049,7 @@ "ScheduleRotationUserResponse", "ScheduleRotationUserResponseData", "ScheduleRotationUserResponseDataType", + "ScheduleShiftReportDayOfWeek", "ScheduleSlackChannelType0", "ScheduleSlackUserGroupType0", "Secret", @@ -6151,9 +7063,23 @@ "SendDashboardReportTaskParamsTaskType", "SendEmailTaskParams", "SendEmailTaskParamsTaskType", + "SendGoogleChatAttachmentsTaskParams", + "SendGoogleChatAttachmentsTaskParamsSpacesItem", + "SendGoogleChatAttachmentsTaskParamsTaskType", + "SendGoogleChatMessageTaskParams", + "SendGoogleChatMessageTaskParamsSpacesItem", + "SendGoogleChatMessageTaskParamsTaskType", + "SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem", "SendMicrosoftTeamsChatMessageTaskParams", "SendMicrosoftTeamsChatMessageTaskParamsChatsItem", "SendMicrosoftTeamsChatMessageTaskParamsTaskType", + "SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem", + "SendSlackBlocksTaskParamsType0ChannelsItem", + "SendSlackBlocksTaskParamsType1SlackUsersItem", + "SendSlackBlocksTaskParamsType2SlackUserGroupsItem", + "SendSlackMessageTaskParamsType0ChannelsItem", + "SendSlackMessageTaskParamsType1SlackUsersItem", + "SendSlackMessageTaskParamsType2SlackUserGroupsItem", "SendSmsTaskParams", "SendSmsTaskParamsTaskType", "SendWhatsappMessageTaskParams", @@ -6164,6 +7090,7 @@ "ServiceList", "ServiceListDataItem", "ServiceListDataItemType", + "ServiceManagedBy", "ServicePropertiesType0Item", "ServiceResponse", "ServiceResponseData", @@ -6181,6 +7108,13 @@ "SeveritySlackAliasesType0Item", "SeveritySlackChannelsType0Item", "Shift", + "ShiftCoverageRequest", + "ShiftCoverageRequestList", + "ShiftCoverageRequestListDataItem", + "ShiftCoverageRequestListDataItemType", + "ShiftCoverageRequestResponse", + "ShiftCoverageRequestResponseData", + "ShiftCoverageRequestResponseDataType", "ShiftList", "ShiftListDataItem", "ShiftListDataItemType", @@ -6201,6 +7135,7 @@ "SimpleTriggerParamsTriggersItem", "SimpleTriggerParamsTriggerType", "Sla", + "SlackChannel", "SlaConditionMatchType", "SlaConditionsItem", "SlaConditionsItemConditionableType", @@ -6229,6 +7164,14 @@ "SnapshotNewRelicGraphTaskParamsMetricType", "SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem", "SnapshotNewRelicGraphTaskParamsTaskType", + "SnoozeAlert", + "SnoozeAlertData", + "SnoozeAlertDataAttributes", + "SnoozeAlertDataType", + "StartSessionRequest", + "StartSessionRequestPlatform", + "StartSessionResponse", + "StartSessionResponseData", "Status", "StatusList", "StatusListDataItem", @@ -6266,10 +7209,12 @@ "SubStatusResponseDataType", "Team", "TeamAlertBroadcastChannelType0", + "TeamAutoAddMembersScope", "TeamIncidentBroadcastChannelType0", "TeamList", "TeamListDataItem", "TeamListDataItemType", + "TeamManagedBy", "TeamPropertiesType0Item", "TeamResponse", "TeamResponseData", @@ -6307,7 +7252,6 @@ "UpdateAlertDataAttributesDataType0", "UpdateAlertDataAttributesLabelsItemType0", "UpdateAlertDataAttributesNoise", - "UpdateAlertDataAttributesSource", "UpdateAlertDataType", "UpdateAlertEvent", "UpdateAlertEventData", @@ -6466,6 +7410,7 @@ "UpdateCommunicationsTypeDataAttributes", "UpdateCommunicationsTypeDataType", "UpdateConfluencePageTaskParams", + "UpdateConfluencePageTaskParamsIntegration", "UpdateConfluencePageTaskParamsTaskType", "UpdateConfluencePageTaskParamsTemplate", "UpdateCustomField", @@ -6528,6 +7473,7 @@ "UpdateEdgeConnectorBody", "UpdateEdgeConnectorBodyData", "UpdateEdgeConnectorBodyDataAttributes", + "UpdateEdgeConnectorBodyDataAttributesFilters", "UpdateEdgeConnectorBodyDataAttributesStatus", "UpdateEdgeConnectorBodyDataType", "UpdateEdgeConnectorEdgeConnector", @@ -6562,6 +7508,72 @@ "UpdateEscalationPolicyPathDataAttributesMatchMode", "UpdateEscalationPolicyPathDataAttributesNotificationType", "UpdateEscalationPolicyPathDataAttributesPathType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType0", + "UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType1", + "UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType2", + "UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType3", + "UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType4", + "UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType5", + "UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem", + "UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone", + "UpdateEscalationPolicyPathDataAttributesRulesItemType6", + "UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType7", + "UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType", "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem", "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay", "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay", @@ -6615,6 +7627,7 @@ "UpdateGithubIssueTaskParamsCompletion", "UpdateGithubIssueTaskParamsIssueType", "UpdateGithubIssueTaskParamsLabelsItem", + "UpdateGithubIssueTaskParamsLabelsMode", "UpdateGithubIssueTaskParamsRepository", "UpdateGithubIssueTaskParamsTaskType", "UpdateGitlabIssueTaskParams", @@ -6625,6 +7638,9 @@ "UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey", "UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem", "UpdateGoogleCalendarEventTaskParamsTaskType", + "UpdateGoogleChatSpaceDescriptionTaskParams", + "UpdateGoogleChatSpaceDescriptionTaskParamsSpace", + "UpdateGoogleChatSpaceDescriptionTaskParamsTaskType", "UpdateGoogleDocsPageTaskParams", "UpdateGoogleDocsPageTaskParamsTaskType", "UpdateHeartbeat", @@ -6637,6 +7653,7 @@ "UpdateIncidentActionItem", "UpdateIncidentActionItemData", "UpdateIncidentActionItemDataAttributes", + "UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item", "UpdateIncidentActionItemDataAttributesKind", "UpdateIncidentActionItemDataAttributesPriority", "UpdateIncidentActionItemDataAttributesStatus", @@ -6736,6 +7753,7 @@ "UpdateIncidentTypeDataAttributesSlackChannelsType0Item", "UpdateIncidentTypeDataType", "UpdateJiraIssueTaskParams", + "UpdateJiraIssueTaskParamsIntegration", "UpdateJiraIssueTaskParamsPriority", "UpdateJiraIssueTaskParamsStatus", "UpdateJiraIssueTaskParamsTaskType", @@ -6777,8 +7795,10 @@ "UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem", "UpdateOnCallRoleDataAttributesApiKeysPermissionsItem", "UpdateOnCallRoleDataAttributesAuditsPermissionsItem", + "UpdateOnCallRoleDataAttributesCatalogsPermissionsItem", "UpdateOnCallRoleDataAttributesContactsPermissionsItem", "UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem", + "UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem", "UpdateOnCallRoleDataAttributesGroupsPermissionsItem", "UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem", "UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem", @@ -6902,6 +7922,7 @@ "UpdateSchedule", "UpdateScheduleData", "UpdateScheduleDataAttributes", + "UpdateScheduleDataAttributesShiftReportDayOfWeek", "UpdateScheduleDataAttributesSlackChannelType0", "UpdateScheduleDataAttributesSlackUserGroup", "UpdateScheduleDataType", @@ -7005,6 +8026,7 @@ "UpdateTeamData", "UpdateTeamDataAttributes", "UpdateTeamDataAttributesAlertBroadcastChannelType0", + "UpdateTeamDataAttributesAutoAddMembersScope", "UpdateTeamDataAttributesIncidentBroadcastChannelType0", "UpdateTeamDataAttributesPropertiesItem", "UpdateTeamDataAttributesSlackAliasesType0Item", @@ -7039,9 +8061,15 @@ "UpdateWebhooksEndpoint", "UpdateWebhooksEndpointData", "UpdateWebhooksEndpointDataAttributes", + "UpdateWebhooksEndpointDataAttributesCustomHeadersItem", "UpdateWebhooksEndpointDataAttributesEventTypesItem", "UpdateWebhooksEndpointDataType", "UpdateWorkflow", + "UpdateWorkflowActionItemFormFieldCondition", + "UpdateWorkflowActionItemFormFieldConditionData", + "UpdateWorkflowActionItemFormFieldConditionDataAttributes", + "UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition", + "UpdateWorkflowActionItemFormFieldConditionDataType", "UpdateWorkflowCustomFieldSelection", "UpdateWorkflowCustomFieldSelectionData", "UpdateWorkflowCustomFieldSelectionDataAttributes", @@ -7069,6 +8097,7 @@ "UpdateZendeskTicketTaskParamsPriority", "UpdateZendeskTicketTaskParamsTaskType", "UptimeChartResponse", + "UptimeChartResponseData", "User", "UserEmailAddress", "UserEmailAddressList", @@ -7110,6 +8139,7 @@ "WebhooksDeliveryResponseData", "WebhooksDeliveryResponseDataType", "WebhooksEndpoint", + "WebhooksEndpointCustomHeadersItem", "WebhooksEndpointEventTypesItem", "WebhooksEndpointList", "WebhooksEndpointListDataItem", @@ -7118,6 +8148,14 @@ "WebhooksEndpointResponseData", "WebhooksEndpointResponseDataType", "Workflow", + "WorkflowActionItemFormFieldCondition", + "WorkflowActionItemFormFieldConditionActionItemCondition", + "WorkflowActionItemFormFieldConditionList", + "WorkflowActionItemFormFieldConditionListDataItem", + "WorkflowActionItemFormFieldConditionListDataItemType", + "WorkflowActionItemFormFieldConditionResponse", + "WorkflowActionItemFormFieldConditionResponseData", + "WorkflowActionItemFormFieldConditionResponseDataType", "WorkflowCustomFieldSelection", "WorkflowCustomFieldSelectionIncidentCondition", "WorkflowCustomFieldSelectionList", diff --git a/rootly_sdk/models/action_item_trigger_params.py b/rootly_sdk/models/action_item_trigger_params.py index 6c91967f..21a6b5c3 100644 --- a/rootly_sdk/models/action_item_trigger_params.py +++ b/rootly_sdk/models/action_item_trigger_params.py @@ -42,13 +42,13 @@ ActionItemTriggerParamsIncidentCondition, check_action_item_trigger_params_incident_condition, ) -from ..models.action_item_trigger_params_incident_condition_acknowledged_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1, - check_action_item_trigger_params_incident_condition_acknowledged_at_type_1, +from ..models.action_item_trigger_params_incident_condition_acknowledged_at import ( + ActionItemTriggerParamsIncidentConditionAcknowledgedAt, + check_action_item_trigger_params_incident_condition_acknowledged_at, ) -from ..models.action_item_trigger_params_incident_condition_detected_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionDetectedAtType1, - check_action_item_trigger_params_incident_condition_detected_at_type_1, +from ..models.action_item_trigger_params_incident_condition_detected_at import ( + ActionItemTriggerParamsIncidentConditionDetectedAt, + check_action_item_trigger_params_incident_condition_detected_at, ) from ..models.action_item_trigger_params_incident_condition_environment import ( ActionItemTriggerParamsIncidentConditionEnvironment, @@ -74,13 +74,17 @@ ActionItemTriggerParamsIncidentConditionKind, check_action_item_trigger_params_incident_condition_kind, ) -from ..models.action_item_trigger_params_incident_condition_mitigated_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionMitigatedAtType1, - check_action_item_trigger_params_incident_condition_mitigated_at_type_1, +from ..models.action_item_trigger_params_incident_condition_label import ( + ActionItemTriggerParamsIncidentConditionLabel, + check_action_item_trigger_params_incident_condition_label, ) -from ..models.action_item_trigger_params_incident_condition_resolved_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionResolvedAtType1, - check_action_item_trigger_params_incident_condition_resolved_at_type_1, +from ..models.action_item_trigger_params_incident_condition_mitigated_at import ( + ActionItemTriggerParamsIncidentConditionMitigatedAt, + check_action_item_trigger_params_incident_condition_mitigated_at, +) +from ..models.action_item_trigger_params_incident_condition_resolved_at import ( + ActionItemTriggerParamsIncidentConditionResolvedAt, + check_action_item_trigger_params_incident_condition_resolved_at, ) from ..models.action_item_trigger_params_incident_condition_service import ( ActionItemTriggerParamsIncidentConditionService, @@ -90,9 +94,9 @@ ActionItemTriggerParamsIncidentConditionSeverity, check_action_item_trigger_params_incident_condition_severity, ) -from ..models.action_item_trigger_params_incident_condition_started_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionStartedAtType1, - check_action_item_trigger_params_incident_condition_started_at_type_1, +from ..models.action_item_trigger_params_incident_condition_started_at import ( + ActionItemTriggerParamsIncidentConditionStartedAt, + check_action_item_trigger_params_incident_condition_started_at, ) from ..models.action_item_trigger_params_incident_condition_status import ( ActionItemTriggerParamsIncidentConditionStatus, @@ -102,17 +106,17 @@ ActionItemTriggerParamsIncidentConditionSubStatus, check_action_item_trigger_params_incident_condition_sub_status, ) -from ..models.action_item_trigger_params_incident_condition_summary_type_1 import ( - ActionItemTriggerParamsIncidentConditionSummaryType1, - check_action_item_trigger_params_incident_condition_summary_type_1, +from ..models.action_item_trigger_params_incident_condition_summary import ( + ActionItemTriggerParamsIncidentConditionSummary, + check_action_item_trigger_params_incident_condition_summary, ) from ..models.action_item_trigger_params_incident_condition_visibility import ( ActionItemTriggerParamsIncidentConditionVisibility, check_action_item_trigger_params_incident_condition_visibility, ) -from ..models.action_item_trigger_params_incident_conditional_inactivity_type_1 import ( - ActionItemTriggerParamsIncidentConditionalInactivityType1, - check_action_item_trigger_params_incident_conditional_inactivity_type_1, +from ..models.action_item_trigger_params_incident_conditional_inactivity import ( + ActionItemTriggerParamsIncidentConditionalInactivity, + check_action_item_trigger_params_incident_conditional_inactivity, ) from ..models.action_item_trigger_params_incident_kinds_item import ( ActionItemTriggerParamsIncidentKindsItem, @@ -140,7 +144,7 @@ class ActionItemTriggerParams: incident_visibilities (list[bool] | Unset): incident_kinds (list[ActionItemTriggerParamsIncidentKindsItem] | Unset): incident_statuses (list[ActionItemTriggerParamsIncidentStatusesItem] | Unset): - incident_inactivity_duration (None | str | Unset): + incident_inactivity_duration (None | str | Unset): ex. 10 min, 1h, 3 days, 2 weeks incident_condition (ActionItemTriggerParamsIncidentCondition | Unset): Default: 'ALL'. incident_condition_visibility (ActionItemTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. incident_condition_kind (ActionItemTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. @@ -156,13 +160,16 @@ class ActionItemTriggerParams: incident_condition_functionality (ActionItemTriggerParamsIncidentConditionFunctionality | Unset): Default: 'ANY'. incident_condition_group (ActionItemTriggerParamsIncidentConditionGroup | Unset): Default: 'ANY'. - incident_condition_summary (ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset): - incident_condition_started_at (ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset): - incident_condition_detected_at (ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset): - incident_condition_acknowledged_at (ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset): - incident_condition_mitigated_at (ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset): - incident_condition_resolved_at (ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset): - incident_conditional_inactivity (ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset): + incident_condition_label (ActionItemTriggerParamsIncidentConditionLabel | Unset): Default: 'ANY'. + incident_condition_label_use_regexp (bool | Unset): Default: False. + incident_labels (list[str] | Unset): + incident_condition_summary (ActionItemTriggerParamsIncidentConditionSummary | Unset): + incident_condition_started_at (ActionItemTriggerParamsIncidentConditionStartedAt | Unset): + incident_condition_detected_at (ActionItemTriggerParamsIncidentConditionDetectedAt | Unset): + incident_condition_acknowledged_at (ActionItemTriggerParamsIncidentConditionAcknowledgedAt | Unset): + incident_condition_mitigated_at (ActionItemTriggerParamsIncidentConditionMitigatedAt | Unset): + incident_condition_resolved_at (ActionItemTriggerParamsIncidentConditionResolvedAt | Unset): + incident_conditional_inactivity (ActionItemTriggerParamsIncidentConditionalInactivity | Unset): incident_action_item_condition (ActionItemTriggerParamsIncidentActionItemCondition | Unset): incident_action_item_condition_kind (ActionItemTriggerParamsIncidentActionItemConditionKind | Unset): Default: 'ANY'. @@ -196,15 +203,16 @@ class ActionItemTriggerParams: incident_condition_service: ActionItemTriggerParamsIncidentConditionService | Unset = "ANY" incident_condition_functionality: ActionItemTriggerParamsIncidentConditionFunctionality | Unset = "ANY" incident_condition_group: ActionItemTriggerParamsIncidentConditionGroup | Unset = "ANY" - incident_condition_summary: ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset = UNSET - incident_condition_started_at: ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset = UNSET - incident_condition_detected_at: ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset = UNSET - incident_condition_acknowledged_at: ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset = ( - UNSET - ) - incident_condition_mitigated_at: ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset = UNSET - incident_condition_resolved_at: ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset = UNSET - incident_conditional_inactivity: ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset = UNSET + incident_condition_label: ActionItemTriggerParamsIncidentConditionLabel | Unset = "ANY" + incident_condition_label_use_regexp: bool | Unset = False + incident_labels: list[str] | Unset = UNSET + incident_condition_summary: ActionItemTriggerParamsIncidentConditionSummary | Unset = UNSET + incident_condition_started_at: ActionItemTriggerParamsIncidentConditionStartedAt | Unset = UNSET + incident_condition_detected_at: ActionItemTriggerParamsIncidentConditionDetectedAt | Unset = UNSET + incident_condition_acknowledged_at: ActionItemTriggerParamsIncidentConditionAcknowledgedAt | Unset = UNSET + incident_condition_mitigated_at: ActionItemTriggerParamsIncidentConditionMitigatedAt | Unset = UNSET + incident_condition_resolved_at: ActionItemTriggerParamsIncidentConditionResolvedAt | Unset = UNSET + incident_conditional_inactivity: ActionItemTriggerParamsIncidentConditionalInactivity | Unset = UNSET incident_action_item_condition: ActionItemTriggerParamsIncidentActionItemCondition | Unset = UNSET incident_action_item_condition_kind: ActionItemTriggerParamsIncidentActionItemConditionKind | Unset = "ANY" incident_action_item_kinds: list[ActionItemTriggerParamsIncidentActionItemKindsItem] | Unset = UNSET @@ -295,60 +303,42 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.incident_condition_group, Unset): incident_condition_group = self.incident_condition_group - incident_condition_summary: None | str | Unset - if isinstance(self.incident_condition_summary, Unset): - incident_condition_summary = UNSET - elif isinstance(self.incident_condition_summary, str): - incident_condition_summary = self.incident_condition_summary - else: + incident_condition_label: str | Unset = UNSET + if not isinstance(self.incident_condition_label, Unset): + incident_condition_label = self.incident_condition_label + + incident_condition_label_use_regexp = self.incident_condition_label_use_regexp + + incident_labels: list[str] | Unset = UNSET + if not isinstance(self.incident_labels, Unset): + incident_labels = self.incident_labels + + incident_condition_summary: str | Unset = UNSET + if not isinstance(self.incident_condition_summary, Unset): incident_condition_summary = self.incident_condition_summary - incident_condition_started_at: None | str | Unset - if isinstance(self.incident_condition_started_at, Unset): - incident_condition_started_at = UNSET - elif isinstance(self.incident_condition_started_at, str): - incident_condition_started_at = self.incident_condition_started_at - else: + incident_condition_started_at: str | Unset = UNSET + if not isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = self.incident_condition_started_at - incident_condition_detected_at: None | str | Unset - if isinstance(self.incident_condition_detected_at, Unset): - incident_condition_detected_at = UNSET - elif isinstance(self.incident_condition_detected_at, str): - incident_condition_detected_at = self.incident_condition_detected_at - else: + incident_condition_detected_at: str | Unset = UNSET + if not isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = self.incident_condition_detected_at - incident_condition_acknowledged_at: None | str | Unset - if isinstance(self.incident_condition_acknowledged_at, Unset): - incident_condition_acknowledged_at = UNSET - elif isinstance(self.incident_condition_acknowledged_at, str): - incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - else: + incident_condition_acknowledged_at: str | Unset = UNSET + if not isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - incident_condition_mitigated_at: None | str | Unset - if isinstance(self.incident_condition_mitigated_at, Unset): - incident_condition_mitigated_at = UNSET - elif isinstance(self.incident_condition_mitigated_at, str): - incident_condition_mitigated_at = self.incident_condition_mitigated_at - else: + incident_condition_mitigated_at: str | Unset = UNSET + if not isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = self.incident_condition_mitigated_at - incident_condition_resolved_at: None | str | Unset - if isinstance(self.incident_condition_resolved_at, Unset): - incident_condition_resolved_at = UNSET - elif isinstance(self.incident_condition_resolved_at, str): - incident_condition_resolved_at = self.incident_condition_resolved_at - else: + incident_condition_resolved_at: str | Unset = UNSET + if not isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | str | Unset - if isinstance(self.incident_conditional_inactivity, Unset): - incident_conditional_inactivity = UNSET - elif isinstance(self.incident_conditional_inactivity, str): - incident_conditional_inactivity = self.incident_conditional_inactivity - else: + incident_conditional_inactivity: str | Unset = UNSET + if not isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = self.incident_conditional_inactivity incident_action_item_condition: str | Unset = UNSET @@ -437,6 +427,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_condition_functionality"] = incident_condition_functionality if incident_condition_group is not UNSET: field_dict["incident_condition_group"] = incident_condition_group + if incident_condition_label is not UNSET: + field_dict["incident_condition_label"] = incident_condition_label + if incident_condition_label_use_regexp is not UNSET: + field_dict["incident_condition_label_use_regexp"] = incident_condition_label_use_regexp + if incident_labels is not UNSET: + field_dict["incident_labels"] = incident_labels if incident_condition_summary is not UNSET: field_dict["incident_condition_summary"] = incident_condition_summary if incident_condition_started_at is not UNSET: @@ -614,164 +610,81 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: _incident_condition_group ) - def _parse_incident_condition_summary( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_summary_type_1 = check_action_item_trigger_params_incident_condition_summary_type_1( - data - ) - - return incident_condition_summary_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset, data) - - incident_condition_summary = _parse_incident_condition_summary(d.pop("incident_condition_summary", UNSET)) - - def _parse_incident_condition_started_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_started_at_type_1 = ( - check_action_item_trigger_params_incident_condition_started_at_type_1(data) - ) - - return incident_condition_started_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset, data) - - incident_condition_started_at = _parse_incident_condition_started_at( - d.pop("incident_condition_started_at", UNSET) - ) - - def _parse_incident_condition_detected_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_detected_at_type_1 = ( - check_action_item_trigger_params_incident_condition_detected_at_type_1(data) - ) - - return incident_condition_detected_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset, data) - - incident_condition_detected_at = _parse_incident_condition_detected_at( - d.pop("incident_condition_detected_at", UNSET) - ) - - def _parse_incident_condition_acknowledged_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_acknowledged_at_type_1 = ( - check_action_item_trigger_params_incident_condition_acknowledged_at_type_1(data) - ) + _incident_condition_label = d.pop("incident_condition_label", UNSET) + incident_condition_label: ActionItemTriggerParamsIncidentConditionLabel | Unset + if isinstance(_incident_condition_label, Unset): + incident_condition_label = UNSET + else: + incident_condition_label = check_action_item_trigger_params_incident_condition_label( + _incident_condition_label + ) - return incident_condition_acknowledged_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset, data) + incident_condition_label_use_regexp = d.pop("incident_condition_label_use_regexp", UNSET) - incident_condition_acknowledged_at = _parse_incident_condition_acknowledged_at( - d.pop("incident_condition_acknowledged_at", UNSET) - ) + incident_labels = cast(list[str], d.pop("incident_labels", UNSET)) - def _parse_incident_condition_mitigated_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_mitigated_at_type_1 = ( - check_action_item_trigger_params_incident_condition_mitigated_at_type_1(data) - ) - - return incident_condition_mitigated_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset, data) - - incident_condition_mitigated_at = _parse_incident_condition_mitigated_at( - d.pop("incident_condition_mitigated_at", UNSET) - ) + _incident_condition_summary = d.pop("incident_condition_summary", UNSET) + incident_condition_summary: ActionItemTriggerParamsIncidentConditionSummary | Unset + if isinstance(_incident_condition_summary, Unset): + incident_condition_summary = UNSET + else: + incident_condition_summary = check_action_item_trigger_params_incident_condition_summary( + _incident_condition_summary + ) - def _parse_incident_condition_resolved_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_resolved_at_type_1 = ( - check_action_item_trigger_params_incident_condition_resolved_at_type_1(data) - ) + _incident_condition_started_at = d.pop("incident_condition_started_at", UNSET) + incident_condition_started_at: ActionItemTriggerParamsIncidentConditionStartedAt | Unset + if isinstance(_incident_condition_started_at, Unset): + incident_condition_started_at = UNSET + else: + incident_condition_started_at = check_action_item_trigger_params_incident_condition_started_at( + _incident_condition_started_at + ) - return incident_condition_resolved_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset, data) + _incident_condition_detected_at = d.pop("incident_condition_detected_at", UNSET) + incident_condition_detected_at: ActionItemTriggerParamsIncidentConditionDetectedAt | Unset + if isinstance(_incident_condition_detected_at, Unset): + incident_condition_detected_at = UNSET + else: + incident_condition_detected_at = check_action_item_trigger_params_incident_condition_detected_at( + _incident_condition_detected_at + ) - incident_condition_resolved_at = _parse_incident_condition_resolved_at( - d.pop("incident_condition_resolved_at", UNSET) - ) + _incident_condition_acknowledged_at = d.pop("incident_condition_acknowledged_at", UNSET) + incident_condition_acknowledged_at: ActionItemTriggerParamsIncidentConditionAcknowledgedAt | Unset + if isinstance(_incident_condition_acknowledged_at, Unset): + incident_condition_acknowledged_at = UNSET + else: + incident_condition_acknowledged_at = check_action_item_trigger_params_incident_condition_acknowledged_at( + _incident_condition_acknowledged_at + ) - def _parse_incident_conditional_inactivity( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_conditional_inactivity_type_1 = ( - check_action_item_trigger_params_incident_conditional_inactivity_type_1(data) - ) + _incident_condition_mitigated_at = d.pop("incident_condition_mitigated_at", UNSET) + incident_condition_mitigated_at: ActionItemTriggerParamsIncidentConditionMitigatedAt | Unset + if isinstance(_incident_condition_mitigated_at, Unset): + incident_condition_mitigated_at = UNSET + else: + incident_condition_mitigated_at = check_action_item_trigger_params_incident_condition_mitigated_at( + _incident_condition_mitigated_at + ) - return incident_conditional_inactivity_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset, data) + _incident_condition_resolved_at = d.pop("incident_condition_resolved_at", UNSET) + incident_condition_resolved_at: ActionItemTriggerParamsIncidentConditionResolvedAt | Unset + if isinstance(_incident_condition_resolved_at, Unset): + incident_condition_resolved_at = UNSET + else: + incident_condition_resolved_at = check_action_item_trigger_params_incident_condition_resolved_at( + _incident_condition_resolved_at + ) - incident_conditional_inactivity = _parse_incident_conditional_inactivity( - d.pop("incident_conditional_inactivity", UNSET) - ) + _incident_conditional_inactivity = d.pop("incident_conditional_inactivity", UNSET) + incident_conditional_inactivity: ActionItemTriggerParamsIncidentConditionalInactivity | Unset + if isinstance(_incident_conditional_inactivity, Unset): + incident_conditional_inactivity = UNSET + else: + incident_conditional_inactivity = check_action_item_trigger_params_incident_conditional_inactivity( + _incident_conditional_inactivity + ) _incident_action_item_condition = d.pop("incident_action_item_condition", UNSET) incident_action_item_condition: ActionItemTriggerParamsIncidentActionItemCondition | Unset @@ -882,6 +795,9 @@ def _parse_incident_conditional_inactivity( incident_condition_service=incident_condition_service, incident_condition_functionality=incident_condition_functionality, incident_condition_group=incident_condition_group, + incident_condition_label=incident_condition_label, + incident_condition_label_use_regexp=incident_condition_label_use_regexp, + incident_labels=incident_labels, incident_condition_summary=incident_condition_summary, incident_condition_started_at=incident_condition_started_at, incident_condition_detected_at=incident_condition_detected_at, diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at.py new file mode 100644 index 00000000..2595f3d8 --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionAcknowledgedAt = Literal["SET", "UNSET"] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionAcknowledgedAt +] = { + "SET", + "UNSET", +} + + +def check_action_item_trigger_params_incident_condition_acknowledged_at( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionAcknowledgedAt | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionAcknowledgedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at_type_1.py deleted file mode 100644 index 036d2a69..00000000 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 = Literal["SET", "UNSET"] - -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_action_item_trigger_params_incident_condition_acknowledged_at_type_1( - value: str | None, -) -> ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None: - if value is None: - return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at.py similarity index 50% rename from rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at_type_1.py rename to rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at.py index 44ae0381..28ddd119 100644 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at_type_1.py +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -ActionItemTriggerParamsIncidentConditionDetectedAtType1 = Literal["SET", "UNSET"] +ActionItemTriggerParamsIncidentConditionDetectedAt = Literal["SET", "UNSET"] -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionDetectedAtType1 +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionDetectedAt ] = { "SET", "UNSET", } -def check_action_item_trigger_params_incident_condition_detected_at_type_1( +def check_action_item_trigger_params_incident_condition_detected_at( value: str | None, -) -> ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None: +) -> ActionItemTriggerParamsIncidentConditionDetectedAt | None: if value is None: return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionDetectedAtType1, value) + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionDetectedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_label.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_label.py new file mode 100644 index 00000000..cfee44ca --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_label.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionLabel = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: set[ActionItemTriggerParamsIncidentConditionLabel] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_action_item_trigger_params_incident_condition_label( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionLabel | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionLabel, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at.py new file mode 100644 index 00000000..2972d7af --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionMitigatedAt = Literal["SET", "UNSET"] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionMitigatedAt +] = { + "SET", + "UNSET", +} + + +def check_action_item_trigger_params_incident_condition_mitigated_at( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionMitigatedAt | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionMitigatedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at_type_1.py deleted file mode 100644 index 3f76cae7..00000000 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ActionItemTriggerParamsIncidentConditionMitigatedAtType1 = Literal["SET", "UNSET"] - -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionMitigatedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_action_item_trigger_params_incident_condition_mitigated_at_type_1( - value: str | None, -) -> ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None: - if value is None: - return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionMitigatedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at.py similarity index 50% rename from rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at_type_1.py rename to rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at.py index 9b83e38b..35990efc 100644 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at_type_1.py +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -ActionItemTriggerParamsIncidentConditionResolvedAtType1 = Literal["SET", "UNSET"] +ActionItemTriggerParamsIncidentConditionResolvedAt = Literal["SET", "UNSET"] -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionResolvedAtType1 +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionResolvedAt ] = { "SET", "UNSET", } -def check_action_item_trigger_params_incident_condition_resolved_at_type_1( +def check_action_item_trigger_params_incident_condition_resolved_at( value: str | None, -) -> ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None: +) -> ActionItemTriggerParamsIncidentConditionResolvedAt | None: if value is None: return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionResolvedAtType1, value) + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionResolvedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_started_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_started_at.py similarity index 50% rename from rootly_sdk/models/action_item_trigger_params_incident_condition_started_at_type_1.py rename to rootly_sdk/models/action_item_trigger_params_incident_condition_started_at.py index 8ff67c57..965e16e2 100644 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_started_at_type_1.py +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_started_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -ActionItemTriggerParamsIncidentConditionStartedAtType1 = Literal["SET", "UNSET"] +ActionItemTriggerParamsIncidentConditionStartedAt = Literal["SET", "UNSET"] -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionStartedAtType1 +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionStartedAt ] = { "SET", "UNSET", } -def check_action_item_trigger_params_incident_condition_started_at_type_1( +def check_action_item_trigger_params_incident_condition_started_at( value: str | None, -) -> ActionItemTriggerParamsIncidentConditionStartedAtType1 | None: +) -> ActionItemTriggerParamsIncidentConditionStartedAt | None: if value is None: return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionStartedAtType1, value) + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionStartedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_summary.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_summary.py new file mode 100644 index 00000000..fbde515f --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_summary.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionSummary = Literal["SET", "UNSET"] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: set[ActionItemTriggerParamsIncidentConditionSummary] = { + "SET", + "UNSET", +} + + +def check_action_item_trigger_params_incident_condition_summary( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionSummary | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionSummary, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_summary_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_summary_type_1.py deleted file mode 100644 index c9365ca9..00000000 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_summary_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ActionItemTriggerParamsIncidentConditionSummaryType1 = Literal["SET", "UNSET"] - -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionSummaryType1 -] = { - "SET", - "UNSET", -} - - -def check_action_item_trigger_params_incident_condition_summary_type_1( - value: str | None, -) -> ActionItemTriggerParamsIncidentConditionSummaryType1 | None: - if value is None: - return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionSummaryType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity.py b/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity.py new file mode 100644 index 00000000..82797de0 --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionalInactivity = Literal["IS"] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: set[ + ActionItemTriggerParamsIncidentConditionalInactivity +] = { + "IS", +} + + +def check_action_item_trigger_params_incident_conditional_inactivity( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionalInactivity | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionalInactivity, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity_type_1.py deleted file mode 100644 index 0eb9ad02..00000000 --- a/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity_type_1.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -ActionItemTriggerParamsIncidentConditionalInactivityType1 = Literal["IS"] - -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionalInactivityType1 -] = { - "IS", -} - - -def check_action_item_trigger_params_incident_conditional_inactivity_type_1( - value: str | None, -) -> ActionItemTriggerParamsIncidentConditionalInactivityType1 | None: - if value is None: - return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionalInactivityType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/add_action_item_task_params.py b/rootly_sdk/models/add_action_item_task_params.py index 285b47a0..5d141312 100644 --- a/rootly_sdk/models/add_action_item_task_params.py +++ b/rootly_sdk/models/add_action_item_task_params.py @@ -74,6 +74,7 @@ class AddActionItemTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + priority: str = self.priority summary = self.summary diff --git a/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params.py b/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params.py index 393233e1..97e5faf6 100644 --- a/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params.py +++ b/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params.py @@ -36,6 +36,7 @@ class AddMicrosoftTeamsChatTabTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + chat = self.chat.to_dict() title = self.title diff --git a/rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py similarity index 60% rename from rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py rename to rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py index e7939f3a..b641221f 100644 --- a/rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py +++ b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py @@ -6,32 +6,32 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="AlertAlertFieldValuesAttributesItemType0") +T = TypeVar("T", bound="AddMicrosoftTeamsTabTaskParamsType0") @_attrs_define -class AlertAlertFieldValuesAttributesItemType0: +class AddMicrosoftTeamsTabTaskParamsType0: """ Attributes: - alert_field_id (str): ID of the custom alert field - value (str): Value for the alert field + title (str): + link (str): """ - alert_field_id: str - value: str + title: str + link: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - alert_field_id = self.alert_field_id + title = self.title - value = self.value + link = self.link field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "alert_field_id": alert_field_id, - "value": value, + "title": title, + "link": link, } ) @@ -40,17 +40,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - alert_field_id = d.pop("alert_field_id") + title = d.pop("title") - value = d.pop("value") + link = d.pop("link") - alert_alert_field_values_attributes_item_type_0 = cls( - alert_field_id=alert_field_id, - value=value, + add_microsoft_teams_tab_task_params_type_0 = cls( + title=title, + link=link, ) - alert_alert_field_values_attributes_item_type_0.additional_properties = d - return alert_alert_field_values_attributes_item_type_0 + add_microsoft_teams_tab_task_params_type_0.additional_properties = d + return add_microsoft_teams_tab_task_params_type_0 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py new file mode 100644 index 00000000..d3997e1b --- /dev/null +++ b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AddMicrosoftTeamsTabTaskParamsType1") + + +@_attrs_define +class AddMicrosoftTeamsTabTaskParamsType1: + """ + Attributes: + playbook_id (str): + """ + + playbook_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + playbook_id = self.playbook_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "playbook_id": playbook_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + playbook_id = d.pop("playbook_id") + + add_microsoft_teams_tab_task_params_type_1 = cls( + playbook_id=playbook_id, + ) + + add_microsoft_teams_tab_task_params_type_1.additional_properties = d + return add_microsoft_teams_tab_task_params_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/add_role_task_params.py b/rootly_sdk/models/add_role_task_params.py index 886d7027..c00fb3ce 100644 --- a/rootly_sdk/models/add_role_task_params.py +++ b/rootly_sdk/models/add_role_task_params.py @@ -34,6 +34,7 @@ class AddRoleTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + incident_role_id = self.incident_role_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py b/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py new file mode 100644 index 00000000..e256010f --- /dev/null +++ b/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AddSlackBookmarkTaskParamsType0") + + +@_attrs_define +class AddSlackBookmarkTaskParamsType0: + """ + Attributes: + title (str): + link (str): + """ + + title: str + link: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + title = self.title + + link = self.link + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "title": title, + "link": link, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + title = d.pop("title") + + link = d.pop("link") + + add_slack_bookmark_task_params_type_0 = cls( + title=title, + link=link, + ) + + add_slack_bookmark_task_params_type_0.additional_properties = d + return add_slack_bookmark_task_params_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py b/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py new file mode 100644 index 00000000..051110dd --- /dev/null +++ b/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AddSlackBookmarkTaskParamsType1") + + +@_attrs_define +class AddSlackBookmarkTaskParamsType1: + """ + Attributes: + playbook_id (str): + """ + + playbook_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + playbook_id = self.playbook_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "playbook_id": playbook_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + playbook_id = d.pop("playbook_id") + + add_slack_bookmark_task_params_type_1 = cls( + playbook_id=playbook_id, + ) + + add_slack_bookmark_task_params_type_1.additional_properties = d + return add_slack_bookmark_task_params_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/add_subscribers.py b/rootly_sdk/models/add_subscribers.py index 2fc8e038..50590e8b 100644 --- a/rootly_sdk/models/add_subscribers.py +++ b/rootly_sdk/models/add_subscribers.py @@ -24,6 +24,7 @@ class AddSubscribers: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/add_subscribers_data.py b/rootly_sdk/models/add_subscribers_data.py index dc21630c..07e1b77d 100644 --- a/rootly_sdk/models/add_subscribers_data.py +++ b/rootly_sdk/models/add_subscribers_data.py @@ -28,6 +28,7 @@ class AddSubscribersData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/add_to_timeline_task_params.py b/rootly_sdk/models/add_to_timeline_task_params.py index 200ae000..d94652d3 100644 --- a/rootly_sdk/models/add_to_timeline_task_params.py +++ b/rootly_sdk/models/add_to_timeline_task_params.py @@ -38,6 +38,7 @@ class AddToTimelineTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + event = self.event task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/ai_chat_response.py b/rootly_sdk/models/ai_chat_response.py new file mode 100644 index 00000000..d4a4d120 --- /dev/null +++ b/rootly_sdk/models/ai_chat_response.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.ai_chat_response_data import AiChatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + + +T = TypeVar("T", bound="AiChatResponse") + + +@_attrs_define +class AiChatResponse: + """ + Attributes: + data (AiChatResponseData): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: AiChatResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ai_chat_response_data import AiChatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + + d = dict(src_dict) + data = AiChatResponseData.from_dict(d.pop("data")) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + ai_chat_response = cls( + data=data, + included=included, + ) + + ai_chat_response.additional_properties = d + return ai_chat_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/ai_chat_response_data.py b/rootly_sdk/models/ai_chat_response_data.py new file mode 100644 index 00000000..9a4718a5 --- /dev/null +++ b/rootly_sdk/models/ai_chat_response_data.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.ai_chat_response_data_type import AiChatResponseDataType, check_ai_chat_response_data_type + +if TYPE_CHECKING: + from ..models.ai_chat_response_data_attributes import AiChatResponseDataAttributes + + +T = TypeVar("T", bound="AiChatResponseData") + + +@_attrs_define +class AiChatResponseData: + """ + Attributes: + id (UUID): Session UUID + type_ (AiChatResponseDataType): + attributes (AiChatResponseDataAttributes): + """ + + id: UUID + type_: AiChatResponseDataType + attributes: AiChatResponseDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = str(self.id) + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ai_chat_response_data_attributes import AiChatResponseDataAttributes + + d = dict(src_dict) + id = UUID(d.pop("id")) + + type_ = check_ai_chat_response_data_type(d.pop("type")) + + attributes = AiChatResponseDataAttributes.from_dict(d.pop("attributes")) + + ai_chat_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + ai_chat_response_data.additional_properties = d + return ai_chat_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/ai_chat_response_data_attributes.py b/rootly_sdk/models/ai_chat_response_data_attributes.py new file mode 100644 index 00000000..67c0577f --- /dev/null +++ b/rootly_sdk/models/ai_chat_response_data_attributes.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.ai_chat_response_data_attributes_status import ( + AiChatResponseDataAttributesStatus, + check_ai_chat_response_data_attributes_status, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AiChatResponseDataAttributes") + + +@_attrs_define +class AiChatResponseDataAttributes: + """ + Attributes: + session_id (UUID): AI chat session UUID + reply (None | str | Unset): Assistant reply text + status (AiChatResponseDataAttributesStatus | Unset): Response status (present when user input is required) + """ + + session_id: UUID + reply: None | str | Unset = UNSET + status: AiChatResponseDataAttributesStatus | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + session_id = str(self.session_id) + + reply: None | str | Unset + if isinstance(self.reply, Unset): + reply = UNSET + else: + reply = self.reply + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "session_id": session_id, + } + ) + if reply is not UNSET: + field_dict["reply"] = reply + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_id = UUID(d.pop("session_id")) + + def _parse_reply(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + reply = _parse_reply(d.pop("reply", UNSET)) + + _status = d.pop("status", UNSET) + status: AiChatResponseDataAttributesStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = check_ai_chat_response_data_attributes_status(_status) + + ai_chat_response_data_attributes = cls( + session_id=session_id, + reply=reply, + status=status, + ) + + ai_chat_response_data_attributes.additional_properties = d + return ai_chat_response_data_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/ai_chat_response_data_attributes_status.py b/rootly_sdk/models/ai_chat_response_data_attributes_status.py new file mode 100644 index 00000000..5dbfeaac --- /dev/null +++ b/rootly_sdk/models/ai_chat_response_data_attributes_status.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +AiChatResponseDataAttributesStatus = Literal["user_input_required"] + +AI_CHAT_RESPONSE_DATA_ATTRIBUTES_STATUS_VALUES: set[AiChatResponseDataAttributesStatus] = { + "user_input_required", +} + + +def check_ai_chat_response_data_attributes_status(value: str | None) -> AiChatResponseDataAttributesStatus | None: + if value is None: + return None + if value in AI_CHAT_RESPONSE_DATA_ATTRIBUTES_STATUS_VALUES: + return cast(AiChatResponseDataAttributesStatus, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {AI_CHAT_RESPONSE_DATA_ATTRIBUTES_STATUS_VALUES!r}") diff --git a/rootly_sdk/models/ai_chat_response_data_type.py b/rootly_sdk/models/ai_chat_response_data_type.py new file mode 100644 index 00000000..ac9c7a26 --- /dev/null +++ b/rootly_sdk/models/ai_chat_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +AiChatResponseDataType = Literal["ai_chat_responses"] + +AI_CHAT_RESPONSE_DATA_TYPE_VALUES: set[AiChatResponseDataType] = { + "ai_chat_responses", +} + + +def check_ai_chat_response_data_type(value: str | None) -> AiChatResponseDataType | None: + if value is None: + return None + if value in AI_CHAT_RESPONSE_DATA_TYPE_VALUES: + return cast(AiChatResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {AI_CHAT_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/ai_chat_session_message.py b/rootly_sdk/models/ai_chat_session_message.py new file mode 100644 index 00000000..272ca8ed --- /dev/null +++ b/rootly_sdk/models/ai_chat_session_message.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.ai_chat_session_message_role import AiChatSessionMessageRole, check_ai_chat_session_message_role + +T = TypeVar("T", bound="AiChatSessionMessage") + + +@_attrs_define +class AiChatSessionMessage: + """ + Attributes: + id (UUID): Message UUID + role (AiChatSessionMessageRole): Message author role + content (str): Message content + created_at (datetime.datetime): When the message was created + """ + + id: UUID + role: AiChatSessionMessageRole + content: str + created_at: datetime.datetime + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + role: str = self.role + + content = self.content + + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "role": role, + "content": content, + "created_at": created_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + role = check_ai_chat_session_message_role(d.pop("role")) + + content = d.pop("content") + + created_at = isoparse(d.pop("created_at")) + + ai_chat_session_message = cls( + id=id, + role=role, + content=content, + created_at=created_at, + ) + + ai_chat_session_message.additional_properties = d + return ai_chat_session_message + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/ai_chat_session_message_list.py b/rootly_sdk/models/ai_chat_session_message_list.py new file mode 100644 index 00000000..7d5486bd --- /dev/null +++ b/rootly_sdk/models/ai_chat_session_message_list.py @@ -0,0 +1,96 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.ai_chat_session_message import AiChatSessionMessage + from ..models.ai_chat_session_message_list_meta import AiChatSessionMessageListMeta + + +T = TypeVar("T", bound="AiChatSessionMessageList") + + +@_attrs_define +class AiChatSessionMessageList: + """ + Attributes: + messages (list[AiChatSessionMessage]): + meta (AiChatSessionMessageListMeta | Unset): + """ + + messages: list[AiChatSessionMessage] + meta: AiChatSessionMessageListMeta | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + messages = [] + for messages_item_data in self.messages: + messages_item = messages_item_data.to_dict() + messages.append(messages_item) + + meta: dict[str, Any] | Unset = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "messages": messages, + } + ) + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ai_chat_session_message import AiChatSessionMessage + from ..models.ai_chat_session_message_list_meta import AiChatSessionMessageListMeta + + d = dict(src_dict) + messages = [] + _messages = d.pop("messages") + for messages_item_data in _messages: + messages_item = AiChatSessionMessage.from_dict(messages_item_data) + + messages.append(messages_item) + + _meta = d.pop("meta", UNSET) + meta: AiChatSessionMessageListMeta | Unset + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = AiChatSessionMessageListMeta.from_dict(_meta) + + ai_chat_session_message_list = cls( + messages=messages, + meta=meta, + ) + + ai_chat_session_message_list.additional_properties = d + return ai_chat_session_message_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/ai_chat_session_message_list_meta.py b/rootly_sdk/models/ai_chat_session_message_list_meta.py new file mode 100644 index 00000000..6d3a6dd3 --- /dev/null +++ b/rootly_sdk/models/ai_chat_session_message_list_meta.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AiChatSessionMessageListMeta") + + +@_attrs_define +class AiChatSessionMessageListMeta: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ai_chat_session_message_list_meta = cls() + + ai_chat_session_message_list_meta.additional_properties = d + return ai_chat_session_message_list_meta + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/ai_chat_session_message_role.py b/rootly_sdk/models/ai_chat_session_message_role.py new file mode 100644 index 00000000..1010ea80 --- /dev/null +++ b/rootly_sdk/models/ai_chat_session_message_role.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +AiChatSessionMessageRole = Literal["assistant", "user"] + +AI_CHAT_SESSION_MESSAGE_ROLE_VALUES: set[AiChatSessionMessageRole] = { + "assistant", + "user", +} + + +def check_ai_chat_session_message_role(value: str | None) -> AiChatSessionMessageRole | None: + if value is None: + return None + if value in AI_CHAT_SESSION_MESSAGE_ROLE_VALUES: + return cast(AiChatSessionMessageRole, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {AI_CHAT_SESSION_MESSAGE_ROLE_VALUES!r}") diff --git a/rootly_sdk/models/alert.py b/rootly_sdk/models/alert.py index f058d7e5..db843d35 100644 --- a/rootly_sdk/models/alert.py +++ b/rootly_sdk/models/alert.py @@ -9,17 +9,22 @@ from dateutil.parser import isoparse from ..models.alert_noise import AlertNoise, check_alert_noise -from ..models.alert_source import AlertSource, check_alert_source +from ..models.alert_notification_target_type import AlertNotificationTargetType, check_alert_notification_target_type from ..models.alert_status import AlertStatus, check_alert_status from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.alert_alert_field_values_attributes_item_type_0 import AlertAlertFieldValuesAttributesItemType0 + from ..models.alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item + from ..models.alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item from ..models.alert_data_type_0 import AlertDataType0 from ..models.alert_labels_item_type_0 import AlertLabelsItemType0 + from ..models.alert_urgency import AlertUrgency from ..models.environment import Environment + from ..models.functionality import Functionality from ..models.service import Service from ..models.team import Team + from ..models.user import User + from ..models.user_flat_response import UserFlatResponse T = TypeVar("T", bound="Alert") @@ -30,7 +35,7 @@ class Alert: """ Attributes: short_id (str): Human-readable short identifier for the alert - source (AlertSource): The source of the alert + source (str): The source of the alert summary (str): The summary of the alert created_at (str): Date of creation updated_at (str): Date of last update @@ -39,28 +44,43 @@ class Alert: description (None | str | Unset): The description of the alert services (list[Service] | Unset): Services attached to the alert groups (list[Team] | Unset): Groups attached to the alert + functionalities (list[Functionality] | Unset): Functionalities attached to the alert environments (list[Environment] | Unset): Environments attached to the alert service_ids (list[str] | None | Unset): The Service IDs to attach to the alert. If your organization has On-Call enabled and your notification target is a Service. This field will be automatically set for you. group_ids (list[str] | None | Unset): The Group IDs to attach to the alert. If your organization has On-Call enabled and your notification target is a Group. This field will be automatically set for you. + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the alert environment_ids (list[str] | None | Unset): The Environment IDs to attach to the alert external_id (None | str | Unset): External ID external_url (None | str | Unset): External Url alert_urgency_id (None | str | Unset): The ID of the alert urgency + alert_urgency (AlertUrgency | Unset): group_leader_alert_id (None | str | Unset): The ID of the group leader alert is_group_leader_alert (bool | None | Unset): Whether the alert is a group leader alert labels (list[AlertLabelsItemType0 | None] | Unset): data (AlertDataType0 | None | Unset): Additional data + notification_target_type (AlertNotificationTargetType | Unset): Only available for organizations with Rootly On- + Call enabled. Can be one of Group, Service, EscalationPolicy, Functionality, User. + notification_target_id (None | str | Unset): Only available for organizations with Rootly On-Call enabled. The + identifier of the notification target object. deduplication_key (None | str | Unset): Alerts sharing the same deduplication key are treated as a single alert. - alert_field_values_attributes (list[AlertAlertFieldValuesAttributesItemType0 | None] | Unset): Custom alert - field values to create with the alert + alert_field_values (list[AlertAlertFieldValuesType0Item] | None | Unset): Custom alert field values associated + with the alert. Only present when the enable_alert_fields feature flag is enabled for the team. + responders (list[UserFlatResponse] | None | Unset): Users who responded to the alert. Included on all non-list + responses (show, create, update, resolve, etc.); on list responses only when `include=responders` is requested. + notified_users (list[User] | None | Unset): Users who were notified about the alert. Included on all non-list + responses (show, create, update, resolve, etc.); on list responses only when `include=notified_users` is + requested. + alerting_targets (list[AlertAlertingTargetsType0Item] | None | Unset): Alerting targets associated with the + alert. Only present when advanced routing is enabled for the team. + url (str | Unset): The Rootly dashboard URL for the alert started_at (datetime.datetime | None | Unset): When the alert started ended_at (datetime.datetime | None | Unset): When the alert ended """ short_id: str - source: AlertSource + source: str summary: str created_at: str updated_at: str @@ -69,31 +89,39 @@ class Alert: description: None | str | Unset = UNSET services: list[Service] | Unset = UNSET groups: list[Team] | Unset = UNSET + functionalities: list[Functionality] | Unset = UNSET environments: list[Environment] | Unset = UNSET service_ids: list[str] | None | Unset = UNSET group_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET environment_ids: list[str] | None | Unset = UNSET external_id: None | str | Unset = UNSET external_url: None | str | Unset = UNSET alert_urgency_id: None | str | Unset = UNSET + alert_urgency: AlertUrgency | Unset = UNSET group_leader_alert_id: None | str | Unset = UNSET is_group_leader_alert: bool | None | Unset = UNSET labels: list[AlertLabelsItemType0 | None] | Unset = UNSET data: AlertDataType0 | None | Unset = UNSET + notification_target_type: AlertNotificationTargetType | Unset = UNSET + notification_target_id: None | str | Unset = UNSET deduplication_key: None | str | Unset = UNSET - alert_field_values_attributes: list[AlertAlertFieldValuesAttributesItemType0 | None] | Unset = UNSET + alert_field_values: list[AlertAlertFieldValuesType0Item] | None | Unset = UNSET + responders: list[UserFlatResponse] | None | Unset = UNSET + notified_users: list[User] | None | Unset = UNSET + alerting_targets: list[AlertAlertingTargetsType0Item] | None | Unset = UNSET + url: str | Unset = UNSET started_at: datetime.datetime | None | Unset = UNSET ended_at: datetime.datetime | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_alert_field_values_attributes_item_type_0 import AlertAlertFieldValuesAttributesItemType0 from ..models.alert_data_type_0 import AlertDataType0 from ..models.alert_labels_item_type_0 import AlertLabelsItemType0 short_id = self.short_id - source: str = self.source + source = self.source summary = self.summary @@ -129,6 +157,13 @@ def to_dict(self) -> dict[str, Any]: groups_item = groups_item_data.to_dict() groups.append(groups_item) + functionalities: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.functionalities, Unset): + functionalities = [] + for functionalities_item_data in self.functionalities: + functionalities_item = functionalities_item_data.to_dict() + functionalities.append(functionalities_item) + environments: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.environments, Unset): environments = [] @@ -154,6 +189,15 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids + functionality_ids: list[str] | None | Unset + if isinstance(self.functionality_ids, Unset): + functionality_ids = UNSET + elif isinstance(self.functionality_ids, list): + functionality_ids = self.functionality_ids + + else: + functionality_ids = self.functionality_ids + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET @@ -181,6 +225,10 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_id = self.alert_urgency_id + alert_urgency: dict[str, Any] | Unset = UNSET + if not isinstance(self.alert_urgency, Unset): + alert_urgency = self.alert_urgency.to_dict() + group_leader_alert_id: None | str | Unset if isinstance(self.group_leader_alert_id, Unset): group_leader_alert_id = UNSET @@ -212,22 +260,71 @@ def to_dict(self) -> dict[str, Any]: else: data = self.data + notification_target_type: str | Unset = UNSET + if not isinstance(self.notification_target_type, Unset): + notification_target_type = self.notification_target_type + + notification_target_id: None | str | Unset + if isinstance(self.notification_target_id, Unset): + notification_target_id = UNSET + else: + notification_target_id = self.notification_target_id + deduplication_key: None | str | Unset if isinstance(self.deduplication_key, Unset): deduplication_key = UNSET else: deduplication_key = self.deduplication_key - alert_field_values_attributes: list[dict[str, Any] | None] | Unset = UNSET - if not isinstance(self.alert_field_values_attributes, Unset): - alert_field_values_attributes = [] - for alert_field_values_attributes_item_data in self.alert_field_values_attributes: - alert_field_values_attributes_item: dict[str, Any] | None - if isinstance(alert_field_values_attributes_item_data, AlertAlertFieldValuesAttributesItemType0): - alert_field_values_attributes_item = alert_field_values_attributes_item_data.to_dict() - else: - alert_field_values_attributes_item = alert_field_values_attributes_item_data - alert_field_values_attributes.append(alert_field_values_attributes_item) + alert_field_values: list[dict[str, Any]] | None | Unset + if isinstance(self.alert_field_values, Unset): + alert_field_values = UNSET + elif isinstance(self.alert_field_values, list): + alert_field_values = [] + for alert_field_values_type_0_item_data in self.alert_field_values: + alert_field_values_type_0_item = alert_field_values_type_0_item_data.to_dict() + alert_field_values.append(alert_field_values_type_0_item) + + else: + alert_field_values = self.alert_field_values + + responders: list[dict[str, Any]] | None | Unset + if isinstance(self.responders, Unset): + responders = UNSET + elif isinstance(self.responders, list): + responders = [] + for responders_type_0_item_data in self.responders: + responders_type_0_item = responders_type_0_item_data.to_dict() + responders.append(responders_type_0_item) + + else: + responders = self.responders + + notified_users: list[dict[str, Any]] | None | Unset + if isinstance(self.notified_users, Unset): + notified_users = UNSET + elif isinstance(self.notified_users, list): + notified_users = [] + for notified_users_type_0_item_data in self.notified_users: + notified_users_type_0_item = notified_users_type_0_item_data.to_dict() + notified_users.append(notified_users_type_0_item) + + else: + notified_users = self.notified_users + + alerting_targets: list[dict[str, Any]] | None | Unset + if isinstance(self.alerting_targets, Unset): + alerting_targets = UNSET + elif isinstance(self.alerting_targets, list): + alerting_targets = [] + for alerting_targets_type_0_item_data in self.alerting_targets: + alerting_targets_type_0_item = alerting_targets_type_0_item_data.to_dict() + alerting_targets.append(alerting_targets_type_0_item) + + else: + alerting_targets = self.alerting_targets + + url = self.url started_at: None | str | Unset if isinstance(self.started_at, Unset): @@ -266,12 +363,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["services"] = services if groups is not UNSET: field_dict["groups"] = groups + if functionalities is not UNSET: + field_dict["functionalities"] = functionalities if environments is not UNSET: field_dict["environments"] = environments if service_ids is not UNSET: field_dict["service_ids"] = service_ids if group_ids is not UNSET: field_dict["group_ids"] = group_ids + if functionality_ids is not UNSET: + field_dict["functionality_ids"] = functionality_ids if environment_ids is not UNSET: field_dict["environment_ids"] = environment_ids if external_id is not UNSET: @@ -280,6 +381,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["external_url"] = external_url if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id + if alert_urgency is not UNSET: + field_dict["alert_urgency"] = alert_urgency if group_leader_alert_id is not UNSET: field_dict["group_leader_alert_id"] = group_leader_alert_id if is_group_leader_alert is not UNSET: @@ -288,10 +391,22 @@ def to_dict(self) -> dict[str, Any]: field_dict["labels"] = labels if data is not UNSET: field_dict["data"] = data + if notification_target_type is not UNSET: + field_dict["notification_target_type"] = notification_target_type + if notification_target_id is not UNSET: + field_dict["notification_target_id"] = notification_target_id if deduplication_key is not UNSET: field_dict["deduplication_key"] = deduplication_key - if alert_field_values_attributes is not UNSET: - field_dict["alert_field_values_attributes"] = alert_field_values_attributes + if alert_field_values is not UNSET: + field_dict["alert_field_values"] = alert_field_values + if responders is not UNSET: + field_dict["responders"] = responders + if notified_users is not UNSET: + field_dict["notified_users"] = notified_users + if alerting_targets is not UNSET: + field_dict["alerting_targets"] = alerting_targets + if url is not UNSET: + field_dict["url"] = url if started_at is not UNSET: field_dict["started_at"] = started_at if ended_at is not UNSET: @@ -301,17 +416,22 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.alert_alert_field_values_attributes_item_type_0 import AlertAlertFieldValuesAttributesItemType0 + from ..models.alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item + from ..models.alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item from ..models.alert_data_type_0 import AlertDataType0 from ..models.alert_labels_item_type_0 import AlertLabelsItemType0 + from ..models.alert_urgency import AlertUrgency from ..models.environment import Environment + from ..models.functionality import Functionality from ..models.service import Service from ..models.team import Team + from ..models.user import User + from ..models.user_flat_response import UserFlatResponse d = dict(src_dict) short_id = d.pop("short_id") - source = check_alert_source(d.pop("source")) + source = d.pop("source") summary = d.pop("summary") @@ -360,6 +480,15 @@ def _parse_description(data: object) -> None | str | Unset: groups.append(groups_item) + _functionalities = d.pop("functionalities", UNSET) + functionalities: list[Functionality] | Unset = UNSET + if _functionalities is not UNSET: + functionalities = [] + for functionalities_item_data in _functionalities: + functionalities_item = Functionality.from_dict(functionalities_item_data) + + functionalities.append(functionalities_item) + _environments = d.pop("environments", UNSET) environments: list[Environment] | Unset = UNSET if _environments is not UNSET: @@ -403,6 +532,23 @@ def _parse_group_ids(data: object) -> list[str] | None | Unset: group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + functionality_ids_type_0 = cast(list[str], data) + + return functionality_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data @@ -447,6 +593,13 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset: alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) + _alert_urgency = d.pop("alert_urgency", UNSET) + alert_urgency: AlertUrgency | Unset + if isinstance(_alert_urgency, Unset): + alert_urgency = UNSET + else: + alert_urgency = AlertUrgency.from_dict(_alert_urgency) + def _parse_group_leader_alert_id(data: object) -> None | str | Unset: if data is None: return data @@ -505,6 +658,22 @@ def _parse_data(data: object) -> AlertDataType0 | None | Unset: data = _parse_data(d.pop("data", UNSET)) + _notification_target_type = d.pop("notification_target_type", UNSET) + notification_target_type: AlertNotificationTargetType | Unset + if isinstance(_notification_target_type, Unset): + notification_target_type = UNSET + else: + notification_target_type = check_alert_notification_target_type(_notification_target_type) + + def _parse_notification_target_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + notification_target_id = _parse_notification_target_id(d.pop("notification_target_id", UNSET)) + def _parse_deduplication_key(data: object) -> None | str | Unset: if data is None: return data @@ -514,34 +683,99 @@ def _parse_deduplication_key(data: object) -> None | str | Unset: deduplication_key = _parse_deduplication_key(d.pop("deduplication_key", UNSET)) - _alert_field_values_attributes = d.pop("alert_field_values_attributes", UNSET) - alert_field_values_attributes: list[AlertAlertFieldValuesAttributesItemType0 | None] | Unset = UNSET - if _alert_field_values_attributes is not UNSET: - alert_field_values_attributes = [] - for alert_field_values_attributes_item_data in _alert_field_values_attributes: + def _parse_alert_field_values(data: object) -> list[AlertAlertFieldValuesType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + alert_field_values_type_0 = [] + _alert_field_values_type_0 = data + for alert_field_values_type_0_item_data in _alert_field_values_type_0: + alert_field_values_type_0_item = AlertAlertFieldValuesType0Item.from_dict( + alert_field_values_type_0_item_data + ) + + alert_field_values_type_0.append(alert_field_values_type_0_item) - def _parse_alert_field_values_attributes_item( - data: object, - ) -> AlertAlertFieldValuesAttributesItemType0 | None: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - alert_field_values_attributes_item_type_0 = AlertAlertFieldValuesAttributesItemType0.from_dict( - data - ) + return alert_field_values_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[AlertAlertFieldValuesType0Item] | None | Unset, data) - return alert_field_values_attributes_item_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(AlertAlertFieldValuesAttributesItemType0 | None, data) + alert_field_values = _parse_alert_field_values(d.pop("alert_field_values", UNSET)) + + def _parse_responders(data: object) -> list[UserFlatResponse] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + responders_type_0 = [] + _responders_type_0 = data + for responders_type_0_item_data in _responders_type_0: + responders_type_0_item = UserFlatResponse.from_dict(responders_type_0_item_data) + + responders_type_0.append(responders_type_0_item) + + return responders_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[UserFlatResponse] | None | Unset, data) + + responders = _parse_responders(d.pop("responders", UNSET)) + + def _parse_notified_users(data: object) -> list[User] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notified_users_type_0 = [] + _notified_users_type_0 = data + for notified_users_type_0_item_data in _notified_users_type_0: + notified_users_type_0_item = User.from_dict(notified_users_type_0_item_data) + + notified_users_type_0.append(notified_users_type_0_item) + + return notified_users_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[User] | None | Unset, data) + + notified_users = _parse_notified_users(d.pop("notified_users", UNSET)) + + def _parse_alerting_targets(data: object) -> list[AlertAlertingTargetsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + alerting_targets_type_0 = [] + _alerting_targets_type_0 = data + for alerting_targets_type_0_item_data in _alerting_targets_type_0: + alerting_targets_type_0_item = AlertAlertingTargetsType0Item.from_dict( + alerting_targets_type_0_item_data + ) + + alerting_targets_type_0.append(alerting_targets_type_0_item) + + return alerting_targets_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[AlertAlertingTargetsType0Item] | None | Unset, data) - alert_field_values_attributes_item = _parse_alert_field_values_attributes_item( - alert_field_values_attributes_item_data - ) + alerting_targets = _parse_alerting_targets(d.pop("alerting_targets", UNSET)) - alert_field_values_attributes.append(alert_field_values_attributes_item) + url = d.pop("url", UNSET) def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: @@ -588,19 +822,28 @@ def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: description=description, services=services, groups=groups, + functionalities=functionalities, environments=environments, service_ids=service_ids, group_ids=group_ids, + functionality_ids=functionality_ids, environment_ids=environment_ids, external_id=external_id, external_url=external_url, alert_urgency_id=alert_urgency_id, + alert_urgency=alert_urgency, group_leader_alert_id=group_leader_alert_id, is_group_leader_alert=is_group_leader_alert, labels=labels, data=data, + notification_target_type=notification_target_type, + notification_target_id=notification_target_id, deduplication_key=deduplication_key, - alert_field_values_attributes=alert_field_values_attributes, + alert_field_values=alert_field_values, + responders=responders, + notified_users=notified_users, + alerting_targets=alerting_targets, + url=url, started_at=started_at, ended_at=ended_at, ) diff --git a/rootly_sdk/models/alert_alert_field_values_type_0_item.py b/rootly_sdk/models/alert_alert_field_values_type_0_item.py new file mode 100644 index 00000000..2be2c603 --- /dev/null +++ b/rootly_sdk/models/alert_alert_field_values_type_0_item.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AlertAlertFieldValuesType0Item") + + +@_attrs_define +class AlertAlertFieldValuesType0Item: + """ + Attributes: + id (str): Unique ID of the alert field value + value (str): Value for the alert field + alert_field_id (str): ID of the custom alert field + alert_id (str): ID of the alert + created_at (str): Date of creation + updated_at (str): Date of last update + """ + + id: str + value: str + alert_field_id: str + alert_id: str + created_at: str + updated_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + value = self.value + + alert_field_id = self.alert_field_id + + alert_id = self.alert_id + + created_at = self.created_at + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "value": value, + "alert_field_id": alert_field_id, + "alert_id": alert_id, + "created_at": created_at, + "updated_at": updated_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + value = d.pop("value") + + alert_field_id = d.pop("alert_field_id") + + alert_id = d.pop("alert_id") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + alert_alert_field_values_type_0_item = cls( + id=id, + value=value, + alert_field_id=alert_field_id, + alert_id=alert_id, + created_at=created_at, + updated_at=updated_at, + ) + + alert_alert_field_values_type_0_item.additional_properties = d + return alert_alert_field_values_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_alerting_targets_type_0_item.py b/rootly_sdk/models/alert_alerting_targets_type_0_item.py new file mode 100644 index 00000000..2ed599cc --- /dev/null +++ b/rootly_sdk/models/alert_alerting_targets_type_0_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AlertAlertingTargetsType0Item") + + +@_attrs_define +class AlertAlertingTargetsType0Item: + """ + Attributes: + id (str): ID of the alerting target + type_ (str): Type of the alerting target (e.g. team, user, escalation_policy, service, functionality, + slack_channel) + """ + + id: str + type_: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + type_ = d.pop("type") + + alert_alerting_targets_type_0_item = cls( + id=id, + type_=type_, + ) + + alert_alerting_targets_type_0_item.additional_properties = d + return alert_alerting_targets_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event.py b/rootly_sdk/models/alert_event.py index d0e3ceb2..66639594 100644 --- a/rootly_sdk/models/alert_event.py +++ b/rootly_sdk/models/alert_event.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,6 +10,14 @@ from ..models.alert_event_kind import AlertEventKind, check_alert_event_kind from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 + from ..models.alert_event_incident_type_0 import AlertEventIncidentType0 + from ..models.alert_event_schedule_type_0 import AlertEventScheduleType0 + from ..models.alert_event_user import AlertEventUser + from ..models.slack_channel import SlackChannel + + T = TypeVar("T", bound="AlertEvent") @@ -17,6 +25,7 @@ class AlertEvent: """ Attributes: + alert_id (str): ID of the alert this event belongs to. kind (AlertEventKind): action (AlertEventAction): source (str): @@ -24,8 +33,18 @@ class AlertEvent: updated_at (str): user_id (int | None | Unset): Author of the note. details (None | str | Unset): Note message. + user (AlertEventUser | Unset): + incident (AlertEventIncidentType0 | None | Unset): + schedule (AlertEventScheduleType0 | None | Unset): + escalation_level (int | None | Unset): + escalation_target_type (None | str | Unset): e.g. EscalationPolicy, User. + escalation_target (AlertEventEscalationTargetType0 | None | Unset): JSON:API-wrapped escalation target (User or + EscalationPolicy). + slack_channel (SlackChannel | Unset): + incident_ids (list[str] | None | Unset): """ + alert_id: str kind: AlertEventKind action: AlertEventAction source: str @@ -33,9 +52,23 @@ class AlertEvent: updated_at: str user_id: int | None | Unset = UNSET details: None | str | Unset = UNSET + user: AlertEventUser | Unset = UNSET + incident: AlertEventIncidentType0 | None | Unset = UNSET + schedule: AlertEventScheduleType0 | None | Unset = UNSET + escalation_level: int | None | Unset = UNSET + escalation_target_type: None | str | Unset = UNSET + escalation_target: AlertEventEscalationTargetType0 | None | Unset = UNSET + slack_channel: SlackChannel | Unset = UNSET + incident_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 + from ..models.alert_event_incident_type_0 import AlertEventIncidentType0 + from ..models.alert_event_schedule_type_0 import AlertEventScheduleType0 + + alert_id = self.alert_id + kind: str = self.kind action: str = self.action @@ -58,10 +91,64 @@ def to_dict(self) -> dict[str, Any]: else: details = self.details + user: dict[str, Any] | Unset = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + incident: dict[str, Any] | None | Unset + if isinstance(self.incident, Unset): + incident = UNSET + elif isinstance(self.incident, AlertEventIncidentType0): + incident = self.incident.to_dict() + else: + incident = self.incident + + schedule: dict[str, Any] | None | Unset + if isinstance(self.schedule, Unset): + schedule = UNSET + elif isinstance(self.schedule, AlertEventScheduleType0): + schedule = self.schedule.to_dict() + else: + schedule = self.schedule + + escalation_level: int | None | Unset + if isinstance(self.escalation_level, Unset): + escalation_level = UNSET + else: + escalation_level = self.escalation_level + + escalation_target_type: None | str | Unset + if isinstance(self.escalation_target_type, Unset): + escalation_target_type = UNSET + else: + escalation_target_type = self.escalation_target_type + + escalation_target: dict[str, Any] | None | Unset + if isinstance(self.escalation_target, Unset): + escalation_target = UNSET + elif isinstance(self.escalation_target, AlertEventEscalationTargetType0): + escalation_target = self.escalation_target.to_dict() + else: + escalation_target = self.escalation_target + + slack_channel: dict[str, Any] | Unset = UNSET + if not isinstance(self.slack_channel, Unset): + slack_channel = self.slack_channel.to_dict() + + incident_ids: list[str] | None | Unset + if isinstance(self.incident_ids, Unset): + incident_ids = UNSET + elif isinstance(self.incident_ids, list): + incident_ids = self.incident_ids + + else: + incident_ids = self.incident_ids + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { + "alert_id": alert_id, "kind": kind, "action": action, "source": source, @@ -73,12 +160,36 @@ def to_dict(self) -> dict[str, Any]: field_dict["user_id"] = user_id if details is not UNSET: field_dict["details"] = details + if user is not UNSET: + field_dict["user"] = user + if incident is not UNSET: + field_dict["incident"] = incident + if schedule is not UNSET: + field_dict["schedule"] = schedule + if escalation_level is not UNSET: + field_dict["escalation_level"] = escalation_level + if escalation_target_type is not UNSET: + field_dict["escalation_target_type"] = escalation_target_type + if escalation_target is not UNSET: + field_dict["escalation_target"] = escalation_target + if slack_channel is not UNSET: + field_dict["slack_channel"] = slack_channel + if incident_ids is not UNSET: + field_dict["incident_ids"] = incident_ids return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 + from ..models.alert_event_incident_type_0 import AlertEventIncidentType0 + from ..models.alert_event_schedule_type_0 import AlertEventScheduleType0 + from ..models.alert_event_user import AlertEventUser + from ..models.slack_channel import SlackChannel + d = dict(src_dict) + alert_id = d.pop("alert_id") + kind = check_alert_event_kind(d.pop("kind")) action = check_alert_event_action(d.pop("action")) @@ -107,7 +218,108 @@ def _parse_details(data: object) -> None | str | Unset: details = _parse_details(d.pop("details", UNSET)) + _user = d.pop("user", UNSET) + user: AlertEventUser | Unset + if isinstance(_user, Unset): + user = UNSET + else: + user = AlertEventUser.from_dict(_user) + + def _parse_incident(data: object) -> AlertEventIncidentType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + incident_type_0 = AlertEventIncidentType0.from_dict(data) + + return incident_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertEventIncidentType0 | None | Unset, data) + + incident = _parse_incident(d.pop("incident", UNSET)) + + def _parse_schedule(data: object) -> AlertEventScheduleType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + schedule_type_0 = AlertEventScheduleType0.from_dict(data) + + return schedule_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertEventScheduleType0 | None | Unset, data) + + schedule = _parse_schedule(d.pop("schedule", UNSET)) + + def _parse_escalation_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + escalation_level = _parse_escalation_level(d.pop("escalation_level", UNSET)) + + def _parse_escalation_target_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + escalation_target_type = _parse_escalation_target_type(d.pop("escalation_target_type", UNSET)) + + def _parse_escalation_target(data: object) -> AlertEventEscalationTargetType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + escalation_target_type_0 = AlertEventEscalationTargetType0.from_dict(data) + + return escalation_target_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertEventEscalationTargetType0 | None | Unset, data) + + escalation_target = _parse_escalation_target(d.pop("escalation_target", UNSET)) + + _slack_channel = d.pop("slack_channel", UNSET) + slack_channel: SlackChannel | Unset + if isinstance(_slack_channel, Unset): + slack_channel = UNSET + else: + slack_channel = SlackChannel.from_dict(_slack_channel) + + def _parse_incident_ids(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + incident_ids_type_0 = cast(list[str], data) + + return incident_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + incident_ids = _parse_incident_ids(d.pop("incident_ids", UNSET)) + alert_event = cls( + alert_id=alert_id, kind=kind, action=action, source=source, @@ -115,6 +327,14 @@ def _parse_details(data: object) -> None | str | Unset: updated_at=updated_at, user_id=user_id, details=details, + user=user, + incident=incident, + schedule=schedule, + escalation_level=escalation_level, + escalation_target_type=escalation_target_type, + escalation_target=escalation_target, + slack_channel=slack_channel, + incident_ids=incident_ids, ) alert_event.additional_properties = d diff --git a/rootly_sdk/models/alert_event_action.py b/rootly_sdk/models/alert_event_action.py index 84ecf6ce..ed9276ab 100644 --- a/rootly_sdk/models/alert_event_action.py +++ b/rootly_sdk/models/alert_event_action.py @@ -5,14 +5,18 @@ "added", "answered", "attached", + "call_lifecycle", "called", "created", "deferred", "emailed", "escalated", "escalation_policy_paged", + "google_chat_messaged", "ignored_alert_request", + "level_skipped", "marked", + "ms_teams_messaged", "muted", "not_marked", "notified", @@ -35,14 +39,18 @@ "added", "answered", "attached", + "call_lifecycle", "called", "created", "deferred", "emailed", "escalated", "escalation_policy_paged", + "google_chat_messaged", "ignored_alert_request", + "level_skipped", "marked", + "ms_teams_messaged", "muted", "not_marked", "notified", diff --git a/rootly_sdk/models/alert_event_escalation_target_type_0.py b/rootly_sdk/models/alert_event_escalation_target_type_0.py new file mode 100644 index 00000000..5d706e96 --- /dev/null +++ b/rootly_sdk/models/alert_event_escalation_target_type_0.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data + + +T = TypeVar("T", bound="AlertEventEscalationTargetType0") + + +@_attrs_define +class AlertEventEscalationTargetType0: + """JSON:API-wrapped escalation target (User or EscalationPolicy). + + Attributes: + data (AlertEventEscalationTargetType0Data | Unset): + """ + + data: AlertEventEscalationTargetType0Data | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: AlertEventEscalationTargetType0Data | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = AlertEventEscalationTargetType0Data.from_dict(_data) + + alert_event_escalation_target_type_0 = cls( + data=data, + ) + + alert_event_escalation_target_type_0.additional_properties = d + return alert_event_escalation_target_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_escalation_target_type_0_data.py b/rootly_sdk/models/alert_event_escalation_target_type_0_data.py new file mode 100644 index 00000000..70c7da0d --- /dev/null +++ b/rootly_sdk/models/alert_event_escalation_target_type_0_data.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.alert_event_escalation_target_type_0_data_attributes import ( + AlertEventEscalationTargetType0DataAttributes, + ) + + +T = TypeVar("T", bound="AlertEventEscalationTargetType0Data") + + +@_attrs_define +class AlertEventEscalationTargetType0Data: + """ + Attributes: + id (str | Unset): + type_ (str | Unset): e.g. users, escalation_policies. + attributes (AlertEventEscalationTargetType0DataAttributes | Unset): + """ + + id: str | Unset = UNSET + type_: str | Unset = UNSET + attributes: AlertEventEscalationTargetType0DataAttributes | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.alert_event_escalation_target_type_0_data_attributes import ( + AlertEventEscalationTargetType0DataAttributes, + ) + + d = dict(src_dict) + id = d.pop("id", UNSET) + + type_ = d.pop("type", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: AlertEventEscalationTargetType0DataAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = AlertEventEscalationTargetType0DataAttributes.from_dict(_attributes) + + alert_event_escalation_target_type_0_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + alert_event_escalation_target_type_0_data.additional_properties = d + return alert_event_escalation_target_type_0_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py b/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py new file mode 100644 index 00000000..dc65c652 --- /dev/null +++ b/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AlertEventEscalationTargetType0DataAttributes") + + +@_attrs_define +class AlertEventEscalationTargetType0DataAttributes: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + alert_event_escalation_target_type_0_data_attributes = cls() + + alert_event_escalation_target_type_0_data_attributes.additional_properties = d + return alert_event_escalation_target_type_0_data_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_feed_list.py b/rootly_sdk/models/alert_event_feed_list.py new file mode 100644 index 00000000..bf831ccd --- /dev/null +++ b/rootly_sdk/models/alert_event_feed_list.py @@ -0,0 +1,130 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.alert_event_feed_list_data_item import AlertEventFeedListDataItem + from ..models.alert_event_feed_meta import AlertEventFeedMeta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + + +T = TypeVar("T", bound="AlertEventFeedList") + + +@_attrs_define +class AlertEventFeedList: + """ + Attributes: + data (list[AlertEventFeedListDataItem]): + meta (AlertEventFeedMeta): Cursor-pagination meta. `total_count` and `total_pages` are nullable because the feed + does not run a COUNT query. + links (Links | Unset): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: list[AlertEventFeedListDataItem] + meta: AlertEventFeedMeta + links: Links | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta = self.meta.to_dict() + + links: dict[str, Any] | Unset = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "meta": meta, + } + ) + if links is not UNSET: + field_dict["links"] = links + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.alert_event_feed_list_data_item import AlertEventFeedListDataItem + from ..models.alert_event_feed_meta import AlertEventFeedMeta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = AlertEventFeedListDataItem.from_dict(data_item_data) + + data.append(data_item) + + meta = AlertEventFeedMeta.from_dict(d.pop("meta")) + + _links = d.pop("links", UNSET) + links: Links | Unset + if isinstance(_links, Unset): + links = UNSET + else: + links = Links.from_dict(_links) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + alert_event_feed_list = cls( + data=data, + meta=meta, + links=links, + included=included, + ) + + alert_event_feed_list.additional_properties = d + return alert_event_feed_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_feed_list_data_item.py b/rootly_sdk/models/alert_event_feed_list_data_item.py new file mode 100644 index 00000000..acf7a370 --- /dev/null +++ b/rootly_sdk/models/alert_event_feed_list_data_item.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.alert_event_feed_list_data_item_type import ( + AlertEventFeedListDataItemType, + check_alert_event_feed_list_data_item_type, +) + +if TYPE_CHECKING: + from ..models.alert_event import AlertEvent + + +T = TypeVar("T", bound="AlertEventFeedListDataItem") + + +@_attrs_define +class AlertEventFeedListDataItem: + """ + Attributes: + id (str): Unique ID of the alert event + type_ (AlertEventFeedListDataItemType): + attributes (AlertEvent): + """ + + id: str + type_: AlertEventFeedListDataItemType + attributes: AlertEvent + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.alert_event import AlertEvent + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_alert_event_feed_list_data_item_type(d.pop("type")) + + attributes = AlertEvent.from_dict(d.pop("attributes")) + + alert_event_feed_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + alert_event_feed_list_data_item.additional_properties = d + return alert_event_feed_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_feed_list_data_item_type.py b/rootly_sdk/models/alert_event_feed_list_data_item_type.py new file mode 100644 index 00000000..87999c29 --- /dev/null +++ b/rootly_sdk/models/alert_event_feed_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +AlertEventFeedListDataItemType = Literal["alert_events"] + +ALERT_EVENT_FEED_LIST_DATA_ITEM_TYPE_VALUES: set[AlertEventFeedListDataItemType] = { + "alert_events", +} + + +def check_alert_event_feed_list_data_item_type(value: str | None) -> AlertEventFeedListDataItemType | None: + if value is None: + return None + if value in ALERT_EVENT_FEED_LIST_DATA_ITEM_TYPE_VALUES: + return cast(AlertEventFeedListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_EVENT_FEED_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/alert_event_feed_meta.py b/rootly_sdk/models/alert_event_feed_meta.py new file mode 100644 index 00000000..cde271b6 --- /dev/null +++ b/rootly_sdk/models/alert_event_feed_meta.py @@ -0,0 +1,171 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AlertEventFeedMeta") + + +@_attrs_define +class AlertEventFeedMeta: + """Cursor-pagination meta. `total_count` and `total_pages` are nullable because the feed does not run a COUNT query. + + Attributes: + next_cursor (None | str): Pass as `page[after]` on the next request to fetch the following page. + current_page (int | None | Unset): + next_page (int | None | Unset): + prev_page (int | None | Unset): + total_count (int | None | Unset): + total_pages (int | None | Unset): + """ + + next_cursor: None | str + current_page: int | None | Unset = UNSET + next_page: int | None | Unset = UNSET + prev_page: int | None | Unset = UNSET + total_count: int | None | Unset = UNSET + total_pages: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + next_cursor: None | str + next_cursor = self.next_cursor + + current_page: int | None | Unset + if isinstance(self.current_page, Unset): + current_page = UNSET + else: + current_page = self.current_page + + next_page: int | None | Unset + if isinstance(self.next_page, Unset): + next_page = UNSET + else: + next_page = self.next_page + + prev_page: int | None | Unset + if isinstance(self.prev_page, Unset): + prev_page = UNSET + else: + prev_page = self.prev_page + + total_count: int | None | Unset + if isinstance(self.total_count, Unset): + total_count = UNSET + else: + total_count = self.total_count + + total_pages: int | None | Unset + if isinstance(self.total_pages, Unset): + total_pages = UNSET + else: + total_pages = self.total_pages + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "next_cursor": next_cursor, + } + ) + if current_page is not UNSET: + field_dict["current_page"] = current_page + if next_page is not UNSET: + field_dict["next_page"] = next_page + if prev_page is not UNSET: + field_dict["prev_page"] = prev_page + if total_count is not UNSET: + field_dict["total_count"] = total_count + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_next_cursor(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + next_cursor = _parse_next_cursor(d.pop("next_cursor")) + + def _parse_current_page(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_page = _parse_current_page(d.pop("current_page", UNSET)) + + def _parse_next_page(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + next_page = _parse_next_page(d.pop("next_page", UNSET)) + + def _parse_prev_page(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + prev_page = _parse_prev_page(d.pop("prev_page", UNSET)) + + def _parse_total_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + total_count = _parse_total_count(d.pop("total_count", UNSET)) + + def _parse_total_pages(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + total_pages = _parse_total_pages(d.pop("total_pages", UNSET)) + + alert_event_feed_meta = cls( + next_cursor=next_cursor, + current_page=current_page, + next_page=next_page, + prev_page=prev_page, + total_count=total_count, + total_pages=total_pages, + ) + + alert_event_feed_meta.additional_properties = d + return alert_event_feed_meta + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_incident_type_0.py b/rootly_sdk/models/alert_event_incident_type_0.py new file mode 100644 index 00000000..902f09f6 --- /dev/null +++ b/rootly_sdk/models/alert_event_incident_type_0.py @@ -0,0 +1,213 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AlertEventIncidentType0") + + +@_attrs_define +class AlertEventIncidentType0: + """ + Attributes: + id (str | Unset): + sequential_id (int | None | Unset): + title (str | Unset): + slug (str | Unset): + kind (str | Unset): + status (str | Unset): + private (bool | Unset): + description (None | str | Unset): + started_at (None | str | Unset): + duration (int | None | Unset): Duration in seconds. + url (str | Unset): + created_at (str | Unset): + updated_at (str | Unset): + """ + + id: str | Unset = UNSET + sequential_id: int | None | Unset = UNSET + title: str | Unset = UNSET + slug: str | Unset = UNSET + kind: str | Unset = UNSET + status: str | Unset = UNSET + private: bool | Unset = UNSET + description: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + duration: int | None | Unset = UNSET + url: str | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + sequential_id: int | None | Unset + if isinstance(self.sequential_id, Unset): + sequential_id = UNSET + else: + sequential_id = self.sequential_id + + title = self.title + + slug = self.slug + + kind = self.kind + + status = self.status + + private = self.private + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + else: + started_at = self.started_at + + duration: int | None | Unset + if isinstance(self.duration, Unset): + duration = UNSET + else: + duration = self.duration + + url = self.url + + created_at = self.created_at + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if sequential_id is not UNSET: + field_dict["sequential_id"] = sequential_id + if title is not UNSET: + field_dict["title"] = title + if slug is not UNSET: + field_dict["slug"] = slug + if kind is not UNSET: + field_dict["kind"] = kind + if status is not UNSET: + field_dict["status"] = status + if private is not UNSET: + field_dict["private"] = private + if description is not UNSET: + field_dict["description"] = description + if started_at is not UNSET: + field_dict["started_at"] = started_at + if duration is not UNSET: + field_dict["duration"] = duration + if url is not UNSET: + field_dict["url"] = url + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + def _parse_sequential_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sequential_id = _parse_sequential_id(d.pop("sequential_id", UNSET)) + + title = d.pop("title", UNSET) + + slug = d.pop("slug", UNSET) + + kind = d.pop("kind", UNSET) + + status = d.pop("status", UNSET) + + private = d.pop("private", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_started_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_duration(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + duration = _parse_duration(d.pop("duration", UNSET)) + + url = d.pop("url", UNSET) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + alert_event_incident_type_0 = cls( + id=id, + sequential_id=sequential_id, + title=title, + slug=slug, + kind=kind, + status=status, + private=private, + description=description, + started_at=started_at, + duration=duration, + url=url, + created_at=created_at, + updated_at=updated_at, + ) + + alert_event_incident_type_0.additional_properties = d + return alert_event_incident_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_list.py b/rootly_sdk/models/alert_event_list.py index bf443fde..796c0bfd 100644 --- a/rootly_sdk/models/alert_event_list.py +++ b/rootly_sdk/models/alert_event_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_event_list_data_item import AlertEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class AlertEventList: data (list[AlertEventListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertEventListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_event_list_data_item import AlertEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_event_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_event_list.additional_properties = d diff --git a/rootly_sdk/models/alert_event_list_data_item.py b/rootly_sdk/models/alert_event_list_data_item.py index 16d7f67a..3691da9b 100644 --- a/rootly_sdk/models/alert_event_list_data_item.py +++ b/rootly_sdk/models/alert_event_list_data_item.py @@ -30,6 +30,7 @@ class AlertEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_event_response.py b/rootly_sdk/models/alert_event_response.py index 5b95d09a..95a9e35b 100644 --- a/rootly_sdk/models/alert_event_response.py +++ b/rootly_sdk/models/alert_event_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_event_response_data import AlertEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertEventResponse") @@ -18,14 +21,24 @@ class AlertEventResponse: """ Attributes: data (AlertEventResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertEventResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_event_response_data import AlertEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertEventResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_event_response = cls( data=data, + included=included, ) alert_event_response.additional_properties = d diff --git a/rootly_sdk/models/alert_event_response_data.py b/rootly_sdk/models/alert_event_response_data.py index 0fe0cf01..5fddf97f 100644 --- a/rootly_sdk/models/alert_event_response_data.py +++ b/rootly_sdk/models/alert_event_response_data.py @@ -30,6 +30,7 @@ class AlertEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_event_schedule_type_0.py b/rootly_sdk/models/alert_event_schedule_type_0.py new file mode 100644 index 00000000..fb8c5b4c --- /dev/null +++ b/rootly_sdk/models/alert_event_schedule_type_0.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.alert_event_schedule_type_0_escalation_policies_item import ( + AlertEventScheduleType0EscalationPoliciesItem, + ) + + +T = TypeVar("T", bound="AlertEventScheduleType0") + + +@_attrs_define +class AlertEventScheduleType0: + """ + Attributes: + id (str | Unset): + name (str | Unset): + description (None | str | Unset): + escalation_policies (list[AlertEventScheduleType0EscalationPoliciesItem] | Unset): + created_at (str | Unset): + updated_at (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + escalation_policies: list[AlertEventScheduleType0EscalationPoliciesItem] | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + escalation_policies: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.escalation_policies, Unset): + escalation_policies = [] + for escalation_policies_item_data in self.escalation_policies: + escalation_policies_item = escalation_policies_item_data.to_dict() + escalation_policies.append(escalation_policies_item) + + created_at = self.created_at + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if escalation_policies is not UNSET: + field_dict["escalation_policies"] = escalation_policies + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.alert_event_schedule_type_0_escalation_policies_item import ( + AlertEventScheduleType0EscalationPoliciesItem, + ) + + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + _escalation_policies = d.pop("escalation_policies", UNSET) + escalation_policies: list[AlertEventScheduleType0EscalationPoliciesItem] | Unset = UNSET + if _escalation_policies is not UNSET: + escalation_policies = [] + for escalation_policies_item_data in _escalation_policies: + escalation_policies_item = AlertEventScheduleType0EscalationPoliciesItem.from_dict( + escalation_policies_item_data + ) + + escalation_policies.append(escalation_policies_item) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + alert_event_schedule_type_0 = cls( + id=id, + name=name, + description=description, + escalation_policies=escalation_policies, + created_at=created_at, + updated_at=updated_at, + ) + + alert_event_schedule_type_0.additional_properties = d + return alert_event_schedule_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py b/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py new file mode 100644 index 00000000..3f33fcf9 --- /dev/null +++ b/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AlertEventScheduleType0EscalationPoliciesItem") + + +@_attrs_define +class AlertEventScheduleType0EscalationPoliciesItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + created_at (str | Unset): + updated_at (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + created_at = self.created_at + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + alert_event_schedule_type_0_escalation_policies_item = cls( + id=id, + name=name, + created_at=created_at, + updated_at=updated_at, + ) + + alert_event_schedule_type_0_escalation_policies_item.additional_properties = d + return alert_event_schedule_type_0_escalation_policies_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_event_user.py b/rootly_sdk/models/alert_event_user.py new file mode 100644 index 00000000..d299cff7 --- /dev/null +++ b/rootly_sdk/models/alert_event_user.py @@ -0,0 +1,195 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AlertEventUser") + + +@_attrs_define +class AlertEventUser: + """ + Attributes: + id (int): + name (str): + email (str): + created_at (str): + updated_at (str): + first_name (None | str | Unset): + last_name (None | str | Unset): + preferred_name (None | str | Unset): + full_name (None | str | Unset): + time_zone (None | str | Unset): + """ + + id: int + name: str + email: str + created_at: str + updated_at: str + first_name: None | str | Unset = UNSET + last_name: None | str | Unset = UNSET + preferred_name: None | str | Unset = UNSET + full_name: None | str | Unset = UNSET + time_zone: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + email = self.email + + created_at = self.created_at + + updated_at = self.updated_at + + first_name: None | str | Unset + if isinstance(self.first_name, Unset): + first_name = UNSET + else: + first_name = self.first_name + + last_name: None | str | Unset + if isinstance(self.last_name, Unset): + last_name = UNSET + else: + last_name = self.last_name + + preferred_name: None | str | Unset + if isinstance(self.preferred_name, Unset): + preferred_name = UNSET + else: + preferred_name = self.preferred_name + + full_name: None | str | Unset + if isinstance(self.full_name, Unset): + full_name = UNSET + else: + full_name = self.full_name + + time_zone: None | str | Unset + if isinstance(self.time_zone, Unset): + time_zone = UNSET + else: + time_zone = self.time_zone + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "email": email, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if first_name is not UNSET: + field_dict["first_name"] = first_name + if last_name is not UNSET: + field_dict["last_name"] = last_name + if preferred_name is not UNSET: + field_dict["preferred_name"] = preferred_name + if full_name is not UNSET: + field_dict["full_name"] = full_name + if time_zone is not UNSET: + field_dict["time_zone"] = time_zone + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + email = d.pop("email") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + def _parse_first_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + first_name = _parse_first_name(d.pop("first_name", UNSET)) + + def _parse_last_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + last_name = _parse_last_name(d.pop("last_name", UNSET)) + + def _parse_preferred_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + preferred_name = _parse_preferred_name(d.pop("preferred_name", UNSET)) + + def _parse_full_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + full_name = _parse_full_name(d.pop("full_name", UNSET)) + + def _parse_time_zone(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) + + alert_event_user = cls( + id=id, + name=name, + email=email, + created_at=created_at, + updated_at=updated_at, + first_name=first_name, + last_name=last_name, + preferred_name=preferred_name, + full_name=full_name, + time_zone=time_zone, + ) + + alert_event_user.additional_properties = d + return alert_event_user + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/alert_field_list.py b/rootly_sdk/models/alert_field_list.py index 6b0890a6..24964325 100644 --- a/rootly_sdk/models/alert_field_list.py +++ b/rootly_sdk/models/alert_field_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_field_list_data_item import AlertFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class AlertFieldList: data (list[AlertFieldListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertFieldListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_field_list_data_item import AlertFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_field_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_field_list.additional_properties = d diff --git a/rootly_sdk/models/alert_field_list_data_item.py b/rootly_sdk/models/alert_field_list_data_item.py index 377b7621..86f5e2a0 100644 --- a/rootly_sdk/models/alert_field_list_data_item.py +++ b/rootly_sdk/models/alert_field_list_data_item.py @@ -30,6 +30,7 @@ class AlertFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_field_response.py b/rootly_sdk/models/alert_field_response.py index 194e802b..17f1725b 100644 --- a/rootly_sdk/models/alert_field_response.py +++ b/rootly_sdk/models/alert_field_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_field_response_data import AlertFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertFieldResponse") @@ -18,14 +21,24 @@ class AlertFieldResponse: """ Attributes: data (AlertFieldResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertFieldResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_field_response_data import AlertFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertFieldResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_field_response = cls( data=data, + included=included, ) alert_field_response.additional_properties = d diff --git a/rootly_sdk/models/alert_field_response_data.py b/rootly_sdk/models/alert_field_response_data.py index 2b6de736..ab7e7923 100644 --- a/rootly_sdk/models/alert_field_response_data.py +++ b/rootly_sdk/models/alert_field_response_data.py @@ -31,6 +31,7 @@ class AlertFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/alert_group.py b/rootly_sdk/models/alert_group.py index f6d123b9..9a198b9c 100644 --- a/rootly_sdk/models/alert_group.py +++ b/rootly_sdk/models/alert_group.py @@ -55,6 +55,7 @@ class AlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str diff --git a/rootly_sdk/models/alert_group_list.py b/rootly_sdk/models/alert_group_list.py index 382f95e7..bbf287d9 100644 --- a/rootly_sdk/models/alert_group_list.py +++ b/rootly_sdk/models/alert_group_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_group_list_data_item import AlertGroupListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertGroupList") @@ -18,17 +21,27 @@ class AlertGroupList: """ Attributes: data (list[AlertGroupListDataItem]): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertGroupListDataItem] + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() data.append(data_item) + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -36,12 +49,15 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_group_list_data_item import AlertGroupListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = [] @@ -51,8 +67,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_group_list = cls( data=data, + included=included, ) alert_group_list.additional_properties = d diff --git a/rootly_sdk/models/alert_group_list_data_item.py b/rootly_sdk/models/alert_group_list_data_item.py index 3a40c496..47de586a 100644 --- a/rootly_sdk/models/alert_group_list_data_item.py +++ b/rootly_sdk/models/alert_group_list_data_item.py @@ -30,6 +30,7 @@ class AlertGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_group_response.py b/rootly_sdk/models/alert_group_response.py index e3ca1078..5c9c2520 100644 --- a/rootly_sdk/models/alert_group_response.py +++ b/rootly_sdk/models/alert_group_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_group_response_data import AlertGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertGroupResponse") @@ -18,14 +21,24 @@ class AlertGroupResponse: """ Attributes: data (AlertGroupResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertGroupResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_group_response_data import AlertGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertGroupResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_group_response = cls( data=data, + included=included, ) alert_group_response.additional_properties = d diff --git a/rootly_sdk/models/alert_group_response_data.py b/rootly_sdk/models/alert_group_response_data.py index d2171843..8d3b3d49 100644 --- a/rootly_sdk/models/alert_group_response_data.py +++ b/rootly_sdk/models/alert_group_response_data.py @@ -30,6 +30,7 @@ class AlertGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_group_targets_item.py b/rootly_sdk/models/alert_group_targets_item.py index c197aa66..1d7557d3 100644 --- a/rootly_sdk/models/alert_group_targets_item.py +++ b/rootly_sdk/models/alert_group_targets_item.py @@ -19,8 +19,9 @@ class AlertGroupTargetsItem: """ Attributes: - target_type (AlertGroupTargetsItemTargetType): The type of the target. - target_id (UUID): id for the Group, Service or EscalationPolicy + target_type (AlertGroupTargetsItemTargetType): The type of the target. Please contact support if you encounter + issues using `Functionality` as a target type. + target_id (UUID): id for the Group, Service, EscalationPolicy or Functionality """ target_type: AlertGroupTargetsItemTargetType diff --git a/rootly_sdk/models/alert_group_targets_item_target_type.py b/rootly_sdk/models/alert_group_targets_item_target_type.py index 5333dc6f..277ea3d4 100644 --- a/rootly_sdk/models/alert_group_targets_item_target_type.py +++ b/rootly_sdk/models/alert_group_targets_item_target_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -AlertGroupTargetsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +AlertGroupTargetsItemTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] ALERT_GROUP_TARGETS_ITEM_TARGET_TYPE_VALUES: set[AlertGroupTargetsItemTargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/alert_list.py b/rootly_sdk/models/alert_list.py index a8d28725..e56e45f3 100644 --- a/rootly_sdk/models/alert_list.py +++ b/rootly_sdk/models/alert_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_list_data_item import AlertListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class AlertList: data (list[AlertListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_list_data_item import AlertListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_list.additional_properties = d diff --git a/rootly_sdk/models/alert_list_data_item.py b/rootly_sdk/models/alert_list_data_item.py index ed0d8fe7..4f9d74d7 100644 --- a/rootly_sdk/models/alert_list_data_item.py +++ b/rootly_sdk/models/alert_list_data_item.py @@ -6,7 +6,6 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_list_data_item_source import AlertListDataItemSource, check_alert_list_data_item_source from ..models.alert_list_data_item_type import AlertListDataItemType, check_alert_list_data_item_type from ..types import UNSET, Unset @@ -24,25 +23,24 @@ class AlertListDataItem: id (str): Unique ID of the alert type_ (AlertListDataItemType): attributes (Alert): - source (AlertListDataItemSource | Unset): The source of the alert + source (str | Unset): The source of the alert """ id: str type_: AlertListDataItemType attributes: Alert - source: AlertListDataItemSource | Unset = UNSET + source: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ attributes = self.attributes.to_dict() - source: str | Unset = UNSET - if not isinstance(self.source, Unset): - source = self.source + source = self.source field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -69,12 +67,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = Alert.from_dict(d.pop("attributes")) - _source = d.pop("source", UNSET) - source: AlertListDataItemSource | Unset - if isinstance(_source, Unset): - source = UNSET - else: - source = check_alert_list_data_item_source(_source) + source = d.pop("source", UNSET) alert_list_data_item = cls( id=id, diff --git a/rootly_sdk/models/alert_list_data_item_source.py b/rootly_sdk/models/alert_list_data_item_source.py deleted file mode 100644 index d88a9512..00000000 --- a/rootly_sdk/models/alert_list_data_item_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -AlertListDataItemSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -ALERT_LIST_DATA_ITEM_SOURCE_VALUES: set[AlertListDataItemSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_alert_list_data_item_source(value: str | None) -> AlertListDataItemSource | None: - if value is None: - return None - if value in ALERT_LIST_DATA_ITEM_SOURCE_VALUES: - return cast(AlertListDataItemSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_LIST_DATA_ITEM_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/alert_notification_target_type.py b/rootly_sdk/models/alert_notification_target_type.py new file mode 100644 index 00000000..af9bc852 --- /dev/null +++ b/rootly_sdk/models/alert_notification_target_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +AlertNotificationTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service", "User"] + +ALERT_NOTIFICATION_TARGET_TYPE_VALUES: set[AlertNotificationTargetType] = { + "EscalationPolicy", + "Functionality", + "Group", + "Service", + "User", +} + + +def check_alert_notification_target_type(value: str | None) -> AlertNotificationTargetType | None: + if value is None: + return None + if value in ALERT_NOTIFICATION_TARGET_TYPE_VALUES: + return cast(AlertNotificationTargetType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_NOTIFICATION_TARGET_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/alert_response.py b/rootly_sdk/models/alert_response.py index b1e9801b..f165c1b4 100644 --- a/rootly_sdk/models/alert_response.py +++ b/rootly_sdk/models/alert_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_response_data import AlertResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertResponse") @@ -18,14 +21,24 @@ class AlertResponse: """ Attributes: data (AlertResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_response_data import AlertResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_response = cls( data=data, + included=included, ) alert_response.additional_properties = d diff --git a/rootly_sdk/models/alert_response_data.py b/rootly_sdk/models/alert_response_data.py index 615c4731..c5700bfe 100644 --- a/rootly_sdk/models/alert_response_data.py +++ b/rootly_sdk/models/alert_response_data.py @@ -6,7 +6,6 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_response_data_source import AlertResponseDataSource, check_alert_response_data_source from ..models.alert_response_data_type import AlertResponseDataType, check_alert_response_data_type from ..types import UNSET, Unset @@ -24,25 +23,24 @@ class AlertResponseData: id (str): Unique ID of the alert type_ (AlertResponseDataType): attributes (Alert): - source (AlertResponseDataSource | Unset): The source of the alert + source (str | Unset): The source of the alert """ id: str type_: AlertResponseDataType attributes: Alert - source: AlertResponseDataSource | Unset = UNSET + source: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ attributes = self.attributes.to_dict() - source: str | Unset = UNSET - if not isinstance(self.source, Unset): - source = self.source + source = self.source field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -69,12 +67,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = Alert.from_dict(d.pop("attributes")) - _source = d.pop("source", UNSET) - source: AlertResponseDataSource | Unset - if isinstance(_source, Unset): - source = UNSET - else: - source = check_alert_response_data_source(_source) + source = d.pop("source", UNSET) alert_response_data = cls( id=id, diff --git a/rootly_sdk/models/alert_response_data_source.py b/rootly_sdk/models/alert_response_data_source.py deleted file mode 100644 index 0572eee7..00000000 --- a/rootly_sdk/models/alert_response_data_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -AlertResponseDataSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -ALERT_RESPONSE_DATA_SOURCE_VALUES: set[AlertResponseDataSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_alert_response_data_source(value: str | None) -> AlertResponseDataSource | None: - if value is None: - return None - if value in ALERT_RESPONSE_DATA_SOURCE_VALUES: - return cast(AlertResponseDataSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_RESPONSE_DATA_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/alert_route.py b/rootly_sdk/models/alert_route.py index d0895905..abfbd781 100644 --- a/rootly_sdk/models/alert_route.py +++ b/rootly_sdk/models/alert_route.py @@ -35,6 +35,7 @@ class AlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name alerts_source_ids = [] diff --git a/rootly_sdk/models/alert_route_list.py b/rootly_sdk/models/alert_route_list.py index 788a6a65..c6276ba7 100644 --- a/rootly_sdk/models/alert_route_list.py +++ b/rootly_sdk/models/alert_route_list.py @@ -30,6 +30,7 @@ class AlertRouteList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() diff --git a/rootly_sdk/models/alert_route_list_data_item.py b/rootly_sdk/models/alert_route_list_data_item.py index 3aee86f3..4ec22e8a 100644 --- a/rootly_sdk/models/alert_route_list_data_item.py +++ b/rootly_sdk/models/alert_route_list_data_item.py @@ -30,6 +30,7 @@ class AlertRouteListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_route_response.py b/rootly_sdk/models/alert_route_response.py index 0fb84000..53657a71 100644 --- a/rootly_sdk/models/alert_route_response.py +++ b/rootly_sdk/models/alert_route_response.py @@ -24,6 +24,7 @@ class AlertRouteResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/alert_route_response_data.py b/rootly_sdk/models/alert_route_response_data.py index f52eb429..4bf1cb69 100644 --- a/rootly_sdk/models/alert_route_response_data.py +++ b/rootly_sdk/models/alert_route_response_data.py @@ -30,6 +30,7 @@ class AlertRouteResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_route_rules_item.py b/rootly_sdk/models/alert_route_rules_item.py index 6377e212..7764fdcb 100644 --- a/rootly_sdk/models/alert_route_rules_item.py +++ b/rootly_sdk/models/alert_route_rules_item.py @@ -35,6 +35,7 @@ class AlertRouteRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name destinations = [] diff --git a/rootly_sdk/models/alert_route_rules_item_condition_groups_item.py b/rootly_sdk/models/alert_route_rules_item_condition_groups_item.py index 80a9e188..45faaf7b 100644 --- a/rootly_sdk/models/alert_route_rules_item_condition_groups_item.py +++ b/rootly_sdk/models/alert_route_rules_item_condition_groups_item.py @@ -30,6 +30,7 @@ class AlertRouteRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + conditions = [] for conditions_item_data in self.conditions: conditions_item = conditions_item_data.to_dict() diff --git a/rootly_sdk/models/alert_routing_rule_condition_group.py b/rootly_sdk/models/alert_routing_rule_condition_group.py index 056ffefd..56abd818 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_group.py +++ b/rootly_sdk/models/alert_routing_rule_condition_group.py @@ -36,6 +36,7 @@ class AlertRoutingRuleConditionGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + position = self.position id: str | Unset = UNSET diff --git a/rootly_sdk/models/alert_routing_rule_condition_groups_item.py b/rootly_sdk/models/alert_routing_rule_condition_groups_item.py index c537c24e..72ea94ca 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_groups_item.py +++ b/rootly_sdk/models/alert_routing_rule_condition_groups_item.py @@ -37,6 +37,7 @@ class AlertRoutingRuleConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + position = self.position id: str | Unset = UNSET diff --git a/rootly_sdk/models/alert_routing_rule_list.py b/rootly_sdk/models/alert_routing_rule_list.py index 79720fd0..3c3aaa42 100644 --- a/rootly_sdk/models/alert_routing_rule_list.py +++ b/rootly_sdk/models/alert_routing_rule_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_routing_rule_list_data_item import AlertRoutingRuleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class AlertRoutingRuleList: data (list[AlertRoutingRuleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertRoutingRuleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_routing_rule_list_data_item import AlertRoutingRuleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_routing_rule_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_routing_rule_list.additional_properties = d diff --git a/rootly_sdk/models/alert_routing_rule_list_data_item.py b/rootly_sdk/models/alert_routing_rule_list_data_item.py index 7f60918e..7245f458 100644 --- a/rootly_sdk/models/alert_routing_rule_list_data_item.py +++ b/rootly_sdk/models/alert_routing_rule_list_data_item.py @@ -33,6 +33,7 @@ class AlertRoutingRuleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_routing_rule_response.py b/rootly_sdk/models/alert_routing_rule_response.py index 79852973..f10281d6 100644 --- a/rootly_sdk/models/alert_routing_rule_response.py +++ b/rootly_sdk/models/alert_routing_rule_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_routing_rule_response_data import AlertRoutingRuleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertRoutingRuleResponse") @@ -18,14 +21,24 @@ class AlertRoutingRuleResponse: """ Attributes: data (AlertRoutingRuleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertRoutingRuleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_routing_rule_response_data import AlertRoutingRuleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertRoutingRuleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_routing_rule_response = cls( data=data, + included=included, ) alert_routing_rule_response.additional_properties = d diff --git a/rootly_sdk/models/alert_routing_rule_response_data.py b/rootly_sdk/models/alert_routing_rule_response_data.py index a03b56b9..bf0c7fc4 100644 --- a/rootly_sdk/models/alert_routing_rule_response_data.py +++ b/rootly_sdk/models/alert_routing_rule_response_data.py @@ -33,6 +33,7 @@ class AlertRoutingRuleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_source.py b/rootly_sdk/models/alert_source.py deleted file mode 100644 index 65e09e2b..00000000 --- a/rootly_sdk/models/alert_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -AlertSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -ALERT_SOURCE_VALUES: set[AlertSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_alert_source(value: str | None) -> AlertSource | None: - if value is None: - return None - if value in ALERT_SOURCE_VALUES: - return cast(AlertSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/alert_trigger_params.py b/rootly_sdk/models/alert_trigger_params.py index a7761fcf..6d99afd0 100644 --- a/rootly_sdk/models/alert_trigger_params.py +++ b/rootly_sdk/models/alert_trigger_params.py @@ -98,6 +98,7 @@ class AlertTriggerParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + trigger_type: str = self.trigger_type triggers: list[str] | Unset = UNSET diff --git a/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py b/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py index dea2beff..a8a3fc50 100644 --- a/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py +++ b/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py @@ -34,6 +34,7 @@ class AlertTriggerParamsAlertPayloadConditions: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + logic: str | Unset = UNSET if not isinstance(self.logic, Unset): logic = self.logic diff --git a/rootly_sdk/models/alert_urgency.py b/rootly_sdk/models/alert_urgency.py index 443ca62e..3921a818 100644 --- a/rootly_sdk/models/alert_urgency.py +++ b/rootly_sdk/models/alert_urgency.py @@ -1,11 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="AlertUrgency") @@ -18,6 +20,11 @@ class AlertUrgency: position (int): Position of the alert urgency created_at (str): Date of creation updated_at (str): Date of last update + id (str | Unset): Unique ID of the alert urgency + urgency (None | str | Unset): The urgency level + color (None | str | Unset): The color associated with this urgency level + team_id (int | Unset): The ID of the team this urgency belongs to + deleted_at (None | str | Unset): Date of deletion """ name: str @@ -25,6 +32,11 @@ class AlertUrgency: position: int created_at: str updated_at: str + id: str | Unset = UNSET + urgency: None | str | Unset = UNSET + color: None | str | Unset = UNSET + team_id: int | Unset = UNSET + deleted_at: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,6 +50,28 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at + id = self.id + + urgency: None | str | Unset + if isinstance(self.urgency, Unset): + urgency = UNSET + else: + urgency = self.urgency + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + team_id = self.team_id + + deleted_at: None | str | Unset + if isinstance(self.deleted_at, Unset): + deleted_at = UNSET + else: + deleted_at = self.deleted_at + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -49,6 +83,16 @@ def to_dict(self) -> dict[str, Any]: "updated_at": updated_at, } ) + if id is not UNSET: + field_dict["id"] = id + if urgency is not UNSET: + field_dict["urgency"] = urgency + if color is not UNSET: + field_dict["color"] = color + if team_id is not UNSET: + field_dict["team_id"] = team_id + if deleted_at is not UNSET: + field_dict["deleted_at"] = deleted_at return field_dict @@ -65,12 +109,48 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") + id = d.pop("id", UNSET) + + def _parse_urgency(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + urgency = _parse_urgency(d.pop("urgency", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + team_id = d.pop("team_id", UNSET) + + def _parse_deleted_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + deleted_at = _parse_deleted_at(d.pop("deleted_at", UNSET)) + alert_urgency = cls( name=name, description=description, position=position, created_at=created_at, updated_at=updated_at, + id=id, + urgency=urgency, + color=color, + team_id=team_id, + deleted_at=deleted_at, ) alert_urgency.additional_properties = d diff --git a/rootly_sdk/models/alert_urgency_list.py b/rootly_sdk/models/alert_urgency_list.py index 392b8cdf..385c12fd 100644 --- a/rootly_sdk/models/alert_urgency_list.py +++ b/rootly_sdk/models/alert_urgency_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_urgency_list_data_item import AlertUrgencyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class AlertUrgencyList: data (list[AlertUrgencyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertUrgencyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_urgency_list_data_item import AlertUrgencyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_urgency_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_urgency_list.additional_properties = d diff --git a/rootly_sdk/models/alert_urgency_list_data_item.py b/rootly_sdk/models/alert_urgency_list_data_item.py index 634dc584..9fd99c3a 100644 --- a/rootly_sdk/models/alert_urgency_list_data_item.py +++ b/rootly_sdk/models/alert_urgency_list_data_item.py @@ -33,6 +33,7 @@ class AlertUrgencyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_urgency_response.py b/rootly_sdk/models/alert_urgency_response.py index 146eee39..6e59691a 100644 --- a/rootly_sdk/models/alert_urgency_response.py +++ b/rootly_sdk/models/alert_urgency_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alert_urgency_response_data import AlertUrgencyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertUrgencyResponse") @@ -18,14 +21,24 @@ class AlertUrgencyResponse: """ Attributes: data (AlertUrgencyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertUrgencyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_urgency_response_data import AlertUrgencyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertUrgencyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_urgency_response = cls( data=data, + included=included, ) alert_urgency_response.additional_properties = d diff --git a/rootly_sdk/models/alert_urgency_response_data.py b/rootly_sdk/models/alert_urgency_response_data.py index 9f88c165..e2a938c7 100644 --- a/rootly_sdk/models/alert_urgency_response_data.py +++ b/rootly_sdk/models/alert_urgency_response_data.py @@ -33,6 +33,7 @@ class AlertUrgencyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alerts_source.py b/rootly_sdk/models/alerts_source.py index 1a770d52..13b79b88 100644 --- a/rootly_sdk/models/alerts_source.py +++ b/rootly_sdk/models/alerts_source.py @@ -36,6 +36,8 @@ class AlertsSource: secret (str): The secret used to authenticate non-email alert sources created_at (str): Date of creation updated_at (str): Date of last update + enabled (bool | Unset): Whether the alert source is enabled. Disabled sources do not create alerts from incoming + events. source_type (AlertsSourceSourceType | Unset): The alert source type alert_urgency_id (str | Unset): ID for the default alert urgency assigned to this alert source deduplicate_alerts_by_key (bool | Unset): Toggle alert deduplication using deduplication key. If enabled, @@ -65,6 +67,7 @@ class AlertsSource: secret: str created_at: str updated_at: str + enabled: bool | Unset = UNSET source_type: AlertsSourceSourceType | Unset = UNSET alert_urgency_id: str | Unset = UNSET deduplicate_alerts_by_key: bool | Unset = UNSET @@ -96,6 +99,8 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at + enabled = self.enabled + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -185,6 +190,8 @@ def to_dict(self) -> dict[str, Any]: "updated_at": updated_at, } ) + if enabled is not UNSET: + field_dict["enabled"] = enabled if source_type is not UNSET: field_dict["source_type"] = source_type if alert_urgency_id is not UNSET: @@ -239,6 +246,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") + enabled = d.pop("enabled", UNSET) + _source_type = d.pop("source_type", UNSET) source_type: AlertsSourceSourceType | Unset if isinstance(_source_type, Unset): @@ -376,6 +385,7 @@ def _parse_webhook_endpoint(data: object) -> None | str | Unset: secret=secret, created_at=created_at, updated_at=updated_at, + enabled=enabled, source_type=source_type, alert_urgency_id=alert_urgency_id, deduplicate_alerts_by_key=deduplicate_alerts_by_key, diff --git a/rootly_sdk/models/alerts_source_list.py b/rootly_sdk/models/alerts_source_list.py index 791f2ed1..922a66a7 100644 --- a/rootly_sdk/models/alerts_source_list.py +++ b/rootly_sdk/models/alerts_source_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alerts_source_list_data_item import AlertsSourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class AlertsSourceList: data (list[AlertsSourceListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertsSourceListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alerts_source_list_data_item import AlertsSourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alerts_source_list = cls( data=data, links=links, meta=meta, + included=included, ) alerts_source_list.additional_properties = d diff --git a/rootly_sdk/models/alerts_source_list_data_item.py b/rootly_sdk/models/alerts_source_list_data_item.py index 26b483bb..697c5bc3 100644 --- a/rootly_sdk/models/alerts_source_list_data_item.py +++ b/rootly_sdk/models/alerts_source_list_data_item.py @@ -33,6 +33,7 @@ class AlertsSourceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0.py b/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0.py index 4bfaa3c1..efa3dec0 100644 --- a/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0.py +++ b/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0.py @@ -62,6 +62,7 @@ class AlertsSourceResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + enabled = self.enabled condition_type: str | Unset = UNSET diff --git a/rootly_sdk/models/alerts_source_response.py b/rootly_sdk/models/alerts_source_response.py index 5b72f28e..e90b0d90 100644 --- a/rootly_sdk/models/alerts_source_response.py +++ b/rootly_sdk/models/alerts_source_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.alerts_source_response_data import AlertsSourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertsSourceResponse") @@ -18,14 +21,24 @@ class AlertsSourceResponse: """ Attributes: data (AlertsSourceResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertsSourceResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alerts_source_response_data import AlertsSourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertsSourceResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alerts_source_response = cls( data=data, + included=included, ) alerts_source_response.additional_properties = d diff --git a/rootly_sdk/models/alerts_source_response_data.py b/rootly_sdk/models/alerts_source_response_data.py index 5413efa8..848030dc 100644 --- a/rootly_sdk/models/alerts_source_response_data.py +++ b/rootly_sdk/models/alerts_source_response_data.py @@ -33,6 +33,7 @@ class AlertsSourceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alerts_source_source_type.py b/rootly_sdk/models/alerts_source_source_type.py index 318c7d22..7762d668 100644 --- a/rootly_sdk/models/alerts_source_source_type.py +++ b/rootly_sdk/models/alerts_source_source_type.py @@ -11,6 +11,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", @@ -37,6 +38,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", diff --git a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py index 2e36bf19..e7714a10 100644 --- a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py +++ b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py @@ -38,6 +38,7 @@ class AlertsSourceSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + auto_resolve = self.auto_resolve resolve_state: None | str | Unset diff --git a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item.py b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item.py index f677c96b..af6141fc 100644 --- a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item.py +++ b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item.py @@ -22,7 +22,8 @@ class AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem: field (AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField | Unset): Select the field on which the condition to be evaluated json_path (str | Unset): JSON path expression to extract a specific value from the alert's payload for - evaluation + evaluation. For `notification_target_id` only: if your account has opted in to Dynamic Notification Targets, + this may also be a Liquid template that resolves to a notification target id at routing time. """ field: AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET diff --git a/rootly_sdk/models/api_key_list.py b/rootly_sdk/models/api_key_list.py index f91da75e..ec533508 100644 --- a/rootly_sdk/models/api_key_list.py +++ b/rootly_sdk/models/api_key_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.api_key_list_data_item import ApiKeyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class ApiKeyList: data (list[ApiKeyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ApiKeyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.api_key_list_data_item import ApiKeyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + api_key_list = cls( data=data, links=links, meta=meta, + included=included, ) api_key_list.additional_properties = d diff --git a/rootly_sdk/models/api_key_list_data_item.py b/rootly_sdk/models/api_key_list_data_item.py index 45c001d8..805cc948 100644 --- a/rootly_sdk/models/api_key_list_data_item.py +++ b/rootly_sdk/models/api_key_list_data_item.py @@ -30,6 +30,7 @@ class ApiKeyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/api_key_response.py b/rootly_sdk/models/api_key_response.py index cc20822c..73e001f3 100644 --- a/rootly_sdk/models/api_key_response.py +++ b/rootly_sdk/models/api_key_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.api_key_response_data import ApiKeyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="ApiKeyResponse") @@ -18,14 +21,24 @@ class ApiKeyResponse: """ Attributes: data (ApiKeyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ApiKeyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.api_key_response_data import ApiKeyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = ApiKeyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + api_key_response = cls( data=data, + included=included, ) api_key_response.additional_properties = d diff --git a/rootly_sdk/models/api_key_response_data.py b/rootly_sdk/models/api_key_response_data.py index a0b026d9..ecc665d2 100644 --- a/rootly_sdk/models/api_key_response_data.py +++ b/rootly_sdk/models/api_key_response_data.py @@ -30,6 +30,7 @@ class ApiKeyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/api_key_with_token_response.py b/rootly_sdk/models/api_key_with_token_response.py index b4c7cf6d..1d29d480 100644 --- a/rootly_sdk/models/api_key_with_token_response.py +++ b/rootly_sdk/models/api_key_with_token_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.api_key_with_token_response_data import ApiKeyWithTokenResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="ApiKeyWithTokenResponse") @@ -18,14 +21,24 @@ class ApiKeyWithTokenResponse: """ Attributes: data (ApiKeyWithTokenResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ApiKeyWithTokenResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.api_key_with_token_response_data import ApiKeyWithTokenResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = ApiKeyWithTokenResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + api_key_with_token_response = cls( data=data, + included=included, ) api_key_with_token_response.additional_properties = d diff --git a/rootly_sdk/models/api_key_with_token_response_data.py b/rootly_sdk/models/api_key_with_token_response_data.py index 92e10765..3df6e4e5 100644 --- a/rootly_sdk/models/api_key_with_token_response_data.py +++ b/rootly_sdk/models/api_key_with_token_response_data.py @@ -33,6 +33,7 @@ class ApiKeyWithTokenResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/archive_google_chat_spaces_task_params.py b/rootly_sdk/models/archive_google_chat_spaces_task_params.py new file mode 100644 index 00000000..2389e17f --- /dev/null +++ b/rootly_sdk/models/archive_google_chat_spaces_task_params.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.archive_google_chat_spaces_task_params_task_type import ( + ArchiveGoogleChatSpacesTaskParamsTaskType, + check_archive_google_chat_spaces_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.archive_google_chat_spaces_task_params_spaces_item import ArchiveGoogleChatSpacesTaskParamsSpacesItem + + +T = TypeVar("T", bound="ArchiveGoogleChatSpacesTaskParams") + + +@_attrs_define +class ArchiveGoogleChatSpacesTaskParams: + """ + Attributes: + spaces (list[ArchiveGoogleChatSpacesTaskParamsSpacesItem]): + task_type (ArchiveGoogleChatSpacesTaskParamsTaskType | Unset): + """ + + spaces: list[ArchiveGoogleChatSpacesTaskParamsSpacesItem] + task_type: ArchiveGoogleChatSpacesTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + spaces = [] + for spaces_item_data in self.spaces: + spaces_item = spaces_item_data.to_dict() + spaces.append(spaces_item) + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "spaces": spaces, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.archive_google_chat_spaces_task_params_spaces_item import ( + ArchiveGoogleChatSpacesTaskParamsSpacesItem, + ) + + d = dict(src_dict) + spaces = [] + _spaces = d.pop("spaces") + for spaces_item_data in _spaces: + spaces_item = ArchiveGoogleChatSpacesTaskParamsSpacesItem.from_dict(spaces_item_data) + + spaces.append(spaces_item) + + _task_type = d.pop("task_type", UNSET) + task_type: ArchiveGoogleChatSpacesTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_archive_google_chat_spaces_task_params_task_type(_task_type) + + archive_google_chat_spaces_task_params = cls( + spaces=spaces, + task_type=task_type, + ) + + archive_google_chat_spaces_task_params.additional_properties = d + return archive_google_chat_spaces_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py b/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py new file mode 100644 index 00000000..ae50ba42 --- /dev/null +++ b/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ArchiveGoogleChatSpacesTaskParamsSpacesItem") + + +@_attrs_define +class ArchiveGoogleChatSpacesTaskParamsSpacesItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + archive_google_chat_spaces_task_params_spaces_item = cls( + id=id, + name=name, + ) + + archive_google_chat_spaces_task_params_spaces_item.additional_properties = d + return archive_google_chat_spaces_task_params_spaces_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/archive_google_chat_spaces_task_params_task_type.py b/rootly_sdk/models/archive_google_chat_spaces_task_params_task_type.py new file mode 100644 index 00000000..9443a09a --- /dev/null +++ b/rootly_sdk/models/archive_google_chat_spaces_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +ArchiveGoogleChatSpacesTaskParamsTaskType = Literal["archive_google_chat_spaces"] + +ARCHIVE_GOOGLE_CHAT_SPACES_TASK_PARAMS_TASK_TYPE_VALUES: set[ArchiveGoogleChatSpacesTaskParamsTaskType] = { + "archive_google_chat_spaces", +} + + +def check_archive_google_chat_spaces_task_params_task_type( + value: str | None, +) -> ArchiveGoogleChatSpacesTaskParamsTaskType | None: + if value is None: + return None + if value in ARCHIVE_GOOGLE_CHAT_SPACES_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(ArchiveGoogleChatSpacesTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ARCHIVE_GOOGLE_CHAT_SPACES_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py b/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py index 3dfbb94b..5187f9fd 100644 --- a/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py +++ b/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py @@ -37,6 +37,7 @@ class ArchiveMicrosoftTeamsChannelsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + team = self.team.to_dict() channels = [] diff --git a/rootly_sdk/models/archive_slack_channels_task_params.py b/rootly_sdk/models/archive_slack_channels_task_params.py index 860e6b9b..a808ecd2 100644 --- a/rootly_sdk/models/archive_slack_channels_task_params.py +++ b/rootly_sdk/models/archive_slack_channels_task_params.py @@ -32,6 +32,7 @@ class ArchiveSlackChannelsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + channels = [] for channels_item_data in self.channels: channels_item = channels_item_data.to_dict() diff --git a/rootly_sdk/models/assign_role_to_user.py b/rootly_sdk/models/assign_role_to_user.py index 694269f5..947a8507 100644 --- a/rootly_sdk/models/assign_role_to_user.py +++ b/rootly_sdk/models/assign_role_to_user.py @@ -24,6 +24,7 @@ class AssignRoleToUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/assign_role_to_user_data.py b/rootly_sdk/models/assign_role_to_user_data.py index 89f9c32a..461a07ed 100644 --- a/rootly_sdk/models/assign_role_to_user_data.py +++ b/rootly_sdk/models/assign_role_to_user_data.py @@ -28,6 +28,7 @@ class AssignRoleToUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/attach_alert.py b/rootly_sdk/models/attach_alert.py index cd717905..39dc5313 100644 --- a/rootly_sdk/models/attach_alert.py +++ b/rootly_sdk/models/attach_alert.py @@ -24,6 +24,7 @@ class AttachAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/attach_alert_data.py b/rootly_sdk/models/attach_alert_data.py index 6e92e6f6..347f3b33 100644 --- a/rootly_sdk/models/attach_alert_data.py +++ b/rootly_sdk/models/attach_alert_data.py @@ -28,6 +28,7 @@ class AttachAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/attach_datadog_dashboards_task_params.py b/rootly_sdk/models/attach_datadog_dashboards_task_params.py index c9a50936..d40d148b 100644 --- a/rootly_sdk/models/attach_datadog_dashboards_task_params.py +++ b/rootly_sdk/models/attach_datadog_dashboards_task_params.py @@ -41,6 +41,7 @@ class AttachDatadogDashboardsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + dashboards = [] for dashboards_item_data in self.dashboards: dashboards_item = dashboards_item_data.to_dict() diff --git a/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py new file mode 100644 index 00000000..64c10013 --- /dev/null +++ b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.attach_retrospective_pdf_to_jira_issue_task_params_task_type import ( + AttachRetrospectivePdfToJiraIssueTaskParamsTaskType, + check_attach_retrospective_pdf_to_jira_issue_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.attach_retrospective_pdf_to_jira_issue_task_params_integration import ( + AttachRetrospectivePdfToJiraIssueTaskParamsIntegration, + ) + + +T = TypeVar("T", bound="AttachRetrospectivePdfToJiraIssueTaskParams") + + +@_attrs_define +class AttachRetrospectivePdfToJiraIssueTaskParams: + """ + Attributes: + issue_id (str): The issue id + task_type (AttachRetrospectivePdfToJiraIssueTaskParamsTaskType | Unset): + integration (AttachRetrospectivePdfToJiraIssueTaskParamsIntegration | Unset): Specify integration id if you have + more than one Jira instance + filename (str | Unset): The attachment filename + """ + + issue_id: str + task_type: AttachRetrospectivePdfToJiraIssueTaskParamsTaskType | Unset = UNSET + integration: AttachRetrospectivePdfToJiraIssueTaskParamsIntegration | Unset = UNSET + filename: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + issue_id = self.issue_id + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + integration: dict[str, Any] | Unset = UNSET + if not isinstance(self.integration, Unset): + integration = self.integration.to_dict() + + filename = self.filename + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "issue_id": issue_id, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if integration is not UNSET: + field_dict["integration"] = integration + if filename is not UNSET: + field_dict["filename"] = filename + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.attach_retrospective_pdf_to_jira_issue_task_params_integration import ( + AttachRetrospectivePdfToJiraIssueTaskParamsIntegration, + ) + + d = dict(src_dict) + issue_id = d.pop("issue_id") + + _task_type = d.pop("task_type", UNSET) + task_type: AttachRetrospectivePdfToJiraIssueTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_attach_retrospective_pdf_to_jira_issue_task_params_task_type(_task_type) + + _integration = d.pop("integration", UNSET) + integration: AttachRetrospectivePdfToJiraIssueTaskParamsIntegration | Unset + if isinstance(_integration, Unset): + integration = UNSET + else: + integration = AttachRetrospectivePdfToJiraIssueTaskParamsIntegration.from_dict(_integration) + + filename = d.pop("filename", UNSET) + + attach_retrospective_pdf_to_jira_issue_task_params = cls( + issue_id=issue_id, + task_type=task_type, + integration=integration, + filename=filename, + ) + + attach_retrospective_pdf_to_jira_issue_task_params.additional_properties = d + return attach_retrospective_pdf_to_jira_issue_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py new file mode 100644 index 00000000..8041a47a --- /dev/null +++ b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AttachRetrospectivePdfToJiraIssueTaskParamsIntegration") + + +@_attrs_define +class AttachRetrospectivePdfToJiraIssueTaskParamsIntegration: + """Specify integration id if you have more than one Jira instance + + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + attach_retrospective_pdf_to_jira_issue_task_params_integration = cls( + id=id, + name=name, + ) + + attach_retrospective_pdf_to_jira_issue_task_params_integration.additional_properties = d + return attach_retrospective_pdf_to_jira_issue_task_params_integration + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_task_type.py b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_task_type.py new file mode 100644 index 00000000..1e1bdbb8 --- /dev/null +++ b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_task_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +AttachRetrospectivePdfToJiraIssueTaskParamsTaskType = Literal["attach_retrospective_pdf_to_jira_issue"] + +ATTACH_RETROSPECTIVE_PDF_TO_JIRA_ISSUE_TASK_PARAMS_TASK_TYPE_VALUES: set[ + AttachRetrospectivePdfToJiraIssueTaskParamsTaskType +] = { + "attach_retrospective_pdf_to_jira_issue", +} + + +def check_attach_retrospective_pdf_to_jira_issue_task_params_task_type( + value: str | None, +) -> AttachRetrospectivePdfToJiraIssueTaskParamsTaskType | None: + if value is None: + return None + if value in ATTACH_RETROSPECTIVE_PDF_TO_JIRA_ISSUE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(AttachRetrospectivePdfToJiraIssueTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ATTACH_RETROSPECTIVE_PDF_TO_JIRA_ISSUE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/audit.py b/rootly_sdk/models/audit.py index d9191468..1efaa9d8 100644 --- a/rootly_sdk/models/audit.py +++ b/rootly_sdk/models/audit.py @@ -24,10 +24,18 @@ class Audit: event (str): Describes the action that was taken. created_at (str): Date of creation item_type (AuditItemType | Unset): Describes the object in which the action was taken on + item_type_display (None | str | Unset): Human-friendly display name for the item type object_ (AuditObjectType0 | None | Unset): The object in which the action was taken on object_changes (AuditObjectChangesType0 | None | Unset): The changes that occurred on the object user_id (int | None | Unset): The ID of who took action on the object. Together with whodunnit_type can be used to find the user + user_name (None | str | Unset): Display name of the user who performed the action + user_email (None | str | Unset): Email address of the user who performed the action + ip_address (None | str | Unset): IP address of the client that performed the action + user_agent (None | str | Unset): User-Agent header of the client that performed the action + request_id (None | str | Unset): Unique request ID (UUID) for the HTTP request that triggered the action + session_id (None | str | Unset): SHA-256 fingerprint of the web session for correlating multiple actions within + the same browser session item_id (None | str | Unset): ID of the affected object id (int | None | Unset): ID of audit """ @@ -35,9 +43,16 @@ class Audit: event: str created_at: str item_type: AuditItemType | Unset = UNSET + item_type_display: None | str | Unset = UNSET object_: AuditObjectType0 | None | Unset = UNSET object_changes: AuditObjectChangesType0 | None | Unset = UNSET user_id: int | None | Unset = UNSET + user_name: None | str | Unset = UNSET + user_email: None | str | Unset = UNSET + ip_address: None | str | Unset = UNSET + user_agent: None | str | Unset = UNSET + request_id: None | str | Unset = UNSET + session_id: None | str | Unset = UNSET item_id: None | str | Unset = UNSET id: int | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -54,6 +69,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.item_type, Unset): item_type = self.item_type + item_type_display: None | str | Unset + if isinstance(self.item_type_display, Unset): + item_type_display = UNSET + else: + item_type_display = self.item_type_display + object_: dict[str, Any] | None | Unset if isinstance(self.object_, Unset): object_ = UNSET @@ -76,6 +97,42 @@ def to_dict(self) -> dict[str, Any]: else: user_id = self.user_id + user_name: None | str | Unset + if isinstance(self.user_name, Unset): + user_name = UNSET + else: + user_name = self.user_name + + user_email: None | str | Unset + if isinstance(self.user_email, Unset): + user_email = UNSET + else: + user_email = self.user_email + + ip_address: None | str | Unset + if isinstance(self.ip_address, Unset): + ip_address = UNSET + else: + ip_address = self.ip_address + + user_agent: None | str | Unset + if isinstance(self.user_agent, Unset): + user_agent = UNSET + else: + user_agent = self.user_agent + + request_id: None | str | Unset + if isinstance(self.request_id, Unset): + request_id = UNSET + else: + request_id = self.request_id + + session_id: None | str | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + item_id: None | str | Unset if isinstance(self.item_id, Unset): item_id = UNSET @@ -98,12 +155,26 @@ def to_dict(self) -> dict[str, Any]: ) if item_type is not UNSET: field_dict["item_type"] = item_type + if item_type_display is not UNSET: + field_dict["item_type_display"] = item_type_display if object_ is not UNSET: field_dict["object"] = object_ if object_changes is not UNSET: field_dict["object_changes"] = object_changes if user_id is not UNSET: field_dict["user_id"] = user_id + if user_name is not UNSET: + field_dict["user_name"] = user_name + if user_email is not UNSET: + field_dict["user_email"] = user_email + if ip_address is not UNSET: + field_dict["ip_address"] = ip_address + if user_agent is not UNSET: + field_dict["user_agent"] = user_agent + if request_id is not UNSET: + field_dict["request_id"] = request_id + if session_id is not UNSET: + field_dict["session_id"] = session_id if item_id is not UNSET: field_dict["item_id"] = item_id if id is not UNSET: @@ -128,6 +199,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: item_type = check_audit_item_type(_item_type) + def _parse_item_type_display(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + item_type_display = _parse_item_type_display(d.pop("item_type_display", UNSET)) + def _parse_object_(data: object) -> AuditObjectType0 | None | Unset: if data is None: return data @@ -171,6 +251,60 @@ def _parse_user_id(data: object) -> int | None | Unset: user_id = _parse_user_id(d.pop("user_id", UNSET)) + def _parse_user_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_name = _parse_user_name(d.pop("user_name", UNSET)) + + def _parse_user_email(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_email = _parse_user_email(d.pop("user_email", UNSET)) + + def _parse_ip_address(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ip_address = _parse_ip_address(d.pop("ip_address", UNSET)) + + def _parse_user_agent(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_agent = _parse_user_agent(d.pop("user_agent", UNSET)) + + def _parse_request_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + request_id = _parse_request_id(d.pop("request_id", UNSET)) + + def _parse_session_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + session_id = _parse_session_id(d.pop("session_id", UNSET)) + def _parse_item_id(data: object) -> None | str | Unset: if data is None: return data @@ -193,9 +327,16 @@ def _parse_id(data: object) -> int | None | Unset: event=event, created_at=created_at, item_type=item_type, + item_type_display=item_type_display, object_=object_, object_changes=object_changes, user_id=user_id, + user_name=user_name, + user_email=user_email, + ip_address=ip_address, + user_agent=user_agent, + request_id=request_id, + session_id=session_id, item_id=item_id, id=id, ) diff --git a/rootly_sdk/models/audit_item_type.py b/rootly_sdk/models/audit_item_type.py index f7d8c330..a3f36ce7 100644 --- a/rootly_sdk/models/audit_item_type.py +++ b/rootly_sdk/models/audit_item_type.py @@ -1,6 +1,8 @@ from typing import Literal, cast AuditItemType = Literal[ + "AlertRoute", + "AlertRoutingRule", "Alerts::Source", "ApiKey", "Catalog", @@ -24,30 +26,50 @@ "GeniusWorkflowGroup", "GeniusWorkflowRun", "Group", + "GroupUser", "Heartbeat", "Incident", "IncidentActionItem", "IncidentEvent", "IncidentFormFieldSelection", "IncidentFormFieldSelectionUser", + "IncidentPermissionSet", "IncidentPostMortem", "IncidentRoleAssignment", "IncidentRoleTask", "IncidentStatusPageEvent", "IncidentTask", "IncidentType", + "Integrations::DatadogAccount", + "Integrations::GithubAccount", + "Integrations::GoogleMeetAccount", + "Integrations::JiraAccount", + "Integrations::MicrosoftTeamsAccount", + "Integrations::NotionAccount", + "Integrations::OpsgenieAccount", + "Integrations::PagerdutyAccount", + "Integrations::ServiceNowAccount", + "Integrations::SlackAccount", + "Integrations::StatusPageIoAccount", + "Integrations::ZendeskAccount", + "Integrations::ZoomAccount", "LiveCallRouter", + "LoginActivity", + "Membership", "OnCallRole", "Playbook", "PlaybookTask", "Role", "Schedule", + "Secret", "Service", "Severity", "StatusPage", ] AUDIT_ITEM_TYPE_VALUES: set[AuditItemType] = { + "AlertRoute", + "AlertRoutingRule", "Alerts::Source", "ApiKey", "Catalog", @@ -71,24 +93,42 @@ "GeniusWorkflowGroup", "GeniusWorkflowRun", "Group", + "GroupUser", "Heartbeat", "Incident", "IncidentActionItem", "IncidentEvent", "IncidentFormFieldSelection", "IncidentFormFieldSelectionUser", + "IncidentPermissionSet", "IncidentPostMortem", "IncidentRoleAssignment", "IncidentRoleTask", "IncidentStatusPageEvent", "IncidentTask", "IncidentType", + "Integrations::DatadogAccount", + "Integrations::GithubAccount", + "Integrations::GoogleMeetAccount", + "Integrations::JiraAccount", + "Integrations::MicrosoftTeamsAccount", + "Integrations::NotionAccount", + "Integrations::OpsgenieAccount", + "Integrations::PagerdutyAccount", + "Integrations::ServiceNowAccount", + "Integrations::SlackAccount", + "Integrations::StatusPageIoAccount", + "Integrations::ZendeskAccount", + "Integrations::ZoomAccount", "LiveCallRouter", + "LoginActivity", + "Membership", "OnCallRole", "Playbook", "PlaybookTask", "Role", "Schedule", + "Secret", "Service", "Severity", "StatusPage", diff --git a/rootly_sdk/models/audits_list.py b/rootly_sdk/models/audits_list.py index 78fe7360..85729264 100644 --- a/rootly_sdk/models/audits_list.py +++ b/rootly_sdk/models/audits_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.audits_list_data_item import AuditsListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class AuditsList: data (list[AuditsListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AuditsListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.audits_list_data_item import AuditsListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + audits_list = cls( data=data, links=links, meta=meta, + included=included, ) audits_list.additional_properties = d diff --git a/rootly_sdk/models/audits_list_data_item.py b/rootly_sdk/models/audits_list_data_item.py index f10c5aff..4056d5dd 100644 --- a/rootly_sdk/models/audits_list_data_item.py +++ b/rootly_sdk/models/audits_list_data_item.py @@ -30,6 +30,7 @@ class AuditsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/authorization_list.py b/rootly_sdk/models/authorization_list.py index 0f145c24..a3e81667 100644 --- a/rootly_sdk/models/authorization_list.py +++ b/rootly_sdk/models/authorization_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.authorization_list_data_item import AuthorizationListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class AuthorizationList: data (list[AuthorizationListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AuthorizationListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.authorization_list_data_item import AuthorizationListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + authorization_list = cls( data=data, links=links, meta=meta, + included=included, ) authorization_list.additional_properties = d diff --git a/rootly_sdk/models/authorization_list_data_item.py b/rootly_sdk/models/authorization_list_data_item.py index 32272298..bbd20e83 100644 --- a/rootly_sdk/models/authorization_list_data_item.py +++ b/rootly_sdk/models/authorization_list_data_item.py @@ -33,6 +33,7 @@ class AuthorizationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/authorization_response.py b/rootly_sdk/models/authorization_response.py index 258ac7b2..8ac40ff2 100644 --- a/rootly_sdk/models/authorization_response.py +++ b/rootly_sdk/models/authorization_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.authorization_response_data import AuthorizationResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AuthorizationResponse") @@ -18,14 +21,24 @@ class AuthorizationResponse: """ Attributes: data (AuthorizationResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AuthorizationResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.authorization_response_data import AuthorizationResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AuthorizationResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + authorization_response = cls( data=data, + included=included, ) authorization_response.additional_properties = d diff --git a/rootly_sdk/models/authorization_response_data.py b/rootly_sdk/models/authorization_response_data.py index fc5371a6..16703d12 100644 --- a/rootly_sdk/models/authorization_response_data.py +++ b/rootly_sdk/models/authorization_response_data.py @@ -33,6 +33,7 @@ class AuthorizationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py b/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py index e3ef0e7c..ab61baa7 100644 --- a/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py +++ b/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py @@ -34,6 +34,7 @@ class AutoAssignRoleOpsgenieTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + incident_role_id = self.incident_role_id schedule = self.schedule.to_dict() diff --git a/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py new file mode 100644 index 00000000..cd35eaf2 --- /dev/null +++ b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoAssignRolePagerdutyTaskParamsType0Schedule") + + +@_attrs_define +class AutoAssignRolePagerdutyTaskParamsType0Schedule: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + auto_assign_role_pagerduty_task_params_type_0_schedule = cls( + id=id, + name=name, + ) + + auto_assign_role_pagerduty_task_params_type_0_schedule.additional_properties = d + return auto_assign_role_pagerduty_task_params_type_0_schedule + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py new file mode 100644 index 00000000..3ef911c2 --- /dev/null +++ b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy") + + +@_attrs_define +class AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + auto_assign_role_pagerduty_task_params_type_1_escalation_policy = cls( + id=id, + name=name, + ) + + auto_assign_role_pagerduty_task_params_type_1_escalation_policy.additional_properties = d + return auto_assign_role_pagerduty_task_params_type_1_escalation_policy + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/auto_assign_role_rootly_task_params.py b/rootly_sdk/models/auto_assign_role_rootly_task_params.py index 64866bed..865859ae 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params.py @@ -50,6 +50,7 @@ class AutoAssignRoleRootlyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + incident_role_id = self.incident_role_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/auto_assign_role_victor_ops_task_params.py b/rootly_sdk/models/auto_assign_role_victor_ops_task_params.py index af0e0efb..74213134 100644 --- a/rootly_sdk/models/auto_assign_role_victor_ops_task_params.py +++ b/rootly_sdk/models/auto_assign_role_victor_ops_task_params.py @@ -34,6 +34,7 @@ class AutoAssignRoleVictorOpsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + incident_role_id = self.incident_role_id team = self.team.to_dict() diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_response.py b/rootly_sdk/models/bulk_destroy_catalog_entities_response.py new file mode 100644 index 00000000..e78840fa --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData + + +T = TypeVar("T", bound="BulkDestroyCatalogEntitiesResponse") + + +@_attrs_define +class BulkDestroyCatalogEntitiesResponse: + """ + Attributes: + data (BulkDestroyCatalogEntitiesResponseData | Unset): + """ + + data: BulkDestroyCatalogEntitiesResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyCatalogEntitiesResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyCatalogEntitiesResponseData.from_dict(_data) + + bulk_destroy_catalog_entities_response = cls( + data=data, + ) + + bulk_destroy_catalog_entities_response.additional_properties = d + return bulk_destroy_catalog_entities_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py b/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py new file mode 100644 index 00000000..100418a0 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyCatalogEntitiesResponseData") + + +@_attrs_define +class BulkDestroyCatalogEntitiesResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_catalog_entities_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_catalog_entities_response_data.additional_properties = d + return bulk_destroy_catalog_entities_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py b/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py new file mode 100644 index 00000000..aa0318b3 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="BulkDestroyCatalogEntitiesType0") + + +@_attrs_define +class BulkDestroyCatalogEntitiesType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_catalog_entities_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_catalog_entities_type_0 diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py new file mode 100644 index 00000000..82423407 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.bulk_destroy_catalog_entities_type_1_managed_by import ( + BulkDestroyCatalogEntitiesType1ManagedBy, + check_bulk_destroy_catalog_entities_type_1_managed_by, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyCatalogEntitiesType1") + + +@_attrs_define +class BulkDestroyCatalogEntitiesType1: + """ + Attributes: + managed_by (BulkDestroyCatalogEntitiesType1ManagedBy): Delete all entities with this managed_by value + (web/admin_web not allowed). + keep_external_ids (list[str] | Unset): Entities with these external_ids are preserved. + """ + + managed_by: BulkDestroyCatalogEntitiesType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_catalog_entities_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_catalog_entities_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_catalog_entities_type_1 diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1_managed_by.py new file mode 100644 index 00000000..225693d2 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1_managed_by.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +BulkDestroyCatalogEntitiesType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_CATALOG_ENTITIES_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyCatalogEntitiesType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_catalog_entities_type_1_managed_by( + value: str | None, +) -> BulkDestroyCatalogEntitiesType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_CATALOG_ENTITIES_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyCatalogEntitiesType1ManagedBy, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_CATALOG_ENTITIES_TYPE_1_MANAGED_BY_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_destroy_environments_response.py b/rootly_sdk/models/bulk_destroy_environments_response.py new file mode 100644 index 00000000..b10deeef --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData + + +T = TypeVar("T", bound="BulkDestroyEnvironmentsResponse") + + +@_attrs_define +class BulkDestroyEnvironmentsResponse: + """ + Attributes: + data (BulkDestroyEnvironmentsResponseData | Unset): + """ + + data: BulkDestroyEnvironmentsResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyEnvironmentsResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyEnvironmentsResponseData.from_dict(_data) + + bulk_destroy_environments_response = cls( + data=data, + ) + + bulk_destroy_environments_response.additional_properties = d + return bulk_destroy_environments_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_environments_response_data.py b/rootly_sdk/models/bulk_destroy_environments_response_data.py new file mode 100644 index 00000000..64ba34fd --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_response_data.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyEnvironmentsResponseData") + + +@_attrs_define +class BulkDestroyEnvironmentsResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_environments_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_environments_response_data.additional_properties = d + return bulk_destroy_environments_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_environments_type_0.py b/rootly_sdk/models/bulk_destroy_environments_type_0.py new file mode 100644 index 00000000..f214081d --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_type_0.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="BulkDestroyEnvironmentsType0") + + +@_attrs_define +class BulkDestroyEnvironmentsType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_environments_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_environments_type_0 diff --git a/rootly_sdk/models/bulk_destroy_environments_type_1.py b/rootly_sdk/models/bulk_destroy_environments_type_1.py new file mode 100644 index 00000000..ce96f4b6 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_type_1.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.bulk_destroy_environments_type_1_managed_by import ( + BulkDestroyEnvironmentsType1ManagedBy, + check_bulk_destroy_environments_type_1_managed_by, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyEnvironmentsType1") + + +@_attrs_define +class BulkDestroyEnvironmentsType1: + """ + Attributes: + managed_by (BulkDestroyEnvironmentsType1ManagedBy): Delete all records with this managed_by value (web/admin_web + not allowed). + keep_external_ids (list[str] | Unset): Records with these external_ids are preserved. + """ + + managed_by: BulkDestroyEnvironmentsType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_environments_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_environments_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_environments_type_1 diff --git a/rootly_sdk/models/bulk_destroy_environments_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_environments_type_1_managed_by.py new file mode 100644 index 00000000..cf58aaeb --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_type_1_managed_by.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +BulkDestroyEnvironmentsType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_ENVIRONMENTS_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyEnvironmentsType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_environments_type_1_managed_by( + value: str | None, +) -> BulkDestroyEnvironmentsType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_ENVIRONMENTS_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyEnvironmentsType1ManagedBy, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_ENVIRONMENTS_TYPE_1_MANAGED_BY_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_destroy_functionalities_response.py b/rootly_sdk/models/bulk_destroy_functionalities_response.py new file mode 100644 index 00000000..07bfc6d7 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData + + +T = TypeVar("T", bound="BulkDestroyFunctionalitiesResponse") + + +@_attrs_define +class BulkDestroyFunctionalitiesResponse: + """ + Attributes: + data (BulkDestroyFunctionalitiesResponseData | Unset): + """ + + data: BulkDestroyFunctionalitiesResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyFunctionalitiesResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyFunctionalitiesResponseData.from_dict(_data) + + bulk_destroy_functionalities_response = cls( + data=data, + ) + + bulk_destroy_functionalities_response.additional_properties = d + return bulk_destroy_functionalities_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_functionalities_response_data.py b/rootly_sdk/models/bulk_destroy_functionalities_response_data.py new file mode 100644 index 00000000..09696126 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_response_data.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyFunctionalitiesResponseData") + + +@_attrs_define +class BulkDestroyFunctionalitiesResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_functionalities_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_functionalities_response_data.additional_properties = d + return bulk_destroy_functionalities_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_functionalities_type_0.py b/rootly_sdk/models/bulk_destroy_functionalities_type_0.py new file mode 100644 index 00000000..3d848f82 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_type_0.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="BulkDestroyFunctionalitiesType0") + + +@_attrs_define +class BulkDestroyFunctionalitiesType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_functionalities_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_functionalities_type_0 diff --git a/rootly_sdk/models/bulk_destroy_functionalities_type_1.py b/rootly_sdk/models/bulk_destroy_functionalities_type_1.py new file mode 100644 index 00000000..f26f768a --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_type_1.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.bulk_destroy_functionalities_type_1_managed_by import ( + BulkDestroyFunctionalitiesType1ManagedBy, + check_bulk_destroy_functionalities_type_1_managed_by, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyFunctionalitiesType1") + + +@_attrs_define +class BulkDestroyFunctionalitiesType1: + """ + Attributes: + managed_by (BulkDestroyFunctionalitiesType1ManagedBy): Delete all records with this managed_by value + (web/admin_web not allowed). + keep_external_ids (list[str] | Unset): Records with these external_ids are preserved. + """ + + managed_by: BulkDestroyFunctionalitiesType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_functionalities_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_functionalities_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_functionalities_type_1 diff --git a/rootly_sdk/models/bulk_destroy_functionalities_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_functionalities_type_1_managed_by.py new file mode 100644 index 00000000..b0afb919 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_type_1_managed_by.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +BulkDestroyFunctionalitiesType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_FUNCTIONALITIES_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyFunctionalitiesType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_functionalities_type_1_managed_by( + value: str | None, +) -> BulkDestroyFunctionalitiesType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_FUNCTIONALITIES_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyFunctionalitiesType1ManagedBy, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_FUNCTIONALITIES_TYPE_1_MANAGED_BY_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_destroy_services_response.py b/rootly_sdk/models/bulk_destroy_services_response.py new file mode 100644 index 00000000..74550d05 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_destroy_services_response_data import BulkDestroyServicesResponseData + + +T = TypeVar("T", bound="BulkDestroyServicesResponse") + + +@_attrs_define +class BulkDestroyServicesResponse: + """ + Attributes: + data (BulkDestroyServicesResponseData | Unset): + """ + + data: BulkDestroyServicesResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_destroy_services_response_data import BulkDestroyServicesResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyServicesResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyServicesResponseData.from_dict(_data) + + bulk_destroy_services_response = cls( + data=data, + ) + + bulk_destroy_services_response.additional_properties = d + return bulk_destroy_services_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_services_response_data.py b/rootly_sdk/models/bulk_destroy_services_response_data.py new file mode 100644 index 00000000..f1a02711 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_response_data.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyServicesResponseData") + + +@_attrs_define +class BulkDestroyServicesResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_services_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_services_response_data.additional_properties = d + return bulk_destroy_services_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_services_type_0.py b/rootly_sdk/models/bulk_destroy_services_type_0.py new file mode 100644 index 00000000..1c0b2be3 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_type_0.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="BulkDestroyServicesType0") + + +@_attrs_define +class BulkDestroyServicesType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_services_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_services_type_0 diff --git a/rootly_sdk/models/bulk_destroy_services_type_1.py b/rootly_sdk/models/bulk_destroy_services_type_1.py new file mode 100644 index 00000000..30af9e88 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_type_1.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.bulk_destroy_services_type_1_managed_by import ( + BulkDestroyServicesType1ManagedBy, + check_bulk_destroy_services_type_1_managed_by, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyServicesType1") + + +@_attrs_define +class BulkDestroyServicesType1: + """ + Attributes: + managed_by (BulkDestroyServicesType1ManagedBy): Delete all records with this managed_by value (web/admin_web not + allowed). + keep_external_ids (list[str] | Unset): Records with these external_ids are preserved. + """ + + managed_by: BulkDestroyServicesType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_services_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_services_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_services_type_1 diff --git a/rootly_sdk/models/bulk_destroy_services_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_services_type_1_managed_by.py new file mode 100644 index 00000000..a95baa65 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_type_1_managed_by.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkDestroyServicesType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_SERVICES_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyServicesType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_services_type_1_managed_by(value: str | None) -> BulkDestroyServicesType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_SERVICES_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyServicesType1ManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_SERVICES_TYPE_1_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/bulk_destroy_teams_response.py b/rootly_sdk/models/bulk_destroy_teams_response.py new file mode 100644 index 00000000..d84b0f6d --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData + + +T = TypeVar("T", bound="BulkDestroyTeamsResponse") + + +@_attrs_define +class BulkDestroyTeamsResponse: + """ + Attributes: + data (BulkDestroyTeamsResponseData | Unset): + """ + + data: BulkDestroyTeamsResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyTeamsResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyTeamsResponseData.from_dict(_data) + + bulk_destroy_teams_response = cls( + data=data, + ) + + bulk_destroy_teams_response.additional_properties = d + return bulk_destroy_teams_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_teams_response_data.py b/rootly_sdk/models/bulk_destroy_teams_response_data.py new file mode 100644 index 00000000..c4e2e3fc --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_response_data.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyTeamsResponseData") + + +@_attrs_define +class BulkDestroyTeamsResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_teams_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_teams_response_data.additional_properties = d + return bulk_destroy_teams_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_destroy_teams_type_0.py b/rootly_sdk/models/bulk_destroy_teams_type_0.py new file mode 100644 index 00000000..3e2eb0d5 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_type_0.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="BulkDestroyTeamsType0") + + +@_attrs_define +class BulkDestroyTeamsType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_teams_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_teams_type_0 diff --git a/rootly_sdk/models/bulk_destroy_teams_type_1.py b/rootly_sdk/models/bulk_destroy_teams_type_1.py new file mode 100644 index 00000000..881d654b --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_type_1.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.bulk_destroy_teams_type_1_managed_by import ( + BulkDestroyTeamsType1ManagedBy, + check_bulk_destroy_teams_type_1_managed_by, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkDestroyTeamsType1") + + +@_attrs_define +class BulkDestroyTeamsType1: + """ + Attributes: + managed_by (BulkDestroyTeamsType1ManagedBy): Delete all records with this managed_by value (web/admin_web not + allowed). + keep_external_ids (list[str] | Unset): Records with these external_ids are preserved. + """ + + managed_by: BulkDestroyTeamsType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_teams_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_teams_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_teams_type_1 diff --git a/rootly_sdk/models/bulk_destroy_teams_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_teams_type_1_managed_by.py new file mode 100644 index 00000000..8eaf2132 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_type_1_managed_by.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkDestroyTeamsType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_TEAMS_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyTeamsType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_teams_type_1_managed_by(value: str | None) -> BulkDestroyTeamsType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_TEAMS_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyTeamsType1ManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_TEAMS_TYPE_1_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities.py b/rootly_sdk/models/bulk_upsert_catalog_entities.py new file mode 100644 index 00000000..d6d87d56 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertCatalogEntities") + + +@_attrs_define +class BulkUpsertCatalogEntities: + """ + Attributes: + entities (list[BulkUpsertCatalogEntitiesEntitiesItem]): Array of catalog entities to upsert. Each must have an + external_id. Max 100 per request. external_ids must be unique within a batch. + """ + + entities: list[BulkUpsertCatalogEntitiesEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertCatalogEntitiesEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_catalog_entities = cls( + entities=entities, + ) + + bulk_upsert_catalog_entities.additional_properties = d + return bulk_upsert_catalog_entities + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py new file mode 100644 index 00000000..941d1738 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py @@ -0,0 +1,146 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_catalog_entities_entities_item_fields_item import ( + BulkUpsertCatalogEntitiesEntitiesItemFieldsItem, + ) + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesEntitiesItem") + + +@_attrs_define +class BulkUpsertCatalogEntitiesEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Must be unique within the catalog. + name (str | Unset): Required for new entities. Optional for updates (managed-fields: omitted attributes are + preserved). + description (None | str | Unset): + backstage_id (None | str | Unset): + fields (list[BulkUpsertCatalogEntitiesEntitiesItemFieldsItem] | Unset): Property values for this entity. Only + mentioned fields are written; unmentioned fields are preserved. + """ + + external_id: str + name: str | Unset = UNSET + description: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + fields: list[BulkUpsertCatalogEntitiesEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + fields: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + fields.append(fields_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_catalog_entities_entities_item_fields_item import ( + BulkUpsertCatalogEntitiesEntitiesItemFieldsItem, + ) + + d = dict(src_dict) + external_id = d.pop("external_id") + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertCatalogEntitiesEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertCatalogEntitiesEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_catalog_entities_entities_item = cls( + external_id=external_id, + name=name, + description=description, + backstage_id=backstage_id, + fields=fields, + ) + + bulk_upsert_catalog_entities_entities_item.additional_properties = d + return bulk_upsert_catalog_entities_entities_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py new file mode 100644 index 00000000..4ee249c4 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertCatalogEntitiesEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + if catalog_property_id is not UNSET: + field_dict["catalog_property_id"] = catalog_property_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_catalog_entities_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_catalog_entities_entities_item_fields_item.additional_properties = d + return bulk_upsert_catalog_entities_entities_item_fields_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_error.py b/rootly_sdk/models/bulk_upsert_catalog_entities_error.py new file mode 100644 index 00000000..ef8ea3cd --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_error.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesError") + + +@_attrs_define +class BulkUpsertCatalogEntitiesError: + """ + Attributes: + errors (list[BulkUpsertCatalogEntitiesErrorErrorsItem]): + """ + + errors: list[BulkUpsertCatalogEntitiesErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertCatalogEntitiesErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_catalog_entities_error = cls( + errors=errors, + ) + + bulk_upsert_catalog_entities_error.additional_properties = d + return bulk_upsert_catalog_entities_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py new file mode 100644 index 00000000..996410a2 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesErrorErrorsItem") + + +@_attrs_define +class BulkUpsertCatalogEntitiesErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed entity in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_catalog_entities_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_catalog_entities_error_errors_item.additional_properties = d + return bulk_upsert_catalog_entities_error_errors_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_response.py b/rootly_sdk/models/bulk_upsert_catalog_entities_response.py new file mode 100644 index 00000000..41ada9ec --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesResponse") + + +@_attrs_define +class BulkUpsertCatalogEntitiesResponse: + """ + Attributes: + data (list[BulkUpsertCatalogEntitiesResponseDataItem] | Unset): + """ + + data: list[BulkUpsertCatalogEntitiesResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertCatalogEntitiesResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertCatalogEntitiesResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_catalog_entities_response = cls( + data=data, + ) + + bulk_upsert_catalog_entities_response.additional_properties = d + return bulk_upsert_catalog_entities_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py new file mode 100644 index 00000000..17df9577 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.bulk_upsert_catalog_entities_response_data_item_type import ( + BulkUpsertCatalogEntitiesResponseDataItemType, + check_bulk_upsert_catalog_entities_response_data_item_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_entity import CatalogEntity + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesResponseDataItem") + + +@_attrs_define +class BulkUpsertCatalogEntitiesResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertCatalogEntitiesResponseDataItemType | Unset): + attributes (CatalogEntity | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertCatalogEntitiesResponseDataItemType | Unset = UNSET + attributes: CatalogEntity | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity import CatalogEntity + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertCatalogEntitiesResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_catalog_entities_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: CatalogEntity | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = CatalogEntity.from_dict(_attributes) + + bulk_upsert_catalog_entities_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_catalog_entities_response_data_item.additional_properties = d + return bulk_upsert_catalog_entities_response_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item_type.py new file mode 100644 index 00000000..fbfd77d2 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkUpsertCatalogEntitiesResponseDataItemType = Literal["catalog_entities"] + +BULK_UPSERT_CATALOG_ENTITIES_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertCatalogEntitiesResponseDataItemType] = { + "catalog_entities", +} + + +def check_bulk_upsert_catalog_entities_response_data_item_type( + value: str | None, +) -> BulkUpsertCatalogEntitiesResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_CATALOG_ENTITIES_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertCatalogEntitiesResponseDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_CATALOG_ENTITIES_RESPONSE_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_upsert_environments.py b/rootly_sdk/models/bulk_upsert_environments.py new file mode 100644 index 00000000..8b79a7f4 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertEnvironments") + + +@_attrs_define +class BulkUpsertEnvironments: + """ + Attributes: + entities (list[BulkUpsertEnvironmentsEntitiesItem]): Environments to upsert, matched by external_id. Max 100 per + request; external_ids unique within a batch. Only attributes present are written (managed-fields semantics). + """ + + entities: list[BulkUpsertEnvironmentsEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertEnvironmentsEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_environments = cls( + entities=entities, + ) + + bulk_upsert_environments.additional_properties = d + return bulk_upsert_environments + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_environments_entities_item.py b/rootly_sdk/models/bulk_upsert_environments_entities_item.py new file mode 100644 index 00000000..fc203929 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_entities_item.py @@ -0,0 +1,194 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_environments_entities_item_fields_item import BulkUpsertEnvironmentsEntitiesItemFieldsItem + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsEntitiesItem") + + +@_attrs_define +class BulkUpsertEnvironmentsEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Unique per team. + name (str | Unset): Required for new records. Optional for updates. + description (None | str | Unset): + color (None | str | Unset): + position (int | None | Unset): + notify_emails (list[str] | None | Unset): + fields (list[BulkUpsertEnvironmentsEntitiesItemFieldsItem] | Unset): Catalog property values (merge semantics: + only mentioned fields written). + """ + + external_id: str + name: str | Unset = UNSET + description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + fields: list[BulkUpsertEnvironmentsEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + notify_emails: list[str] | None | Unset + if isinstance(self.notify_emails, Unset): + notify_emails = UNSET + elif isinstance(self.notify_emails, list): + notify_emails = self.notify_emails + + else: + notify_emails = self.notify_emails + + fields: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + fields.append(fields_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if color is not UNSET: + field_dict["color"] = color + if position is not UNSET: + field_dict["position"] = position + if notify_emails is not UNSET: + field_dict["notify_emails"] = notify_emails + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_environments_entities_item_fields_item import ( + BulkUpsertEnvironmentsEntitiesItemFieldsItem, + ) + + d = dict(src_dict) + external_id = d.pop("external_id") + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + def _parse_notify_emails(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notify_emails_type_0 = cast(list[str], data) + + return notify_emails_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertEnvironmentsEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertEnvironmentsEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_environments_entities_item = cls( + external_id=external_id, + name=name, + description=description, + color=color, + position=position, + notify_emails=notify_emails, + fields=fields, + ) + + bulk_upsert_environments_entities_item.additional_properties = d + return bulk_upsert_environments_entities_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py new file mode 100644 index 00000000..a2fb5f0b --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkUpsertEnvironmentsEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertEnvironmentsEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + if catalog_property_id is not UNSET: + field_dict["catalog_property_id"] = catalog_property_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_environments_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_environments_entities_item_fields_item.additional_properties = d + return bulk_upsert_environments_entities_item_fields_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_environments_error.py b/rootly_sdk/models/bulk_upsert_environments_error.py new file mode 100644 index 00000000..38e7490e --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_error.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsError") + + +@_attrs_define +class BulkUpsertEnvironmentsError: + """ + Attributes: + errors (list[BulkUpsertEnvironmentsErrorErrorsItem]): + """ + + errors: list[BulkUpsertEnvironmentsErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertEnvironmentsErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_environments_error = cls( + errors=errors, + ) + + bulk_upsert_environments_error.additional_properties = d + return bulk_upsert_environments_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py b/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py new file mode 100644 index 00000000..39c9c7b2 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkUpsertEnvironmentsErrorErrorsItem") + + +@_attrs_define +class BulkUpsertEnvironmentsErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed record in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_environments_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_environments_error_errors_item.additional_properties = d + return bulk_upsert_environments_error_errors_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_environments_response.py b/rootly_sdk/models/bulk_upsert_environments_response.py new file mode 100644 index 00000000..3e7032dc --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsResponse") + + +@_attrs_define +class BulkUpsertEnvironmentsResponse: + """ + Attributes: + data (list[BulkUpsertEnvironmentsResponseDataItem] | Unset): + """ + + data: list[BulkUpsertEnvironmentsResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertEnvironmentsResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertEnvironmentsResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_environments_response = cls( + data=data, + ) + + bulk_upsert_environments_response.additional_properties = d + return bulk_upsert_environments_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_environments_response_data_item.py b/rootly_sdk/models/bulk_upsert_environments_response_data_item.py new file mode 100644 index 00000000..57f2a594 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_response_data_item.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.bulk_upsert_environments_response_data_item_type import ( + BulkUpsertEnvironmentsResponseDataItemType, + check_bulk_upsert_environments_response_data_item_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.environment import Environment + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsResponseDataItem") + + +@_attrs_define +class BulkUpsertEnvironmentsResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertEnvironmentsResponseDataItemType | Unset): + attributes (Environment | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertEnvironmentsResponseDataItemType | Unset = UNSET + attributes: Environment | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.environment import Environment + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertEnvironmentsResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_environments_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: Environment | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = Environment.from_dict(_attributes) + + bulk_upsert_environments_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_environments_response_data_item.additional_properties = d + return bulk_upsert_environments_response_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_environments_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_environments_response_data_item_type.py new file mode 100644 index 00000000..dde45699 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_response_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkUpsertEnvironmentsResponseDataItemType = Literal["environments"] + +BULK_UPSERT_ENVIRONMENTS_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertEnvironmentsResponseDataItemType] = { + "environments", +} + + +def check_bulk_upsert_environments_response_data_item_type( + value: str | None, +) -> BulkUpsertEnvironmentsResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_ENVIRONMENTS_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertEnvironmentsResponseDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_ENVIRONMENTS_RESPONSE_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_upsert_functionalities.py b/rootly_sdk/models/bulk_upsert_functionalities.py new file mode 100644 index 00000000..31332a66 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertFunctionalities") + + +@_attrs_define +class BulkUpsertFunctionalities: + """ + Attributes: + entities (list[BulkUpsertFunctionalitiesEntitiesItem]): Functionalities to upsert, matched by external_id. Max + 100 per request; external_ids unique within a batch. Only attributes present are written (managed-fields + semantics). + """ + + entities: list[BulkUpsertFunctionalitiesEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertFunctionalitiesEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_functionalities = cls( + entities=entities, + ) + + bulk_upsert_functionalities.additional_properties = d + return bulk_upsert_functionalities + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py b/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py new file mode 100644 index 00000000..e0dc2dec --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py @@ -0,0 +1,396 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_functionalities_entities_item_fields_item import ( + BulkUpsertFunctionalitiesEntitiesItemFieldsItem, + ) + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesEntitiesItem") + + +@_attrs_define +class BulkUpsertFunctionalitiesEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Unique per team. + name (str | Unset): Required for new records. Optional for updates. + description (None | str | Unset): + public_description (None | str | Unset): + color (None | str | Unset): + position (int | None | Unset): + show_uptime (bool | None | Unset): + show_uptime_last_days (int | None | Unset): + notify_emails (list[str] | None | Unset): + pagerduty_id (None | str | Unset): + opsgenie_id (None | str | Unset): + opsgenie_team_id (None | str | Unset): + backstage_id (None | str | Unset): + cortex_id (None | str | Unset): + opslevel_id (None | str | Unset): + service_now_ci_sys_id (None | str | Unset): + fields (list[BulkUpsertFunctionalitiesEntitiesItemFieldsItem] | Unset): Catalog property values (merge + semantics: only mentioned fields written). + """ + + external_id: str + name: str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + opsgenie_team_id: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + opslevel_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + fields: list[BulkUpsertFunctionalitiesEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + public_description: None | str | Unset + if isinstance(self.public_description, Unset): + public_description = UNSET + else: + public_description = self.public_description + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + show_uptime: bool | None | Unset + if isinstance(self.show_uptime, Unset): + show_uptime = UNSET + else: + show_uptime = self.show_uptime + + show_uptime_last_days: int | None | Unset + if isinstance(self.show_uptime_last_days, Unset): + show_uptime_last_days = UNSET + else: + show_uptime_last_days = self.show_uptime_last_days + + notify_emails: list[str] | None | Unset + if isinstance(self.notify_emails, Unset): + notify_emails = UNSET + elif isinstance(self.notify_emails, list): + notify_emails = self.notify_emails + + else: + notify_emails = self.notify_emails + + pagerduty_id: None | str | Unset + if isinstance(self.pagerduty_id, Unset): + pagerduty_id = UNSET + else: + pagerduty_id = self.pagerduty_id + + opsgenie_id: None | str | Unset + if isinstance(self.opsgenie_id, Unset): + opsgenie_id = UNSET + else: + opsgenie_id = self.opsgenie_id + + opsgenie_team_id: None | str | Unset + if isinstance(self.opsgenie_team_id, Unset): + opsgenie_team_id = UNSET + else: + opsgenie_team_id = self.opsgenie_team_id + + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + cortex_id: None | str | Unset + if isinstance(self.cortex_id, Unset): + cortex_id = UNSET + else: + cortex_id = self.cortex_id + + opslevel_id: None | str | Unset + if isinstance(self.opslevel_id, Unset): + opslevel_id = UNSET + else: + opslevel_id = self.opslevel_id + + service_now_ci_sys_id: None | str | Unset + if isinstance(self.service_now_ci_sys_id, Unset): + service_now_ci_sys_id = UNSET + else: + service_now_ci_sys_id = self.service_now_ci_sys_id + + fields: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + fields.append(fields_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if public_description is not UNSET: + field_dict["public_description"] = public_description + if color is not UNSET: + field_dict["color"] = color + if position is not UNSET: + field_dict["position"] = position + if show_uptime is not UNSET: + field_dict["show_uptime"] = show_uptime + if show_uptime_last_days is not UNSET: + field_dict["show_uptime_last_days"] = show_uptime_last_days + if notify_emails is not UNSET: + field_dict["notify_emails"] = notify_emails + if pagerduty_id is not UNSET: + field_dict["pagerduty_id"] = pagerduty_id + if opsgenie_id is not UNSET: + field_dict["opsgenie_id"] = opsgenie_id + if opsgenie_team_id is not UNSET: + field_dict["opsgenie_team_id"] = opsgenie_team_id + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if cortex_id is not UNSET: + field_dict["cortex_id"] = cortex_id + if opslevel_id is not UNSET: + field_dict["opslevel_id"] = opslevel_id + if service_now_ci_sys_id is not UNSET: + field_dict["service_now_ci_sys_id"] = service_now_ci_sys_id + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_functionalities_entities_item_fields_item import ( + BulkUpsertFunctionalitiesEntitiesItemFieldsItem, + ) + + d = dict(src_dict) + external_id = d.pop("external_id") + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_public_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + public_description = _parse_public_description(d.pop("public_description", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + def _parse_show_uptime(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) + + def _parse_show_uptime_last_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + show_uptime_last_days = _parse_show_uptime_last_days(d.pop("show_uptime_last_days", UNSET)) + + def _parse_notify_emails(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notify_emails_type_0 = cast(list[str], data) + + return notify_emails_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) + + def _parse_pagerduty_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) + + def _parse_opsgenie_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) + + def _parse_opsgenie_team_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opsgenie_team_id = _parse_opsgenie_team_id(d.pop("opsgenie_team_id", UNSET)) + + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_cortex_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) + + def _parse_opslevel_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opslevel_id = _parse_opslevel_id(d.pop("opslevel_id", UNSET)) + + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertFunctionalitiesEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertFunctionalitiesEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_functionalities_entities_item = cls( + external_id=external_id, + name=name, + description=description, + public_description=public_description, + color=color, + position=position, + show_uptime=show_uptime, + show_uptime_last_days=show_uptime_last_days, + notify_emails=notify_emails, + pagerduty_id=pagerduty_id, + opsgenie_id=opsgenie_id, + opsgenie_team_id=opsgenie_team_id, + backstage_id=backstage_id, + cortex_id=cortex_id, + opslevel_id=opslevel_id, + service_now_ci_sys_id=service_now_ci_sys_id, + fields=fields, + ) + + bulk_upsert_functionalities_entities_item.additional_properties = d + return bulk_upsert_functionalities_entities_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py new file mode 100644 index 00000000..f56126ce --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertFunctionalitiesEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + if catalog_property_id is not UNSET: + field_dict["catalog_property_id"] = catalog_property_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_functionalities_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_functionalities_entities_item_fields_item.additional_properties = d + return bulk_upsert_functionalities_entities_item_fields_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_functionalities_error.py b/rootly_sdk/models/bulk_upsert_functionalities_error.py new file mode 100644 index 00000000..2c93c715 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_error.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesError") + + +@_attrs_define +class BulkUpsertFunctionalitiesError: + """ + Attributes: + errors (list[BulkUpsertFunctionalitiesErrorErrorsItem]): + """ + + errors: list[BulkUpsertFunctionalitiesErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertFunctionalitiesErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_functionalities_error = cls( + errors=errors, + ) + + bulk_upsert_functionalities_error.additional_properties = d + return bulk_upsert_functionalities_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py b/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py new file mode 100644 index 00000000..8ae7ae2e --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesErrorErrorsItem") + + +@_attrs_define +class BulkUpsertFunctionalitiesErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed record in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_functionalities_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_functionalities_error_errors_item.additional_properties = d + return bulk_upsert_functionalities_error_errors_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_functionalities_response.py b/rootly_sdk/models/bulk_upsert_functionalities_response.py new file mode 100644 index 00000000..1318338b --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesResponse") + + +@_attrs_define +class BulkUpsertFunctionalitiesResponse: + """ + Attributes: + data (list[BulkUpsertFunctionalitiesResponseDataItem] | Unset): + """ + + data: list[BulkUpsertFunctionalitiesResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertFunctionalitiesResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertFunctionalitiesResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_functionalities_response = cls( + data=data, + ) + + bulk_upsert_functionalities_response.additional_properties = d + return bulk_upsert_functionalities_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py new file mode 100644 index 00000000..a96ca1af --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.bulk_upsert_functionalities_response_data_item_type import ( + BulkUpsertFunctionalitiesResponseDataItemType, + check_bulk_upsert_functionalities_response_data_item_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.functionality import Functionality + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesResponseDataItem") + + +@_attrs_define +class BulkUpsertFunctionalitiesResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertFunctionalitiesResponseDataItemType | Unset): + attributes (Functionality | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertFunctionalitiesResponseDataItemType | Unset = UNSET + attributes: Functionality | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.functionality import Functionality + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertFunctionalitiesResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_functionalities_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: Functionality | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = Functionality.from_dict(_attributes) + + bulk_upsert_functionalities_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_functionalities_response_data_item.additional_properties = d + return bulk_upsert_functionalities_response_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_functionalities_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item_type.py new file mode 100644 index 00000000..b1cdac0f --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkUpsertFunctionalitiesResponseDataItemType = Literal["functionalities"] + +BULK_UPSERT_FUNCTIONALITIES_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertFunctionalitiesResponseDataItemType] = { + "functionalities", +} + + +def check_bulk_upsert_functionalities_response_data_item_type( + value: str | None, +) -> BulkUpsertFunctionalitiesResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_FUNCTIONALITIES_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertFunctionalitiesResponseDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_FUNCTIONALITIES_RESPONSE_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_upsert_services.py b/rootly_sdk/models/bulk_upsert_services.py new file mode 100644 index 00000000..e027c8be --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertServices") + + +@_attrs_define +class BulkUpsertServices: + """ + Attributes: + entities (list[BulkUpsertServicesEntitiesItem]): Services to upsert, matched by external_id. Max 100 per + request; external_ids unique within a batch. Only attributes present are written (managed-fields semantics). + """ + + entities: list[BulkUpsertServicesEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertServicesEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_services = cls( + entities=entities, + ) + + bulk_upsert_services.additional_properties = d + return bulk_upsert_services + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_services_entities_item.py b/rootly_sdk/models/bulk_upsert_services_entities_item.py new file mode 100644 index 00000000..9c8d36e8 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_entities_item.py @@ -0,0 +1,512 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem + + +T = TypeVar("T", bound="BulkUpsertServicesEntitiesItem") + + +@_attrs_define +class BulkUpsertServicesEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Unique per team. + name (str | Unset): Required for new records. Optional for updates. + description (None | str | Unset): + public_description (None | str | Unset): + color (None | str | Unset): + position (int | None | Unset): + show_uptime (bool | None | Unset): + show_uptime_last_days (int | None | Unset): + github_repository_name (None | str | Unset): + github_repository_branch (None | str | Unset): + gitlab_repository_name (None | str | Unset): + gitlab_repository_branch (None | str | Unset): + kubernetes_deployment_name (None | str | Unset): + pagerduty_id (None | str | Unset): + opsgenie_id (None | str | Unset): + opsgenie_team_id (None | str | Unset): + cortex_id (None | str | Unset): + opslevel_id (None | str | Unset): + backstage_id (None | str | Unset): + service_now_ci_sys_id (None | str | Unset): + notify_emails (list[str] | None | Unset): + alerts_email_enabled (bool | None | Unset): + fields (list[BulkUpsertServicesEntitiesItemFieldsItem] | Unset): Catalog property values (merge semantics: only + mentioned fields written). + """ + + external_id: str + name: str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: int | None | Unset = UNSET + github_repository_name: None | str | Unset = UNSET + github_repository_branch: None | str | Unset = UNSET + gitlab_repository_name: None | str | Unset = UNSET + gitlab_repository_branch: None | str | Unset = UNSET + kubernetes_deployment_name: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + opsgenie_team_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + opslevel_id: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + fields: list[BulkUpsertServicesEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + public_description: None | str | Unset + if isinstance(self.public_description, Unset): + public_description = UNSET + else: + public_description = self.public_description + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + show_uptime: bool | None | Unset + if isinstance(self.show_uptime, Unset): + show_uptime = UNSET + else: + show_uptime = self.show_uptime + + show_uptime_last_days: int | None | Unset + if isinstance(self.show_uptime_last_days, Unset): + show_uptime_last_days = UNSET + else: + show_uptime_last_days = self.show_uptime_last_days + + github_repository_name: None | str | Unset + if isinstance(self.github_repository_name, Unset): + github_repository_name = UNSET + else: + github_repository_name = self.github_repository_name + + github_repository_branch: None | str | Unset + if isinstance(self.github_repository_branch, Unset): + github_repository_branch = UNSET + else: + github_repository_branch = self.github_repository_branch + + gitlab_repository_name: None | str | Unset + if isinstance(self.gitlab_repository_name, Unset): + gitlab_repository_name = UNSET + else: + gitlab_repository_name = self.gitlab_repository_name + + gitlab_repository_branch: None | str | Unset + if isinstance(self.gitlab_repository_branch, Unset): + gitlab_repository_branch = UNSET + else: + gitlab_repository_branch = self.gitlab_repository_branch + + kubernetes_deployment_name: None | str | Unset + if isinstance(self.kubernetes_deployment_name, Unset): + kubernetes_deployment_name = UNSET + else: + kubernetes_deployment_name = self.kubernetes_deployment_name + + pagerduty_id: None | str | Unset + if isinstance(self.pagerduty_id, Unset): + pagerduty_id = UNSET + else: + pagerduty_id = self.pagerduty_id + + opsgenie_id: None | str | Unset + if isinstance(self.opsgenie_id, Unset): + opsgenie_id = UNSET + else: + opsgenie_id = self.opsgenie_id + + opsgenie_team_id: None | str | Unset + if isinstance(self.opsgenie_team_id, Unset): + opsgenie_team_id = UNSET + else: + opsgenie_team_id = self.opsgenie_team_id + + cortex_id: None | str | Unset + if isinstance(self.cortex_id, Unset): + cortex_id = UNSET + else: + cortex_id = self.cortex_id + + opslevel_id: None | str | Unset + if isinstance(self.opslevel_id, Unset): + opslevel_id = UNSET + else: + opslevel_id = self.opslevel_id + + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + service_now_ci_sys_id: None | str | Unset + if isinstance(self.service_now_ci_sys_id, Unset): + service_now_ci_sys_id = UNSET + else: + service_now_ci_sys_id = self.service_now_ci_sys_id + + notify_emails: list[str] | None | Unset + if isinstance(self.notify_emails, Unset): + notify_emails = UNSET + elif isinstance(self.notify_emails, list): + notify_emails = self.notify_emails + + else: + notify_emails = self.notify_emails + + alerts_email_enabled: bool | None | Unset + if isinstance(self.alerts_email_enabled, Unset): + alerts_email_enabled = UNSET + else: + alerts_email_enabled = self.alerts_email_enabled + + fields: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + fields.append(fields_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if public_description is not UNSET: + field_dict["public_description"] = public_description + if color is not UNSET: + field_dict["color"] = color + if position is not UNSET: + field_dict["position"] = position + if show_uptime is not UNSET: + field_dict["show_uptime"] = show_uptime + if show_uptime_last_days is not UNSET: + field_dict["show_uptime_last_days"] = show_uptime_last_days + if github_repository_name is not UNSET: + field_dict["github_repository_name"] = github_repository_name + if github_repository_branch is not UNSET: + field_dict["github_repository_branch"] = github_repository_branch + if gitlab_repository_name is not UNSET: + field_dict["gitlab_repository_name"] = gitlab_repository_name + if gitlab_repository_branch is not UNSET: + field_dict["gitlab_repository_branch"] = gitlab_repository_branch + if kubernetes_deployment_name is not UNSET: + field_dict["kubernetes_deployment_name"] = kubernetes_deployment_name + if pagerduty_id is not UNSET: + field_dict["pagerduty_id"] = pagerduty_id + if opsgenie_id is not UNSET: + field_dict["opsgenie_id"] = opsgenie_id + if opsgenie_team_id is not UNSET: + field_dict["opsgenie_team_id"] = opsgenie_team_id + if cortex_id is not UNSET: + field_dict["cortex_id"] = cortex_id + if opslevel_id is not UNSET: + field_dict["opslevel_id"] = opslevel_id + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if service_now_ci_sys_id is not UNSET: + field_dict["service_now_ci_sys_id"] = service_now_ci_sys_id + if notify_emails is not UNSET: + field_dict["notify_emails"] = notify_emails + if alerts_email_enabled is not UNSET: + field_dict["alerts_email_enabled"] = alerts_email_enabled + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem + + d = dict(src_dict) + external_id = d.pop("external_id") + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_public_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + public_description = _parse_public_description(d.pop("public_description", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + def _parse_show_uptime(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) + + def _parse_show_uptime_last_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + show_uptime_last_days = _parse_show_uptime_last_days(d.pop("show_uptime_last_days", UNSET)) + + def _parse_github_repository_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + github_repository_name = _parse_github_repository_name(d.pop("github_repository_name", UNSET)) + + def _parse_github_repository_branch(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + github_repository_branch = _parse_github_repository_branch(d.pop("github_repository_branch", UNSET)) + + def _parse_gitlab_repository_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + gitlab_repository_name = _parse_gitlab_repository_name(d.pop("gitlab_repository_name", UNSET)) + + def _parse_gitlab_repository_branch(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + gitlab_repository_branch = _parse_gitlab_repository_branch(d.pop("gitlab_repository_branch", UNSET)) + + def _parse_kubernetes_deployment_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + kubernetes_deployment_name = _parse_kubernetes_deployment_name(d.pop("kubernetes_deployment_name", UNSET)) + + def _parse_pagerduty_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) + + def _parse_opsgenie_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) + + def _parse_opsgenie_team_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opsgenie_team_id = _parse_opsgenie_team_id(d.pop("opsgenie_team_id", UNSET)) + + def _parse_cortex_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) + + def _parse_opslevel_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opslevel_id = _parse_opslevel_id(d.pop("opslevel_id", UNSET)) + + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) + + def _parse_notify_emails(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notify_emails_type_0 = cast(list[str], data) + + return notify_emails_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) + + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertServicesEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertServicesEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_services_entities_item = cls( + external_id=external_id, + name=name, + description=description, + public_description=public_description, + color=color, + position=position, + show_uptime=show_uptime, + show_uptime_last_days=show_uptime_last_days, + github_repository_name=github_repository_name, + github_repository_branch=github_repository_branch, + gitlab_repository_name=gitlab_repository_name, + gitlab_repository_branch=gitlab_repository_branch, + kubernetes_deployment_name=kubernetes_deployment_name, + pagerduty_id=pagerduty_id, + opsgenie_id=opsgenie_id, + opsgenie_team_id=opsgenie_team_id, + cortex_id=cortex_id, + opslevel_id=opslevel_id, + backstage_id=backstage_id, + service_now_ci_sys_id=service_now_ci_sys_id, + notify_emails=notify_emails, + alerts_email_enabled=alerts_email_enabled, + fields=fields, + ) + + bulk_upsert_services_entities_item.additional_properties = d + return bulk_upsert_services_entities_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py new file mode 100644 index 00000000..1c8f31dc --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkUpsertServicesEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertServicesEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + if catalog_property_id is not UNSET: + field_dict["catalog_property_id"] = catalog_property_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_services_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_services_entities_item_fields_item.additional_properties = d + return bulk_upsert_services_entities_item_fields_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_services_error.py b/rootly_sdk/models/bulk_upsert_services_error.py new file mode 100644 index 00000000..2c96bf7d --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_error.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertServicesError") + + +@_attrs_define +class BulkUpsertServicesError: + """ + Attributes: + errors (list[BulkUpsertServicesErrorErrorsItem]): + """ + + errors: list[BulkUpsertServicesErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertServicesErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_services_error = cls( + errors=errors, + ) + + bulk_upsert_services_error.additional_properties = d + return bulk_upsert_services_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_services_error_errors_item.py b/rootly_sdk/models/bulk_upsert_services_error_errors_item.py new file mode 100644 index 00000000..8fb6bac4 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_error_errors_item.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkUpsertServicesErrorErrorsItem") + + +@_attrs_define +class BulkUpsertServicesErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed record in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_services_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_services_error_errors_item.additional_properties = d + return bulk_upsert_services_error_errors_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_services_response.py b/rootly_sdk/models/bulk_upsert_services_response.py new file mode 100644 index 00000000..60959ba7 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertServicesResponse") + + +@_attrs_define +class BulkUpsertServicesResponse: + """ + Attributes: + data (list[BulkUpsertServicesResponseDataItem] | Unset): + """ + + data: list[BulkUpsertServicesResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertServicesResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertServicesResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_services_response = cls( + data=data, + ) + + bulk_upsert_services_response.additional_properties = d + return bulk_upsert_services_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_services_response_data_item.py b/rootly_sdk/models/bulk_upsert_services_response_data_item.py new file mode 100644 index 00000000..a57b5d08 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_response_data_item.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.bulk_upsert_services_response_data_item_type import ( + BulkUpsertServicesResponseDataItemType, + check_bulk_upsert_services_response_data_item_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.service import Service + + +T = TypeVar("T", bound="BulkUpsertServicesResponseDataItem") + + +@_attrs_define +class BulkUpsertServicesResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertServicesResponseDataItemType | Unset): + attributes (Service | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertServicesResponseDataItemType | Unset = UNSET + attributes: Service | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service import Service + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertServicesResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_services_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: Service | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = Service.from_dict(_attributes) + + bulk_upsert_services_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_services_response_data_item.additional_properties = d + return bulk_upsert_services_response_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_services_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_services_response_data_item_type.py new file mode 100644 index 00000000..92736645 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_response_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkUpsertServicesResponseDataItemType = Literal["services"] + +BULK_UPSERT_SERVICES_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertServicesResponseDataItemType] = { + "services", +} + + +def check_bulk_upsert_services_response_data_item_type( + value: str | None, +) -> BulkUpsertServicesResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_SERVICES_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertServicesResponseDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_SERVICES_RESPONSE_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_upsert_teams.py b/rootly_sdk/models/bulk_upsert_teams.py new file mode 100644 index 00000000..8495037f --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertTeams") + + +@_attrs_define +class BulkUpsertTeams: + """ + Attributes: + entities (list[BulkUpsertTeamsEntitiesItem]): Teams to upsert, matched by external_id. Max 100 per request; + external_ids unique within a batch. Only attributes present are written (managed-fields semantics). + """ + + entities: list[BulkUpsertTeamsEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertTeamsEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_teams = cls( + entities=entities, + ) + + bulk_upsert_teams.additional_properties = d + return bulk_upsert_teams + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_teams_entities_item.py b/rootly_sdk/models/bulk_upsert_teams_entities_item.py new file mode 100644 index 00000000..2f881903 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_entities_item.py @@ -0,0 +1,392 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem + + +T = TypeVar("T", bound="BulkUpsertTeamsEntitiesItem") + + +@_attrs_define +class BulkUpsertTeamsEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Unique per team. + name (str | Unset): Required for new records. Optional for updates. + description (None | str | Unset): + color (None | str | Unset): + position (int | None | Unset): + notify_emails (list[str] | None | Unset): + pagerduty_id (None | str | Unset): + pagerduty_service_id (None | str | Unset): + opsgenie_id (None | str | Unset): + victor_ops_id (None | str | Unset): + pagertree_id (None | str | Unset): + backstage_id (None | str | Unset): + cortex_id (None | str | Unset): + opslevel_id (None | str | Unset): + service_now_ci_sys_id (None | str | Unset): + alerts_email_enabled (bool | None | Unset): + fields (list[BulkUpsertTeamsEntitiesItemFieldsItem] | Unset): Catalog property values (merge semantics: only + mentioned fields written). + """ + + external_id: str + name: str | Unset = UNSET + description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + pagerduty_service_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + victor_ops_id: None | str | Unset = UNSET + pagertree_id: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + opslevel_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + fields: list[BulkUpsertTeamsEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + notify_emails: list[str] | None | Unset + if isinstance(self.notify_emails, Unset): + notify_emails = UNSET + elif isinstance(self.notify_emails, list): + notify_emails = self.notify_emails + + else: + notify_emails = self.notify_emails + + pagerduty_id: None | str | Unset + if isinstance(self.pagerduty_id, Unset): + pagerduty_id = UNSET + else: + pagerduty_id = self.pagerduty_id + + pagerduty_service_id: None | str | Unset + if isinstance(self.pagerduty_service_id, Unset): + pagerduty_service_id = UNSET + else: + pagerduty_service_id = self.pagerduty_service_id + + opsgenie_id: None | str | Unset + if isinstance(self.opsgenie_id, Unset): + opsgenie_id = UNSET + else: + opsgenie_id = self.opsgenie_id + + victor_ops_id: None | str | Unset + if isinstance(self.victor_ops_id, Unset): + victor_ops_id = UNSET + else: + victor_ops_id = self.victor_ops_id + + pagertree_id: None | str | Unset + if isinstance(self.pagertree_id, Unset): + pagertree_id = UNSET + else: + pagertree_id = self.pagertree_id + + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + cortex_id: None | str | Unset + if isinstance(self.cortex_id, Unset): + cortex_id = UNSET + else: + cortex_id = self.cortex_id + + opslevel_id: None | str | Unset + if isinstance(self.opslevel_id, Unset): + opslevel_id = UNSET + else: + opslevel_id = self.opslevel_id + + service_now_ci_sys_id: None | str | Unset + if isinstance(self.service_now_ci_sys_id, Unset): + service_now_ci_sys_id = UNSET + else: + service_now_ci_sys_id = self.service_now_ci_sys_id + + alerts_email_enabled: bool | None | Unset + if isinstance(self.alerts_email_enabled, Unset): + alerts_email_enabled = UNSET + else: + alerts_email_enabled = self.alerts_email_enabled + + fields: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + fields.append(fields_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if color is not UNSET: + field_dict["color"] = color + if position is not UNSET: + field_dict["position"] = position + if notify_emails is not UNSET: + field_dict["notify_emails"] = notify_emails + if pagerduty_id is not UNSET: + field_dict["pagerduty_id"] = pagerduty_id + if pagerduty_service_id is not UNSET: + field_dict["pagerduty_service_id"] = pagerduty_service_id + if opsgenie_id is not UNSET: + field_dict["opsgenie_id"] = opsgenie_id + if victor_ops_id is not UNSET: + field_dict["victor_ops_id"] = victor_ops_id + if pagertree_id is not UNSET: + field_dict["pagertree_id"] = pagertree_id + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if cortex_id is not UNSET: + field_dict["cortex_id"] = cortex_id + if opslevel_id is not UNSET: + field_dict["opslevel_id"] = opslevel_id + if service_now_ci_sys_id is not UNSET: + field_dict["service_now_ci_sys_id"] = service_now_ci_sys_id + if alerts_email_enabled is not UNSET: + field_dict["alerts_email_enabled"] = alerts_email_enabled + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem + + d = dict(src_dict) + external_id = d.pop("external_id") + + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + def _parse_notify_emails(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notify_emails_type_0 = cast(list[str], data) + + return notify_emails_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) + + def _parse_pagerduty_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) + + def _parse_pagerduty_service_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pagerduty_service_id = _parse_pagerduty_service_id(d.pop("pagerduty_service_id", UNSET)) + + def _parse_opsgenie_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) + + def _parse_victor_ops_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + victor_ops_id = _parse_victor_ops_id(d.pop("victor_ops_id", UNSET)) + + def _parse_pagertree_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pagertree_id = _parse_pagertree_id(d.pop("pagertree_id", UNSET)) + + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_cortex_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) + + def _parse_opslevel_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opslevel_id = _parse_opslevel_id(d.pop("opslevel_id", UNSET)) + + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) + + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertTeamsEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertTeamsEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_teams_entities_item = cls( + external_id=external_id, + name=name, + description=description, + color=color, + position=position, + notify_emails=notify_emails, + pagerduty_id=pagerduty_id, + pagerduty_service_id=pagerduty_service_id, + opsgenie_id=opsgenie_id, + victor_ops_id=victor_ops_id, + pagertree_id=pagertree_id, + backstage_id=backstage_id, + cortex_id=cortex_id, + opslevel_id=opslevel_id, + service_now_ci_sys_id=service_now_ci_sys_id, + alerts_email_enabled=alerts_email_enabled, + fields=fields, + ) + + bulk_upsert_teams_entities_item.additional_properties = d + return bulk_upsert_teams_entities_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py new file mode 100644 index 00000000..72057a8f --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BulkUpsertTeamsEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertTeamsEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + if catalog_property_id is not UNSET: + field_dict["catalog_property_id"] = catalog_property_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_teams_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_teams_entities_item_fields_item.additional_properties = d + return bulk_upsert_teams_entities_item_fields_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_teams_error.py b/rootly_sdk/models/bulk_upsert_teams_error.py new file mode 100644 index 00000000..1c23d188 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_error.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertTeamsError") + + +@_attrs_define +class BulkUpsertTeamsError: + """ + Attributes: + errors (list[BulkUpsertTeamsErrorErrorsItem]): + """ + + errors: list[BulkUpsertTeamsErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertTeamsErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_teams_error = cls( + errors=errors, + ) + + bulk_upsert_teams_error.additional_properties = d + return bulk_upsert_teams_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py b/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py new file mode 100644 index 00000000..bb7cffdc --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="BulkUpsertTeamsErrorErrorsItem") + + +@_attrs_define +class BulkUpsertTeamsErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed record in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_teams_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_teams_error_errors_item.additional_properties = d + return bulk_upsert_teams_error_errors_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_teams_response.py b/rootly_sdk/models/bulk_upsert_teams_response.py new file mode 100644 index 00000000..6080b412 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_response.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertTeamsResponse") + + +@_attrs_define +class BulkUpsertTeamsResponse: + """ + Attributes: + data (list[BulkUpsertTeamsResponseDataItem] | Unset): + """ + + data: list[BulkUpsertTeamsResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertTeamsResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertTeamsResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_teams_response = cls( + data=data, + ) + + bulk_upsert_teams_response.additional_properties = d + return bulk_upsert_teams_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_teams_response_data_item.py b/rootly_sdk/models/bulk_upsert_teams_response_data_item.py new file mode 100644 index 00000000..16ccb481 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_response_data_item.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.bulk_upsert_teams_response_data_item_type import ( + BulkUpsertTeamsResponseDataItemType, + check_bulk_upsert_teams_response_data_item_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.team import Team + + +T = TypeVar("T", bound="BulkUpsertTeamsResponseDataItem") + + +@_attrs_define +class BulkUpsertTeamsResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertTeamsResponseDataItemType | Unset): + attributes (Team | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertTeamsResponseDataItemType | Unset = UNSET + attributes: Team | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.team import Team + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertTeamsResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_teams_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: Team | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = Team.from_dict(_attributes) + + bulk_upsert_teams_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_teams_response_data_item.additional_properties = d + return bulk_upsert_teams_response_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/bulk_upsert_teams_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_teams_response_data_item_type.py new file mode 100644 index 00000000..623914c5 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_response_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +BulkUpsertTeamsResponseDataItemType = Literal["groups"] + +BULK_UPSERT_TEAMS_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertTeamsResponseDataItemType] = { + "groups", +} + + +def check_bulk_upsert_teams_response_data_item_type(value: str | None) -> BulkUpsertTeamsResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_TEAMS_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertTeamsResponseDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_TEAMS_RESPONSE_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/cancel_incident.py b/rootly_sdk/models/cancel_incident.py index 4db0d2c6..d8a65df4 100644 --- a/rootly_sdk/models/cancel_incident.py +++ b/rootly_sdk/models/cancel_incident.py @@ -24,6 +24,7 @@ class CancelIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/cancel_incident_data.py b/rootly_sdk/models/cancel_incident_data.py index 7dd184bb..3e06852a 100644 --- a/rootly_sdk/models/cancel_incident_data.py +++ b/rootly_sdk/models/cancel_incident_data.py @@ -28,6 +28,7 @@ class CancelIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/catalog.py b/rootly_sdk/models/catalog.py index 8f3a5b3e..97470165 100644 --- a/rootly_sdk/models/catalog.py +++ b/rootly_sdk/models/catalog.py @@ -7,6 +7,7 @@ from attrs import field as _attrs_field from ..models.catalog_icon import CatalogIcon, check_catalog_icon +from ..models.catalog_managed_by import CatalogManagedBy, check_catalog_managed_by from ..types import UNSET, Unset T = TypeVar("T", bound="Catalog") @@ -22,6 +23,8 @@ class Catalog: created_at (str): updated_at (str): description (None | str | Unset): + external_id (None | str | Unset): An external identifier for this catalog. Must be unique within the team. + managed_by (CatalogManagedBy | Unset): Which source manages this resource (read-only). """ name: str @@ -30,6 +33,8 @@ class Catalog: created_at: str updated_at: str description: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + managed_by: CatalogManagedBy | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,6 +55,16 @@ def to_dict(self) -> dict[str, Any]: else: description = self.description + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -63,6 +78,10 @@ def to_dict(self) -> dict[str, Any]: ) if description is not UNSET: field_dict["description"] = description + if external_id is not UNSET: + field_dict["external_id"] = external_id + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by return field_dict @@ -93,6 +112,22 @@ def _parse_description(data: object) -> None | str | Unset: description = _parse_description(d.pop("description", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _managed_by = d.pop("managed_by", UNSET) + managed_by: CatalogManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_catalog_managed_by(_managed_by) + catalog = cls( name=name, icon=icon, @@ -100,6 +135,8 @@ def _parse_description(data: object) -> None | str | Unset: created_at=created_at, updated_at=updated_at, description=description, + external_id=external_id, + managed_by=managed_by, ) catalog.additional_properties = d diff --git a/rootly_sdk/models/catalog_checklist_template.py b/rootly_sdk/models/catalog_checklist_template.py index db087dd2..44046997 100644 --- a/rootly_sdk/models/catalog_checklist_template.py +++ b/rootly_sdk/models/catalog_checklist_template.py @@ -53,6 +53,7 @@ class CatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name catalog_type: str = self.catalog_type diff --git a/rootly_sdk/models/catalog_checklist_template_list.py b/rootly_sdk/models/catalog_checklist_template_list.py index bcce7076..c0f7ee80 100644 --- a/rootly_sdk/models/catalog_checklist_template_list.py +++ b/rootly_sdk/models/catalog_checklist_template_list.py @@ -10,6 +10,7 @@ if TYPE_CHECKING: from ..models.catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +25,17 @@ class CatalogChecklistTemplateList: data (list[CatalogChecklistTemplateListDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogChecklistTemplateListDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +67,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +101,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_checklist_template_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_checklist_template_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_checklist_template_list_data_item.py b/rootly_sdk/models/catalog_checklist_template_list_data_item.py index 005c894f..be31006e 100644 --- a/rootly_sdk/models/catalog_checklist_template_list_data_item.py +++ b/rootly_sdk/models/catalog_checklist_template_list_data_item.py @@ -33,6 +33,7 @@ class CatalogChecklistTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_checklist_template_response.py b/rootly_sdk/models/catalog_checklist_template_response.py index e1fe20bf..c86b6fd4 100644 --- a/rootly_sdk/models/catalog_checklist_template_response.py +++ b/rootly_sdk/models/catalog_checklist_template_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogChecklistTemplateResponse") @@ -18,14 +21,24 @@ class CatalogChecklistTemplateResponse: """ Attributes: data (CatalogChecklistTemplateResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogChecklistTemplateResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogChecklistTemplateResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_checklist_template_response = cls( data=data, + included=included, ) catalog_checklist_template_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_checklist_template_response_data.py b/rootly_sdk/models/catalog_checklist_template_response_data.py index d58e7592..777c5a27 100644 --- a/rootly_sdk/models/catalog_checklist_template_response_data.py +++ b/rootly_sdk/models/catalog_checklist_template_response_data.py @@ -33,6 +33,7 @@ class CatalogChecklistTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity.py b/rootly_sdk/models/catalog_entity.py index e984d737..abd0a3b3 100644 --- a/rootly_sdk/models/catalog_entity.py +++ b/rootly_sdk/models/catalog_entity.py @@ -6,6 +6,7 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.catalog_entity_managed_by import CatalogEntityManagedBy, check_catalog_entity_managed_by from ..types import UNSET, Unset if TYPE_CHECKING: @@ -24,6 +25,10 @@ class CatalogEntity: created_at (str): updated_at (str): description (None | str | Unset): + backstage_id (None | str | Unset): The Backstage entity ID this catalog entity is linked to. + external_id (None | str | Unset): An external identifier for this catalog entity. Must be unique within the + catalog. + managed_by (CatalogEntityManagedBy | Unset): Which source manages this resource (read-only). properties (list[CatalogEntityPropertiesItem] | Unset): Array of property values for this catalog entity """ @@ -32,10 +37,14 @@ class CatalogEntity: created_at: str updated_at: str description: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + managed_by: CatalogEntityManagedBy | Unset = UNSET properties: list[CatalogEntityPropertiesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name position: int | None @@ -51,6 +60,22 @@ def to_dict(self) -> dict[str, Any]: else: description = self.description + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -70,6 +95,12 @@ def to_dict(self) -> dict[str, Any]: ) if description is not UNSET: field_dict["description"] = description + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if external_id is not UNSET: + field_dict["external_id"] = external_id + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by if properties is not UNSET: field_dict["properties"] = properties @@ -102,6 +133,31 @@ def _parse_description(data: object) -> None | str | Unset: description = _parse_description(d.pop("description", UNSET)) + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _managed_by = d.pop("managed_by", UNSET) + managed_by: CatalogEntityManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_catalog_entity_managed_by(_managed_by) + _properties = d.pop("properties", UNSET) properties: list[CatalogEntityPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -117,6 +173,9 @@ def _parse_description(data: object) -> None | str | Unset: created_at=created_at, updated_at=updated_at, description=description, + backstage_id=backstage_id, + external_id=external_id, + managed_by=managed_by, properties=properties, ) diff --git a/rootly_sdk/models/catalog_entity_checklist.py b/rootly_sdk/models/catalog_entity_checklist.py index e8d7db76..24f345bc 100644 --- a/rootly_sdk/models/catalog_entity_checklist.py +++ b/rootly_sdk/models/catalog_entity_checklist.py @@ -56,6 +56,7 @@ class CatalogEntityChecklist: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + catalog_checklist_template_id = self.catalog_checklist_template_id auditable_type: str = self.auditable_type diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item.py b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item.py index 760de6b0..6543fd4e 100644 --- a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item.py +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item.py @@ -28,6 +28,7 @@ class CatalogEntityChecklistChecklistFieldsType0Item: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data.py b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data.py index 99be75a9..577b41b2 100644 --- a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data.py +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data.py @@ -36,6 +36,7 @@ class CatalogEntityChecklistChecklistFieldsType0ItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str | Unset = UNSET diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item.py b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item.py index cfcef9a1..a0e411bc 100644 --- a/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item.py +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item.py @@ -28,6 +28,7 @@ class CatalogEntityChecklistChecklistOwnersType0Item: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data.py b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data.py index e873ed7a..b2e34423 100644 --- a/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data.py +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data.py @@ -36,6 +36,7 @@ class CatalogEntityChecklistChecklistOwnersType0ItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str | Unset = UNSET diff --git a/rootly_sdk/models/catalog_entity_checklist_list.py b/rootly_sdk/models/catalog_entity_checklist_list.py index f7e46d19..2eaf2854 100644 --- a/rootly_sdk/models/catalog_entity_checklist_list.py +++ b/rootly_sdk/models/catalog_entity_checklist_list.py @@ -10,6 +10,7 @@ if TYPE_CHECKING: from ..models.catalog_entity_checklist_list_data_item import CatalogEntityChecklistListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +25,17 @@ class CatalogEntityChecklistList: data (list[CatalogEntityChecklistListDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogEntityChecklistListDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +67,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_checklist_list_data_item import CatalogEntityChecklistListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +101,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_checklist_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_entity_checklist_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_checklist_list_data_item.py b/rootly_sdk/models/catalog_entity_checklist_list_data_item.py index 5ce9263e..4e904d00 100644 --- a/rootly_sdk/models/catalog_entity_checklist_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_checklist_list_data_item.py @@ -33,6 +33,7 @@ class CatalogEntityChecklistListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_checklist_response.py b/rootly_sdk/models/catalog_entity_checklist_response.py index 88e502b5..649544ff 100644 --- a/rootly_sdk/models/catalog_entity_checklist_response.py +++ b/rootly_sdk/models/catalog_entity_checklist_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_entity_checklist_response_data import CatalogEntityChecklistResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogEntityChecklistResponse") @@ -18,14 +21,24 @@ class CatalogEntityChecklistResponse: """ Attributes: data (CatalogEntityChecklistResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogEntityChecklistResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_checklist_response_data import CatalogEntityChecklistResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogEntityChecklistResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_checklist_response = cls( data=data, + included=included, ) catalog_entity_checklist_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_checklist_response_data.py b/rootly_sdk/models/catalog_entity_checklist_response_data.py index 8406b9e3..0f7379b9 100644 --- a/rootly_sdk/models/catalog_entity_checklist_response_data.py +++ b/rootly_sdk/models/catalog_entity_checklist_response_data.py @@ -33,6 +33,7 @@ class CatalogEntityChecklistResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_list.py b/rootly_sdk/models/catalog_entity_list.py index 4beee503..25ebef55 100644 --- a/rootly_sdk/models/catalog_entity_list.py +++ b/rootly_sdk/models/catalog_entity_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_entity_list_data_item import CatalogEntityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class CatalogEntityList: data (list[CatalogEntityListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogEntityListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_list_data_item import CatalogEntityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_entity_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_list_data_item.py b/rootly_sdk/models/catalog_entity_list_data_item.py index 5a17fc87..d6635a40 100644 --- a/rootly_sdk/models/catalog_entity_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_list_data_item.py @@ -33,6 +33,7 @@ class CatalogEntityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_managed_by.py b/rootly_sdk/models/catalog_entity_managed_by.py new file mode 100644 index 00000000..344958e6 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogEntityManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +CATALOG_ENTITY_MANAGED_BY_VALUES: set[CatalogEntityManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_catalog_entity_managed_by(value: str | None) -> CatalogEntityManagedBy | None: + if value is None: + return None + if value in CATALOG_ENTITY_MANAGED_BY_VALUES: + return cast(CatalogEntityManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_ENTITY_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/catalog_entity_property_list.py b/rootly_sdk/models/catalog_entity_property_list.py index 935a2814..ee46c1ca 100644 --- a/rootly_sdk/models/catalog_entity_property_list.py +++ b/rootly_sdk/models/catalog_entity_property_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_entity_property_list_data_item import CatalogEntityPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +27,17 @@ class CatalogEntityPropertyList: data (list[CatalogEntityPropertyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogEntityPropertyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -41,6 +47,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -50,12 +63,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_property_list_data_item import CatalogEntityPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -71,10 +87,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_property_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_entity_property_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_property_list_data_item.py b/rootly_sdk/models/catalog_entity_property_list_data_item.py index 283fee04..076db434 100644 --- a/rootly_sdk/models/catalog_entity_property_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_property_list_data_item.py @@ -35,6 +35,7 @@ class CatalogEntityPropertyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_property_response.py b/rootly_sdk/models/catalog_entity_property_response.py index 8d7907af..dcc92f35 100644 --- a/rootly_sdk/models/catalog_entity_property_response.py +++ b/rootly_sdk/models/catalog_entity_property_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_entity_property_response_data import CatalogEntityPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogEntityPropertyResponse") @@ -20,14 +23,24 @@ class CatalogEntityPropertyResponse: Attributes: data (CatalogEntityPropertyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogEntityPropertyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -35,18 +48,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_property_response_data import CatalogEntityPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogEntityPropertyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_property_response = cls( data=data, + included=included, ) catalog_entity_property_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_property_response_data.py b/rootly_sdk/models/catalog_entity_property_response_data.py index 197549c8..498e31c9 100644 --- a/rootly_sdk/models/catalog_entity_property_response_data.py +++ b/rootly_sdk/models/catalog_entity_property_response_data.py @@ -35,6 +35,7 @@ class CatalogEntityPropertyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_response.py b/rootly_sdk/models/catalog_entity_response.py index bf8fcf59..d4021d60 100644 --- a/rootly_sdk/models/catalog_entity_response.py +++ b/rootly_sdk/models/catalog_entity_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_entity_response_data import CatalogEntityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogEntityResponse") @@ -18,14 +21,24 @@ class CatalogEntityResponse: """ Attributes: data (CatalogEntityResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogEntityResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_response_data import CatalogEntityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogEntityResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_response = cls( data=data, + included=included, ) catalog_entity_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_response_data.py b/rootly_sdk/models/catalog_entity_response_data.py index d68be342..c94fce28 100644 --- a/rootly_sdk/models/catalog_entity_response_data.py +++ b/rootly_sdk/models/catalog_entity_response_data.py @@ -33,6 +33,7 @@ class CatalogEntityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_field.py b/rootly_sdk/models/catalog_field.py index 914f85eb..ec19027e 100644 --- a/rootly_sdk/models/catalog_field.py +++ b/rootly_sdk/models/catalog_field.py @@ -8,6 +8,7 @@ from ..models.catalog_field_catalog_type import CatalogFieldCatalogType, check_catalog_field_catalog_type from ..models.catalog_field_kind import CatalogFieldKind, check_catalog_field_kind +from ..models.catalog_field_managed_by import CatalogFieldManagedBy, check_catalog_field_managed_by from ..types import UNSET, Unset T = TypeVar("T", bound="CatalogField") @@ -28,6 +29,9 @@ class CatalogField: kind_catalog_id (None | str | Unset): Restricts values to items of specified catalog. required (bool | Unset): Whether the field is required. catalog_type (CatalogFieldCatalogType | Unset): The type of catalog the field belongs to. + external_id (None | str | Unset): An external identifier for this catalog field. Must be unique within the + scope. + managed_by (CatalogFieldManagedBy | Unset): Which source manages this resource (read-only). """ catalog_id: None | str @@ -41,6 +45,8 @@ class CatalogField: kind_catalog_id: None | str | Unset = UNSET required: bool | Unset = UNSET catalog_type: CatalogFieldCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET + managed_by: CatalogFieldManagedBy | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -74,6 +80,16 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -95,6 +111,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by return field_dict @@ -146,6 +166,22 @@ def _parse_kind_catalog_id(data: object) -> None | str | Unset: else: catalog_type = check_catalog_field_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _managed_by = d.pop("managed_by", UNSET) + managed_by: CatalogFieldManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_catalog_field_managed_by(_managed_by) + catalog_field = cls( catalog_id=catalog_id, name=name, @@ -158,6 +194,8 @@ def _parse_kind_catalog_id(data: object) -> None | str | Unset: kind_catalog_id=kind_catalog_id, required=required, catalog_type=catalog_type, + external_id=external_id, + managed_by=managed_by, ) catalog_field.additional_properties = d diff --git a/rootly_sdk/models/catalog_field_list.py b/rootly_sdk/models/catalog_field_list.py index 10bfa106..701ad0c1 100644 --- a/rootly_sdk/models/catalog_field_list.py +++ b/rootly_sdk/models/catalog_field_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_field_list_data_item import CatalogFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class CatalogFieldList: data (list[CatalogFieldListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogFieldListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_field_list_data_item import CatalogFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_field_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_field_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_field_list_data_item.py b/rootly_sdk/models/catalog_field_list_data_item.py index b5ed471d..682398fe 100644 --- a/rootly_sdk/models/catalog_field_list_data_item.py +++ b/rootly_sdk/models/catalog_field_list_data_item.py @@ -33,6 +33,7 @@ class CatalogFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_field_managed_by.py b/rootly_sdk/models/catalog_field_managed_by.py new file mode 100644 index 00000000..0764812c --- /dev/null +++ b/rootly_sdk/models/catalog_field_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogFieldManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +CATALOG_FIELD_MANAGED_BY_VALUES: set[CatalogFieldManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_catalog_field_managed_by(value: str | None) -> CatalogFieldManagedBy | None: + if value is None: + return None + if value in CATALOG_FIELD_MANAGED_BY_VALUES: + return cast(CatalogFieldManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_FIELD_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/catalog_field_response.py b/rootly_sdk/models/catalog_field_response.py index a4811f5a..28027488 100644 --- a/rootly_sdk/models/catalog_field_response.py +++ b/rootly_sdk/models/catalog_field_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_field_response_data import CatalogFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogFieldResponse") @@ -18,14 +21,24 @@ class CatalogFieldResponse: """ Attributes: data (CatalogFieldResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogFieldResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_field_response_data import CatalogFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogFieldResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_field_response = cls( data=data, + included=included, ) catalog_field_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_field_response_data.py b/rootly_sdk/models/catalog_field_response_data.py index fcec088c..8e7af968 100644 --- a/rootly_sdk/models/catalog_field_response_data.py +++ b/rootly_sdk/models/catalog_field_response_data.py @@ -33,6 +33,7 @@ class CatalogFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_list.py b/rootly_sdk/models/catalog_list.py index 9abab448..b08d4e29 100644 --- a/rootly_sdk/models/catalog_list.py +++ b/rootly_sdk/models/catalog_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_list_data_item import CatalogListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class CatalogList: data (list[CatalogListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_list_data_item import CatalogListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_list_data_item.py b/rootly_sdk/models/catalog_list_data_item.py index 64ef65d2..b571539d 100644 --- a/rootly_sdk/models/catalog_list_data_item.py +++ b/rootly_sdk/models/catalog_list_data_item.py @@ -30,6 +30,7 @@ class CatalogListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_managed_by.py b/rootly_sdk/models/catalog_managed_by.py new file mode 100644 index 00000000..00bcf025 --- /dev/null +++ b/rootly_sdk/models/catalog_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +CATALOG_MANAGED_BY_VALUES: set[CatalogManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_catalog_managed_by(value: str | None) -> CatalogManagedBy | None: + if value is None: + return None + if value in CATALOG_MANAGED_BY_VALUES: + return cast(CatalogManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/catalog_property.py b/rootly_sdk/models/catalog_property.py index 9d363915..290c5655 100644 --- a/rootly_sdk/models/catalog_property.py +++ b/rootly_sdk/models/catalog_property.py @@ -8,6 +8,7 @@ from ..models.catalog_property_catalog_type import CatalogPropertyCatalogType, check_catalog_property_catalog_type from ..models.catalog_property_kind import CatalogPropertyKind, check_catalog_property_kind +from ..models.catalog_property_managed_by import CatalogPropertyManagedBy, check_catalog_property_managed_by from ..types import UNSET, Unset T = TypeVar("T", bound="CatalogProperty") @@ -28,6 +29,9 @@ class CatalogProperty: kind_catalog_id (None | str | Unset): Restricts values to items of specified catalog. required (bool | Unset): Whether the property is required. catalog_type (CatalogPropertyCatalogType | Unset): The type of catalog the property belongs to. + external_id (None | str | Unset): An external identifier for this catalog property. Must be unique within the + scope. + managed_by (CatalogPropertyManagedBy | Unset): Which source manages this resource (read-only). """ catalog_id: None | str @@ -41,6 +45,8 @@ class CatalogProperty: kind_catalog_id: None | str | Unset = UNSET required: bool | Unset = UNSET catalog_type: CatalogPropertyCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET + managed_by: CatalogPropertyManagedBy | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -74,6 +80,16 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -95,6 +111,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by return field_dict @@ -146,6 +166,22 @@ def _parse_kind_catalog_id(data: object) -> None | str | Unset: else: catalog_type = check_catalog_property_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _managed_by = d.pop("managed_by", UNSET) + managed_by: CatalogPropertyManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_catalog_property_managed_by(_managed_by) + catalog_property = cls( catalog_id=catalog_id, name=name, @@ -158,6 +194,8 @@ def _parse_kind_catalog_id(data: object) -> None | str | Unset: kind_catalog_id=kind_catalog_id, required=required, catalog_type=catalog_type, + external_id=external_id, + managed_by=managed_by, ) catalog_property.additional_properties = d diff --git a/rootly_sdk/models/catalog_property_list.py b/rootly_sdk/models/catalog_property_list.py index 20ba1204..599d86d9 100644 --- a/rootly_sdk/models/catalog_property_list.py +++ b/rootly_sdk/models/catalog_property_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_property_list_data_item import CatalogPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class CatalogPropertyList: data (list[CatalogPropertyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogPropertyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_property_list_data_item import CatalogPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_property_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_property_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_property_list_data_item.py b/rootly_sdk/models/catalog_property_list_data_item.py index 992dea68..30b3a4f7 100644 --- a/rootly_sdk/models/catalog_property_list_data_item.py +++ b/rootly_sdk/models/catalog_property_list_data_item.py @@ -33,6 +33,7 @@ class CatalogPropertyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_property_managed_by.py b/rootly_sdk/models/catalog_property_managed_by.py new file mode 100644 index 00000000..d7f860e8 --- /dev/null +++ b/rootly_sdk/models/catalog_property_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogPropertyManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +CATALOG_PROPERTY_MANAGED_BY_VALUES: set[CatalogPropertyManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_catalog_property_managed_by(value: str | None) -> CatalogPropertyManagedBy | None: + if value is None: + return None + if value in CATALOG_PROPERTY_MANAGED_BY_VALUES: + return cast(CatalogPropertyManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_PROPERTY_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/catalog_property_response.py b/rootly_sdk/models/catalog_property_response.py index c23b9039..9487ea12 100644 --- a/rootly_sdk/models/catalog_property_response.py +++ b/rootly_sdk/models/catalog_property_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_property_response_data import CatalogPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogPropertyResponse") @@ -18,14 +21,24 @@ class CatalogPropertyResponse: """ Attributes: data (CatalogPropertyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogPropertyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_property_response_data import CatalogPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogPropertyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_property_response = cls( data=data, + included=included, ) catalog_property_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_property_response_data.py b/rootly_sdk/models/catalog_property_response_data.py index a5922b8d..97cf9c33 100644 --- a/rootly_sdk/models/catalog_property_response_data.py +++ b/rootly_sdk/models/catalog_property_response_data.py @@ -33,6 +33,7 @@ class CatalogPropertyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_response.py b/rootly_sdk/models/catalog_response.py index 9e034c2d..803acfef 100644 --- a/rootly_sdk/models/catalog_response.py +++ b/rootly_sdk/models/catalog_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_response_data import CatalogResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogResponse") @@ -18,14 +21,24 @@ class CatalogResponse: """ Attributes: data (CatalogResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_response_data import CatalogResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_response = cls( data=data, + included=included, ) catalog_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_response_data.py b/rootly_sdk/models/catalog_response_data.py index d4be5b4b..3043dcd1 100644 --- a/rootly_sdk/models/catalog_response_data.py +++ b/rootly_sdk/models/catalog_response_data.py @@ -30,6 +30,7 @@ class CatalogResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/cause.py b/rootly_sdk/models/cause.py index cdb7a08c..0f7cc7b6 100644 --- a/rootly_sdk/models/cause.py +++ b/rootly_sdk/models/cause.py @@ -38,6 +38,7 @@ class Cause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name created_at = self.created_at diff --git a/rootly_sdk/models/cause_list.py b/rootly_sdk/models/cause_list.py index e408bb35..09bf20ee 100644 --- a/rootly_sdk/models/cause_list.py +++ b/rootly_sdk/models/cause_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.cause_list_data_item import CauseListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class CauseList: data (list[CauseListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CauseListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.cause_list_data_item import CauseListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + cause_list = cls( data=data, links=links, meta=meta, + included=included, ) cause_list.additional_properties = d diff --git a/rootly_sdk/models/cause_list_data_item.py b/rootly_sdk/models/cause_list_data_item.py index 56624359..ab260383 100644 --- a/rootly_sdk/models/cause_list_data_item.py +++ b/rootly_sdk/models/cause_list_data_item.py @@ -30,6 +30,7 @@ class CauseListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/cause_response.py b/rootly_sdk/models/cause_response.py index 88e8eda4..5b7f1b42 100644 --- a/rootly_sdk/models/cause_response.py +++ b/rootly_sdk/models/cause_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.cause_response_data import CauseResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CauseResponse") @@ -18,14 +21,24 @@ class CauseResponse: """ Attributes: data (CauseResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CauseResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.cause_response_data import CauseResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CauseResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + cause_response = cls( data=data, + included=included, ) cause_response.additional_properties = d diff --git a/rootly_sdk/models/cause_response_data.py b/rootly_sdk/models/cause_response_data.py index 6249d136..26df2bb4 100644 --- a/rootly_sdk/models/cause_response_data.py +++ b/rootly_sdk/models/cause_response_data.py @@ -30,6 +30,7 @@ class CauseResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/change_google_chat_space_privacy_task_params.py b/rootly_sdk/models/change_google_chat_space_privacy_task_params.py new file mode 100644 index 00000000..b38539dc --- /dev/null +++ b/rootly_sdk/models/change_google_chat_space_privacy_task_params.py @@ -0,0 +1,113 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.change_google_chat_space_privacy_task_params_task_type import ( + ChangeGoogleChatSpacePrivacyTaskParamsTaskType, + check_change_google_chat_space_privacy_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.change_google_chat_space_privacy_task_params_space import ChangeGoogleChatSpacePrivacyTaskParamsSpace + + +T = TypeVar("T", bound="ChangeGoogleChatSpacePrivacyTaskParams") + + +@_attrs_define +class ChangeGoogleChatSpacePrivacyTaskParams: + """ + Attributes: + space (ChangeGoogleChatSpacePrivacyTaskParamsSpace): + task_type (ChangeGoogleChatSpacePrivacyTaskParamsTaskType | Unset): + audience (None | str | Unset): Target audience resource name (e.g. audiences/default). Leave blank to make + private. + """ + + space: ChangeGoogleChatSpacePrivacyTaskParamsSpace + task_type: ChangeGoogleChatSpacePrivacyTaskParamsTaskType | Unset = UNSET + audience: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + space = self.space.to_dict() + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + audience: None | str | Unset + if isinstance(self.audience, Unset): + audience = UNSET + else: + audience = self.audience + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "space": space, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if audience is not UNSET: + field_dict["audience"] = audience + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.change_google_chat_space_privacy_task_params_space import ( + ChangeGoogleChatSpacePrivacyTaskParamsSpace, + ) + + d = dict(src_dict) + space = ChangeGoogleChatSpacePrivacyTaskParamsSpace.from_dict(d.pop("space")) + + _task_type = d.pop("task_type", UNSET) + task_type: ChangeGoogleChatSpacePrivacyTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_change_google_chat_space_privacy_task_params_task_type(_task_type) + + def _parse_audience(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + audience = _parse_audience(d.pop("audience", UNSET)) + + change_google_chat_space_privacy_task_params = cls( + space=space, + task_type=task_type, + audience=audience, + ) + + change_google_chat_space_privacy_task_params.additional_properties = d + return change_google_chat_space_privacy_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py b/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py new file mode 100644 index 00000000..cf4c0984 --- /dev/null +++ b/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ChangeGoogleChatSpacePrivacyTaskParamsSpace") + + +@_attrs_define +class ChangeGoogleChatSpacePrivacyTaskParamsSpace: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + change_google_chat_space_privacy_task_params_space = cls( + id=id, + name=name, + ) + + change_google_chat_space_privacy_task_params_space.additional_properties = d + return change_google_chat_space_privacy_task_params_space + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/change_google_chat_space_privacy_task_params_task_type.py b/rootly_sdk/models/change_google_chat_space_privacy_task_params_task_type.py new file mode 100644 index 00000000..df9d0a4c --- /dev/null +++ b/rootly_sdk/models/change_google_chat_space_privacy_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +ChangeGoogleChatSpacePrivacyTaskParamsTaskType = Literal["change_google_chat_space_privacy"] + +CHANGE_GOOGLE_CHAT_SPACE_PRIVACY_TASK_PARAMS_TASK_TYPE_VALUES: set[ChangeGoogleChatSpacePrivacyTaskParamsTaskType] = { + "change_google_chat_space_privacy", +} + + +def check_change_google_chat_space_privacy_task_params_task_type( + value: str | None, +) -> ChangeGoogleChatSpacePrivacyTaskParamsTaskType | None: + if value is None: + return None + if value in CHANGE_GOOGLE_CHAT_SPACE_PRIVACY_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(ChangeGoogleChatSpacePrivacyTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CHANGE_GOOGLE_CHAT_SPACE_PRIVACY_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/change_slack_channel_privacy_task_params.py b/rootly_sdk/models/change_slack_channel_privacy_task_params.py index f812ce4b..58c10e84 100644 --- a/rootly_sdk/models/change_slack_channel_privacy_task_params.py +++ b/rootly_sdk/models/change_slack_channel_privacy_task_params.py @@ -27,38 +27,36 @@ class ChangeSlackChannelPrivacyTaskParams: """ Attributes: + channel (ChangeSlackChannelPrivacyTaskParamsChannel): privacy (ChangeSlackChannelPrivacyTaskParamsPrivacy): task_type (ChangeSlackChannelPrivacyTaskParamsTaskType | Unset): - channel (ChangeSlackChannelPrivacyTaskParamsChannel | Unset): """ + channel: ChangeSlackChannelPrivacyTaskParamsChannel privacy: ChangeSlackChannelPrivacyTaskParamsPrivacy task_type: ChangeSlackChannelPrivacyTaskParamsTaskType | Unset = UNSET - channel: ChangeSlackChannelPrivacyTaskParamsChannel | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + + channel = self.channel.to_dict() + privacy: str = self.privacy task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - channel: dict[str, Any] | Unset = UNSET - if not isinstance(self.channel, Unset): - channel = self.channel.to_dict() - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { + "channel": channel, "privacy": privacy, } ) if task_type is not UNSET: field_dict["task_type"] = task_type - if channel is not UNSET: - field_dict["channel"] = channel return field_dict @@ -67,6 +65,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.change_slack_channel_privacy_task_params_channel import ChangeSlackChannelPrivacyTaskParamsChannel d = dict(src_dict) + channel = ChangeSlackChannelPrivacyTaskParamsChannel.from_dict(d.pop("channel")) + privacy = check_change_slack_channel_privacy_task_params_privacy(d.pop("privacy")) _task_type = d.pop("task_type", UNSET) @@ -76,17 +76,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: task_type = check_change_slack_channel_privacy_task_params_task_type(_task_type) - _channel = d.pop("channel", UNSET) - channel: ChangeSlackChannelPrivacyTaskParamsChannel | Unset - if isinstance(_channel, Unset): - channel = UNSET - else: - channel = ChangeSlackChannelPrivacyTaskParamsChannel.from_dict(_channel) - change_slack_channel_privacy_task_params = cls( + channel=channel, privacy=privacy, task_type=task_type, - channel=channel, ) change_slack_channel_privacy_task_params.additional_properties = d diff --git a/rootly_sdk/models/change_slack_channel_privacy_task_params_task_type.py b/rootly_sdk/models/change_slack_channel_privacy_task_params_task_type.py index b2c9e4ea..bd967611 100644 --- a/rootly_sdk/models/change_slack_channel_privacy_task_params_task_type.py +++ b/rootly_sdk/models/change_slack_channel_privacy_task_params_task_type.py @@ -1,9 +1,9 @@ from typing import Literal, cast -ChangeSlackChannelPrivacyTaskParamsTaskType = Literal["rename_slack_channel"] +ChangeSlackChannelPrivacyTaskParamsTaskType = Literal["change_slack_channel_privacy"] CHANGE_SLACK_CHANNEL_PRIVACY_TASK_PARAMS_TASK_TYPE_VALUES: set[ChangeSlackChannelPrivacyTaskParamsTaskType] = { - "rename_slack_channel", + "change_slack_channel_privacy", } diff --git a/rootly_sdk/models/communications_group.py b/rootly_sdk/models/communications_group.py index 1c187a2a..a6028858 100644 --- a/rootly_sdk/models/communications_group.py +++ b/rootly_sdk/models/communications_group.py @@ -67,6 +67,7 @@ class CommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name communication_type_id = self.communication_type_id diff --git a/rootly_sdk/models/communications_group_response.py b/rootly_sdk/models/communications_group_response.py index ba98fbdd..b5a5b73d 100644 --- a/rootly_sdk/models/communications_group_response.py +++ b/rootly_sdk/models/communications_group_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.communications_group_response_data import CommunicationsGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CommunicationsGroupResponse") @@ -18,14 +21,24 @@ class CommunicationsGroupResponse: """ Attributes: data (CommunicationsGroupResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CommunicationsGroupResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_group_response_data import CommunicationsGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CommunicationsGroupResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_group_response = cls( data=data, + included=included, ) communications_group_response.additional_properties = d diff --git a/rootly_sdk/models/communications_group_response_data.py b/rootly_sdk/models/communications_group_response_data.py index 3b64c804..348403a7 100644 --- a/rootly_sdk/models/communications_group_response_data.py +++ b/rootly_sdk/models/communications_group_response_data.py @@ -33,6 +33,7 @@ class CommunicationsGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_groups_response.py b/rootly_sdk/models/communications_groups_response.py index 64e7c7a3..073a891b 100644 --- a/rootly_sdk/models/communications_groups_response.py +++ b/rootly_sdk/models/communications_groups_response.py @@ -10,6 +10,7 @@ if TYPE_CHECKING: from ..models.communications_groups_response_data_item import CommunicationsGroupsResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +25,17 @@ class CommunicationsGroupsResponse: data (list[CommunicationsGroupsResponseDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CommunicationsGroupsResponseDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +67,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_groups_response_data_item import CommunicationsGroupsResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +101,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_groups_response = cls( data=data, links=links, meta=meta, + included=included, ) communications_groups_response.additional_properties = d diff --git a/rootly_sdk/models/communications_groups_response_data_item.py b/rootly_sdk/models/communications_groups_response_data_item.py index ee9f830d..9aa6b3cd 100644 --- a/rootly_sdk/models/communications_groups_response_data_item.py +++ b/rootly_sdk/models/communications_groups_response_data_item.py @@ -33,6 +33,7 @@ class CommunicationsGroupsResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_stage_response.py b/rootly_sdk/models/communications_stage_response.py index b031c5b6..4fd84073 100644 --- a/rootly_sdk/models/communications_stage_response.py +++ b/rootly_sdk/models/communications_stage_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.communications_stage_response_data import CommunicationsStageResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CommunicationsStageResponse") @@ -18,14 +21,24 @@ class CommunicationsStageResponse: """ Attributes: data (CommunicationsStageResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CommunicationsStageResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_stage_response_data import CommunicationsStageResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CommunicationsStageResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_stage_response = cls( data=data, + included=included, ) communications_stage_response.additional_properties = d diff --git a/rootly_sdk/models/communications_stage_response_data.py b/rootly_sdk/models/communications_stage_response_data.py index 4d7295dd..740ecf53 100644 --- a/rootly_sdk/models/communications_stage_response_data.py +++ b/rootly_sdk/models/communications_stage_response_data.py @@ -33,6 +33,7 @@ class CommunicationsStageResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_stages_response.py b/rootly_sdk/models/communications_stages_response.py index 2df29ea0..bc18ddc2 100644 --- a/rootly_sdk/models/communications_stages_response.py +++ b/rootly_sdk/models/communications_stages_response.py @@ -10,6 +10,7 @@ if TYPE_CHECKING: from ..models.communications_stages_response_data_item import CommunicationsStagesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +25,17 @@ class CommunicationsStagesResponse: data (list[CommunicationsStagesResponseDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CommunicationsStagesResponseDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +67,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_stages_response_data_item import CommunicationsStagesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +101,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_stages_response = cls( data=data, links=links, meta=meta, + included=included, ) communications_stages_response.additional_properties = d diff --git a/rootly_sdk/models/communications_stages_response_data_item.py b/rootly_sdk/models/communications_stages_response_data_item.py index f4cf324c..08d91cc3 100644 --- a/rootly_sdk/models/communications_stages_response_data_item.py +++ b/rootly_sdk/models/communications_stages_response_data_item.py @@ -33,6 +33,7 @@ class CommunicationsStagesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_template.py b/rootly_sdk/models/communications_template.py index ec359696..6e9b9007 100644 --- a/rootly_sdk/models/communications_template.py +++ b/rootly_sdk/models/communications_template.py @@ -48,6 +48,7 @@ class CommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name position: int | None diff --git a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item.py b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item.py index 08867b37..1d8c4f18 100644 --- a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item.py +++ b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item.py @@ -28,6 +28,7 @@ class CommunicationsTemplateCommunicationTemplateStagesType0Item: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data.py b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data.py index 8b36ddcb..0999ec29 100644 --- a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data.py +++ b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data.py @@ -36,6 +36,7 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str | Unset = UNSET diff --git a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes.py b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes.py index 4f9dcc5b..1d91175b 100644 --- a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes.py +++ b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes.py @@ -51,6 +51,7 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + email_body: None | str | Unset if isinstance(self.email_body, Unset): email_body = UNSET diff --git a/rootly_sdk/models/communications_template_response.py b/rootly_sdk/models/communications_template_response.py index 84eda97a..ad97411a 100644 --- a/rootly_sdk/models/communications_template_response.py +++ b/rootly_sdk/models/communications_template_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.communications_template_response_data import CommunicationsTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CommunicationsTemplateResponse") @@ -18,14 +21,24 @@ class CommunicationsTemplateResponse: """ Attributes: data (CommunicationsTemplateResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CommunicationsTemplateResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_template_response_data import CommunicationsTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CommunicationsTemplateResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_template_response = cls( data=data, + included=included, ) communications_template_response.additional_properties = d diff --git a/rootly_sdk/models/communications_template_response_data.py b/rootly_sdk/models/communications_template_response_data.py index 0149545c..a5f60679 100644 --- a/rootly_sdk/models/communications_template_response_data.py +++ b/rootly_sdk/models/communications_template_response_data.py @@ -33,6 +33,7 @@ class CommunicationsTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_templates_response.py b/rootly_sdk/models/communications_templates_response.py index 85397b27..c8d4f769 100644 --- a/rootly_sdk/models/communications_templates_response.py +++ b/rootly_sdk/models/communications_templates_response.py @@ -10,6 +10,7 @@ if TYPE_CHECKING: from ..models.communications_templates_response_data_item import CommunicationsTemplatesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +25,17 @@ class CommunicationsTemplatesResponse: data (list[CommunicationsTemplatesResponseDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CommunicationsTemplatesResponseDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +67,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_templates_response_data_item import CommunicationsTemplatesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +101,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_templates_response = cls( data=data, links=links, meta=meta, + included=included, ) communications_templates_response.additional_properties = d diff --git a/rootly_sdk/models/communications_templates_response_data_item.py b/rootly_sdk/models/communications_templates_response_data_item.py index bc9e42bf..1c42e544 100644 --- a/rootly_sdk/models/communications_templates_response_data_item.py +++ b/rootly_sdk/models/communications_templates_response_data_item.py @@ -33,6 +33,7 @@ class CommunicationsTemplatesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_type_response.py b/rootly_sdk/models/communications_type_response.py index 1da7911a..87a0439a 100644 --- a/rootly_sdk/models/communications_type_response.py +++ b/rootly_sdk/models/communications_type_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.communications_type_response_data import CommunicationsTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CommunicationsTypeResponse") @@ -18,14 +21,24 @@ class CommunicationsTypeResponse: """ Attributes: data (CommunicationsTypeResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CommunicationsTypeResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_type_response_data import CommunicationsTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CommunicationsTypeResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_type_response = cls( data=data, + included=included, ) communications_type_response.additional_properties = d diff --git a/rootly_sdk/models/communications_type_response_data.py b/rootly_sdk/models/communications_type_response_data.py index 5d78c846..f37e6746 100644 --- a/rootly_sdk/models/communications_type_response_data.py +++ b/rootly_sdk/models/communications_type_response_data.py @@ -33,6 +33,7 @@ class CommunicationsTypeResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_types_response.py b/rootly_sdk/models/communications_types_response.py index 699a6aac..adbf3c58 100644 --- a/rootly_sdk/models/communications_types_response.py +++ b/rootly_sdk/models/communications_types_response.py @@ -10,6 +10,7 @@ if TYPE_CHECKING: from ..models.communications_types_response_data_item import CommunicationsTypesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +25,17 @@ class CommunicationsTypesResponse: data (list[CommunicationsTypesResponseDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CommunicationsTypesResponseDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +67,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_types_response_data_item import CommunicationsTypesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +101,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_types_response = cls( data=data, links=links, meta=meta, + included=included, ) communications_types_response.additional_properties = d diff --git a/rootly_sdk/models/communications_types_response_data_item.py b/rootly_sdk/models/communications_types_response_data_item.py index 22874284..21bd7214 100644 --- a/rootly_sdk/models/communications_types_response_data_item.py +++ b/rootly_sdk/models/communications_types_response_data_item.py @@ -33,6 +33,7 @@ class CommunicationsTypesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/create_airtable_table_record_task_params.py b/rootly_sdk/models/create_airtable_table_record_task_params.py index e1277c8a..61670f3d 100644 --- a/rootly_sdk/models/create_airtable_table_record_task_params.py +++ b/rootly_sdk/models/create_airtable_table_record_task_params.py @@ -38,6 +38,7 @@ class CreateAirtableTableRecordTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + base = self.base.to_dict() table = self.table.to_dict() diff --git a/rootly_sdk/models/create_anthropic_chat_completion_task_params.py b/rootly_sdk/models/create_anthropic_chat_completion_task_params.py index c6b4f284..fe2527e4 100644 --- a/rootly_sdk/models/create_anthropic_chat_completion_task_params.py +++ b/rootly_sdk/models/create_anthropic_chat_completion_task_params.py @@ -36,6 +36,7 @@ class CreateAnthropicChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + model = self.model.to_dict() prompt = self.prompt diff --git a/rootly_sdk/models/create_asana_subtask_task_params.py b/rootly_sdk/models/create_asana_subtask_task_params.py index 7e4076e8..3c379f45 100644 --- a/rootly_sdk/models/create_asana_subtask_task_params.py +++ b/rootly_sdk/models/create_asana_subtask_task_params.py @@ -53,6 +53,7 @@ class CreateAsanaSubtaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + parent_task_id = self.parent_task_id title = self.title diff --git a/rootly_sdk/models/create_asana_task_task_params.py b/rootly_sdk/models/create_asana_task_task_params.py index ca6f82fd..173324ea 100644 --- a/rootly_sdk/models/create_asana_task_task_params.py +++ b/rootly_sdk/models/create_asana_task_task_params.py @@ -57,6 +57,7 @@ class CreateAsanaTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + workspace = self.workspace.to_dict() projects = [] diff --git a/rootly_sdk/models/create_clickup_task_task_params.py b/rootly_sdk/models/create_clickup_task_task_params.py index 346f7454..9231249b 100644 --- a/rootly_sdk/models/create_clickup_task_task_params.py +++ b/rootly_sdk/models/create_clickup_task_task_params.py @@ -46,6 +46,7 @@ class CreateClickupTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/create_coda_page_task_params.py b/rootly_sdk/models/create_coda_page_task_params.py index 2579e2d2..4d8fb030 100644 --- a/rootly_sdk/models/create_coda_page_task_params.py +++ b/rootly_sdk/models/create_coda_page_task_params.py @@ -47,6 +47,7 @@ class CreateCodaPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/create_confluence_page_task_params.py b/rootly_sdk/models/create_confluence_page_task_params.py index f7923c9e..f1cb980e 100644 --- a/rootly_sdk/models/create_confluence_page_task_params.py +++ b/rootly_sdk/models/create_confluence_page_task_params.py @@ -36,6 +36,9 @@ class CreateConfluencePageTaskParams: content (str | Unset): The page content post_mortem_template_id (str | Unset): The Retrospective template to use mark_post_mortem_as_published (bool | Unset): Default: True. + include_overview (bool | Unset): Default: True. + include_timeline (bool | Unset): Default: True. + create_as_live_doc (bool | Unset): Default: False. """ space: CreateConfluencePageTaskParamsSpace @@ -47,9 +50,13 @@ class CreateConfluencePageTaskParams: content: str | Unset = UNSET post_mortem_template_id: str | Unset = UNSET mark_post_mortem_as_published: bool | Unset = True + include_overview: bool | Unset = True + include_timeline: bool | Unset = True + create_as_live_doc: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + space = self.space.to_dict() title = self.title @@ -76,6 +83,12 @@ def to_dict(self) -> dict[str, Any]: mark_post_mortem_as_published = self.mark_post_mortem_as_published + include_overview = self.include_overview + + include_timeline = self.include_timeline + + create_as_live_doc = self.create_as_live_doc + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -98,6 +111,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["post_mortem_template_id"] = post_mortem_template_id if mark_post_mortem_as_published is not UNSET: field_dict["mark_post_mortem_as_published"] = mark_post_mortem_as_published + if include_overview is not UNSET: + field_dict["include_overview"] = include_overview + if include_timeline is not UNSET: + field_dict["include_timeline"] = include_timeline + if create_as_live_doc is not UNSET: + field_dict["create_as_live_doc"] = create_as_live_doc return field_dict @@ -147,6 +166,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: mark_post_mortem_as_published = d.pop("mark_post_mortem_as_published", UNSET) + include_overview = d.pop("include_overview", UNSET) + + include_timeline = d.pop("include_timeline", UNSET) + + create_as_live_doc = d.pop("create_as_live_doc", UNSET) + create_confluence_page_task_params = cls( space=space, title=title, @@ -157,6 +182,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content=content, post_mortem_template_id=post_mortem_template_id, mark_post_mortem_as_published=mark_post_mortem_as_published, + include_overview=include_overview, + include_timeline=include_timeline, + create_as_live_doc=create_as_live_doc, ) create_confluence_page_task_params.additional_properties = d diff --git a/rootly_sdk/models/create_datadog_notebook_task_params.py b/rootly_sdk/models/create_datadog_notebook_task_params.py index d765ca54..02c1c0ae 100644 --- a/rootly_sdk/models/create_datadog_notebook_task_params.py +++ b/rootly_sdk/models/create_datadog_notebook_task_params.py @@ -46,6 +46,7 @@ class CreateDatadogNotebookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title kind: str = self.kind diff --git a/rootly_sdk/models/create_dropbox_paper_page_task_params.py b/rootly_sdk/models/create_dropbox_paper_page_task_params.py index ff1a1fdb..415cf46f 100644 --- a/rootly_sdk/models/create_dropbox_paper_page_task_params.py +++ b/rootly_sdk/models/create_dropbox_paper_page_task_params.py @@ -45,6 +45,7 @@ class CreateDropboxPaperPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/create_edge_connector_action_body.py b/rootly_sdk/models/create_edge_connector_action_body.py index ed3410af..72e8c61c 100644 --- a/rootly_sdk/models/create_edge_connector_action_body.py +++ b/rootly_sdk/models/create_edge_connector_action_body.py @@ -26,6 +26,7 @@ class CreateEdgeConnectorActionBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + action: dict[str, Any] | Unset = UNSET if not isinstance(self.action, Unset): action = self.action.to_dict() diff --git a/rootly_sdk/models/create_edge_connector_action_body_action.py b/rootly_sdk/models/create_edge_connector_action_body_action.py index 15620225..f8fedce0 100644 --- a/rootly_sdk/models/create_edge_connector_action_body_action.py +++ b/rootly_sdk/models/create_edge_connector_action_body_action.py @@ -34,6 +34,7 @@ class CreateEdgeConnectorActionBodyAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name action_type: str = self.action_type diff --git a/rootly_sdk/models/create_edge_connector_action_body_action_metadata.py b/rootly_sdk/models/create_edge_connector_action_body_action_metadata.py index b536dde0..46132686 100644 --- a/rootly_sdk/models/create_edge_connector_action_body_action_metadata.py +++ b/rootly_sdk/models/create_edge_connector_action_body_action_metadata.py @@ -32,6 +32,7 @@ class CreateEdgeConnectorActionBodyActionMetadata: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + description = self.description timeout = self.timeout diff --git a/rootly_sdk/models/create_edge_connector_body.py b/rootly_sdk/models/create_edge_connector_body.py index bfe6de95..26b01395 100644 --- a/rootly_sdk/models/create_edge_connector_body.py +++ b/rootly_sdk/models/create_edge_connector_body.py @@ -24,6 +24,7 @@ class CreateEdgeConnectorBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/create_edge_connector_body_data.py b/rootly_sdk/models/create_edge_connector_body_data.py index 77191b2b..a9d31183 100644 --- a/rootly_sdk/models/create_edge_connector_body_data.py +++ b/rootly_sdk/models/create_edge_connector_body_data.py @@ -31,6 +31,7 @@ class CreateEdgeConnectorBodyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/create_edge_connector_body_data_attributes.py b/rootly_sdk/models/create_edge_connector_body_data_attributes.py index 44b5844e..5731ed4c 100644 --- a/rootly_sdk/models/create_edge_connector_body_data_attributes.py +++ b/rootly_sdk/models/create_edge_connector_body_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,6 +12,10 @@ ) from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.create_edge_connector_body_data_attributes_filters import CreateEdgeConnectorBodyDataAttributesFilters + + T = TypeVar("T", bound="CreateEdgeConnectorBodyDataAttributes") @@ -23,15 +27,19 @@ class CreateEdgeConnectorBodyDataAttributes: description (str | Unset): Connector description status (CreateEdgeConnectorBodyDataAttributesStatus | Unset): Connector status subscriptions (list[str] | Unset): Array of event types to subscribe to + filters (CreateEdgeConnectorBodyDataAttributesFilters | Unset): Event filters. OR within dimension, AND across + dimensions. """ name: str description: str | Unset = UNSET status: CreateEdgeConnectorBodyDataAttributesStatus | Unset = UNSET subscriptions: list[str] | Unset = UNSET + filters: CreateEdgeConnectorBodyDataAttributesFilters | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name description = self.description @@ -44,6 +52,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions + filters: dict[str, Any] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = self.filters.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -57,11 +69,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["status"] = status if subscriptions is not UNSET: field_dict["subscriptions"] = subscriptions + if filters is not UNSET: + field_dict["filters"] = filters return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_edge_connector_body_data_attributes_filters import ( + CreateEdgeConnectorBodyDataAttributesFilters, + ) + d = dict(src_dict) name = d.pop("name") @@ -76,11 +94,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subscriptions = cast(list[str], d.pop("subscriptions", UNSET)) + _filters = d.pop("filters", UNSET) + filters: CreateEdgeConnectorBodyDataAttributesFilters | Unset + if isinstance(_filters, Unset): + filters = UNSET + else: + filters = CreateEdgeConnectorBodyDataAttributesFilters.from_dict(_filters) + create_edge_connector_body_data_attributes = cls( name=name, description=description, status=status, subscriptions=subscriptions, + filters=filters, ) create_edge_connector_body_data_attributes.additional_properties = d diff --git a/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py b/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py new file mode 100644 index 00000000..14497423 --- /dev/null +++ b/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateEdgeConnectorBodyDataAttributesFilters") + + +@_attrs_define +class CreateEdgeConnectorBodyDataAttributesFilters: + """Event filters. OR within dimension, AND across dimensions. + + Attributes: + group_ids (list[str] | Unset): Filter by group UUIDs + service_ids (list[str] | Unset): Filter by service UUIDs + environment_ids (list[str] | Unset): Filter by environment UUIDs + functionality_ids (list[str] | Unset): Filter by functionality UUIDs + """ + + group_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + environment_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + group_ids: list[str] | Unset = UNSET + if not isinstance(self.group_ids, Unset): + group_ids = self.group_ids + + service_ids: list[str] | Unset = UNSET + if not isinstance(self.service_ids, Unset): + service_ids = self.service_ids + + environment_ids: list[str] | Unset = UNSET + if not isinstance(self.environment_ids, Unset): + environment_ids = self.environment_ids + + functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.functionality_ids, Unset): + functionality_ids = self.functionality_ids + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if group_ids is not UNSET: + field_dict["group_ids"] = group_ids + if service_ids is not UNSET: + field_dict["service_ids"] = service_ids + if environment_ids is not UNSET: + field_dict["environment_ids"] = environment_ids + if functionality_ids is not UNSET: + field_dict["functionality_ids"] = functionality_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + group_ids = cast(list[str], d.pop("group_ids", UNSET)) + + service_ids = cast(list[str], d.pop("service_ids", UNSET)) + + environment_ids = cast(list[str], d.pop("environment_ids", UNSET)) + + functionality_ids = cast(list[str], d.pop("functionality_ids", UNSET)) + + create_edge_connector_body_data_attributes_filters = cls( + group_ids=group_ids, + service_ids=service_ids, + environment_ids=environment_ids, + functionality_ids=functionality_ids, + ) + + return create_edge_connector_body_data_attributes_filters diff --git a/rootly_sdk/models/create_github_issue_task_params.py b/rootly_sdk/models/create_github_issue_task_params.py index d1a579e0..26f28b7a 100644 --- a/rootly_sdk/models/create_github_issue_task_params.py +++ b/rootly_sdk/models/create_github_issue_task_params.py @@ -32,6 +32,8 @@ class CreateGithubIssueTaskParams: labels (list[CreateGithubIssueTaskParamsLabelsItem] | Unset): The issue labels issue_type (CreateGithubIssueTaskParamsIssueType | Unset): The issue type parent_issue_number (None | str | Unset): The parent issue number for sub-issue linking + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ title: str @@ -41,9 +43,11 @@ class CreateGithubIssueTaskParams: labels: list[CreateGithubIssueTaskParamsLabelsItem] | Unset = UNSET issue_type: CreateGithubIssueTaskParamsIssueType | Unset = UNSET parent_issue_number: None | str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title repository = self.repository.to_dict() @@ -71,6 +75,12 @@ def to_dict(self) -> dict[str, Any]: else: parent_issue_number = self.parent_issue_number + custom_fields_mapping: None | str | Unset + if isinstance(self.custom_fields_mapping, Unset): + custom_fields_mapping = UNSET + else: + custom_fields_mapping = self.custom_fields_mapping + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -89,6 +99,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["issue_type"] = issue_type if parent_issue_number is not UNSET: field_dict["parent_issue_number"] = parent_issue_number + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -137,6 +149,15 @@ def _parse_parent_issue_number(data: object) -> None | str | Unset: parent_issue_number = _parse_parent_issue_number(d.pop("parent_issue_number", UNSET)) + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + create_github_issue_task_params = cls( title=title, repository=repository, @@ -145,6 +166,7 @@ def _parse_parent_issue_number(data: object) -> None | str | Unset: labels=labels, issue_type=issue_type, parent_issue_number=parent_issue_number, + custom_fields_mapping=custom_fields_mapping, ) create_github_issue_task_params.additional_properties = d diff --git a/rootly_sdk/models/create_gitlab_issue_task_params.py b/rootly_sdk/models/create_gitlab_issue_task_params.py index 10502043..f8d4741b 100644 --- a/rootly_sdk/models/create_gitlab_issue_task_params.py +++ b/rootly_sdk/models/create_gitlab_issue_task_params.py @@ -46,6 +46,7 @@ class CreateGitlabIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title repository = self.repository.to_dict() diff --git a/rootly_sdk/models/create_go_to_meeting_task_params.py b/rootly_sdk/models/create_go_to_meeting_task_params.py index 2b9b4c58..e2ffda6c 100644 --- a/rootly_sdk/models/create_go_to_meeting_task_params.py +++ b/rootly_sdk/models/create_go_to_meeting_task_params.py @@ -46,6 +46,7 @@ class CreateGoToMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + subject = self.subject task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/create_google_calendar_event_task_params.py b/rootly_sdk/models/create_google_calendar_event_task_params.py index 84ce97a8..0ea08aee 100644 --- a/rootly_sdk/models/create_google_calendar_event_task_params.py +++ b/rootly_sdk/models/create_google_calendar_event_task_params.py @@ -69,6 +69,7 @@ class CreateGoogleCalendarEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + days_until_meeting = self.days_until_meeting time_of_meeting = self.time_of_meeting diff --git a/rootly_sdk/models/create_google_chat_space_task_params.py b/rootly_sdk/models/create_google_chat_space_task_params.py new file mode 100644 index 00000000..ff6a09f3 --- /dev/null +++ b/rootly_sdk/models/create_google_chat_space_task_params.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.create_google_chat_space_task_params_task_type import ( + CreateGoogleChatSpaceTaskParamsTaskType, + check_create_google_chat_space_task_params_task_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateGoogleChatSpaceTaskParams") + + +@_attrs_define +class CreateGoogleChatSpaceTaskParams: + """ + Attributes: + title (str): + task_type (CreateGoogleChatSpaceTaskParamsTaskType | Unset): + description (str | Unset): + audience (str | Unset): Target audience resource name (e.g. audiences/default). Leave blank for private space. + """ + + title: str + task_type: CreateGoogleChatSpaceTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET + audience: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + title = self.title + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + description = self.description + + audience = self.audience + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "title": title, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if description is not UNSET: + field_dict["description"] = description + if audience is not UNSET: + field_dict["audience"] = audience + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + title = d.pop("title") + + _task_type = d.pop("task_type", UNSET) + task_type: CreateGoogleChatSpaceTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_create_google_chat_space_task_params_task_type(_task_type) + + description = d.pop("description", UNSET) + + audience = d.pop("audience", UNSET) + + create_google_chat_space_task_params = cls( + title=title, + task_type=task_type, + description=description, + audience=audience, + ) + + create_google_chat_space_task_params.additional_properties = d + return create_google_chat_space_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_google_chat_space_task_params_task_type.py b/rootly_sdk/models/create_google_chat_space_task_params_task_type.py new file mode 100644 index 00000000..90acf167 --- /dev/null +++ b/rootly_sdk/models/create_google_chat_space_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +CreateGoogleChatSpaceTaskParamsTaskType = Literal["create_google_chat_space"] + +CREATE_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: set[CreateGoogleChatSpaceTaskParamsTaskType] = { + "create_google_chat_space", +} + + +def check_create_google_chat_space_task_params_task_type( + value: str | None, +) -> CreateGoogleChatSpaceTaskParamsTaskType | None: + if value is None: + return None + if value in CREATE_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(CreateGoogleChatSpaceTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CREATE_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/create_google_docs_page_task_params.py b/rootly_sdk/models/create_google_docs_page_task_params.py index 3d993738..3b931d6f 100644 --- a/rootly_sdk/models/create_google_docs_page_task_params.py +++ b/rootly_sdk/models/create_google_docs_page_task_params.py @@ -33,6 +33,8 @@ class CreateGoogleDocsPageTaskParams: content (str | Unset): The page content template_id (str | Unset): The Google Doc file ID to use as a template permissions (str | Unset): Page permissions JSON + include_overview (bool | Unset): Default: True. + include_timeline (bool | Unset): Default: True. """ title: str @@ -44,9 +46,12 @@ class CreateGoogleDocsPageTaskParams: content: str | Unset = UNSET template_id: str | Unset = UNSET permissions: str | Unset = UNSET + include_overview: bool | Unset = True + include_timeline: bool | Unset = True additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title task_type: str | Unset = UNSET @@ -71,6 +76,10 @@ def to_dict(self) -> dict[str, Any]: permissions = self.permissions + include_overview = self.include_overview + + include_timeline = self.include_timeline + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -94,6 +103,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["template_id"] = template_id if permissions is not UNSET: field_dict["permissions"] = permissions + if include_overview is not UNSET: + field_dict["include_overview"] = include_overview + if include_timeline is not UNSET: + field_dict["include_timeline"] = include_timeline return field_dict @@ -138,6 +151,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: permissions = d.pop("permissions", UNSET) + include_overview = d.pop("include_overview", UNSET) + + include_timeline = d.pop("include_timeline", UNSET) + create_google_docs_page_task_params = cls( title=title, task_type=task_type, @@ -148,6 +165,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content=content, template_id=template_id, permissions=permissions, + include_overview=include_overview, + include_timeline=include_timeline, ) create_google_docs_page_task_params.additional_properties = d diff --git a/rootly_sdk/models/create_google_gemini_chat_completion_task_params.py b/rootly_sdk/models/create_google_gemini_chat_completion_task_params.py index 8800e746..ad8a81b6 100644 --- a/rootly_sdk/models/create_google_gemini_chat_completion_task_params.py +++ b/rootly_sdk/models/create_google_gemini_chat_completion_task_params.py @@ -38,6 +38,7 @@ class CreateGoogleGeminiChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + model = self.model.to_dict() prompt = self.prompt diff --git a/rootly_sdk/models/create_google_meeting_task_params.py b/rootly_sdk/models/create_google_meeting_task_params.py index f567d61f..2bf70afb 100644 --- a/rootly_sdk/models/create_google_meeting_task_params.py +++ b/rootly_sdk/models/create_google_meeting_task_params.py @@ -57,6 +57,7 @@ class CreateGoogleMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + summary: None | str summary = self.summary diff --git a/rootly_sdk/models/create_jira_issue_task_params.py b/rootly_sdk/models/create_jira_issue_task_params.py index c46a1a12..83f02914 100644 --- a/rootly_sdk/models/create_jira_issue_task_params.py +++ b/rootly_sdk/models/create_jira_issue_task_params.py @@ -61,6 +61,7 @@ class CreateJiraIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title project_key = self.project_key diff --git a/rootly_sdk/models/create_jira_subtask_task_params.py b/rootly_sdk/models/create_jira_subtask_task_params.py index 3320dad5..f94a8ba6 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params.py +++ b/rootly_sdk/models/create_jira_subtask_task_params.py @@ -63,6 +63,7 @@ class CreateJiraSubtaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + project_key = self.project_key parent_issue_id = self.parent_issue_id diff --git a/rootly_sdk/models/create_jsmops_alert_task_params.py b/rootly_sdk/models/create_jsmops_alert_task_params.py index 10b48b77..5fa7699e 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params.py @@ -54,6 +54,7 @@ class CreateJsmopsAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + message = self.message task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/create_linear_issue_task_params.py b/rootly_sdk/models/create_linear_issue_task_params.py index 6c282acc..df69a9e7 100644 --- a/rootly_sdk/models/create_linear_issue_task_params.py +++ b/rootly_sdk/models/create_linear_issue_task_params.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,6 +36,8 @@ class CreateLinearIssueTaskParams: labels (list[CreateLinearIssueTaskParamsLabelsItem] | Unset): priority (CreateLinearIssueTaskParamsPriority | Unset): The priority id and display name assign_user_email (str | Unset): The assigned user's email + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ title: str @@ -47,9 +49,11 @@ class CreateLinearIssueTaskParams: labels: list[CreateLinearIssueTaskParamsLabelsItem] | Unset = UNSET priority: CreateLinearIssueTaskParamsPriority | Unset = UNSET assign_user_email: str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title team = self.team.to_dict() @@ -79,6 +83,12 @@ def to_dict(self) -> dict[str, Any]: assign_user_email = self.assign_user_email + custom_fields_mapping: None | str | Unset + if isinstance(self.custom_fields_mapping, Unset): + custom_fields_mapping = UNSET + else: + custom_fields_mapping = self.custom_fields_mapping + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -100,6 +110,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["priority"] = priority if assign_user_email is not UNSET: field_dict["assign_user_email"] = assign_user_email + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -152,6 +164,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assign_user_email = d.pop("assign_user_email", UNSET) + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + create_linear_issue_task_params = cls( title=title, team=team, @@ -162,6 +183,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: labels=labels, priority=priority, assign_user_email=assign_user_email, + custom_fields_mapping=custom_fields_mapping, ) create_linear_issue_task_params.additional_properties = d diff --git a/rootly_sdk/models/create_linear_subtask_issue_task_params.py b/rootly_sdk/models/create_linear_subtask_issue_task_params.py index 5843d380..aa6a3465 100644 --- a/rootly_sdk/models/create_linear_subtask_issue_task_params.py +++ b/rootly_sdk/models/create_linear_subtask_issue_task_params.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -35,6 +35,8 @@ class CreateLinearSubtaskIssueTaskParams: priority (CreateLinearSubtaskIssueTaskParamsPriority | Unset): The priority id and display name labels (list[CreateLinearSubtaskIssueTaskParamsLabelsItem] | Unset): assign_user_email (str | Unset): The assigned user's email + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ parent_issue_id: str @@ -45,9 +47,11 @@ class CreateLinearSubtaskIssueTaskParams: priority: CreateLinearSubtaskIssueTaskParamsPriority | Unset = UNSET labels: list[CreateLinearSubtaskIssueTaskParamsLabelsItem] | Unset = UNSET assign_user_email: str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + parent_issue_id = self.parent_issue_id title = self.title @@ -73,6 +77,12 @@ def to_dict(self) -> dict[str, Any]: assign_user_email = self.assign_user_email + custom_fields_mapping: None | str | Unset + if isinstance(self.custom_fields_mapping, Unset): + custom_fields_mapping = UNSET + else: + custom_fields_mapping = self.custom_fields_mapping + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -92,6 +102,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["labels"] = labels if assign_user_email is not UNSET: field_dict["assign_user_email"] = assign_user_email + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -137,6 +149,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assign_user_email = d.pop("assign_user_email", UNSET) + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + create_linear_subtask_issue_task_params = cls( parent_issue_id=parent_issue_id, title=title, @@ -146,6 +167,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: priority=priority, labels=labels, assign_user_email=assign_user_email, + custom_fields_mapping=custom_fields_mapping, ) create_linear_subtask_issue_task_params.additional_properties = d diff --git a/rootly_sdk/models/create_microsoft_teams_channel_task_params.py b/rootly_sdk/models/create_microsoft_teams_channel_task_params.py index 03b404cc..a52cb327 100644 --- a/rootly_sdk/models/create_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_channel_task_params.py @@ -27,31 +27,30 @@ class CreateMicrosoftTeamsChannelTaskParams: """ Attributes: + team (CreateMicrosoftTeamsChannelTaskParamsTeam): title (str): Microsoft Team channel title task_type (CreateMicrosoftTeamsChannelTaskParamsTaskType | Unset): - team (CreateMicrosoftTeamsChannelTaskParamsTeam | Unset): description (str | Unset): Microsoft Team channel description private (CreateMicrosoftTeamsChannelTaskParamsPrivate | Unset): Default: 'auto'. """ + team: CreateMicrosoftTeamsChannelTaskParamsTeam title: str task_type: CreateMicrosoftTeamsChannelTaskParamsTaskType | Unset = UNSET - team: CreateMicrosoftTeamsChannelTaskParamsTeam | Unset = UNSET description: str | Unset = UNSET private: CreateMicrosoftTeamsChannelTaskParamsPrivate | Unset = "auto" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + + team = self.team.to_dict() + title = self.title task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - team: dict[str, Any] | Unset = UNSET - if not isinstance(self.team, Unset): - team = self.team.to_dict() - description = self.description private: str | Unset = UNSET @@ -62,13 +61,12 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { + "team": team, "title": title, } ) if task_type is not UNSET: field_dict["task_type"] = task_type - if team is not UNSET: - field_dict["team"] = team if description is not UNSET: field_dict["description"] = description if private is not UNSET: @@ -81,6 +79,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_microsoft_teams_channel_task_params_team import CreateMicrosoftTeamsChannelTaskParamsTeam d = dict(src_dict) + team = CreateMicrosoftTeamsChannelTaskParamsTeam.from_dict(d.pop("team")) + title = d.pop("title") _task_type = d.pop("task_type", UNSET) @@ -90,13 +90,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: task_type = check_create_microsoft_teams_channel_task_params_task_type(_task_type) - _team = d.pop("team", UNSET) - team: CreateMicrosoftTeamsChannelTaskParamsTeam | Unset - if isinstance(_team, Unset): - team = UNSET - else: - team = CreateMicrosoftTeamsChannelTaskParamsTeam.from_dict(_team) - description = d.pop("description", UNSET) _private = d.pop("private", UNSET) @@ -107,9 +100,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: private = check_create_microsoft_teams_channel_task_params_private(_private) create_microsoft_teams_channel_task_params = cls( + team=team, title=title, task_type=task_type, - team=team, description=description, private=private, ) diff --git a/rootly_sdk/models/create_microsoft_teams_chat_task_params.py b/rootly_sdk/models/create_microsoft_teams_chat_task_params.py index 00563ed0..28cf2434 100644 --- a/rootly_sdk/models/create_microsoft_teams_chat_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_chat_task_params.py @@ -42,6 +42,7 @@ class CreateMicrosoftTeamsChatTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + members = [] for members_item_data in self.members: members_item = members_item_data.to_dict() diff --git a/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py b/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py index 96f5022e..02fb935f 100644 --- a/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py @@ -50,6 +50,7 @@ class CreateMicrosoftTeamsMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name subject = self.subject diff --git a/rootly_sdk/models/create_mistral_chat_completion_task_params.py b/rootly_sdk/models/create_mistral_chat_completion_task_params.py index 98d6bef7..2747acd8 100644 --- a/rootly_sdk/models/create_mistral_chat_completion_task_params.py +++ b/rootly_sdk/models/create_mistral_chat_completion_task_params.py @@ -42,6 +42,7 @@ class CreateMistralChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + model = self.model.to_dict() prompt = self.prompt diff --git a/rootly_sdk/models/create_motion_task_task_params.py b/rootly_sdk/models/create_motion_task_task_params.py index acd46aab..f266e09a 100644 --- a/rootly_sdk/models/create_motion_task_task_params.py +++ b/rootly_sdk/models/create_motion_task_task_params.py @@ -51,6 +51,7 @@ class CreateMotionTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + workspace = self.workspace.to_dict() title = self.title diff --git a/rootly_sdk/models/create_notion_page_task_params.py b/rootly_sdk/models/create_notion_page_task_params.py index e07077d6..aa2d8930 100644 --- a/rootly_sdk/models/create_notion_page_task_params.py +++ b/rootly_sdk/models/create_notion_page_task_params.py @@ -45,6 +45,7 @@ class CreateNotionPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title parent_page = self.parent_page.to_dict() diff --git a/rootly_sdk/models/create_openai_chat_completion_task_params.py b/rootly_sdk/models/create_openai_chat_completion_task_params.py index 03ea154c..fbe1281e 100644 --- a/rootly_sdk/models/create_openai_chat_completion_task_params.py +++ b/rootly_sdk/models/create_openai_chat_completion_task_params.py @@ -56,6 +56,7 @@ class CreateOpenaiChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + model = self.model.to_dict() prompt = self.prompt diff --git a/rootly_sdk/models/create_opsgenie_alert_task_params.py b/rootly_sdk/models/create_opsgenie_alert_task_params.py index 47f1806c..b1e7967b 100644 --- a/rootly_sdk/models/create_opsgenie_alert_task_params.py +++ b/rootly_sdk/models/create_opsgenie_alert_task_params.py @@ -54,6 +54,7 @@ class CreateOpsgenieAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + message = self.message task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/create_outlook_event_task_params.py b/rootly_sdk/models/create_outlook_event_task_params.py index 585ca1e6..a5bcdd67 100644 --- a/rootly_sdk/models/create_outlook_event_task_params.py +++ b/rootly_sdk/models/create_outlook_event_task_params.py @@ -57,6 +57,7 @@ class CreateOutlookEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + calendar = self.calendar.to_dict() days_until_meeting = self.days_until_meeting diff --git a/rootly_sdk/models/create_pagertree_alert_task_params.py b/rootly_sdk/models/create_pagertree_alert_task_params.py index 8ea30592..599a1b7b 100644 --- a/rootly_sdk/models/create_pagertree_alert_task_params.py +++ b/rootly_sdk/models/create_pagertree_alert_task_params.py @@ -53,6 +53,7 @@ class CreatePagertreeAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type diff --git a/rootly_sdk/models/create_service_now_incident_task_params.py b/rootly_sdk/models/create_service_now_incident_task_params.py index a6f71fb9..0f10232b 100644 --- a/rootly_sdk/models/create_service_now_incident_task_params.py +++ b/rootly_sdk/models/create_service_now_incident_task_params.py @@ -42,6 +42,7 @@ class CreateServiceNowIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/create_sharepoint_page_task_params.py b/rootly_sdk/models/create_sharepoint_page_task_params.py index d914148c..f76d8f61 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params.py @@ -48,6 +48,7 @@ class CreateSharepointPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title site = self.site.to_dict() diff --git a/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py b/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py new file mode 100644 index 00000000..1f749fa3 --- /dev/null +++ b/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateShortcutStoryTaskParamsType0Project") + + +@_attrs_define +class CreateShortcutStoryTaskParamsType0Project: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + create_shortcut_story_task_params_type_0_project = cls( + id=id, + name=name, + ) + + create_shortcut_story_task_params_type_0_project.additional_properties = d + return create_shortcut_story_task_params_type_0_project + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py b/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py new file mode 100644 index 00000000..cf311fb3 --- /dev/null +++ b/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateShortcutStoryTaskParamsType1WorkflowState") + + +@_attrs_define +class CreateShortcutStoryTaskParamsType1WorkflowState: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + create_shortcut_story_task_params_type_1_workflow_state = cls( + id=id, + name=name, + ) + + create_shortcut_story_task_params_type_1_workflow_state.additional_properties = d + return create_shortcut_story_task_params_type_1_workflow_state + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_shortcut_task_task_params.py b/rootly_sdk/models/create_shortcut_task_task_params.py index be8cd214..2b27b227 100644 --- a/rootly_sdk/models/create_shortcut_task_task_params.py +++ b/rootly_sdk/models/create_shortcut_task_task_params.py @@ -36,6 +36,7 @@ class CreateShortcutTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + parent_story_id = self.parent_story_id description = self.description diff --git a/rootly_sdk/models/create_slack_channel_task_params.py b/rootly_sdk/models/create_slack_channel_task_params.py index 5f21ab2b..4587c12a 100644 --- a/rootly_sdk/models/create_slack_channel_task_params.py +++ b/rootly_sdk/models/create_slack_channel_task_params.py @@ -40,6 +40,7 @@ class CreateSlackChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + workspace = self.workspace.to_dict() title = self.title diff --git a/rootly_sdk/models/create_trello_card_task_params.py b/rootly_sdk/models/create_trello_card_task_params.py index 8522b681..b1d2e73f 100644 --- a/rootly_sdk/models/create_trello_card_task_params.py +++ b/rootly_sdk/models/create_trello_card_task_params.py @@ -47,6 +47,7 @@ class CreateTrelloCardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + title = self.title board = self.board.to_dict() diff --git a/rootly_sdk/models/create_watsonx_chat_completion_task_params.py b/rootly_sdk/models/create_watsonx_chat_completion_task_params.py index ddc592bc..0524c92d 100644 --- a/rootly_sdk/models/create_watsonx_chat_completion_task_params.py +++ b/rootly_sdk/models/create_watsonx_chat_completion_task_params.py @@ -38,6 +38,7 @@ class CreateWatsonxChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + model = self.model.to_dict() prompt = self.prompt diff --git a/rootly_sdk/models/create_webex_meeting_task_params.py b/rootly_sdk/models/create_webex_meeting_task_params.py index cffd1878..20afbca5 100644 --- a/rootly_sdk/models/create_webex_meeting_task_params.py +++ b/rootly_sdk/models/create_webex_meeting_task_params.py @@ -50,6 +50,7 @@ class CreateWebexMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + topic = self.topic task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/create_zendesk_ticket_task_params.py b/rootly_sdk/models/create_zendesk_ticket_task_params.py index e0358ab7..ecf79ca3 100644 --- a/rootly_sdk/models/create_zendesk_ticket_task_params.py +++ b/rootly_sdk/models/create_zendesk_ticket_task_params.py @@ -53,6 +53,7 @@ class CreateZendeskTicketTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + kind: str = self.kind subject = self.subject diff --git a/rootly_sdk/models/create_zoom_meeting_task_params.py b/rootly_sdk/models/create_zoom_meeting_task_params.py index ac986319..835f6ef5 100644 --- a/rootly_sdk/models/create_zoom_meeting_task_params.py +++ b/rootly_sdk/models/create_zoom_meeting_task_params.py @@ -43,6 +43,8 @@ class CreateZoomMeetingTaskParams: summary from your meeting recording_mode (CreateZoomMeetingTaskParamsRecordingMode | Unset): The video layout for the bot's recording (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) + enable_zoom_bot_auto_join (bool | Unset): Allow the Rootly bot to start recording without waiting for host + approval post_to_incident_timeline (bool | Unset): post_to_slack_channels (list[CreateZoomMeetingTaskParamsPostToSlackChannelsItem] | Unset): """ @@ -55,11 +57,13 @@ class CreateZoomMeetingTaskParams: auto_recording: CreateZoomMeetingTaskParamsAutoRecording | Unset = "none" record_meeting: bool | Unset = UNSET recording_mode: CreateZoomMeetingTaskParamsRecordingMode | Unset = UNSET + enable_zoom_bot_auto_join: bool | Unset = UNSET post_to_incident_timeline: bool | Unset = UNSET post_to_slack_channels: list[CreateZoomMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + topic = self.topic task_type: str | Unset = UNSET @@ -84,6 +88,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.recording_mode, Unset): recording_mode = self.recording_mode + enable_zoom_bot_auto_join = self.enable_zoom_bot_auto_join + post_to_incident_timeline = self.post_to_incident_timeline post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET @@ -114,6 +120,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["record_meeting"] = record_meeting if recording_mode is not UNSET: field_dict["recording_mode"] = recording_mode + if enable_zoom_bot_auto_join is not UNSET: + field_dict["enable_zoom_bot_auto_join"] = enable_zoom_bot_auto_join if post_to_incident_timeline is not UNSET: field_dict["post_to_incident_timeline"] = post_to_incident_timeline if post_to_slack_channels is not UNSET: @@ -159,6 +167,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: recording_mode = check_create_zoom_meeting_task_params_recording_mode(_recording_mode) + enable_zoom_bot_auto_join = d.pop("enable_zoom_bot_auto_join", UNSET) + post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) @@ -181,6 +191,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: auto_recording=auto_recording, record_meeting=record_meeting, recording_mode=recording_mode, + enable_zoom_bot_auto_join=enable_zoom_bot_auto_join, post_to_incident_timeline=post_to_incident_timeline, post_to_slack_channels=post_to_slack_channels, ) diff --git a/rootly_sdk/models/custom_field_list.py b/rootly_sdk/models/custom_field_list.py index 6ebec51c..fe97544e 100644 --- a/rootly_sdk/models/custom_field_list.py +++ b/rootly_sdk/models/custom_field_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.custom_field_list_data_item import CustomFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class CustomFieldList: data (list[CustomFieldListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CustomFieldListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_field_list_data_item import CustomFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_field_list = cls( data=data, links=links, meta=meta, + included=included, ) custom_field_list.additional_properties = d diff --git a/rootly_sdk/models/custom_field_list_data_item.py b/rootly_sdk/models/custom_field_list_data_item.py index 51f85834..fffd241a 100644 --- a/rootly_sdk/models/custom_field_list_data_item.py +++ b/rootly_sdk/models/custom_field_list_data_item.py @@ -33,6 +33,7 @@ class CustomFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_field_option_list.py b/rootly_sdk/models/custom_field_option_list.py index cdc9c37d..8a317936 100644 --- a/rootly_sdk/models/custom_field_option_list.py +++ b/rootly_sdk/models/custom_field_option_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.custom_field_option_list_data_item import CustomFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class CustomFieldOptionList: data (list[CustomFieldOptionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CustomFieldOptionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_field_option_list_data_item import CustomFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_field_option_list = cls( data=data, links=links, meta=meta, + included=included, ) custom_field_option_list.additional_properties = d diff --git a/rootly_sdk/models/custom_field_option_list_data_item.py b/rootly_sdk/models/custom_field_option_list_data_item.py index 43e459bf..a4f0144a 100644 --- a/rootly_sdk/models/custom_field_option_list_data_item.py +++ b/rootly_sdk/models/custom_field_option_list_data_item.py @@ -33,6 +33,7 @@ class CustomFieldOptionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_field_option_response.py b/rootly_sdk/models/custom_field_option_response.py index a2e6ac19..88160965 100644 --- a/rootly_sdk/models/custom_field_option_response.py +++ b/rootly_sdk/models/custom_field_option_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.custom_field_option_response_data import CustomFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CustomFieldOptionResponse") @@ -18,14 +21,24 @@ class CustomFieldOptionResponse: """ Attributes: data (CustomFieldOptionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CustomFieldOptionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_field_option_response_data import CustomFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CustomFieldOptionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_field_option_response = cls( data=data, + included=included, ) custom_field_option_response.additional_properties = d diff --git a/rootly_sdk/models/custom_field_option_response_data.py b/rootly_sdk/models/custom_field_option_response_data.py index 4255f099..d715f128 100644 --- a/rootly_sdk/models/custom_field_option_response_data.py +++ b/rootly_sdk/models/custom_field_option_response_data.py @@ -33,6 +33,7 @@ class CustomFieldOptionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_field_response.py b/rootly_sdk/models/custom_field_response.py index 2825b94a..502d3f37 100644 --- a/rootly_sdk/models/custom_field_response.py +++ b/rootly_sdk/models/custom_field_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.custom_field_response_data import CustomFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CustomFieldResponse") @@ -18,14 +21,24 @@ class CustomFieldResponse: """ Attributes: data (CustomFieldResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CustomFieldResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_field_response_data import CustomFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CustomFieldResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_field_response = cls( data=data, + included=included, ) custom_field_response.additional_properties = d diff --git a/rootly_sdk/models/custom_field_response_data.py b/rootly_sdk/models/custom_field_response_data.py index 54ea82aa..54454627 100644 --- a/rootly_sdk/models/custom_field_response_data.py +++ b/rootly_sdk/models/custom_field_response_data.py @@ -30,6 +30,7 @@ class CustomFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_form_list.py b/rootly_sdk/models/custom_form_list.py index 9df0e52e..8c429938 100644 --- a/rootly_sdk/models/custom_form_list.py +++ b/rootly_sdk/models/custom_form_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.custom_form_list_data_item import CustomFormListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class CustomFormList: data (list[CustomFormListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CustomFormListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_form_list_data_item import CustomFormListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_form_list = cls( data=data, links=links, meta=meta, + included=included, ) custom_form_list.additional_properties = d diff --git a/rootly_sdk/models/custom_form_list_data_item.py b/rootly_sdk/models/custom_form_list_data_item.py index ecf82fbb..3aba2bac 100644 --- a/rootly_sdk/models/custom_form_list_data_item.py +++ b/rootly_sdk/models/custom_form_list_data_item.py @@ -30,6 +30,7 @@ class CustomFormListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_form_response.py b/rootly_sdk/models/custom_form_response.py index e74e6e7b..f1bfe51b 100644 --- a/rootly_sdk/models/custom_form_response.py +++ b/rootly_sdk/models/custom_form_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.custom_form_response_data import CustomFormResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CustomFormResponse") @@ -18,14 +21,24 @@ class CustomFormResponse: """ Attributes: data (CustomFormResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CustomFormResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_form_response_data import CustomFormResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CustomFormResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_form_response = cls( data=data, + included=included, ) custom_form_response.additional_properties = d diff --git a/rootly_sdk/models/custom_form_response_data.py b/rootly_sdk/models/custom_form_response_data.py index fb42a220..3ea9ebe9 100644 --- a/rootly_sdk/models/custom_form_response_data.py +++ b/rootly_sdk/models/custom_form_response_data.py @@ -30,6 +30,7 @@ class CustomFormResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/dashboard_list.py b/rootly_sdk/models/dashboard_list.py index b7a9f817..265ba250 100644 --- a/rootly_sdk/models/dashboard_list.py +++ b/rootly_sdk/models/dashboard_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.dashboard_list_data_item import DashboardListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class DashboardList: data (list[DashboardListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[DashboardListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_list_data_item import DashboardListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + dashboard_list = cls( data=data, links=links, meta=meta, + included=included, ) dashboard_list.additional_properties = d diff --git a/rootly_sdk/models/dashboard_list_data_item.py b/rootly_sdk/models/dashboard_list_data_item.py index af7c1f78..8950eaf7 100644 --- a/rootly_sdk/models/dashboard_list_data_item.py +++ b/rootly_sdk/models/dashboard_list_data_item.py @@ -30,6 +30,7 @@ class DashboardListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/dashboard_panel_list.py b/rootly_sdk/models/dashboard_panel_list.py index cda76597..bde2df38 100644 --- a/rootly_sdk/models/dashboard_panel_list.py +++ b/rootly_sdk/models/dashboard_panel_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.dashboard_panel_list_data_item import DashboardPanelListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class DashboardPanelList: data (list[DashboardPanelListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[DashboardPanelListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_panel_list_data_item import DashboardPanelListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + dashboard_panel_list = cls( data=data, links=links, meta=meta, + included=included, ) dashboard_panel_list.additional_properties = d diff --git a/rootly_sdk/models/dashboard_panel_list_data_item.py b/rootly_sdk/models/dashboard_panel_list_data_item.py index dcb89dd9..bd1dc5f7 100644 --- a/rootly_sdk/models/dashboard_panel_list_data_item.py +++ b/rootly_sdk/models/dashboard_panel_list_data_item.py @@ -33,6 +33,7 @@ class DashboardPanelListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/dashboard_panel_params.py b/rootly_sdk/models/dashboard_panel_params.py index 90a15121..66aed2da 100644 --- a/rootly_sdk/models/dashboard_panel_params.py +++ b/rootly_sdk/models/dashboard_panel_params.py @@ -39,6 +39,7 @@ class DashboardPanelParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.display diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item.py b/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item.py index 7d73ee70..1eaceebe 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item.py @@ -34,6 +34,7 @@ class DashboardPanelParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation diff --git a/rootly_sdk/models/dashboard_panel_response.py b/rootly_sdk/models/dashboard_panel_response.py index 93f0c50c..53b175e2 100644 --- a/rootly_sdk/models/dashboard_panel_response.py +++ b/rootly_sdk/models/dashboard_panel_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.dashboard_panel_response_data import DashboardPanelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="DashboardPanelResponse") @@ -18,14 +21,24 @@ class DashboardPanelResponse: """ Attributes: data (DashboardPanelResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: DashboardPanelResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_panel_response_data import DashboardPanelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = DashboardPanelResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + dashboard_panel_response = cls( data=data, + included=included, ) dashboard_panel_response.additional_properties = d diff --git a/rootly_sdk/models/dashboard_panel_response_data.py b/rootly_sdk/models/dashboard_panel_response_data.py index 5e5cd3ee..17f3d2bc 100644 --- a/rootly_sdk/models/dashboard_panel_response_data.py +++ b/rootly_sdk/models/dashboard_panel_response_data.py @@ -33,6 +33,7 @@ class DashboardPanelResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/dashboard_response.py b/rootly_sdk/models/dashboard_response.py index 7d73d1e1..8ccf9235 100644 --- a/rootly_sdk/models/dashboard_response.py +++ b/rootly_sdk/models/dashboard_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.dashboard_response_data import DashboardResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="DashboardResponse") @@ -18,14 +21,24 @@ class DashboardResponse: """ Attributes: data (DashboardResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: DashboardResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_response_data import DashboardResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = DashboardResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + dashboard_response = cls( data=data, + included=included, ) dashboard_response.additional_properties = d diff --git a/rootly_sdk/models/dashboard_response_data.py b/rootly_sdk/models/dashboard_response_data.py index a650842b..2ba914b5 100644 --- a/rootly_sdk/models/dashboard_response_data.py +++ b/rootly_sdk/models/dashboard_response_data.py @@ -30,6 +30,7 @@ class DashboardResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/delete_alert_route_response_200.py b/rootly_sdk/models/delete_alert_route_response_200.py index 87303581..dfee77b3 100644 --- a/rootly_sdk/models/delete_alert_route_response_200.py +++ b/rootly_sdk/models/delete_alert_route_response_200.py @@ -26,6 +26,7 @@ class DeleteAlertRouteResponse200: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/delete_alert_route_response_200_data.py b/rootly_sdk/models/delete_alert_route_response_200_data.py index 2913fe1f..95d7b221 100644 --- a/rootly_sdk/models/delete_alert_route_response_200_data.py +++ b/rootly_sdk/models/delete_alert_route_response_200_data.py @@ -30,6 +30,7 @@ class DeleteAlertRouteResponse200Data: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_ = self.type_ diff --git a/rootly_sdk/models/duplicate_incident.py b/rootly_sdk/models/duplicate_incident.py index cbd34466..55260f94 100644 --- a/rootly_sdk/models/duplicate_incident.py +++ b/rootly_sdk/models/duplicate_incident.py @@ -24,6 +24,7 @@ class DuplicateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/duplicate_incident_data.py b/rootly_sdk/models/duplicate_incident_data.py index 638fc79a..8b075bd7 100644 --- a/rootly_sdk/models/duplicate_incident_data.py +++ b/rootly_sdk/models/duplicate_incident_data.py @@ -28,6 +28,7 @@ class DuplicateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/edge_connector.py b/rootly_sdk/models/edge_connector.py index c2289131..09054d23 100644 --- a/rootly_sdk/models/edge_connector.py +++ b/rootly_sdk/models/edge_connector.py @@ -24,6 +24,7 @@ class EdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/edge_connector_action.py b/rootly_sdk/models/edge_connector_action.py index c805f1fa..4480e034 100644 --- a/rootly_sdk/models/edge_connector_action.py +++ b/rootly_sdk/models/edge_connector_action.py @@ -24,6 +24,7 @@ class EdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/edge_connector_action_data.py b/rootly_sdk/models/edge_connector_action_data.py index 91db467a..e87a97a7 100644 --- a/rootly_sdk/models/edge_connector_action_data.py +++ b/rootly_sdk/models/edge_connector_action_data.py @@ -31,6 +31,7 @@ class EdgeConnectorActionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ id = str(self.id) diff --git a/rootly_sdk/models/edge_connector_action_data_attributes.py b/rootly_sdk/models/edge_connector_action_data_attributes.py index c0deb032..6c67eee5 100644 --- a/rootly_sdk/models/edge_connector_action_data_attributes.py +++ b/rootly_sdk/models/edge_connector_action_data_attributes.py @@ -56,6 +56,7 @@ class EdgeConnectorActionDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name action_type: str = self.action_type diff --git a/rootly_sdk/models/edge_connector_data.py b/rootly_sdk/models/edge_connector_data.py index dc408332..1264673c 100644 --- a/rootly_sdk/models/edge_connector_data.py +++ b/rootly_sdk/models/edge_connector_data.py @@ -31,6 +31,7 @@ class EdgeConnectorData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ id = str(self.id) diff --git a/rootly_sdk/models/environment.py b/rootly_sdk/models/environment.py index 86d757c2..652d2359 100644 --- a/rootly_sdk/models/environment.py +++ b/rootly_sdk/models/environment.py @@ -6,6 +6,7 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.environment_managed_by import EnvironmentManagedBy, check_environment_managed_by from ..types import UNSET, Unset if TYPE_CHECKING: @@ -25,6 +26,9 @@ class Environment: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the environment + managed_by (EnvironmentManagedBy | Unset): How this environment is managed (provenance): web, api, terraform, + etc. Read-only. + external_id (None | str | Unset): The external id associated to this environment description (None | str | Unset): The description of the environment notify_emails (list[str] | None | Unset): Emails attached to the environment color (None | str | Unset): The hex color of the environment @@ -40,6 +44,8 @@ class Environment: created_at: str updated_at: str slug: str | Unset = UNSET + managed_by: EnvironmentManagedBy | Unset = UNSET + external_id: None | str | Unset = UNSET description: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET color: None | str | Unset = UNSET @@ -50,6 +56,7 @@ class Environment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name created_at = self.created_at @@ -58,6 +65,16 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET @@ -132,6 +149,10 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by + if external_id is not UNSET: + field_dict["external_id"] = external_id if description is not UNSET: field_dict["description"] = description if notify_emails is not UNSET: @@ -164,6 +185,22 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _managed_by = d.pop("managed_by", UNSET) + managed_by: EnvironmentManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_environment_managed_by(_managed_by) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + def _parse_description(data: object) -> None | str | Unset: if data is None: return data @@ -283,6 +320,8 @@ def _parse_properties(data: object) -> list[EnvironmentPropertiesType0Item] | No created_at=created_at, updated_at=updated_at, slug=slug, + managed_by=managed_by, + external_id=external_id, description=description, notify_emails=notify_emails, color=color, diff --git a/rootly_sdk/models/environment_list.py b/rootly_sdk/models/environment_list.py index 9339bf0d..28818d4b 100644 --- a/rootly_sdk/models/environment_list.py +++ b/rootly_sdk/models/environment_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.environment_list_data_item import EnvironmentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class EnvironmentList: data (list[EnvironmentListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[EnvironmentListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.environment_list_data_item import EnvironmentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + environment_list = cls( data=data, links=links, meta=meta, + included=included, ) environment_list.additional_properties = d diff --git a/rootly_sdk/models/environment_list_data_item.py b/rootly_sdk/models/environment_list_data_item.py index 59cbd582..9cd8698e 100644 --- a/rootly_sdk/models/environment_list_data_item.py +++ b/rootly_sdk/models/environment_list_data_item.py @@ -30,6 +30,7 @@ class EnvironmentListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/environment_managed_by.py b/rootly_sdk/models/environment_managed_by.py new file mode 100644 index 00000000..ee5a4ff5 --- /dev/null +++ b/rootly_sdk/models/environment_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EnvironmentManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +ENVIRONMENT_MANAGED_BY_VALUES: set[EnvironmentManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_environment_managed_by(value: str | None) -> EnvironmentManagedBy | None: + if value is None: + return None + if value in ENVIRONMENT_MANAGED_BY_VALUES: + return cast(EnvironmentManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ENVIRONMENT_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/environment_response.py b/rootly_sdk/models/environment_response.py index 7d978e8e..9bc22e2b 100644 --- a/rootly_sdk/models/environment_response.py +++ b/rootly_sdk/models/environment_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.environment_response_data import EnvironmentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="EnvironmentResponse") @@ -18,14 +21,24 @@ class EnvironmentResponse: """ Attributes: data (EnvironmentResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: EnvironmentResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.environment_response_data import EnvironmentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = EnvironmentResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + environment_response = cls( data=data, + included=included, ) environment_response.additional_properties = d diff --git a/rootly_sdk/models/environment_response_data.py b/rootly_sdk/models/environment_response_data.py index 5202818b..b2a242c7 100644 --- a/rootly_sdk/models/environment_response_data.py +++ b/rootly_sdk/models/environment_response_data.py @@ -30,6 +30,7 @@ class EnvironmentResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/errors_list.py b/rootly_sdk/models/errors_list.py index eb0f6933..51274091 100644 --- a/rootly_sdk/models/errors_list.py +++ b/rootly_sdk/models/errors_list.py @@ -26,6 +26,7 @@ class ErrorsList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + errors: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.errors, Unset): errors = [] diff --git a/rootly_sdk/models/escalate_alert.py b/rootly_sdk/models/escalate_alert.py new file mode 100644 index 00000000..ecd3882d --- /dev/null +++ b/rootly_sdk/models/escalate_alert.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.escalate_alert_data import EscalateAlertData + + +T = TypeVar("T", bound="EscalateAlert") + + +@_attrs_define +class EscalateAlert: + """ + Attributes: + data (EscalateAlertData | Unset): + """ + + data: EscalateAlertData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalate_alert_data import EscalateAlertData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: EscalateAlertData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = EscalateAlertData.from_dict(_data) + + escalate_alert = cls( + data=data, + ) + + escalate_alert.additional_properties = d + return escalate_alert + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalate_alert_data.py b/rootly_sdk/models/escalate_alert_data.py new file mode 100644 index 00000000..beb705bc --- /dev/null +++ b/rootly_sdk/models/escalate_alert_data.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalate_alert_data_type import EscalateAlertDataType, check_escalate_alert_data_type +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.escalate_alert_data_attributes import EscalateAlertDataAttributes + + +T = TypeVar("T", bound="EscalateAlertData") + + +@_attrs_define +class EscalateAlertData: + """ + Attributes: + type_ (EscalateAlertDataType | Unset): + attributes (EscalateAlertDataAttributes | Unset): + """ + + type_: EscalateAlertDataType | Unset = UNSET + attributes: EscalateAlertDataAttributes | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalate_alert_data_attributes import EscalateAlertDataAttributes + + d = dict(src_dict) + _type_ = d.pop("type", UNSET) + type_: EscalateAlertDataType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_escalate_alert_data_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: EscalateAlertDataAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = EscalateAlertDataAttributes.from_dict(_attributes) + + escalate_alert_data = cls( + type_=type_, + attributes=attributes, + ) + + escalate_alert_data.additional_properties = d + return escalate_alert_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalate_alert_data_attributes.py b/rootly_sdk/models/escalate_alert_data_attributes.py new file mode 100644 index 00000000..b22f75ee --- /dev/null +++ b/rootly_sdk/models/escalate_alert_data_attributes.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalateAlertDataAttributes") + + +@_attrs_define +class EscalateAlertDataAttributes: + """ + Attributes: + escalation_policy_id (str | Unset): The ID of the escalation policy to escalate to. If omitted, uses the alert's + current escalation policy from metadata. Required for resolved alerts whose metadata may have been cleared. + escalation_policy_level (int | Unset): The escalation policy level to escalate to. If omitted, defaults to the + next level (same EP) or level 1 (different EP). + """ + + escalation_policy_id: str | Unset = UNSET + escalation_policy_level: int | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + escalation_policy_id = self.escalation_policy_id + + escalation_policy_level = self.escalation_policy_level + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if escalation_policy_id is not UNSET: + field_dict["escalation_policy_id"] = escalation_policy_id + if escalation_policy_level is not UNSET: + field_dict["escalation_policy_level"] = escalation_policy_level + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + escalation_policy_id = d.pop("escalation_policy_id", UNSET) + + escalation_policy_level = d.pop("escalation_policy_level", UNSET) + + escalate_alert_data_attributes = cls( + escalation_policy_id=escalation_policy_id, + escalation_policy_level=escalation_policy_level, + ) + + return escalate_alert_data_attributes diff --git a/rootly_sdk/models/escalate_alert_data_type.py b/rootly_sdk/models/escalate_alert_data_type.py new file mode 100644 index 00000000..55b7c819 --- /dev/null +++ b/rootly_sdk/models/escalate_alert_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +EscalateAlertDataType = Literal["alerts"] + +ESCALATE_ALERT_DATA_TYPE_VALUES: set[EscalateAlertDataType] = { + "alerts", +} + + +def check_escalate_alert_data_type(value: str | None) -> EscalateAlertDataType | None: + if value is None: + return None + if value in ESCALATE_ALERT_DATA_TYPE_VALUES: + return cast(EscalateAlertDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATE_ALERT_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py b/rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py deleted file mode 100644 index 165b2c66..00000000 --- a/rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPathRuleAlertUrgencyRuleType = Literal["alert_urgency"] - -ESCALATION_PATH_RULE_ALERT_URGENCY_RULE_TYPE_VALUES: set[EscalationPathRuleAlertUrgencyRuleType] = { - "alert_urgency", -} - - -def check_escalation_path_rule_alert_urgency_rule_type( - value: str | None, -) -> EscalationPathRuleAlertUrgencyRuleType | None: - if value is None: - return None - if value in ESCALATION_PATH_RULE_ALERT_URGENCY_RULE_TYPE_VALUES: - return cast(EscalationPathRuleAlertUrgencyRuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_ALERT_URGENCY_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py b/rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py deleted file mode 100644 index 215b8e8d..00000000 --- a/rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPathRuleDeferralWindowRuleType = Literal["deferral_window"] - -ESCALATION_PATH_RULE_DEFERRAL_WINDOW_RULE_TYPE_VALUES: set[EscalationPathRuleDeferralWindowRuleType] = { - "deferral_window", -} - - -def check_escalation_path_rule_deferral_window_rule_type( - value: str | None, -) -> EscalationPathRuleDeferralWindowRuleType | None: - if value is None: - return None - if value in ESCALATION_PATH_RULE_DEFERRAL_WINDOW_RULE_TYPE_VALUES: - return cast(EscalationPathRuleDeferralWindowRuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_DEFERRAL_WINDOW_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_path_rule_deferral_window_time_blocks_item.py b/rootly_sdk/models/escalation_path_rule_deferral_window_time_blocks_item.py deleted file mode 100644 index b4c63629..00000000 --- a/rootly_sdk/models/escalation_path_rule_deferral_window_time_blocks_item.py +++ /dev/null @@ -1,251 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="EscalationPathRuleDeferralWindowTimeBlocksItem") - - -@_attrs_define -class EscalationPathRuleDeferralWindowTimeBlocksItem: - """ - Attributes: - monday (bool | None | Unset): - tuesday (bool | None | Unset): - wednesday (bool | None | Unset): - thursday (bool | None | Unset): - friday (bool | None | Unset): - saturday (bool | None | Unset): - sunday (bool | None | Unset): - start_time (str | Unset): Formatted as HH:MM - end_time (str | Unset): Formatted as HH:MM - all_day (bool | None | Unset): - position (int | None | Unset): - """ - - monday: bool | None | Unset = UNSET - tuesday: bool | None | Unset = UNSET - wednesday: bool | None | Unset = UNSET - thursday: bool | None | Unset = UNSET - friday: bool | None | Unset = UNSET - saturday: bool | None | Unset = UNSET - sunday: bool | None | Unset = UNSET - start_time: str | Unset = UNSET - end_time: str | Unset = UNSET - all_day: bool | None | Unset = UNSET - position: int | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - monday: bool | None | Unset - if isinstance(self.monday, Unset): - monday = UNSET - else: - monday = self.monday - - tuesday: bool | None | Unset - if isinstance(self.tuesday, Unset): - tuesday = UNSET - else: - tuesday = self.tuesday - - wednesday: bool | None | Unset - if isinstance(self.wednesday, Unset): - wednesday = UNSET - else: - wednesday = self.wednesday - - thursday: bool | None | Unset - if isinstance(self.thursday, Unset): - thursday = UNSET - else: - thursday = self.thursday - - friday: bool | None | Unset - if isinstance(self.friday, Unset): - friday = UNSET - else: - friday = self.friday - - saturday: bool | None | Unset - if isinstance(self.saturday, Unset): - saturday = UNSET - else: - saturday = self.saturday - - sunday: bool | None | Unset - if isinstance(self.sunday, Unset): - sunday = UNSET - else: - sunday = self.sunday - - start_time = self.start_time - - end_time = self.end_time - - all_day: bool | None | Unset - if isinstance(self.all_day, Unset): - all_day = UNSET - else: - all_day = self.all_day - - position: int | None | Unset - if isinstance(self.position, Unset): - position = UNSET - else: - position = self.position - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if monday is not UNSET: - field_dict["monday"] = monday - if tuesday is not UNSET: - field_dict["tuesday"] = tuesday - if wednesday is not UNSET: - field_dict["wednesday"] = wednesday - if thursday is not UNSET: - field_dict["thursday"] = thursday - if friday is not UNSET: - field_dict["friday"] = friday - if saturday is not UNSET: - field_dict["saturday"] = saturday - if sunday is not UNSET: - field_dict["sunday"] = sunday - if start_time is not UNSET: - field_dict["start_time"] = start_time - if end_time is not UNSET: - field_dict["end_time"] = end_time - if all_day is not UNSET: - field_dict["all_day"] = all_day - if position is not UNSET: - field_dict["position"] = position - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - - def _parse_monday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - monday = _parse_monday(d.pop("monday", UNSET)) - - def _parse_tuesday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - tuesday = _parse_tuesday(d.pop("tuesday", UNSET)) - - def _parse_wednesday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - wednesday = _parse_wednesday(d.pop("wednesday", UNSET)) - - def _parse_thursday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - thursday = _parse_thursday(d.pop("thursday", UNSET)) - - def _parse_friday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - friday = _parse_friday(d.pop("friday", UNSET)) - - def _parse_saturday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - saturday = _parse_saturday(d.pop("saturday", UNSET)) - - def _parse_sunday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - sunday = _parse_sunday(d.pop("sunday", UNSET)) - - start_time = d.pop("start_time", UNSET) - - end_time = d.pop("end_time", UNSET) - - def _parse_all_day(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - all_day = _parse_all_day(d.pop("all_day", UNSET)) - - def _parse_position(data: object) -> int | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(int | None | Unset, data) - - position = _parse_position(d.pop("position", UNSET)) - - escalation_path_rule_deferral_window_time_blocks_item = cls( - monday=monday, - tuesday=tuesday, - wednesday=wednesday, - thursday=thursday, - friday=friday, - saturday=saturday, - sunday=sunday, - start_time=start_time, - end_time=end_time, - all_day=all_day, - position=position, - ) - - escalation_path_rule_deferral_window_time_blocks_item.additional_properties = d - return escalation_path_rule_deferral_window_time_blocks_item - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_path_rule_field_rule_type.py b/rootly_sdk/models/escalation_path_rule_field_rule_type.py deleted file mode 100644 index 414160bc..00000000 --- a/rootly_sdk/models/escalation_path_rule_field_rule_type.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -EscalationPathRuleFieldRuleType = Literal["field"] - -ESCALATION_PATH_RULE_FIELD_RULE_TYPE_VALUES: set[EscalationPathRuleFieldRuleType] = { - "field", -} - - -def check_escalation_path_rule_field_rule_type(value: str | None) -> EscalationPathRuleFieldRuleType | None: - if value is None: - return None - if value in ESCALATION_PATH_RULE_FIELD_RULE_TYPE_VALUES: - return cast(EscalationPathRuleFieldRuleType, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_FIELD_RULE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/escalation_path_rule_json_path_operator.py b/rootly_sdk/models/escalation_path_rule_json_path_operator.py deleted file mode 100644 index ca7e74dc..00000000 --- a/rootly_sdk/models/escalation_path_rule_json_path_operator.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -EscalationPathRuleJsonPathOperator = Literal[ - "contains", "does_not_contain", "is", "is_not", "is_not_one_of", "is_one_of" -] - -ESCALATION_PATH_RULE_JSON_PATH_OPERATOR_VALUES: set[EscalationPathRuleJsonPathOperator] = { - "contains", - "does_not_contain", - "is", - "is_not", - "is_not_one_of", - "is_one_of", -} - - -def check_escalation_path_rule_json_path_operator(value: str | None) -> EscalationPathRuleJsonPathOperator | None: - if value is None: - return None - if value in ESCALATION_PATH_RULE_JSON_PATH_OPERATOR_VALUES: - return cast(EscalationPathRuleJsonPathOperator, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_JSON_PATH_OPERATOR_VALUES!r}") diff --git a/rootly_sdk/models/escalation_path_rule_json_path_rule_type.py b/rootly_sdk/models/escalation_path_rule_json_path_rule_type.py deleted file mode 100644 index 1e4bff52..00000000 --- a/rootly_sdk/models/escalation_path_rule_json_path_rule_type.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -EscalationPathRuleJsonPathRuleType = Literal["json_path"] - -ESCALATION_PATH_RULE_JSON_PATH_RULE_TYPE_VALUES: set[EscalationPathRuleJsonPathRuleType] = { - "json_path", -} - - -def check_escalation_path_rule_json_path_rule_type(value: str | None) -> EscalationPathRuleJsonPathRuleType | None: - if value is None: - return None - if value in ESCALATION_PATH_RULE_JSON_PATH_RULE_TYPE_VALUES: - return cast(EscalationPathRuleJsonPathRuleType, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_JSON_PATH_RULE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/escalation_path_rule_service_rule_type.py b/rootly_sdk/models/escalation_path_rule_service_rule_type.py deleted file mode 100644 index fd8a88c8..00000000 --- a/rootly_sdk/models/escalation_path_rule_service_rule_type.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -EscalationPathRuleServiceRuleType = Literal["service"] - -ESCALATION_PATH_RULE_SERVICE_RULE_TYPE_VALUES: set[EscalationPathRuleServiceRuleType] = { - "service", -} - - -def check_escalation_path_rule_service_rule_type(value: str | None) -> EscalationPathRuleServiceRuleType | None: - if value is None: - return None - if value in ESCALATION_PATH_RULE_SERVICE_RULE_TYPE_VALUES: - return cast(EscalationPathRuleServiceRuleType, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_SERVICE_RULE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py b/rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py deleted file mode 100644 index a7d93d20..00000000 --- a/rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPathRuleWorkingHourRuleType = Literal["working_hour"] - -ESCALATION_PATH_RULE_WORKING_HOUR_RULE_TYPE_VALUES: set[EscalationPathRuleWorkingHourRuleType] = { - "working_hour", -} - - -def check_escalation_path_rule_working_hour_rule_type( - value: str | None, -) -> EscalationPathRuleWorkingHourRuleType | None: - if value is None: - return None - if value in ESCALATION_PATH_RULE_WORKING_HOUR_RULE_TYPE_VALUES: - return cast(EscalationPathRuleWorkingHourRuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_WORKING_HOUR_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_business_hours_type_0_time_zone.py b/rootly_sdk/models/escalation_policy_business_hours_type_0_time_zone.py index 8b499200..e8841516 100644 --- a/rootly_sdk/models/escalation_policy_business_hours_type_0_time_zone.py +++ b/rootly_sdk/models/escalation_policy_business_hours_type_0_time_zone.py @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -304,8 +320,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -321,6 +339,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -332,6 +351,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -386,7 +406,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -407,6 +430,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -416,6 +440,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -522,15 +547,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -570,6 +601,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/escalation_policy_level_list.py b/rootly_sdk/models/escalation_policy_level_list.py index c77dc432..98857100 100644 --- a/rootly_sdk/models/escalation_policy_level_list.py +++ b/rootly_sdk/models/escalation_policy_level_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.escalation_policy_level_list_data_item import EscalationPolicyLevelListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class EscalationPolicyLevelList: data (list[EscalationPolicyLevelListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[EscalationPolicyLevelListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_level_list_data_item import EscalationPolicyLevelListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_level_list = cls( data=data, links=links, meta=meta, + included=included, ) escalation_policy_level_list.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_level_list_data_item.py b/rootly_sdk/models/escalation_policy_level_list_data_item.py index de6c1f8a..5f8d975f 100644 --- a/rootly_sdk/models/escalation_policy_level_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_level_list_data_item.py @@ -26,6 +26,7 @@ class EscalationPolicyLevelListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0_type.py b/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0_type.py index f8714fd0..eaeda31d 100644 --- a/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0_type.py +++ b/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0_type.py @@ -1,12 +1,13 @@ from typing import Literal, cast EscalationPolicyLevelNotificationTargetParamsItemType0Type = Literal[ - "schedule", "service", "slack_channel", "team", "user" + "microsoft_teams_channel", "schedule", "service", "slack_channel", "team", "user" ] ESCALATION_POLICY_LEVEL_NOTIFICATION_TARGET_PARAMS_ITEM_TYPE_0_TYPE_VALUES: set[ EscalationPolicyLevelNotificationTargetParamsItemType0Type ] = { + "microsoft_teams_channel", "schedule", "service", "slack_channel", diff --git a/rootly_sdk/models/escalation_policy_level_response.py b/rootly_sdk/models/escalation_policy_level_response.py index 80658cce..262024a3 100644 --- a/rootly_sdk/models/escalation_policy_level_response.py +++ b/rootly_sdk/models/escalation_policy_level_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.escalation_policy_level_response_data import EscalationPolicyLevelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="EscalationPolicyLevelResponse") @@ -18,14 +21,24 @@ class EscalationPolicyLevelResponse: """ Attributes: data (EscalationPolicyLevelResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: EscalationPolicyLevelResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_level_response_data import EscalationPolicyLevelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = EscalationPolicyLevelResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_level_response = cls( data=data, + included=included, ) escalation_policy_level_response.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_level_response_data.py b/rootly_sdk/models/escalation_policy_level_response_data.py index 49803990..34e59feb 100644 --- a/rootly_sdk/models/escalation_policy_level_response_data.py +++ b/rootly_sdk/models/escalation_policy_level_response_data.py @@ -34,6 +34,7 @@ class EscalationPolicyLevelResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/escalation_policy_list.py b/rootly_sdk/models/escalation_policy_list.py index d1639d18..98fe7348 100644 --- a/rootly_sdk/models/escalation_policy_list.py +++ b/rootly_sdk/models/escalation_policy_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.escalation_policy_list_data_item import EscalationPolicyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class EscalationPolicyList: data (list[EscalationPolicyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[EscalationPolicyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_list_data_item import EscalationPolicyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_list = cls( data=data, links=links, meta=meta, + included=included, ) escalation_policy_list.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_list_data_item.py b/rootly_sdk/models/escalation_policy_list_data_item.py index 3d4758cf..36be2375 100644 --- a/rootly_sdk/models/escalation_policy_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_list_data_item.py @@ -33,6 +33,7 @@ class EscalationPolicyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/escalation_policy_path.py b/rootly_sdk/models/escalation_policy_path.py index 9da832f9..def4ef06 100644 --- a/rootly_sdk/models/escalation_policy_path.py +++ b/rootly_sdk/models/escalation_policy_path.py @@ -25,12 +25,30 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 + from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 + from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 + from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 + from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 + from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 + from ..models.escalation_policy_path_rules_item_type_6 import EscalationPolicyPathRulesItemType6 + from ..models.escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 + from ..models.escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 + from ..models.escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 + from ..models.escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 + from ..models.escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 + from ..models.escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 + from ..models.escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 + from ..models.escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 + from ..models.escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 + from ..models.escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 + from ..models.escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 + from ..models.escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 + from ..models.escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 + from ..models.escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 + from ..models.escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 + from ..models.escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 + from ..models.escalation_policy_path_rules_item_type_9_type_7 import EscalationPolicyPathRulesItemType9Type7 from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem @@ -57,9 +75,18 @@ class EscalationPolicyPath: initial_delay (int | Unset): Initial delay for escalation path in minutes. Maximum 1 week (10080). created_at (str | Unset): Date of creation updated_at (str | Unset): Date of last update - rules (list[EscalationPathRuleAlertUrgency | EscalationPathRuleDeferralWindow | EscalationPathRuleField | - EscalationPathRuleJsonPath | EscalationPathRuleService | EscalationPathRuleWorkingHour | None] | Unset): - Escalation path rules + rules (list[EscalationPolicyPathRulesItemType0 | EscalationPolicyPathRulesItemType1 | + EscalationPolicyPathRulesItemType2 | EscalationPolicyPathRulesItemType3 | EscalationPolicyPathRulesItemType4 | + EscalationPolicyPathRulesItemType5 | EscalationPolicyPathRulesItemType6 | EscalationPolicyPathRulesItemType7 | + EscalationPolicyPathRulesItemType8Type0 | EscalationPolicyPathRulesItemType8Type1 | + EscalationPolicyPathRulesItemType8Type2 | EscalationPolicyPathRulesItemType8Type3 | + EscalationPolicyPathRulesItemType8Type4 | EscalationPolicyPathRulesItemType8Type5 | + EscalationPolicyPathRulesItemType8Type6 | EscalationPolicyPathRulesItemType8Type7 | + EscalationPolicyPathRulesItemType9Type0 | EscalationPolicyPathRulesItemType9Type1 | + EscalationPolicyPathRulesItemType9Type2 | EscalationPolicyPathRulesItemType9Type3 | + EscalationPolicyPathRulesItemType9Type4 | EscalationPolicyPathRulesItemType9Type5 | + EscalationPolicyPathRulesItemType9Type6 | EscalationPolicyPathRulesItemType9Type7] | Unset): Escalation path + rules time_restriction_time_zone (EscalationPolicyPathTimeRestrictionTimeZone | Unset): Time zone used for time restrictions. time_restrictions (list[EscalationPolicyPathTimeRestrictionsItem] | Unset): If time restrictions are set, alerts @@ -82,13 +109,30 @@ class EscalationPolicyPath: updated_at: str | Unset = UNSET rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6 + | EscalationPolicyPathRulesItemType7 + | EscalationPolicyPathRulesItemType8Type0 + | EscalationPolicyPathRulesItemType8Type1 + | EscalationPolicyPathRulesItemType8Type2 + | EscalationPolicyPathRulesItemType8Type3 + | EscalationPolicyPathRulesItemType8Type4 + | EscalationPolicyPathRulesItemType8Type5 + | EscalationPolicyPathRulesItemType8Type6 + | EscalationPolicyPathRulesItemType8Type7 + | EscalationPolicyPathRulesItemType9Type0 + | EscalationPolicyPathRulesItemType9Type1 + | EscalationPolicyPathRulesItemType9Type2 + | EscalationPolicyPathRulesItemType9Type3 + | EscalationPolicyPathRulesItemType9Type4 + | EscalationPolicyPathRulesItemType9Type5 + | EscalationPolicyPathRulesItemType9Type6 + | EscalationPolicyPathRulesItemType9Type7 ] | Unset ) = UNSET @@ -97,12 +141,29 @@ class EscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 + from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 + from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 + from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 + from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 + from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 + from ..models.escalation_policy_path_rules_item_type_6 import EscalationPolicyPathRulesItemType6 + from ..models.escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 + from ..models.escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 + from ..models.escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 + from ..models.escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 + from ..models.escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 + from ..models.escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 + from ..models.escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 + from ..models.escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 + from ..models.escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 + from ..models.escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 + from ..models.escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 + from ..models.escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 + from ..models.escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 + from ..models.escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 + from ..models.escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 + from ..models.escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 name = self.name @@ -144,25 +205,60 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - rules: list[dict[str, Any] | None] | Unset = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: - rules_item: dict[str, Any] | None - if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): + rules_item: dict[str, Any] + if isinstance(rules_item_data, EscalationPolicyPathRulesItemType0): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType1): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleJsonPath): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType2): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleField): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType3): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleService): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType4): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleDeferralWindow): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type2): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type3): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type6): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type7): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type2): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type3): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type6): rules_item = rules_item_data.to_dict() else: - rules_item = rules_item_data + rules_item = rules_item_data.to_dict() + rules.append(rules_item) time_restriction_time_zone: str | Unset = UNSET @@ -215,12 +311,30 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 + from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 + from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 + from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 + from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 + from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 + from ..models.escalation_policy_path_rules_item_type_6 import EscalationPolicyPathRulesItemType6 + from ..models.escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 + from ..models.escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 + from ..models.escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 + from ..models.escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 + from ..models.escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 + from ..models.escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 + from ..models.escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 + from ..models.escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 + from ..models.escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 + from ..models.escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 + from ..models.escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 + from ..models.escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 + from ..models.escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 + from ..models.escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 + from ..models.escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 + from ..models.escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 + from ..models.escalation_policy_path_rules_item_type_9_type_7 import EscalationPolicyPathRulesItemType9Type7 from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem d = dict(src_dict) @@ -287,13 +401,30 @@ def _parse_after_deferral_path_id(data: object) -> None | str | Unset: _rules = d.pop("rules", UNSET) rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6 + | EscalationPolicyPathRulesItemType7 + | EscalationPolicyPathRulesItemType8Type0 + | EscalationPolicyPathRulesItemType8Type1 + | EscalationPolicyPathRulesItemType8Type2 + | EscalationPolicyPathRulesItemType8Type3 + | EscalationPolicyPathRulesItemType8Type4 + | EscalationPolicyPathRulesItemType8Type5 + | EscalationPolicyPathRulesItemType8Type6 + | EscalationPolicyPathRulesItemType8Type7 + | EscalationPolicyPathRulesItemType9Type0 + | EscalationPolicyPathRulesItemType9Type1 + | EscalationPolicyPathRulesItemType9Type2 + | EscalationPolicyPathRulesItemType9Type3 + | EscalationPolicyPathRulesItemType9Type4 + | EscalationPolicyPathRulesItemType9Type5 + | EscalationPolicyPathRulesItemType9Type6 + | EscalationPolicyPathRulesItemType9Type7 ] | Unset ) = UNSET @@ -304,20 +435,35 @@ def _parse_after_deferral_path_id(data: object) -> None | str | Unset: def _parse_rules_item( data: object, ) -> ( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6 + | EscalationPolicyPathRulesItemType7 + | EscalationPolicyPathRulesItemType8Type0 + | EscalationPolicyPathRulesItemType8Type1 + | EscalationPolicyPathRulesItemType8Type2 + | EscalationPolicyPathRulesItemType8Type3 + | EscalationPolicyPathRulesItemType8Type4 + | EscalationPolicyPathRulesItemType8Type5 + | EscalationPolicyPathRulesItemType8Type6 + | EscalationPolicyPathRulesItemType8Type7 + | EscalationPolicyPathRulesItemType9Type0 + | EscalationPolicyPathRulesItemType9Type1 + | EscalationPolicyPathRulesItemType9Type2 + | EscalationPolicyPathRulesItemType9Type3 + | EscalationPolicyPathRulesItemType9Type4 + | EscalationPolicyPathRulesItemType9Type5 + | EscalationPolicyPathRulesItemType9Type6 + | EscalationPolicyPathRulesItemType9Type7 ): - if data is None: - return data try: if not isinstance(data, dict): raise TypeError() - rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) + rules_item_type_0 = EscalationPolicyPathRulesItemType0.from_dict(data) return rules_item_type_0 except (TypeError, ValueError, AttributeError, KeyError): @@ -325,7 +471,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) + rules_item_type_1 = EscalationPolicyPathRulesItemType1.from_dict(data) return rules_item_type_1 except (TypeError, ValueError, AttributeError, KeyError): @@ -333,7 +479,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) + rules_item_type_2 = EscalationPolicyPathRulesItemType2.from_dict(data) return rules_item_type_2 except (TypeError, ValueError, AttributeError, KeyError): @@ -341,7 +487,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_3 = EscalationPathRuleField.from_dict(data) + rules_item_type_3 = EscalationPolicyPathRulesItemType3.from_dict(data) return rules_item_type_3 except (TypeError, ValueError, AttributeError, KeyError): @@ -349,7 +495,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_4 = EscalationPathRuleService.from_dict(data) + rules_item_type_4 = EscalationPolicyPathRulesItemType4.from_dict(data) return rules_item_type_4 except (TypeError, ValueError, AttributeError, KeyError): @@ -357,21 +503,152 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) + rules_item_type_5 = EscalationPolicyPathRulesItemType5.from_dict(data) return rules_item_type_5 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None, - data, - ) + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6 = EscalationPolicyPathRulesItemType6.from_dict(data) + + return rules_item_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7 = EscalationPolicyPathRulesItemType7.from_dict(data) + + return rules_item_type_7 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_0 = EscalationPolicyPathRulesItemType8Type0.from_dict(data) + + return rules_item_type_8_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_1 = EscalationPolicyPathRulesItemType8Type1.from_dict(data) + + return rules_item_type_8_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_2 = EscalationPolicyPathRulesItemType8Type2.from_dict(data) + + return rules_item_type_8_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_3 = EscalationPolicyPathRulesItemType8Type3.from_dict(data) + + return rules_item_type_8_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_4 = EscalationPolicyPathRulesItemType8Type4.from_dict(data) + + return rules_item_type_8_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_5 = EscalationPolicyPathRulesItemType8Type5.from_dict(data) + + return rules_item_type_8_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_6 = EscalationPolicyPathRulesItemType8Type6.from_dict(data) + + return rules_item_type_8_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_7 = EscalationPolicyPathRulesItemType8Type7.from_dict(data) + + return rules_item_type_8_type_7 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_0 = EscalationPolicyPathRulesItemType9Type0.from_dict(data) + + return rules_item_type_9_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_1 = EscalationPolicyPathRulesItemType9Type1.from_dict(data) + + return rules_item_type_9_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_2 = EscalationPolicyPathRulesItemType9Type2.from_dict(data) + + return rules_item_type_9_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_3 = EscalationPolicyPathRulesItemType9Type3.from_dict(data) + + return rules_item_type_9_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_4 = EscalationPolicyPathRulesItemType9Type4.from_dict(data) + + return rules_item_type_9_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_5 = EscalationPolicyPathRulesItemType9Type5.from_dict(data) + + return rules_item_type_9_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_6 = EscalationPolicyPathRulesItemType9Type6.from_dict(data) + + return rules_item_type_9_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_7 = EscalationPolicyPathRulesItemType9Type7.from_dict(data) + + return rules_item_type_9_type_7 rules_item = _parse_rules_item(rules_item_data) diff --git a/rootly_sdk/models/escalation_policy_path_list.py b/rootly_sdk/models/escalation_policy_path_list.py index 8e9c2bd5..3c07f135 100644 --- a/rootly_sdk/models/escalation_policy_path_list.py +++ b/rootly_sdk/models/escalation_policy_path_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.escalation_policy_path_list_data_item import EscalationPolicyPathListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class EscalationPolicyPathList: data (list[EscalationPolicyPathListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[EscalationPolicyPathListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_path_list_data_item import EscalationPolicyPathListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_path_list = cls( data=data, links=links, meta=meta, + included=included, ) escalation_policy_path_list.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_path_list_data_item.py b/rootly_sdk/models/escalation_policy_path_list_data_item.py index 7d50c763..bcb35aac 100644 --- a/rootly_sdk/models/escalation_policy_path_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_path_list_data_item.py @@ -26,6 +26,7 @@ class EscalationPolicyPathListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/escalation_policy_path_response.py b/rootly_sdk/models/escalation_policy_path_response.py index 591386ad..0983a792 100644 --- a/rootly_sdk/models/escalation_policy_path_response.py +++ b/rootly_sdk/models/escalation_policy_path_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.escalation_policy_path_response_data import EscalationPolicyPathResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="EscalationPolicyPathResponse") @@ -18,14 +21,24 @@ class EscalationPolicyPathResponse: """ Attributes: data (EscalationPolicyPathResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: EscalationPolicyPathResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_path_response_data import EscalationPolicyPathResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = EscalationPolicyPathResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_path_response = cls( data=data, + included=included, ) escalation_policy_path_response.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_path_response_data.py b/rootly_sdk/models/escalation_policy_path_response_data.py index a4d94aab..0b318cc3 100644 --- a/rootly_sdk/models/escalation_policy_path_response_data.py +++ b/rootly_sdk/models/escalation_policy_path_response_data.py @@ -34,6 +34,7 @@ class EscalationPolicyPathResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/escalation_path_rule_alert_urgency.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py similarity index 68% rename from rootly_sdk/models/escalation_path_rule_alert_urgency.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_0.py index 86c59b5b..f01cb69c 100644 --- a/rootly_sdk/models/escalation_path_rule_alert_urgency.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py @@ -6,23 +6,23 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_alert_urgency_rule_type import ( - EscalationPathRuleAlertUrgencyRuleType, - check_escalation_path_rule_alert_urgency_rule_type, +from ..models.escalation_policy_path_rules_item_type_0_rule_type import ( + EscalationPolicyPathRulesItemType0RuleType, + check_escalation_policy_path_rules_item_type_0_rule_type, ) -T = TypeVar("T", bound="EscalationPathRuleAlertUrgency") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType0") @_attrs_define -class EscalationPathRuleAlertUrgency: +class EscalationPolicyPathRulesItemType0: """ Attributes: - rule_type (EscalationPathRuleAlertUrgencyRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType0RuleType): The type of the escalation path rule urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used """ - rule_type: EscalationPathRuleAlertUrgencyRuleType + rule_type: EscalationPolicyPathRulesItemType0RuleType urgency_ids: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_path_rule_alert_urgency_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_0_rule_type(d.pop("rule_type")) urgency_ids = cast(list[str], d.pop("urgency_ids")) - escalation_path_rule_alert_urgency = cls( + escalation_policy_path_rules_item_type_0 = cls( rule_type=rule_type, urgency_ids=urgency_ids, ) - escalation_path_rule_alert_urgency.additional_properties = d - return escalation_path_rule_alert_urgency + escalation_policy_path_rules_item_type_0.additional_properties = d + return escalation_policy_path_rules_item_type_0 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py new file mode 100644 index 00000000..ade096f4 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType0RuleType = Literal["alert_urgency"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType0RuleType] = { + "alert_urgency", +} + + +def check_escalation_policy_path_rules_item_type_0_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType0RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_path_rule_working_hour.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py similarity index 69% rename from rootly_sdk/models/escalation_path_rule_working_hour.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_1.py index c48901b4..cebe2ca3 100644 --- a/rootly_sdk/models/escalation_path_rule_working_hour.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py @@ -6,23 +6,23 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_working_hour_rule_type import ( - EscalationPathRuleWorkingHourRuleType, - check_escalation_path_rule_working_hour_rule_type, +from ..models.escalation_policy_path_rules_item_type_1_rule_type import ( + EscalationPolicyPathRulesItemType1RuleType, + check_escalation_policy_path_rules_item_type_1_rule_type, ) -T = TypeVar("T", bound="EscalationPathRuleWorkingHour") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType1") @_attrs_define -class EscalationPathRuleWorkingHour: +class EscalationPolicyPathRulesItemType1: """ Attributes: - rule_type (EscalationPathRuleWorkingHourRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType1RuleType): The type of the escalation path rule within_working_hour (bool): Whether the escalation path should be used within working hours """ - rule_type: EscalationPathRuleWorkingHourRuleType + rule_type: EscalationPolicyPathRulesItemType1RuleType within_working_hour: bool additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_path_rule_working_hour_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_1_rule_type(d.pop("rule_type")) within_working_hour = d.pop("within_working_hour") - escalation_path_rule_working_hour = cls( + escalation_policy_path_rules_item_type_1 = cls( rule_type=rule_type, within_working_hour=within_working_hour, ) - escalation_path_rule_working_hour.additional_properties = d - return escalation_path_rule_working_hour + escalation_policy_path_rules_item_type_1.additional_properties = d + return escalation_policy_path_rules_item_type_1 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py new file mode 100644 index 00000000..3ff4b383 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType1RuleType = Literal["working_hour"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType1RuleType] = { + "working_hour", +} + + +def check_escalation_policy_path_rules_item_type_1_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType1RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_path_rule_json_path.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py similarity index 70% rename from rootly_sdk/models/escalation_path_rule_json_path.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_2.py index 31951043..6c37de59 100644 --- a/rootly_sdk/models/escalation_path_rule_json_path.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py @@ -6,33 +6,33 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_json_path_operator import ( - EscalationPathRuleJsonPathOperator, - check_escalation_path_rule_json_path_operator, +from ..models.escalation_policy_path_rules_item_type_2_operator import ( + EscalationPolicyPathRulesItemType2Operator, + check_escalation_policy_path_rules_item_type_2_operator, ) -from ..models.escalation_path_rule_json_path_rule_type import ( - EscalationPathRuleJsonPathRuleType, - check_escalation_path_rule_json_path_rule_type, +from ..models.escalation_policy_path_rules_item_type_2_rule_type import ( + EscalationPolicyPathRulesItemType2RuleType, + check_escalation_policy_path_rules_item_type_2_rule_type, ) from ..types import UNSET, Unset -T = TypeVar("T", bound="EscalationPathRuleJsonPath") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType2") @_attrs_define -class EscalationPathRuleJsonPath: +class EscalationPolicyPathRulesItemType2: """ Attributes: - rule_type (EscalationPathRuleJsonPathRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType2RuleType): The type of the escalation path rule json_path (str): JSON path to extract value from payload - operator (EscalationPathRuleJsonPathOperator): How JSON path value should be matched + operator (EscalationPolicyPathRulesItemType2Operator): How JSON path value should be matched value (None | str | Unset): Value with which JSON path value should be matched values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) """ - rule_type: EscalationPathRuleJsonPathRuleType + rule_type: EscalationPolicyPathRulesItemType2RuleType json_path: str - operator: EscalationPathRuleJsonPathOperator + operator: EscalationPolicyPathRulesItemType2Operator value: None | str | Unset = UNSET values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -73,11 +73,11 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_path_rule_json_path_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_2_rule_type(d.pop("rule_type")) json_path = d.pop("json_path") - operator = check_escalation_path_rule_json_path_operator(d.pop("operator")) + operator = check_escalation_policy_path_rules_item_type_2_operator(d.pop("operator")) def _parse_value(data: object) -> None | str | Unset: if data is None: @@ -90,7 +90,7 @@ def _parse_value(data: object) -> None | str | Unset: values = cast(list[str], d.pop("values", UNSET)) - escalation_path_rule_json_path = cls( + escalation_policy_path_rules_item_type_2 = cls( rule_type=rule_type, json_path=json_path, operator=operator, @@ -98,8 +98,8 @@ def _parse_value(data: object) -> None | str | Unset: values=values, ) - escalation_path_rule_json_path.additional_properties = d - return escalation_path_rule_json_path + escalation_policy_path_rules_item_type_2.additional_properties = d + return escalation_policy_path_rules_item_type_2 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py new file mode 100644 index 00000000..5ba6f8b7 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py @@ -0,0 +1,47 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType2Operator] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_escalation_policy_path_rules_item_type_2_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType2Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py new file mode 100644 index 00000000..ed2c358b --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType2RuleType = Literal["json_path"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType2RuleType] = { + "json_path", +} + + +def check_escalation_policy_path_rules_item_type_2_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType2RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_path_rule_field.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py similarity index 66% rename from rootly_sdk/models/escalation_path_rule_field.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_3.py index 3df46e2c..7696e1e7 100644 --- a/rootly_sdk/models/escalation_path_rule_field.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py @@ -6,34 +6,34 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_field_operator import ( - EscalationPathRuleFieldOperator, - check_escalation_path_rule_field_operator, +from ..models.escalation_policy_path_rules_item_type_3_operator import ( + EscalationPolicyPathRulesItemType3Operator, + check_escalation_policy_path_rules_item_type_3_operator, ) -from ..models.escalation_path_rule_field_rule_type import ( - EscalationPathRuleFieldRuleType, - check_escalation_path_rule_field_rule_type, +from ..models.escalation_policy_path_rules_item_type_3_rule_type import ( + EscalationPolicyPathRulesItemType3RuleType, + check_escalation_policy_path_rules_item_type_3_rule_type, ) from ..types import UNSET, Unset -T = TypeVar("T", bound="EscalationPathRuleField") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType3") @_attrs_define -class EscalationPathRuleField: +class EscalationPolicyPathRulesItemType3: """ Attributes: - rule_type (EscalationPathRuleFieldRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType3RuleType): The type of the escalation path rule fieldable_type (str): The type of the fieldable (e.g., AlertField) fieldable_id (str): The ID of the alert field - operator (EscalationPathRuleFieldOperator): How the alert field value should be matched + operator (EscalationPolicyPathRulesItemType3Operator): How the alert field value should be matched values (list[str] | Unset): Values to match against """ - rule_type: EscalationPathRuleFieldRuleType + rule_type: EscalationPolicyPathRulesItemType3RuleType fieldable_type: str fieldable_id: str - operator: EscalationPathRuleFieldOperator + operator: EscalationPolicyPathRulesItemType3Operator values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -68,17 +68,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_path_rule_field_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_3_rule_type(d.pop("rule_type")) fieldable_type = d.pop("fieldable_type") fieldable_id = d.pop("fieldable_id") - operator = check_escalation_path_rule_field_operator(d.pop("operator")) + operator = check_escalation_policy_path_rules_item_type_3_operator(d.pop("operator")) values = cast(list[str], d.pop("values", UNSET)) - escalation_path_rule_field = cls( + escalation_policy_path_rules_item_type_3 = cls( rule_type=rule_type, fieldable_type=fieldable_type, fieldable_id=fieldable_id, @@ -86,8 +86,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: values=values, ) - escalation_path_rule_field.additional_properties = d - return escalation_path_rule_field + escalation_policy_path_rules_item_type_3.additional_properties = d + return escalation_policy_path_rules_item_type_3 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_path_rule_field_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py similarity index 51% rename from rootly_sdk/models/escalation_path_rule_field_operator.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py index 6258b694..d036caca 100644 --- a/rootly_sdk/models/escalation_path_rule_field_operator.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPathRuleFieldOperator = Literal[ +EscalationPolicyPathRulesItemType3Operator = Literal[ "contains", "contains_key", "does_not_contain", @@ -17,7 +17,7 @@ "starts_with", ] -ESCALATION_PATH_RULE_FIELD_OPERATOR_VALUES: set[EscalationPathRuleFieldOperator] = { +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType3Operator] = { "contains", "contains_key", "does_not_contain", @@ -35,9 +35,13 @@ } -def check_escalation_path_rule_field_operator(value: str | None) -> EscalationPathRuleFieldOperator | None: +def check_escalation_policy_path_rules_item_type_3_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType3Operator | None: if value is None: return None - if value in ESCALATION_PATH_RULE_FIELD_OPERATOR_VALUES: - return cast(EscalationPathRuleFieldOperator, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_FIELD_OPERATOR_VALUES!r}") + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py new file mode 100644 index 00000000..7e78400c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType3RuleType = Literal["field"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType3RuleType] = { + "field", +} + + +def check_escalation_policy_path_rules_item_type_3_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType3RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_path_rule_service.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py similarity index 68% rename from rootly_sdk/models/escalation_path_rule_service.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_4.py index 9b278181..0b343c49 100644 --- a/rootly_sdk/models/escalation_path_rule_service.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py @@ -6,23 +6,23 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_service_rule_type import ( - EscalationPathRuleServiceRuleType, - check_escalation_path_rule_service_rule_type, +from ..models.escalation_policy_path_rules_item_type_4_rule_type import ( + EscalationPolicyPathRulesItemType4RuleType, + check_escalation_policy_path_rules_item_type_4_rule_type, ) -T = TypeVar("T", bound="EscalationPathRuleService") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4") @_attrs_define -class EscalationPathRuleService: +class EscalationPolicyPathRulesItemType4: """ Attributes: - rule_type (EscalationPathRuleServiceRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType4RuleType): The type of the escalation path rule service_ids (list[str]): Service ids for which this escalation path should be used """ - rule_type: EscalationPathRuleServiceRuleType + rule_type: EscalationPolicyPathRulesItemType4RuleType service_ids: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_path_rule_service_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_4_rule_type(d.pop("rule_type")) service_ids = cast(list[str], d.pop("service_ids")) - escalation_path_rule_service = cls( + escalation_policy_path_rules_item_type_4 = cls( rule_type=rule_type, service_ids=service_ids, ) - escalation_path_rule_service.additional_properties = d - return escalation_path_rule_service + escalation_policy_path_rules_item_type_4.additional_properties = d + return escalation_policy_path_rules_item_type_4 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py new file mode 100644 index 00000000..fe252ee5 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType4RuleType = Literal["service"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType4RuleType] = { + "service", +} + + +def check_escalation_policy_path_rules_item_type_4_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType4RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_path_rule_deferral_window.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py similarity index 52% rename from rootly_sdk/models/escalation_path_rule_deferral_window.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_5.py index d495663f..e0cca146 100644 --- a/rootly_sdk/models/escalation_path_rule_deferral_window.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py @@ -6,40 +6,41 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_deferral_window_rule_type import ( - EscalationPathRuleDeferralWindowRuleType, - check_escalation_path_rule_deferral_window_rule_type, +from ..models.escalation_policy_path_rules_item_type_5_rule_type import ( + EscalationPolicyPathRulesItemType5RuleType, + check_escalation_policy_path_rules_item_type_5_rule_type, ) -from ..models.escalation_path_rule_deferral_window_time_zone import ( - EscalationPathRuleDeferralWindowTimeZone, - check_escalation_path_rule_deferral_window_time_zone, +from ..models.escalation_policy_path_rules_item_type_5_time_zone import ( + EscalationPolicyPathRulesItemType5TimeZone, + check_escalation_policy_path_rules_item_type_5_time_zone, ) if TYPE_CHECKING: - from ..models.escalation_path_rule_deferral_window_time_blocks_item import ( - EscalationPathRuleDeferralWindowTimeBlocksItem, + from ..models.escalation_policy_path_rules_item_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType5TimeBlocksItem, ) -T = TypeVar("T", bound="EscalationPathRuleDeferralWindow") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5") @_attrs_define -class EscalationPathRuleDeferralWindow: +class EscalationPolicyPathRulesItemType5: """ Attributes: - rule_type (EscalationPathRuleDeferralWindowRuleType): The type of the escalation path rule - time_zone (EscalationPathRuleDeferralWindowTimeZone): Time zone for the deferral window - time_blocks (list[EscalationPathRuleDeferralWindowTimeBlocksItem]): Time windows during which alerts are + rule_type (EscalationPolicyPathRulesItemType5RuleType): The type of the escalation path rule + time_zone (EscalationPolicyPathRulesItemType5TimeZone): Time zone for the deferral window + time_blocks (list[EscalationPolicyPathRulesItemType5TimeBlocksItem]): Time windows during which alerts are deferred """ - rule_type: EscalationPathRuleDeferralWindowRuleType - time_zone: EscalationPathRuleDeferralWindowTimeZone - time_blocks: list[EscalationPathRuleDeferralWindowTimeBlocksItem] + rule_type: EscalationPolicyPathRulesItemType5RuleType + time_zone: EscalationPolicyPathRulesItemType5TimeZone + time_blocks: list[EscalationPolicyPathRulesItemType5TimeBlocksItem] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type time_zone: str = self.time_zone @@ -63,30 +64,30 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.escalation_path_rule_deferral_window_time_blocks_item import ( - EscalationPathRuleDeferralWindowTimeBlocksItem, + from ..models.escalation_policy_path_rules_item_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType5TimeBlocksItem, ) d = dict(src_dict) - rule_type = check_escalation_path_rule_deferral_window_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_5_rule_type(d.pop("rule_type")) - time_zone = check_escalation_path_rule_deferral_window_time_zone(d.pop("time_zone")) + time_zone = check_escalation_policy_path_rules_item_type_5_time_zone(d.pop("time_zone")) time_blocks = [] _time_blocks = d.pop("time_blocks") for time_blocks_item_data in _time_blocks: - time_blocks_item = EscalationPathRuleDeferralWindowTimeBlocksItem.from_dict(time_blocks_item_data) + time_blocks_item = EscalationPolicyPathRulesItemType5TimeBlocksItem.from_dict(time_blocks_item_data) time_blocks.append(time_blocks_item) - escalation_path_rule_deferral_window = cls( + escalation_policy_path_rules_item_type_5 = cls( rule_type=rule_type, time_zone=time_zone, time_blocks=time_blocks, ) - escalation_path_rule_deferral_window.additional_properties = d - return escalation_path_rule_deferral_window + escalation_policy_path_rules_item_type_5.additional_properties = d + return escalation_policy_path_rules_item_type_5 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py new file mode 100644 index 00000000..94cfaa55 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType5RuleType = Literal["deferral_window"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType5RuleType] = { + "deferral_window", +} + + +def check_escalation_policy_path_rules_item_type_5_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType5RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py new file mode 100644 index 00000000..2c596cc9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py @@ -0,0 +1,162 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + all_day = d.pop("all_day", UNSET) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + escalation_policy_path_rules_item_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + escalation_policy_path_rules_item_type_5_time_blocks_item.additional_properties = d + return escalation_policy_path_rules_item_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_path_rule_deferral_window_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py similarity index 90% rename from rootly_sdk/models/escalation_path_rule_deferral_window_time_zone.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py index dbd31352..670be050 100644 --- a/rootly_sdk/models/escalation_path_rule_deferral_window_time_zone.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPathRuleDeferralWindowTimeZone = Literal[ +EscalationPolicyPathRulesItemType5TimeZone = Literal[ "Abu Dhabi", "Adelaide", "Africa/Algiers", @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -292,7 +308,7 @@ "Zurich", ] -ESCALATION_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES: set[EscalationPathRuleDeferralWindowTimeZone] = { +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: set[EscalationPolicyPathRulesItemType5TimeZone] = { "Abu Dhabi", "Adelaide", "Africa/Algiers", @@ -304,8 +320,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -321,6 +339,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -332,6 +351,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -386,7 +406,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -407,6 +430,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -416,6 +440,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -522,15 +547,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -570,6 +601,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -585,13 +617,13 @@ } -def check_escalation_path_rule_deferral_window_time_zone( +def check_escalation_policy_path_rules_item_type_5_time_zone( value: str | None, -) -> EscalationPathRuleDeferralWindowTimeZone | None: +) -> EscalationPolicyPathRulesItemType5TimeZone | None: if value is None: return None - if value in ESCALATION_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES: - return cast(EscalationPathRuleDeferralWindowTimeZone, value) + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: + return cast(EscalationPolicyPathRulesItemType5TimeZone, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES!r}" ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py new file mode 100644 index 00000000..5b56175d --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_6_operator import ( + EscalationPolicyPathRulesItemType6Operator, + check_escalation_policy_path_rules_item_type_6_operator, +) +from ..models.escalation_policy_path_rules_item_type_6_rule_type import ( + EscalationPolicyPathRulesItemType6RuleType, + check_escalation_policy_path_rules_item_type_6_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6") + + +@_attrs_define +class EscalationPolicyPathRulesItemType6: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType6RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType6Operator): How the alert source should be matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: EscalationPolicyPathRulesItemType6RuleType + operator: EscalationPolicyPathRulesItemType6Operator + values: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "values": values, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_6_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + escalation_policy_path_rules_item_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + escalation_policy_path_rules_item_type_6.additional_properties = d + return escalation_policy_path_rules_item_type_6 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_operator.py new file mode 100644 index 00000000..f841c2c3 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType6Operator] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_policy_path_rules_item_type_6_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_rule_type.py new file mode 100644 index 00000000..713ba08d --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6RuleType = Literal["source"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType6RuleType] = { + "source", +} + + +def check_escalation_policy_path_rules_item_type_6_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType6RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py new file mode 100644 index 00000000..76be2bb0 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_7_operator import ( + EscalationPolicyPathRulesItemType7Operator, + check_escalation_policy_path_rules_item_type_7_operator, +) +from ..models.escalation_policy_path_rules_item_type_7_rule_type import ( + EscalationPolicyPathRulesItemType7RuleType, + check_escalation_policy_path_rules_item_type_7_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7") + + +@_attrs_define +class EscalationPolicyPathRulesItemType7: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType7RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType7Operator): Whether the alert must (or must not) have related + incidents + """ + + rule_type: EscalationPolicyPathRulesItemType7RuleType + operator: EscalationPolicyPathRulesItemType7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_7_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_7_operator(d.pop("operator")) + + escalation_policy_path_rules_item_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + escalation_policy_path_rules_item_type_7.additional_properties = d + return escalation_policy_path_rules_item_type_7 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_operator.py new file mode 100644 index 00000000..b31cb9a2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_operator.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Operator = Literal["is_not_set", "is_set"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType7Operator] = { + "is_not_set", + "is_set", +} + + +def check_escalation_policy_path_rules_item_type_7_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_rule_type.py new file mode 100644 index 00000000..1308f650 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7RuleType = Literal["related_incidents"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType7RuleType] = { + "related_incidents", +} + + +def check_escalation_policy_path_rules_item_type_7_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType7RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py new file mode 100644 index 00000000..cac3b5ab --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_8_type_0_rule_type import ( + EscalationPolicyPathRulesItemType8Type0RuleType, + check_escalation_policy_path_rules_item_type_8_type_0_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type0") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type0: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type0RuleType): The type of the escalation path rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType8Type0RuleType + urgency_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + urgency_ids = self.urgency_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "urgency_ids": urgency_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_0_rule_type(d.pop("rule_type")) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + escalation_policy_path_rules_item_type_8_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + escalation_policy_path_rules_item_type_8_type_0.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0_rule_type.py new file mode 100644 index 00000000..264602f3 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type0RuleType = Literal["alert_urgency"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type0RuleType +] = { + "alert_urgency", +} + + +def check_escalation_policy_path_rules_item_type_8_type_0_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type0RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py new file mode 100644 index 00000000..c58ca2b9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_8_type_1_rule_type import ( + EscalationPolicyPathRulesItemType8Type1RuleType, + check_escalation_policy_path_rules_item_type_8_type_1_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type1") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type1: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type1RuleType): The type of the escalation path rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: EscalationPolicyPathRulesItemType8Type1RuleType + within_working_hour: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + within_working_hour = self.within_working_hour + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "within_working_hour": within_working_hour, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_1_rule_type(d.pop("rule_type")) + + within_working_hour = d.pop("within_working_hour") + + escalation_policy_path_rules_item_type_8_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + escalation_policy_path_rules_item_type_8_type_1.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1_rule_type.py new file mode 100644 index 00000000..109e8ed2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type1RuleType = Literal["working_hour"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type1RuleType +] = { + "working_hour", +} + + +def check_escalation_policy_path_rules_item_type_8_type_1_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type1RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py new file mode 100644 index 00000000..1f0b82f7 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_8_type_2_operator import ( + EscalationPolicyPathRulesItemType8Type2Operator, + check_escalation_policy_path_rules_item_type_8_type_2_operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_2_rule_type import ( + EscalationPolicyPathRulesItemType8Type2RuleType, + check_escalation_policy_path_rules_item_type_8_type_2_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type2") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type2: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (EscalationPolicyPathRulesItemType8Type2Operator): How JSON path value should be matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) + """ + + rule_type: EscalationPolicyPathRulesItemType8Type2RuleType + json_path: str + operator: EscalationPolicyPathRulesItemType8Type2Operator + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + json_path = self.json_path + + operator: str = self.operator + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "json_path": json_path, + "operator": operator, + } + ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_escalation_policy_path_rules_item_type_8_type_2_operator(d.pop("operator")) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) + + escalation_policy_path_rules_item_type_8_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + escalation_policy_path_rules_item_type_8_type_2.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_operator.py new file mode 100644 index 00000000..5faeeb50 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType8Type2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_escalation_policy_path_rules_item_type_8_type_2_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type2Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_rule_type.py new file mode 100644 index 00000000..0e61520a --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type2RuleType = Literal["json_path"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type2RuleType +] = { + "json_path", +} + + +def check_escalation_policy_path_rules_item_type_8_type_2_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type2RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py new file mode 100644 index 00000000..2081dba4 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_8_type_3_operator import ( + EscalationPolicyPathRulesItemType8Type3Operator, + check_escalation_policy_path_rules_item_type_8_type_3_operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_3_rule_type import ( + EscalationPolicyPathRulesItemType8Type3RuleType, + check_escalation_policy_path_rules_item_type_8_type_3_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type3") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type3: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type3RuleType): The type of the escalation path rule + fieldable_type (str): The type of the fieldable (e.g., AlertField) + fieldable_id (str): The ID of the alert field + operator (EscalationPolicyPathRulesItemType8Type3Operator): How the alert field value should be matched + values (list[str] | Unset): Values to match against + """ + + rule_type: EscalationPolicyPathRulesItemType8Type3RuleType + fieldable_type: str + fieldable_id: str + operator: EscalationPolicyPathRulesItemType8Type3Operator + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + fieldable_type = self.fieldable_type + + fieldable_id = self.fieldable_id + + operator: str = self.operator + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "fieldable_type": fieldable_type, + "fieldable_id": fieldable_id, + "operator": operator, + } + ) + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_3_rule_type(d.pop("rule_type")) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_escalation_policy_path_rules_item_type_8_type_3_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values", UNSET)) + + escalation_policy_path_rules_item_type_8_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + escalation_policy_path_rules_item_type_8_type_3.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_3 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_operator.py new file mode 100644 index 00000000..2d4fbe9c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type3Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType8Type3Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +} + + +def check_escalation_policy_path_rules_item_type_8_type_3_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type3Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_rule_type.py new file mode 100644 index 00000000..0a39312e --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type3RuleType = Literal["field"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type3RuleType +] = { + "field", +} + + +def check_escalation_policy_path_rules_item_type_8_type_3_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type3RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py new file mode 100644 index 00000000..ffbf6f87 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_8_type_4_rule_type import ( + EscalationPolicyPathRulesItemType8Type4RuleType, + check_escalation_policy_path_rules_item_type_8_type_4_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type4") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type4: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType8Type4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + escalation_policy_path_rules_item_type_8_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + escalation_policy_path_rules_item_type_8_type_4.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4_rule_type.py new file mode 100644 index 00000000..bdafcbd9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type4RuleType = Literal["service"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type4RuleType +] = { + "service", +} + + +def check_escalation_policy_path_rules_item_type_8_type_4_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type4RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py new file mode 100644 index 00000000..1143016f --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_8_type_5_rule_type import ( + EscalationPolicyPathRulesItemType8Type5RuleType, + check_escalation_policy_path_rules_item_type_8_type_5_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_5_time_zone import ( + EscalationPolicyPathRulesItemType8Type5TimeZone, + check_escalation_policy_path_rules_item_type_8_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.escalation_policy_path_rules_item_type_8_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType8Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type5") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type5: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type5RuleType): The type of the escalation path rule + time_zone (EscalationPolicyPathRulesItemType8Type5TimeZone): Time zone for the deferral window + time_blocks (list[EscalationPolicyPathRulesItemType8Type5TimeBlocksItem]): Time windows during which alerts are + deferred + """ + + rule_type: EscalationPolicyPathRulesItemType8Type5RuleType + time_zone: EscalationPolicyPathRulesItemType8Type5TimeZone + time_blocks: list[EscalationPolicyPathRulesItemType8Type5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalation_policy_path_rules_item_type_8_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType8Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_escalation_policy_path_rules_item_type_8_type_5_time_zone(d.pop("time_zone")) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = EscalationPolicyPathRulesItemType8Type5TimeBlocksItem.from_dict(time_blocks_item_data) + + time_blocks.append(time_blocks_item) + + escalation_policy_path_rules_item_type_8_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + escalation_policy_path_rules_item_type_8_type_5.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_rule_type.py new file mode 100644 index 00000000..b01151d2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type5RuleType = Literal["deferral_window"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type5RuleType +] = { + "deferral_window", +} + + +def check_escalation_policy_path_rules_item_type_8_type_5_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type5RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py new file mode 100644 index 00000000..78acd66d --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py @@ -0,0 +1,162 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + all_day = d.pop("all_day", UNSET) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + escalation_policy_path_rules_item_type_8_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_zone.py new file mode 100644 index 00000000..7606e2c9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_escalation_policy_path_rules_item_type_8_type_5_time_zone( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type5TimeZone | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py new file mode 100644 index 00000000..c83904aa --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_8_type_6_operator import ( + EscalationPolicyPathRulesItemType8Type6Operator, + check_escalation_policy_path_rules_item_type_8_type_6_operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_6_rule_type import ( + EscalationPolicyPathRulesItemType8Type6RuleType, + check_escalation_policy_path_rules_item_type_8_type_6_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type6") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type6: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type6RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType8Type6Operator): How the alert source should be matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: EscalationPolicyPathRulesItemType8Type6RuleType + operator: EscalationPolicyPathRulesItemType8Type6Operator + values: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "values": values, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_6_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_8_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + escalation_policy_path_rules_item_type_8_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + escalation_policy_path_rules_item_type_8_type_6.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_6 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_operator.py new file mode 100644 index 00000000..ac729347 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_operator.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType8Type6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_policy_path_rules_item_type_8_type_6_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type6Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_rule_type.py new file mode 100644 index 00000000..3c5ff6b8 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type6RuleType = Literal["source"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type6RuleType +] = { + "source", +} + + +def check_escalation_policy_path_rules_item_type_8_type_6_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type6RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py new file mode 100644 index 00000000..435bdc44 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_8_type_7_operator import ( + EscalationPolicyPathRulesItemType8Type7Operator, + check_escalation_policy_path_rules_item_type_8_type_7_operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_7_rule_type import ( + EscalationPolicyPathRulesItemType8Type7RuleType, + check_escalation_policy_path_rules_item_type_8_type_7_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type7") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type7: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type7RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType8Type7Operator): Whether the alert must (or must not) have related + incidents + """ + + rule_type: EscalationPolicyPathRulesItemType8Type7RuleType + operator: EscalationPolicyPathRulesItemType8Type7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_7_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_8_type_7_operator(d.pop("operator")) + + escalation_policy_path_rules_item_type_8_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + escalation_policy_path_rules_item_type_8_type_7.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_7 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_operator.py new file mode 100644 index 00000000..d5297005 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type7Operator = Literal["is_not_set", "is_set"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType8Type7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_escalation_policy_path_rules_item_type_8_type_7_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type7Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_rule_type.py new file mode 100644 index 00000000..1b37193d --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type7RuleType = Literal["related_incidents"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type7RuleType +] = { + "related_incidents", +} + + +def check_escalation_policy_path_rules_item_type_8_type_7_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type7RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py new file mode 100644 index 00000000..ec39d280 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_9_type_0_rule_type import ( + EscalationPolicyPathRulesItemType9Type0RuleType, + check_escalation_policy_path_rules_item_type_9_type_0_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type0") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type0: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type0RuleType): The type of the escalation path rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType9Type0RuleType + urgency_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + urgency_ids = self.urgency_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "urgency_ids": urgency_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_0_rule_type(d.pop("rule_type")) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + escalation_policy_path_rules_item_type_9_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + escalation_policy_path_rules_item_type_9_type_0.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0_rule_type.py new file mode 100644 index 00000000..48322d7c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type0RuleType = Literal["alert_urgency"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type0RuleType +] = { + "alert_urgency", +} + + +def check_escalation_policy_path_rules_item_type_9_type_0_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type0RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py new file mode 100644 index 00000000..6ba315ef --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_9_type_1_rule_type import ( + EscalationPolicyPathRulesItemType9Type1RuleType, + check_escalation_policy_path_rules_item_type_9_type_1_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type1") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type1: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type1RuleType): The type of the escalation path rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: EscalationPolicyPathRulesItemType9Type1RuleType + within_working_hour: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + within_working_hour = self.within_working_hour + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "within_working_hour": within_working_hour, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_1_rule_type(d.pop("rule_type")) + + within_working_hour = d.pop("within_working_hour") + + escalation_policy_path_rules_item_type_9_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + escalation_policy_path_rules_item_type_9_type_1.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1_rule_type.py new file mode 100644 index 00000000..a87ebc23 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type1RuleType = Literal["working_hour"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type1RuleType +] = { + "working_hour", +} + + +def check_escalation_policy_path_rules_item_type_9_type_1_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type1RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py new file mode 100644 index 00000000..97d1442c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_9_type_2_operator import ( + EscalationPolicyPathRulesItemType9Type2Operator, + check_escalation_policy_path_rules_item_type_9_type_2_operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_2_rule_type import ( + EscalationPolicyPathRulesItemType9Type2RuleType, + check_escalation_policy_path_rules_item_type_9_type_2_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type2") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type2: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (EscalationPolicyPathRulesItemType9Type2Operator): How JSON path value should be matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) + """ + + rule_type: EscalationPolicyPathRulesItemType9Type2RuleType + json_path: str + operator: EscalationPolicyPathRulesItemType9Type2Operator + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + json_path = self.json_path + + operator: str = self.operator + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "json_path": json_path, + "operator": operator, + } + ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_escalation_policy_path_rules_item_type_9_type_2_operator(d.pop("operator")) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) + + escalation_policy_path_rules_item_type_9_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + escalation_policy_path_rules_item_type_9_type_2.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_operator.py new file mode 100644 index 00000000..f28c4c22 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType9Type2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_escalation_policy_path_rules_item_type_9_type_2_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type2Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_rule_type.py new file mode 100644 index 00000000..b5356280 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type2RuleType = Literal["json_path"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type2RuleType +] = { + "json_path", +} + + +def check_escalation_policy_path_rules_item_type_9_type_2_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type2RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py new file mode 100644 index 00000000..6c5863b1 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_9_type_3_operator import ( + EscalationPolicyPathRulesItemType9Type3Operator, + check_escalation_policy_path_rules_item_type_9_type_3_operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_3_rule_type import ( + EscalationPolicyPathRulesItemType9Type3RuleType, + check_escalation_policy_path_rules_item_type_9_type_3_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type3") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type3: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type3RuleType): The type of the escalation path rule + fieldable_type (str): The type of the fieldable (e.g., AlertField) + fieldable_id (str): The ID of the alert field + operator (EscalationPolicyPathRulesItemType9Type3Operator): How the alert field value should be matched + values (list[str] | Unset): Values to match against + """ + + rule_type: EscalationPolicyPathRulesItemType9Type3RuleType + fieldable_type: str + fieldable_id: str + operator: EscalationPolicyPathRulesItemType9Type3Operator + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + fieldable_type = self.fieldable_type + + fieldable_id = self.fieldable_id + + operator: str = self.operator + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "fieldable_type": fieldable_type, + "fieldable_id": fieldable_id, + "operator": operator, + } + ) + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_3_rule_type(d.pop("rule_type")) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_escalation_policy_path_rules_item_type_9_type_3_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values", UNSET)) + + escalation_policy_path_rules_item_type_9_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + escalation_policy_path_rules_item_type_9_type_3.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_3 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_operator.py new file mode 100644 index 00000000..0ec9653c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type3Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType9Type3Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +} + + +def check_escalation_policy_path_rules_item_type_9_type_3_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type3Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_rule_type.py new file mode 100644 index 00000000..01336e99 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type3RuleType = Literal["field"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type3RuleType +] = { + "field", +} + + +def check_escalation_policy_path_rules_item_type_9_type_3_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type3RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py new file mode 100644 index 00000000..d20cd9a4 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_9_type_4_rule_type import ( + EscalationPolicyPathRulesItemType9Type4RuleType, + check_escalation_policy_path_rules_item_type_9_type_4_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type4") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type4: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType9Type4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + escalation_policy_path_rules_item_type_9_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + escalation_policy_path_rules_item_type_9_type_4.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4_rule_type.py new file mode 100644 index 00000000..4db178bf --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type4RuleType = Literal["service"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type4RuleType +] = { + "service", +} + + +def check_escalation_policy_path_rules_item_type_9_type_4_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type4RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py new file mode 100644 index 00000000..69651641 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_9_type_5_rule_type import ( + EscalationPolicyPathRulesItemType9Type5RuleType, + check_escalation_policy_path_rules_item_type_9_type_5_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_5_time_zone import ( + EscalationPolicyPathRulesItemType9Type5TimeZone, + check_escalation_policy_path_rules_item_type_9_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.escalation_policy_path_rules_item_type_9_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType9Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type5") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type5: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type5RuleType): The type of the escalation path rule + time_zone (EscalationPolicyPathRulesItemType9Type5TimeZone): Time zone for the deferral window + time_blocks (list[EscalationPolicyPathRulesItemType9Type5TimeBlocksItem]): Time windows during which alerts are + deferred + """ + + rule_type: EscalationPolicyPathRulesItemType9Type5RuleType + time_zone: EscalationPolicyPathRulesItemType9Type5TimeZone + time_blocks: list[EscalationPolicyPathRulesItemType9Type5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalation_policy_path_rules_item_type_9_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType9Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_escalation_policy_path_rules_item_type_9_type_5_time_zone(d.pop("time_zone")) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = EscalationPolicyPathRulesItemType9Type5TimeBlocksItem.from_dict(time_blocks_item_data) + + time_blocks.append(time_blocks_item) + + escalation_policy_path_rules_item_type_9_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + escalation_policy_path_rules_item_type_9_type_5.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_rule_type.py new file mode 100644 index 00000000..bc896cef --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type5RuleType = Literal["deferral_window"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type5RuleType +] = { + "deferral_window", +} + + +def check_escalation_policy_path_rules_item_type_9_type_5_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type5RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py new file mode 100644 index 00000000..6b32dea9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py @@ -0,0 +1,162 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + all_day = d.pop("all_day", UNSET) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + escalation_policy_path_rules_item_type_9_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_zone.py new file mode 100644 index 00000000..5d1ef449 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_escalation_policy_path_rules_item_type_9_type_5_time_zone( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type5TimeZone | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py new file mode 100644 index 00000000..ac30f0d9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_9_type_6_operator import ( + EscalationPolicyPathRulesItemType9Type6Operator, + check_escalation_policy_path_rules_item_type_9_type_6_operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_6_rule_type import ( + EscalationPolicyPathRulesItemType9Type6RuleType, + check_escalation_policy_path_rules_item_type_9_type_6_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type6") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type6: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type6RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType9Type6Operator): How the alert source should be matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: EscalationPolicyPathRulesItemType9Type6RuleType + operator: EscalationPolicyPathRulesItemType9Type6Operator + values: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "values": values, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_6_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_9_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + escalation_policy_path_rules_item_type_9_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + escalation_policy_path_rules_item_type_9_type_6.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_6 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_operator.py new file mode 100644 index 00000000..4a71cad8 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_operator.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType9Type6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_policy_path_rules_item_type_9_type_6_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type6Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_rule_type.py new file mode 100644 index 00000000..1b062e94 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type6RuleType = Literal["source"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type6RuleType +] = { + "source", +} + + +def check_escalation_policy_path_rules_item_type_9_type_6_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type6RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py new file mode 100644 index 00000000..c66bd1f0 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_9_type_7_operator import ( + EscalationPolicyPathRulesItemType9Type7Operator, + check_escalation_policy_path_rules_item_type_9_type_7_operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_7_rule_type import ( + EscalationPolicyPathRulesItemType9Type7RuleType, + check_escalation_policy_path_rules_item_type_9_type_7_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type7") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type7: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type7RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType9Type7Operator): Whether the alert must (or must not) have related + incidents + """ + + rule_type: EscalationPolicyPathRulesItemType9Type7RuleType + operator: EscalationPolicyPathRulesItemType9Type7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_7_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_9_type_7_operator(d.pop("operator")) + + escalation_policy_path_rules_item_type_9_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + escalation_policy_path_rules_item_type_9_type_7.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_7 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_operator.py new file mode 100644 index 00000000..a3b93a2a --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type7Operator = Literal["is_not_set", "is_set"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType9Type7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_escalation_policy_path_rules_item_type_9_type_7_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type7Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_rule_type.py new file mode 100644 index 00000000..82299509 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type7RuleType = Literal["related_incidents"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type7RuleType +] = { + "related_incidents", +} + + +def check_escalation_policy_path_rules_item_type_9_type_7_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type7RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_time_restriction_time_zone.py b/rootly_sdk/models/escalation_policy_path_time_restriction_time_zone.py index c79145d8..c5c8d0c2 100644 --- a/rootly_sdk/models/escalation_policy_path_time_restriction_time_zone.py +++ b/rootly_sdk/models/escalation_policy_path_time_restriction_time_zone.py @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -304,8 +320,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -321,6 +339,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -332,6 +351,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -386,7 +406,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -407,6 +430,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -416,6 +440,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -522,15 +547,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -570,6 +601,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/escalation_policy_response.py b/rootly_sdk/models/escalation_policy_response.py index ff548478..75a58333 100644 --- a/rootly_sdk/models/escalation_policy_response.py +++ b/rootly_sdk/models/escalation_policy_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.escalation_policy_response_data import EscalationPolicyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="EscalationPolicyResponse") @@ -18,14 +21,24 @@ class EscalationPolicyResponse: """ Attributes: data (EscalationPolicyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: EscalationPolicyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_response_data import EscalationPolicyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = EscalationPolicyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_response = cls( data=data, + included=included, ) escalation_policy_response.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_response_data.py b/rootly_sdk/models/escalation_policy_response_data.py index 24e804a5..04dc48e4 100644 --- a/rootly_sdk/models/escalation_policy_response_data.py +++ b/rootly_sdk/models/escalation_policy_response_data.py @@ -33,6 +33,7 @@ class EscalationPolicyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_kind.py b/rootly_sdk/models/form_field_kind.py index 3620584e..a1252578 100644 --- a/rootly_sdk/models/form_field_kind.py +++ b/rootly_sdk/models/form_field_kind.py @@ -25,6 +25,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", @@ -58,6 +59,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", diff --git a/rootly_sdk/models/form_field_list.py b/rootly_sdk/models/form_field_list.py index a48ea04d..2011c3b9 100644 --- a/rootly_sdk/models/form_field_list.py +++ b/rootly_sdk/models/form_field_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_list_data_item import FormFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class FormFieldList: data (list[FormFieldListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_list_data_item import FormFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_list.additional_properties = d diff --git a/rootly_sdk/models/form_field_list_data_item.py b/rootly_sdk/models/form_field_list_data_item.py index 190312ed..e25163e5 100644 --- a/rootly_sdk/models/form_field_list_data_item.py +++ b/rootly_sdk/models/form_field_list_data_item.py @@ -30,6 +30,7 @@ class FormFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_option_list.py b/rootly_sdk/models/form_field_option_list.py index b4c5a091..e790315c 100644 --- a/rootly_sdk/models/form_field_option_list.py +++ b/rootly_sdk/models/form_field_option_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_option_list_data_item import FormFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class FormFieldOptionList: data (list[FormFieldOptionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldOptionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_option_list_data_item import FormFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_option_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_option_list.additional_properties = d diff --git a/rootly_sdk/models/form_field_option_list_data_item.py b/rootly_sdk/models/form_field_option_list_data_item.py index b37a530e..cd8c8f3b 100644 --- a/rootly_sdk/models/form_field_option_list_data_item.py +++ b/rootly_sdk/models/form_field_option_list_data_item.py @@ -33,6 +33,7 @@ class FormFieldOptionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_option_response.py b/rootly_sdk/models/form_field_option_response.py index 2045abdd..a4531c97 100644 --- a/rootly_sdk/models/form_field_option_response.py +++ b/rootly_sdk/models/form_field_option_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_option_response_data import FormFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldOptionResponse") @@ -18,14 +21,24 @@ class FormFieldOptionResponse: """ Attributes: data (FormFieldOptionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldOptionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_option_response_data import FormFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldOptionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_option_response = cls( data=data, + included=included, ) form_field_option_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_option_response_data.py b/rootly_sdk/models/form_field_option_response_data.py index ab893054..e9ccf686 100644 --- a/rootly_sdk/models/form_field_option_response_data.py +++ b/rootly_sdk/models/form_field_option_response_data.py @@ -33,6 +33,7 @@ class FormFieldOptionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_placement_condition_list.py b/rootly_sdk/models/form_field_placement_condition_list.py index ca528d32..94fe706f 100644 --- a/rootly_sdk/models/form_field_placement_condition_list.py +++ b/rootly_sdk/models/form_field_placement_condition_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_placement_condition_list_data_item import FormFieldPlacementConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class FormFieldPlacementConditionList: data (list[FormFieldPlacementConditionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldPlacementConditionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_placement_condition_list_data_item import FormFieldPlacementConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_placement_condition_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_placement_condition_list.additional_properties = d diff --git a/rootly_sdk/models/form_field_placement_condition_list_data_item.py b/rootly_sdk/models/form_field_placement_condition_list_data_item.py index f86cdeb6..5f15820c 100644 --- a/rootly_sdk/models/form_field_placement_condition_list_data_item.py +++ b/rootly_sdk/models/form_field_placement_condition_list_data_item.py @@ -33,6 +33,7 @@ class FormFieldPlacementConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_placement_condition_response.py b/rootly_sdk/models/form_field_placement_condition_response.py index 6ecfaf5e..c374c385 100644 --- a/rootly_sdk/models/form_field_placement_condition_response.py +++ b/rootly_sdk/models/form_field_placement_condition_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_placement_condition_response_data import FormFieldPlacementConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldPlacementConditionResponse") @@ -18,14 +21,24 @@ class FormFieldPlacementConditionResponse: """ Attributes: data (FormFieldPlacementConditionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldPlacementConditionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_placement_condition_response_data import FormFieldPlacementConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldPlacementConditionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_placement_condition_response = cls( data=data, + included=included, ) form_field_placement_condition_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_placement_condition_response_data.py b/rootly_sdk/models/form_field_placement_condition_response_data.py index 72b5df8e..61facbc0 100644 --- a/rootly_sdk/models/form_field_placement_condition_response_data.py +++ b/rootly_sdk/models/form_field_placement_condition_response_data.py @@ -33,6 +33,7 @@ class FormFieldPlacementConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_placement_list.py b/rootly_sdk/models/form_field_placement_list.py index 64308e8d..3e82fdde 100644 --- a/rootly_sdk/models/form_field_placement_list.py +++ b/rootly_sdk/models/form_field_placement_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_placement_list_data_item import FormFieldPlacementListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class FormFieldPlacementList: data (list[FormFieldPlacementListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldPlacementListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_placement_list_data_item import FormFieldPlacementListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_placement_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_placement_list.additional_properties = d diff --git a/rootly_sdk/models/form_field_placement_list_data_item.py b/rootly_sdk/models/form_field_placement_list_data_item.py index ffb31c2b..fb27515a 100644 --- a/rootly_sdk/models/form_field_placement_list_data_item.py +++ b/rootly_sdk/models/form_field_placement_list_data_item.py @@ -33,6 +33,7 @@ class FormFieldPlacementListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_placement_response.py b/rootly_sdk/models/form_field_placement_response.py index 8074305f..e1366e5f 100644 --- a/rootly_sdk/models/form_field_placement_response.py +++ b/rootly_sdk/models/form_field_placement_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_placement_response_data import FormFieldPlacementResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldPlacementResponse") @@ -18,14 +21,24 @@ class FormFieldPlacementResponse: """ Attributes: data (FormFieldPlacementResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldPlacementResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_placement_response_data import FormFieldPlacementResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldPlacementResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_placement_response = cls( data=data, + included=included, ) form_field_placement_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_placement_response_data.py b/rootly_sdk/models/form_field_placement_response_data.py index 20c0d20f..c36d8782 100644 --- a/rootly_sdk/models/form_field_placement_response_data.py +++ b/rootly_sdk/models/form_field_placement_response_data.py @@ -33,6 +33,7 @@ class FormFieldPlacementResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_position_form.py b/rootly_sdk/models/form_field_position_form.py index ff67d554..8b1043f4 100644 --- a/rootly_sdk/models/form_field_position_form.py +++ b/rootly_sdk/models/form_field_position_form.py @@ -2,6 +2,7 @@ FormFieldPositionForm = Literal[ "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -10,6 +11,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", @@ -22,6 +24,7 @@ FORM_FIELD_POSITION_FORM_VALUES: set[FormFieldPositionForm] = { "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -30,6 +33,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", diff --git a/rootly_sdk/models/form_field_position_list.py b/rootly_sdk/models/form_field_position_list.py index 7d0f35f3..6acf4d07 100644 --- a/rootly_sdk/models/form_field_position_list.py +++ b/rootly_sdk/models/form_field_position_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_position_list_data_item import FormFieldPositionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class FormFieldPositionList: data (list[FormFieldPositionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldPositionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_position_list_data_item import FormFieldPositionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_position_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_position_list.additional_properties = d diff --git a/rootly_sdk/models/form_field_position_list_data_item.py b/rootly_sdk/models/form_field_position_list_data_item.py index c68a3ba1..e0c0a026 100644 --- a/rootly_sdk/models/form_field_position_list_data_item.py +++ b/rootly_sdk/models/form_field_position_list_data_item.py @@ -33,6 +33,7 @@ class FormFieldPositionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_position_response.py b/rootly_sdk/models/form_field_position_response.py index 2a751e3c..5fbc79a2 100644 --- a/rootly_sdk/models/form_field_position_response.py +++ b/rootly_sdk/models/form_field_position_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_position_response_data import FormFieldPositionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldPositionResponse") @@ -18,14 +21,24 @@ class FormFieldPositionResponse: """ Attributes: data (FormFieldPositionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldPositionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_position_response_data import FormFieldPositionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldPositionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_position_response = cls( data=data, + included=included, ) form_field_position_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_position_response_data.py b/rootly_sdk/models/form_field_position_response_data.py index 35e52e1a..d1e206d9 100644 --- a/rootly_sdk/models/form_field_position_response_data.py +++ b/rootly_sdk/models/form_field_position_response_data.py @@ -33,6 +33,7 @@ class FormFieldPositionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_response.py b/rootly_sdk/models/form_field_response.py index af8cf6a7..f84e4bb3 100644 --- a/rootly_sdk/models/form_field_response.py +++ b/rootly_sdk/models/form_field_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_field_response_data import FormFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldResponse") @@ -18,14 +21,24 @@ class FormFieldResponse: """ Attributes: data (FormFieldResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_response_data import FormFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_response = cls( data=data, + included=included, ) form_field_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_response_data.py b/rootly_sdk/models/form_field_response_data.py index 10089c15..00a95f7a 100644 --- a/rootly_sdk/models/form_field_response_data.py +++ b/rootly_sdk/models/form_field_response_data.py @@ -30,6 +30,7 @@ class FormFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_set.py b/rootly_sdk/models/form_set.py index 02ffd729..4800d2d5 100644 --- a/rootly_sdk/models/form_set.py +++ b/rootly_sdk/models/form_set.py @@ -23,7 +23,7 @@ class FormSet: `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, - `slack_update_scheduled_incident_form` + `slack_update_scheduled_incident_form`, `google_chat_new_incident_form`, `google_chat_update_incident_form` created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the form set diff --git a/rootly_sdk/models/form_set_condition_list.py b/rootly_sdk/models/form_set_condition_list.py index 7e0ed3e8..427a6913 100644 --- a/rootly_sdk/models/form_set_condition_list.py +++ b/rootly_sdk/models/form_set_condition_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_set_condition_list_data_item import FormSetConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class FormSetConditionList: data (list[FormSetConditionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormSetConditionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_set_condition_list_data_item import FormSetConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_set_condition_list = cls( data=data, links=links, meta=meta, + included=included, ) form_set_condition_list.additional_properties = d diff --git a/rootly_sdk/models/form_set_condition_list_data_item.py b/rootly_sdk/models/form_set_condition_list_data_item.py index 0525b725..4e33ff01 100644 --- a/rootly_sdk/models/form_set_condition_list_data_item.py +++ b/rootly_sdk/models/form_set_condition_list_data_item.py @@ -33,6 +33,7 @@ class FormSetConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_set_condition_response.py b/rootly_sdk/models/form_set_condition_response.py index 7f0509b7..d2e7b00a 100644 --- a/rootly_sdk/models/form_set_condition_response.py +++ b/rootly_sdk/models/form_set_condition_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_set_condition_response_data import FormSetConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormSetConditionResponse") @@ -18,14 +21,24 @@ class FormSetConditionResponse: """ Attributes: data (FormSetConditionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormSetConditionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_set_condition_response_data import FormSetConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormSetConditionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_set_condition_response = cls( data=data, + included=included, ) form_set_condition_response.additional_properties = d diff --git a/rootly_sdk/models/form_set_condition_response_data.py b/rootly_sdk/models/form_set_condition_response_data.py index 6e6a3a67..37053a7c 100644 --- a/rootly_sdk/models/form_set_condition_response_data.py +++ b/rootly_sdk/models/form_set_condition_response_data.py @@ -33,6 +33,7 @@ class FormSetConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_set_list.py b/rootly_sdk/models/form_set_list.py index f6526e07..451c198c 100644 --- a/rootly_sdk/models/form_set_list.py +++ b/rootly_sdk/models/form_set_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_set_list_data_item import FormSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class FormSetList: data (list[FormSetListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormSetListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_set_list_data_item import FormSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_set_list = cls( data=data, links=links, meta=meta, + included=included, ) form_set_list.additional_properties = d diff --git a/rootly_sdk/models/form_set_list_data_item.py b/rootly_sdk/models/form_set_list_data_item.py index 24f0718c..21ac0f95 100644 --- a/rootly_sdk/models/form_set_list_data_item.py +++ b/rootly_sdk/models/form_set_list_data_item.py @@ -30,6 +30,7 @@ class FormSetListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_set_response.py b/rootly_sdk/models/form_set_response.py index 99022037..a8cd8b95 100644 --- a/rootly_sdk/models/form_set_response.py +++ b/rootly_sdk/models/form_set_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.form_set_response_data import FormSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormSetResponse") @@ -18,14 +21,24 @@ class FormSetResponse: """ Attributes: data (FormSetResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormSetResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_set_response_data import FormSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormSetResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_set_response = cls( data=data, + included=included, ) form_set_response.additional_properties = d diff --git a/rootly_sdk/models/form_set_response_data.py b/rootly_sdk/models/form_set_response_data.py index 96ccef28..9c7d1e8e 100644 --- a/rootly_sdk/models/form_set_response_data.py +++ b/rootly_sdk/models/form_set_response_data.py @@ -30,6 +30,7 @@ class FormSetResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/functionality.py b/rootly_sdk/models/functionality.py index 42664292..5c5f97c0 100644 --- a/rootly_sdk/models/functionality.py +++ b/rootly_sdk/models/functionality.py @@ -6,6 +6,7 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.functionality_managed_by import FunctionalityManagedBy, check_functionality_managed_by from ..types import UNSET, Unset if TYPE_CHECKING: @@ -25,6 +26,8 @@ class Functionality: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the functionality + managed_by (FunctionalityManagedBy | Unset): How this functionality is managed (provenance): web, api, + terraform, etc. Read-only. description (None | str | Unset): The description of the functionality public_description (None | str | Unset): The public description of the functionality notify_emails (list[str] | None | Unset): Emails attached to the functionality @@ -42,6 +45,7 @@ class Functionality: service_ids (list[str] | None | Unset): Services associated with this functionality owner_group_ids (list[str] | None | Unset): Owner Teams associated with this functionality owner_user_ids (list[int] | None | Unset): Owner Users associated with this functionality + escalation_policy_id (None | str | Unset): The escalation policy id of the functionality slack_channels (list[FunctionalitySlackChannelsType0Item] | None | Unset): Slack Channels associated with this functionality slack_aliases (list[FunctionalitySlackAliasesType0Item] | None | Unset): Slack Aliases associated with this @@ -54,6 +58,7 @@ class Functionality: created_at: str updated_at: str slug: str | Unset = UNSET + managed_by: FunctionalityManagedBy | Unset = UNSET description: None | str | Unset = UNSET public_description: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET @@ -70,12 +75,14 @@ class Functionality: service_ids: list[str] | None | Unset = UNSET owner_group_ids: list[str] | None | Unset = UNSET owner_user_ids: list[int] | None | Unset = UNSET + escalation_policy_id: None | str | Unset = UNSET slack_channels: list[FunctionalitySlackChannelsType0Item] | None | Unset = UNSET slack_aliases: list[FunctionalitySlackAliasesType0Item] | None | Unset = UNSET properties: list[FunctionalityPropertiesType0Item] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name created_at = self.created_at @@ -84,6 +91,10 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET @@ -195,6 +206,12 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids + escalation_policy_id: None | str | Unset + if isinstance(self.escalation_policy_id, Unset): + escalation_policy_id = UNSET + else: + escalation_policy_id = self.escalation_policy_id + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET @@ -242,6 +259,8 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by if description is not UNSET: field_dict["description"] = description if public_description is not UNSET: @@ -274,6 +293,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["owner_group_ids"] = owner_group_ids if owner_user_ids is not UNSET: field_dict["owner_user_ids"] = owner_user_ids + if escalation_policy_id is not UNSET: + field_dict["escalation_policy_id"] = escalation_policy_id if slack_channels is not UNSET: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: @@ -298,6 +319,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _managed_by = d.pop("managed_by", UNSET) + managed_by: FunctionalityManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_functionality_managed_by(_managed_by) + def _parse_description(data: object) -> None | str | Unset: if data is None: return data @@ -482,6 +510,15 @@ def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) + def _parse_escalation_policy_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) + def _parse_slack_channels(data: object) -> list[FunctionalitySlackChannelsType0Item] | None | Unset: if data is None: return data @@ -557,6 +594,7 @@ def _parse_properties(data: object) -> list[FunctionalityPropertiesType0Item] | created_at=created_at, updated_at=updated_at, slug=slug, + managed_by=managed_by, description=description, public_description=public_description, notify_emails=notify_emails, @@ -573,6 +611,7 @@ def _parse_properties(data: object) -> list[FunctionalityPropertiesType0Item] | service_ids=service_ids, owner_group_ids=owner_group_ids, owner_user_ids=owner_user_ids, + escalation_policy_id=escalation_policy_id, slack_channels=slack_channels, slack_aliases=slack_aliases, properties=properties, diff --git a/rootly_sdk/models/functionality_list.py b/rootly_sdk/models/functionality_list.py index 1aad7cf8..fbc1c27f 100644 --- a/rootly_sdk/models/functionality_list.py +++ b/rootly_sdk/models/functionality_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.functionality_list_data_item import FunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class FunctionalityList: data (list[FunctionalityListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FunctionalityListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.functionality_list_data_item import FunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + functionality_list = cls( data=data, links=links, meta=meta, + included=included, ) functionality_list.additional_properties = d diff --git a/rootly_sdk/models/functionality_list_data_item.py b/rootly_sdk/models/functionality_list_data_item.py index 62e6eee4..df02f6b2 100644 --- a/rootly_sdk/models/functionality_list_data_item.py +++ b/rootly_sdk/models/functionality_list_data_item.py @@ -33,6 +33,7 @@ class FunctionalityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/functionality_managed_by.py b/rootly_sdk/models/functionality_managed_by.py new file mode 100644 index 00000000..09f413b5 --- /dev/null +++ b/rootly_sdk/models/functionality_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +FunctionalityManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +FUNCTIONALITY_MANAGED_BY_VALUES: set[FunctionalityManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_functionality_managed_by(value: str | None) -> FunctionalityManagedBy | None: + if value is None: + return None + if value in FUNCTIONALITY_MANAGED_BY_VALUES: + return cast(FunctionalityManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {FUNCTIONALITY_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/functionality_response.py b/rootly_sdk/models/functionality_response.py index eb5b8f25..87433a01 100644 --- a/rootly_sdk/models/functionality_response.py +++ b/rootly_sdk/models/functionality_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.functionality_response_data import FunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FunctionalityResponse") @@ -18,14 +21,24 @@ class FunctionalityResponse: """ Attributes: data (FunctionalityResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FunctionalityResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.functionality_response_data import FunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FunctionalityResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + functionality_response = cls( data=data, + included=included, ) functionality_response.additional_properties = d diff --git a/rootly_sdk/models/functionality_response_data.py b/rootly_sdk/models/functionality_response_data.py index 21af7809..cd1b0087 100644 --- a/rootly_sdk/models/functionality_response_data.py +++ b/rootly_sdk/models/functionality_response_data.py @@ -33,6 +33,7 @@ class FunctionalityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/generate_phone_number_live_call_router_country_code.py b/rootly_sdk/models/generate_phone_number_live_call_router_country_code.py index 121a7c18..bfa44e1e 100644 --- a/rootly_sdk/models/generate_phone_number_live_call_router_country_code.py +++ b/rootly_sdk/models/generate_phone_number_live_call_router_country_code.py @@ -1,10 +1,11 @@ from typing import Literal, cast -GeneratePhoneNumberLiveCallRouterCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] +GeneratePhoneNumberLiveCallRouterCountryCode = Literal["AU", "CA", "CH", "DE", "GB", "NL", "NZ", "SE", "US"] GENERATE_PHONE_NUMBER_LIVE_CALL_ROUTER_COUNTRY_CODE_VALUES: set[GeneratePhoneNumberLiveCallRouterCountryCode] = { "AU", "CA", + "CH", "DE", "GB", "NL", diff --git a/rootly_sdk/models/get_alert_include.py b/rootly_sdk/models/get_alert_include.py index 32effd82..5ac6ff9d 100644 --- a/rootly_sdk/models/get_alert_include.py +++ b/rootly_sdk/models/get_alert_include.py @@ -9,12 +9,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", ] @@ -28,12 +30,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", } diff --git a/rootly_sdk/models/get_alerts_task_params.py b/rootly_sdk/models/get_alerts_task_params.py index aa334970..ed386b43 100644 --- a/rootly_sdk/models/get_alerts_task_params.py +++ b/rootly_sdk/models/get_alerts_task_params.py @@ -53,6 +53,7 @@ class GetAlertsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + past_duration = self.past_duration task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/get_github_commits_task_params_type_0.py b/rootly_sdk/models/get_github_commits_task_params_type_0.py new file mode 100644 index 00000000..06c5ef0e --- /dev/null +++ b/rootly_sdk/models/get_github_commits_task_params_type_0.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetGithubCommitsTaskParamsType0") + + +@_attrs_define +class GetGithubCommitsTaskParamsType0: + """ + Attributes: + service_ids (list[str]): + """ + + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_ids = cast(list[str], d.pop("service_ids")) + + get_github_commits_task_params_type_0 = cls( + service_ids=service_ids, + ) + + get_github_commits_task_params_type_0.additional_properties = d + return get_github_commits_task_params_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/get_github_commits_task_params_type_1.py b/rootly_sdk/models/get_github_commits_task_params_type_1.py new file mode 100644 index 00000000..76dedc3e --- /dev/null +++ b/rootly_sdk/models/get_github_commits_task_params_type_1.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetGithubCommitsTaskParamsType1") + + +@_attrs_define +class GetGithubCommitsTaskParamsType1: + """ + Attributes: + github_repository_names (list[str]): + """ + + github_repository_names: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + github_repository_names = self.github_repository_names + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "github_repository_names": github_repository_names, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + github_repository_names = cast(list[str], d.pop("github_repository_names")) + + get_github_commits_task_params_type_1 = cls( + github_repository_names=github_repository_names, + ) + + get_github_commits_task_params_type_1.additional_properties = d + return get_github_commits_task_params_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py b/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py new file mode 100644 index 00000000..b4ead582 --- /dev/null +++ b/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetGitlabCommitsTaskParamsType0") + + +@_attrs_define +class GetGitlabCommitsTaskParamsType0: + """ + Attributes: + service_ids (list[str]): + """ + + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_ids = cast(list[str], d.pop("service_ids")) + + get_gitlab_commits_task_params_type_0 = cls( + service_ids=service_ids, + ) + + get_gitlab_commits_task_params_type_0.additional_properties = d + return get_gitlab_commits_task_params_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py b/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py new file mode 100644 index 00000000..dac35eb7 --- /dev/null +++ b/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="GetGitlabCommitsTaskParamsType1") + + +@_attrs_define +class GetGitlabCommitsTaskParamsType1: + """ + Attributes: + gitlab_repository_names (list[str]): + """ + + gitlab_repository_names: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + gitlab_repository_names = self.gitlab_repository_names + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "gitlab_repository_names": gitlab_repository_names, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + gitlab_repository_names = cast(list[str], d.pop("gitlab_repository_names")) + + get_gitlab_commits_task_params_type_1 = cls( + gitlab_repository_names=gitlab_repository_names, + ) + + get_gitlab_commits_task_params_type_1.additional_properties = d + return get_gitlab_commits_task_params_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/get_meeting_recording_include.py b/rootly_sdk/models/get_meeting_recording_include.py new file mode 100644 index 00000000..4f766051 --- /dev/null +++ b/rootly_sdk/models/get_meeting_recording_include.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +GetMeetingRecordingInclude = Literal["transcript"] + +GET_MEETING_RECORDING_INCLUDE_VALUES: set[GetMeetingRecordingInclude] = { + "transcript", +} + + +def check_get_meeting_recording_include(value: str | None) -> GetMeetingRecordingInclude | None: + if value is None: + return None + if value in GET_MEETING_RECORDING_INCLUDE_VALUES: + return cast(GetMeetingRecordingInclude, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {GET_MEETING_RECORDING_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/get_pulses_task_params.py b/rootly_sdk/models/get_pulses_task_params.py index 47ac664c..9587716c 100644 --- a/rootly_sdk/models/get_pulses_task_params.py +++ b/rootly_sdk/models/get_pulses_task_params.py @@ -55,6 +55,7 @@ class GetPulsesTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + past_duration = self.past_duration task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/get_team_include.py b/rootly_sdk/models/get_team_include.py index 6aaec09f..b59ae417 100644 --- a/rootly_sdk/models/get_team_include.py +++ b/rootly_sdk/models/get_team_include.py @@ -1,8 +1,10 @@ from typing import Literal, cast -GetTeamInclude = Literal["users"] +GetTeamInclude = Literal["escalation_policies", "schedules", "users"] GET_TEAM_INCLUDE_VALUES: set[GetTeamInclude] = { + "escalation_policies", + "schedules", "users", } diff --git a/rootly_sdk/models/heartbeat.py b/rootly_sdk/models/heartbeat.py index 221bff46..43738654 100644 --- a/rootly_sdk/models/heartbeat.py +++ b/rootly_sdk/models/heartbeat.py @@ -36,6 +36,7 @@ class Heartbeat: 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 ping_url (None | str | Unset): URL to receive heartbeat pings. secret (None | str | Unset): Secret used as bearer token when pinging heartbeat. last_pinged_at (None | str | Unset): When the heartbeat was last pinged. @@ -56,6 +57,7 @@ class Heartbeat: 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 ping_url: None | str | Unset = UNSET secret: None | str | Unset = UNSET last_pinged_at: None | str | Unset = UNSET @@ -103,6 +105,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 + ping_url: None | str | Unset if isinstance(self.ping_url, Unset): ping_url = UNSET @@ -150,6 +156,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 ping_url is not UNSET: field_dict["ping_url"] = ping_url if secret is not UNSET: @@ -213,6 +221,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)) + def _parse_ping_url(data: object) -> None | str | Unset: if data is None: return data @@ -264,6 +274,7 @@ def _parse_expires_at(data: object) -> None | str | Unset: description=description, alert_description=alert_description, alert_urgency_id=alert_urgency_id, + owner_group_ids=owner_group_ids, ping_url=ping_url, secret=secret, last_pinged_at=last_pinged_at, diff --git a/rootly_sdk/models/heartbeat_list.py b/rootly_sdk/models/heartbeat_list.py index 433bf7e8..1253d2f0 100644 --- a/rootly_sdk/models/heartbeat_list.py +++ b/rootly_sdk/models/heartbeat_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.heartbeat_list_data_item import HeartbeatListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class HeartbeatList: data (list[HeartbeatListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[HeartbeatListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.heartbeat_list_data_item import HeartbeatListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + heartbeat_list = cls( data=data, links=links, meta=meta, + included=included, ) heartbeat_list.additional_properties = d diff --git a/rootly_sdk/models/heartbeat_list_data_item.py b/rootly_sdk/models/heartbeat_list_data_item.py index 7de52115..05cec67e 100644 --- a/rootly_sdk/models/heartbeat_list_data_item.py +++ b/rootly_sdk/models/heartbeat_list_data_item.py @@ -30,6 +30,7 @@ class HeartbeatListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/heartbeat_response.py b/rootly_sdk/models/heartbeat_response.py index 13d55c26..46bc93e1 100644 --- a/rootly_sdk/models/heartbeat_response.py +++ b/rootly_sdk/models/heartbeat_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.heartbeat_response_data import HeartbeatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="HeartbeatResponse") @@ -18,14 +21,24 @@ class HeartbeatResponse: """ Attributes: data (HeartbeatResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: HeartbeatResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.heartbeat_response_data import HeartbeatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = HeartbeatResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + heartbeat_response = cls( data=data, + included=included, ) heartbeat_response.additional_properties = d diff --git a/rootly_sdk/models/heartbeat_response_data.py b/rootly_sdk/models/heartbeat_response_data.py index d680b42f..59c3a427 100644 --- a/rootly_sdk/models/heartbeat_response_data.py +++ b/rootly_sdk/models/heartbeat_response_data.py @@ -30,6 +30,7 @@ class HeartbeatResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/http_client_task_params.py b/rootly_sdk/models/http_client_task_params.py index aeffe9ed..69e1619d 100644 --- a/rootly_sdk/models/http_client_task_params.py +++ b/rootly_sdk/models/http_client_task_params.py @@ -36,6 +36,10 @@ class HttpClientTaskParams: method (HttpClientTaskParamsMethod | Unset): HTTP method Default: 'GET'. post_to_incident_timeline (bool | Unset): post_to_slack_channels (list[HttpClientTaskParamsPostToSlackChannelsItem] | Unset): + retry_count (int | Unset): Number of times to retry on HTTP 429 responses (0-4). 0 disables retry. Default: 0. + Example: 3. + retry_wait_time (int | Unset): Seconds to wait before each retry (1-15). Retry-After header is honored when + present and <= 90s, taking the larger of retry_wait_time and the header value. Default: 1. Example: 2. """ url: str @@ -49,9 +53,12 @@ class HttpClientTaskParams: method: HttpClientTaskParamsMethod | Unset = "GET" post_to_incident_timeline: bool | Unset = UNSET post_to_slack_channels: list[HttpClientTaskParamsPostToSlackChannelsItem] | Unset = UNSET + retry_count: int | Unset = 0 + retry_wait_time: int | Unset = 1 additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + url = self.url succeed_on_status = self.succeed_on_status @@ -83,6 +90,10 @@ def to_dict(self) -> dict[str, Any]: post_to_slack_channels_item = post_to_slack_channels_item_data.to_dict() post_to_slack_channels.append(post_to_slack_channels_item) + retry_count = self.retry_count + + retry_wait_time = self.retry_wait_time + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -109,6 +120,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["post_to_incident_timeline"] = post_to_incident_timeline if post_to_slack_channels is not UNSET: field_dict["post_to_slack_channels"] = post_to_slack_channels + if retry_count is not UNSET: + field_dict["retry_count"] = retry_count + if retry_wait_time is not UNSET: + field_dict["retry_wait_time"] = retry_wait_time return field_dict @@ -160,6 +175,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_slack_channels.append(post_to_slack_channels_item) + retry_count = d.pop("retry_count", UNSET) + + retry_wait_time = d.pop("retry_wait_time", UNSET) + http_client_task_params = cls( url=url, succeed_on_status=succeed_on_status, @@ -172,6 +191,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: method=method, post_to_incident_timeline=post_to_incident_timeline, post_to_slack_channels=post_to_slack_channels, + retry_count=retry_count, + retry_wait_time=retry_wait_time, ) http_client_task_params.additional_properties = d diff --git a/rootly_sdk/models/import_meeting_recording.py b/rootly_sdk/models/import_meeting_recording.py new file mode 100644 index 00000000..fb318d24 --- /dev/null +++ b/rootly_sdk/models/import_meeting_recording.py @@ -0,0 +1,167 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.import_meeting_recording_platform import ( + ImportMeetingRecordingPlatform, + check_import_meeting_recording_platform, +) +from ..models.import_meeting_recording_source import ImportMeetingRecordingSource, check_import_meeting_recording_source +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ImportMeetingRecording") + + +@_attrs_define +class ImportMeetingRecording: + """ + Attributes: + source (ImportMeetingRecordingSource): Import source (currently only "recall_desktop_sdk") + recall_recording_id (UUID): External recording UUID (required when source is recall_desktop_sdk) + platform (ImportMeetingRecordingPlatform): Meeting platform + started_at (datetime.datetime | None | Unset): When the recording started + ended_at (datetime.datetime | None | Unset): When the recording ended + meeting_url (None | str | Unset): Original meeting URL + """ + + source: ImportMeetingRecordingSource + recall_recording_id: UUID + platform: ImportMeetingRecordingPlatform + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + meeting_url: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source: str = self.source + + recall_recording_id = str(self.recall_recording_id) + + platform: str = self.platform + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): + started_at = self.started_at.isoformat() + else: + started_at = self.started_at + + ended_at: None | str | Unset + if isinstance(self.ended_at, Unset): + ended_at = UNSET + elif isinstance(self.ended_at, datetime.datetime): + ended_at = self.ended_at.isoformat() + else: + ended_at = self.ended_at + + meeting_url: None | str | Unset + if isinstance(self.meeting_url, Unset): + meeting_url = UNSET + else: + meeting_url = self.meeting_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source": source, + "recall_recording_id": recall_recording_id, + "platform": platform, + } + ) + if started_at is not UNSET: + field_dict["started_at"] = started_at + if ended_at is not UNSET: + field_dict["ended_at"] = ended_at + if meeting_url is not UNSET: + field_dict["meeting_url"] = meeting_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + source = check_import_meeting_recording_source(d.pop("source")) + + recall_recording_id = UUID(d.pop("recall_recording_id")) + + platform = check_import_meeting_recording_platform(d.pop("platform")) + + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + ended_at_type_0 = isoparse(data) + + return ended_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) + + def _parse_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + meeting_url = _parse_meeting_url(d.pop("meeting_url", UNSET)) + + import_meeting_recording = cls( + source=source, + recall_recording_id=recall_recording_id, + platform=platform, + started_at=started_at, + ended_at=ended_at, + meeting_url=meeting_url, + ) + + import_meeting_recording.additional_properties = d + return import_meeting_recording + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/import_meeting_recording_platform.py b/rootly_sdk/models/import_meeting_recording_platform.py new file mode 100644 index 00000000..384fa62c --- /dev/null +++ b/rootly_sdk/models/import_meeting_recording_platform.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +ImportMeetingRecordingPlatform = Literal["google_meet", "microsoft_teams", "webex", "zoom"] + +IMPORT_MEETING_RECORDING_PLATFORM_VALUES: set[ImportMeetingRecordingPlatform] = { + "google_meet", + "microsoft_teams", + "webex", + "zoom", +} + + +def check_import_meeting_recording_platform(value: str | None) -> ImportMeetingRecordingPlatform | None: + if value is None: + return None + if value in IMPORT_MEETING_RECORDING_PLATFORM_VALUES: + return cast(ImportMeetingRecordingPlatform, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {IMPORT_MEETING_RECORDING_PLATFORM_VALUES!r}") diff --git a/rootly_sdk/models/import_meeting_recording_source.py b/rootly_sdk/models/import_meeting_recording_source.py new file mode 100644 index 00000000..809dea7a --- /dev/null +++ b/rootly_sdk/models/import_meeting_recording_source.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ImportMeetingRecordingSource = Literal["recall_desktop_sdk"] + +IMPORT_MEETING_RECORDING_SOURCE_VALUES: set[ImportMeetingRecordingSource] = { + "recall_desktop_sdk", +} + + +def check_import_meeting_recording_source(value: str | None) -> ImportMeetingRecordingSource | None: + if value is None: + return None + if value in IMPORT_MEETING_RECORDING_SOURCE_VALUES: + return cast(ImportMeetingRecordingSource, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {IMPORT_MEETING_RECORDING_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/in_triage_incident.py b/rootly_sdk/models/in_triage_incident.py index e8b5f987..bd1a66ca 100644 --- a/rootly_sdk/models/in_triage_incident.py +++ b/rootly_sdk/models/in_triage_incident.py @@ -24,6 +24,7 @@ class InTriageIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/incident.py b/rootly_sdk/models/incident.py index 651e0067..408a7e53 100644 --- a/rootly_sdk/models/incident.py +++ b/rootly_sdk/models/incident.py @@ -84,6 +84,23 @@ class Incident: google_drive_url (None | str | Unset): Google Drive URL google_meeting_id (None | str | Unset): Google meeting ID google_meeting_url (None | str | Unset): Google meeting URL + microsoft_teams_meeting_id (None | str | Unset): Microsoft Teams meeting ID + microsoft_teams_meeting_url (None | str | Unset): Microsoft Teams meeting URL + microsoft_teams_channel_id (None | str | Unset): Microsoft Teams channel ID + microsoft_teams_channel_name (None | str | Unset): Microsoft Teams channel name + microsoft_teams_channel_url (None | str | Unset): Microsoft Teams channel URL + microsoft_teams_channel_short_url (None | str | Unset): Microsoft Teams channel short URL + microsoft_teams_chat_id (None | str | Unset): Microsoft Teams chat ID + microsoft_teams_chat_url (None | str | Unset): Microsoft Teams chat URL + microsoft_teams_team_id (None | str | Unset): Microsoft Teams team ID + google_chat_space_id (None | str | Unset): Google Chat space ID + google_chat_space_name (None | str | Unset): Google Chat space name + google_chat_space_url (None | str | Unset): Google Chat space URL + google_chat_space_short_url (None | str | Unset): Google Chat space short URL + google_chat_space_archived (bool | None | Unset): Whether the Google Chat space is archived + google_chat_space_domain_id (None | str | Unset): Google Chat space domain ID + webex_meeting_id (None | str | Unset): Webex meeting ID + webex_meeting_url (None | str | Unset): Webex meeting URL jira_issue_key (None | str | Unset): Jira issue key jira_issue_id (None | str | Unset): Jira issue ID jira_issue_url (None | str | Unset): Jira issue URL @@ -206,6 +223,23 @@ class Incident: google_drive_url: None | str | Unset = UNSET google_meeting_id: None | str | Unset = UNSET google_meeting_url: None | str | Unset = UNSET + microsoft_teams_meeting_id: None | str | Unset = UNSET + microsoft_teams_meeting_url: None | str | Unset = UNSET + microsoft_teams_channel_id: None | str | Unset = UNSET + microsoft_teams_channel_name: None | str | Unset = UNSET + microsoft_teams_channel_url: None | str | Unset = UNSET + microsoft_teams_channel_short_url: None | str | Unset = UNSET + microsoft_teams_chat_id: None | str | Unset = UNSET + microsoft_teams_chat_url: None | str | Unset = UNSET + microsoft_teams_team_id: None | str | Unset = UNSET + google_chat_space_id: None | str | Unset = UNSET + google_chat_space_name: None | str | Unset = UNSET + google_chat_space_url: None | str | Unset = UNSET + google_chat_space_short_url: None | str | Unset = UNSET + google_chat_space_archived: bool | None | Unset = UNSET + google_chat_space_domain_id: None | str | Unset = UNSET + webex_meeting_id: None | str | Unset = UNSET + webex_meeting_url: None | str | Unset = UNSET jira_issue_key: None | str | Unset = UNSET jira_issue_id: None | str | Unset = UNSET jira_issue_url: None | str | Unset = UNSET @@ -559,6 +593,108 @@ def to_dict(self) -> dict[str, Any]: else: google_meeting_url = self.google_meeting_url + microsoft_teams_meeting_id: None | str | Unset + if isinstance(self.microsoft_teams_meeting_id, Unset): + microsoft_teams_meeting_id = UNSET + else: + microsoft_teams_meeting_id = self.microsoft_teams_meeting_id + + microsoft_teams_meeting_url: None | str | Unset + if isinstance(self.microsoft_teams_meeting_url, Unset): + microsoft_teams_meeting_url = UNSET + else: + microsoft_teams_meeting_url = self.microsoft_teams_meeting_url + + microsoft_teams_channel_id: None | str | Unset + if isinstance(self.microsoft_teams_channel_id, Unset): + microsoft_teams_channel_id = UNSET + else: + microsoft_teams_channel_id = self.microsoft_teams_channel_id + + microsoft_teams_channel_name: None | str | Unset + if isinstance(self.microsoft_teams_channel_name, Unset): + microsoft_teams_channel_name = UNSET + else: + microsoft_teams_channel_name = self.microsoft_teams_channel_name + + microsoft_teams_channel_url: None | str | Unset + if isinstance(self.microsoft_teams_channel_url, Unset): + microsoft_teams_channel_url = UNSET + else: + microsoft_teams_channel_url = self.microsoft_teams_channel_url + + microsoft_teams_channel_short_url: None | str | Unset + if isinstance(self.microsoft_teams_channel_short_url, Unset): + microsoft_teams_channel_short_url = UNSET + else: + microsoft_teams_channel_short_url = self.microsoft_teams_channel_short_url + + microsoft_teams_chat_id: None | str | Unset + if isinstance(self.microsoft_teams_chat_id, Unset): + microsoft_teams_chat_id = UNSET + else: + microsoft_teams_chat_id = self.microsoft_teams_chat_id + + microsoft_teams_chat_url: None | str | Unset + if isinstance(self.microsoft_teams_chat_url, Unset): + microsoft_teams_chat_url = UNSET + else: + microsoft_teams_chat_url = self.microsoft_teams_chat_url + + microsoft_teams_team_id: None | str | Unset + if isinstance(self.microsoft_teams_team_id, Unset): + microsoft_teams_team_id = UNSET + else: + microsoft_teams_team_id = self.microsoft_teams_team_id + + google_chat_space_id: None | str | Unset + if isinstance(self.google_chat_space_id, Unset): + google_chat_space_id = UNSET + else: + google_chat_space_id = self.google_chat_space_id + + google_chat_space_name: None | str | Unset + if isinstance(self.google_chat_space_name, Unset): + google_chat_space_name = UNSET + else: + google_chat_space_name = self.google_chat_space_name + + google_chat_space_url: None | str | Unset + if isinstance(self.google_chat_space_url, Unset): + google_chat_space_url = UNSET + else: + google_chat_space_url = self.google_chat_space_url + + google_chat_space_short_url: None | str | Unset + if isinstance(self.google_chat_space_short_url, Unset): + google_chat_space_short_url = UNSET + else: + google_chat_space_short_url = self.google_chat_space_short_url + + google_chat_space_archived: bool | None | Unset + if isinstance(self.google_chat_space_archived, Unset): + google_chat_space_archived = UNSET + else: + google_chat_space_archived = self.google_chat_space_archived + + google_chat_space_domain_id: None | str | Unset + if isinstance(self.google_chat_space_domain_id, Unset): + google_chat_space_domain_id = UNSET + else: + google_chat_space_domain_id = self.google_chat_space_domain_id + + webex_meeting_id: None | str | Unset + if isinstance(self.webex_meeting_id, Unset): + webex_meeting_id = UNSET + else: + webex_meeting_id = self.webex_meeting_id + + webex_meeting_url: None | str | Unset + if isinstance(self.webex_meeting_url, Unset): + webex_meeting_url = UNSET + else: + webex_meeting_url = self.webex_meeting_url + jira_issue_key: None | str | Unset if isinstance(self.jira_issue_key, Unset): jira_issue_key = UNSET @@ -1111,6 +1247,40 @@ def to_dict(self) -> dict[str, Any]: field_dict["google_meeting_id"] = google_meeting_id if google_meeting_url is not UNSET: field_dict["google_meeting_url"] = google_meeting_url + if microsoft_teams_meeting_id is not UNSET: + field_dict["microsoft_teams_meeting_id"] = microsoft_teams_meeting_id + if microsoft_teams_meeting_url is not UNSET: + field_dict["microsoft_teams_meeting_url"] = microsoft_teams_meeting_url + if microsoft_teams_channel_id is not UNSET: + field_dict["microsoft_teams_channel_id"] = microsoft_teams_channel_id + if microsoft_teams_channel_name is not UNSET: + field_dict["microsoft_teams_channel_name"] = microsoft_teams_channel_name + if microsoft_teams_channel_url is not UNSET: + field_dict["microsoft_teams_channel_url"] = microsoft_teams_channel_url + if microsoft_teams_channel_short_url is not UNSET: + field_dict["microsoft_teams_channel_short_url"] = microsoft_teams_channel_short_url + if microsoft_teams_chat_id is not UNSET: + field_dict["microsoft_teams_chat_id"] = microsoft_teams_chat_id + if microsoft_teams_chat_url is not UNSET: + field_dict["microsoft_teams_chat_url"] = microsoft_teams_chat_url + if microsoft_teams_team_id is not UNSET: + field_dict["microsoft_teams_team_id"] = microsoft_teams_team_id + if google_chat_space_id is not UNSET: + field_dict["google_chat_space_id"] = google_chat_space_id + if google_chat_space_name is not UNSET: + field_dict["google_chat_space_name"] = google_chat_space_name + if google_chat_space_url is not UNSET: + field_dict["google_chat_space_url"] = google_chat_space_url + if google_chat_space_short_url is not UNSET: + field_dict["google_chat_space_short_url"] = google_chat_space_short_url + if google_chat_space_archived is not UNSET: + field_dict["google_chat_space_archived"] = google_chat_space_archived + if google_chat_space_domain_id is not UNSET: + field_dict["google_chat_space_domain_id"] = google_chat_space_domain_id + if webex_meeting_id is not UNSET: + field_dict["webex_meeting_id"] = webex_meeting_id + if webex_meeting_url is not UNSET: + field_dict["webex_meeting_url"] = webex_meeting_url if jira_issue_key is not UNSET: field_dict["jira_issue_key"] = jira_issue_key if jira_issue_id is not UNSET: @@ -1716,6 +1886,161 @@ def _parse_google_meeting_url(data: object) -> None | str | Unset: google_meeting_url = _parse_google_meeting_url(d.pop("google_meeting_url", UNSET)) + def _parse_microsoft_teams_meeting_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_meeting_id = _parse_microsoft_teams_meeting_id(d.pop("microsoft_teams_meeting_id", UNSET)) + + def _parse_microsoft_teams_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_meeting_url = _parse_microsoft_teams_meeting_url(d.pop("microsoft_teams_meeting_url", UNSET)) + + def _parse_microsoft_teams_channel_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_channel_id = _parse_microsoft_teams_channel_id(d.pop("microsoft_teams_channel_id", UNSET)) + + def _parse_microsoft_teams_channel_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_channel_name = _parse_microsoft_teams_channel_name(d.pop("microsoft_teams_channel_name", UNSET)) + + def _parse_microsoft_teams_channel_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_channel_url = _parse_microsoft_teams_channel_url(d.pop("microsoft_teams_channel_url", UNSET)) + + def _parse_microsoft_teams_channel_short_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_channel_short_url = _parse_microsoft_teams_channel_short_url( + d.pop("microsoft_teams_channel_short_url", UNSET) + ) + + def _parse_microsoft_teams_chat_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_chat_id = _parse_microsoft_teams_chat_id(d.pop("microsoft_teams_chat_id", UNSET)) + + def _parse_microsoft_teams_chat_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_chat_url = _parse_microsoft_teams_chat_url(d.pop("microsoft_teams_chat_url", UNSET)) + + def _parse_microsoft_teams_team_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_team_id = _parse_microsoft_teams_team_id(d.pop("microsoft_teams_team_id", UNSET)) + + def _parse_google_chat_space_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_id = _parse_google_chat_space_id(d.pop("google_chat_space_id", UNSET)) + + def _parse_google_chat_space_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_name = _parse_google_chat_space_name(d.pop("google_chat_space_name", UNSET)) + + def _parse_google_chat_space_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_url = _parse_google_chat_space_url(d.pop("google_chat_space_url", UNSET)) + + def _parse_google_chat_space_short_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_short_url = _parse_google_chat_space_short_url(d.pop("google_chat_space_short_url", UNSET)) + + def _parse_google_chat_space_archived(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + google_chat_space_archived = _parse_google_chat_space_archived(d.pop("google_chat_space_archived", UNSET)) + + def _parse_google_chat_space_domain_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_domain_id = _parse_google_chat_space_domain_id(d.pop("google_chat_space_domain_id", UNSET)) + + def _parse_webex_meeting_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + webex_meeting_id = _parse_webex_meeting_id(d.pop("webex_meeting_id", UNSET)) + + def _parse_webex_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + webex_meeting_url = _parse_webex_meeting_url(d.pop("webex_meeting_url", UNSET)) + def _parse_jira_issue_key(data: object) -> None | str | Unset: if data is None: return data @@ -2489,6 +2814,23 @@ def _parse_cancelled_at(data: object) -> None | str | Unset: google_drive_url=google_drive_url, google_meeting_id=google_meeting_id, google_meeting_url=google_meeting_url, + microsoft_teams_meeting_id=microsoft_teams_meeting_id, + microsoft_teams_meeting_url=microsoft_teams_meeting_url, + microsoft_teams_channel_id=microsoft_teams_channel_id, + microsoft_teams_channel_name=microsoft_teams_channel_name, + microsoft_teams_channel_url=microsoft_teams_channel_url, + microsoft_teams_channel_short_url=microsoft_teams_channel_short_url, + microsoft_teams_chat_id=microsoft_teams_chat_id, + microsoft_teams_chat_url=microsoft_teams_chat_url, + microsoft_teams_team_id=microsoft_teams_team_id, + google_chat_space_id=google_chat_space_id, + google_chat_space_name=google_chat_space_name, + google_chat_space_url=google_chat_space_url, + google_chat_space_short_url=google_chat_space_short_url, + google_chat_space_archived=google_chat_space_archived, + google_chat_space_domain_id=google_chat_space_domain_id, + webex_meeting_id=webex_meeting_id, + webex_meeting_url=webex_meeting_url, jira_issue_key=jira_issue_key, jira_issue_id=jira_issue_id, jira_issue_url=jira_issue_url, diff --git a/rootly_sdk/models/incident_action_item.py b/rootly_sdk/models/incident_action_item.py index 1b8ee2ff..ded60de4 100644 --- a/rootly_sdk/models/incident_action_item.py +++ b/rootly_sdk/models/incident_action_item.py @@ -27,7 +27,8 @@ class IncidentActionItem: updated_at (str): Date of last update description (None | str | Unset): The description of incident action item kind (IncidentActionItemKind | Unset): The kind of the action item - assigned_to (UserFlatResponse | Unset): Flat user object as returned by serializer + assigned_to (UserFlatResponse | Unset): Flat user attributes as returned by UserFlatSerializer (no nested + associations) assigned_to_group_ids (list[str] | None | Unset): IDs of groups you wish to assign this action item priority (IncidentActionItemPriority | Unset): The priority of the action item status (IncidentActionItemStatus | Unset): The status of the action item @@ -35,6 +36,8 @@ class IncidentActionItem: jira_issue_id (None | str | Unset): The Jira issue ID. jira_issue_key (None | str | Unset): The Jira issue key. jira_issue_url (None | str | Unset): The Jira issue URL. + created_by (UserFlatResponse | Unset): Flat user attributes as returned by UserFlatSerializer (no nested + associations) """ summary: str @@ -50,9 +53,11 @@ class IncidentActionItem: jira_issue_id: None | str | Unset = UNSET jira_issue_key: None | str | Unset = UNSET jira_issue_url: None | str | Unset = UNSET + created_by: UserFlatResponse | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + summary = self.summary created_at = self.created_at @@ -114,6 +119,10 @@ def to_dict(self) -> dict[str, Any]: else: jira_issue_url = self.jira_issue_url + created_by: dict[str, Any] | Unset = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -143,6 +152,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["jira_issue_key"] = jira_issue_key if jira_issue_url is not UNSET: field_dict["jira_issue_url"] = jira_issue_url + if created_by is not UNSET: + field_dict["created_by"] = created_by return field_dict @@ -247,6 +258,13 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) + _created_by = d.pop("created_by", UNSET) + created_by: UserFlatResponse | Unset + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = UserFlatResponse.from_dict(_created_by) + incident_action_item = cls( summary=summary, created_at=created_at, @@ -261,6 +279,7 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_id=jira_issue_id, jira_issue_key=jira_issue_key, jira_issue_url=jira_issue_url, + created_by=created_by, ) incident_action_item.additional_properties = d diff --git a/rootly_sdk/models/incident_action_item_list.py b/rootly_sdk/models/incident_action_item_list.py index 75eb9d7e..05633372 100644 --- a/rootly_sdk/models/incident_action_item_list.py +++ b/rootly_sdk/models/incident_action_item_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_action_item_list_data_item import IncidentActionItemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentActionItemList: data (list[IncidentActionItemListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentActionItemListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_action_item_list_data_item import IncidentActionItemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_action_item_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_action_item_list.additional_properties = d diff --git a/rootly_sdk/models/incident_action_item_list_data_item.py b/rootly_sdk/models/incident_action_item_list_data_item.py index 46910964..ce06e3de 100644 --- a/rootly_sdk/models/incident_action_item_list_data_item.py +++ b/rootly_sdk/models/incident_action_item_list_data_item.py @@ -33,6 +33,7 @@ class IncidentActionItemListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_action_item_response.py b/rootly_sdk/models/incident_action_item_response.py index facdf5c1..02edb2d1 100644 --- a/rootly_sdk/models/incident_action_item_response.py +++ b/rootly_sdk/models/incident_action_item_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_action_item_response_data import IncidentActionItemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentActionItemResponse") @@ -18,14 +21,24 @@ class IncidentActionItemResponse: """ Attributes: data (IncidentActionItemResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentActionItemResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_action_item_response_data import IncidentActionItemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentActionItemResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_action_item_response = cls( data=data, + included=included, ) incident_action_item_response.additional_properties = d diff --git a/rootly_sdk/models/incident_action_item_response_data.py b/rootly_sdk/models/incident_action_item_response_data.py index 162efaa1..6a0ef40e 100644 --- a/rootly_sdk/models/incident_action_item_response_data.py +++ b/rootly_sdk/models/incident_action_item_response_data.py @@ -33,6 +33,7 @@ class IncidentActionItemResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_custom_field_selection_list.py b/rootly_sdk/models/incident_custom_field_selection_list.py index 8727b826..da3943db 100644 --- a/rootly_sdk/models/incident_custom_field_selection_list.py +++ b/rootly_sdk/models/incident_custom_field_selection_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_custom_field_selection_list_data_item import IncidentCustomFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentCustomFieldSelectionList: data (list[IncidentCustomFieldSelectionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentCustomFieldSelectionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_custom_field_selection_list_data_item import IncidentCustomFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_custom_field_selection_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_custom_field_selection_list.additional_properties = d diff --git a/rootly_sdk/models/incident_custom_field_selection_list_data_item.py b/rootly_sdk/models/incident_custom_field_selection_list_data_item.py index 8cc9c216..699bb419 100644 --- a/rootly_sdk/models/incident_custom_field_selection_list_data_item.py +++ b/rootly_sdk/models/incident_custom_field_selection_list_data_item.py @@ -33,6 +33,7 @@ class IncidentCustomFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_custom_field_selection_response.py b/rootly_sdk/models/incident_custom_field_selection_response.py index 99631504..2f0b51f0 100644 --- a/rootly_sdk/models/incident_custom_field_selection_response.py +++ b/rootly_sdk/models/incident_custom_field_selection_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_custom_field_selection_response_data import IncidentCustomFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentCustomFieldSelectionResponse") @@ -18,14 +21,24 @@ class IncidentCustomFieldSelectionResponse: """ Attributes: data (IncidentCustomFieldSelectionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentCustomFieldSelectionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_custom_field_selection_response_data import IncidentCustomFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentCustomFieldSelectionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_custom_field_selection_response = cls( data=data, + included=included, ) incident_custom_field_selection_response.additional_properties = d diff --git a/rootly_sdk/models/incident_custom_field_selection_response_data.py b/rootly_sdk/models/incident_custom_field_selection_response_data.py index 40bee22e..7648082d 100644 --- a/rootly_sdk/models/incident_custom_field_selection_response_data.py +++ b/rootly_sdk/models/incident_custom_field_selection_response_data.py @@ -33,6 +33,7 @@ class IncidentCustomFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_functionality_list.py b/rootly_sdk/models/incident_event_functionality_list.py index 98fa45b7..eb338790 100644 --- a/rootly_sdk/models/incident_event_functionality_list.py +++ b/rootly_sdk/models/incident_event_functionality_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_event_functionality_list_data_item import IncidentEventFunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentEventFunctionalityList: data (list[IncidentEventFunctionalityListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentEventFunctionalityListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_functionality_list_data_item import IncidentEventFunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_functionality_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_event_functionality_list.additional_properties = d diff --git a/rootly_sdk/models/incident_event_functionality_list_data_item.py b/rootly_sdk/models/incident_event_functionality_list_data_item.py index 187d9f5d..3c9b49cc 100644 --- a/rootly_sdk/models/incident_event_functionality_list_data_item.py +++ b/rootly_sdk/models/incident_event_functionality_list_data_item.py @@ -33,6 +33,7 @@ class IncidentEventFunctionalityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_functionality_response.py b/rootly_sdk/models/incident_event_functionality_response.py index 40c22ff4..6f00656f 100644 --- a/rootly_sdk/models/incident_event_functionality_response.py +++ b/rootly_sdk/models/incident_event_functionality_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_event_functionality_response_data import IncidentEventFunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentEventFunctionalityResponse") @@ -18,14 +21,24 @@ class IncidentEventFunctionalityResponse: """ Attributes: data (IncidentEventFunctionalityResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentEventFunctionalityResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_functionality_response_data import IncidentEventFunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentEventFunctionalityResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_functionality_response = cls( data=data, + included=included, ) incident_event_functionality_response.additional_properties = d diff --git a/rootly_sdk/models/incident_event_functionality_response_data.py b/rootly_sdk/models/incident_event_functionality_response_data.py index a7efe600..76ca707a 100644 --- a/rootly_sdk/models/incident_event_functionality_response_data.py +++ b/rootly_sdk/models/incident_event_functionality_response_data.py @@ -33,6 +33,7 @@ class IncidentEventFunctionalityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_list.py b/rootly_sdk/models/incident_event_list.py index 23e8187c..10bdd165 100644 --- a/rootly_sdk/models/incident_event_list.py +++ b/rootly_sdk/models/incident_event_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_event_list_data_item import IncidentEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentEventList: data (list[IncidentEventListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentEventListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_list_data_item import IncidentEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_event_list.additional_properties = d diff --git a/rootly_sdk/models/incident_event_list_data_item.py b/rootly_sdk/models/incident_event_list_data_item.py index ec5e4556..40a5cfc6 100644 --- a/rootly_sdk/models/incident_event_list_data_item.py +++ b/rootly_sdk/models/incident_event_list_data_item.py @@ -33,6 +33,7 @@ class IncidentEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_response.py b/rootly_sdk/models/incident_event_response.py index 671201d9..13afb6a3 100644 --- a/rootly_sdk/models/incident_event_response.py +++ b/rootly_sdk/models/incident_event_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_event_response_data import IncidentEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentEventResponse") @@ -18,14 +21,24 @@ class IncidentEventResponse: """ Attributes: data (IncidentEventResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentEventResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_response_data import IncidentEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentEventResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_response = cls( data=data, + included=included, ) incident_event_response.additional_properties = d diff --git a/rootly_sdk/models/incident_event_response_data.py b/rootly_sdk/models/incident_event_response_data.py index 420a0bb2..e276e0a7 100644 --- a/rootly_sdk/models/incident_event_response_data.py +++ b/rootly_sdk/models/incident_event_response_data.py @@ -33,6 +33,7 @@ class IncidentEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_service_list.py b/rootly_sdk/models/incident_event_service_list.py index e1ef7ee1..d23a4196 100644 --- a/rootly_sdk/models/incident_event_service_list.py +++ b/rootly_sdk/models/incident_event_service_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_event_service_list_data_item import IncidentEventServiceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentEventServiceList: data (list[IncidentEventServiceListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentEventServiceListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_service_list_data_item import IncidentEventServiceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_service_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_event_service_list.additional_properties = d diff --git a/rootly_sdk/models/incident_event_service_list_data_item.py b/rootly_sdk/models/incident_event_service_list_data_item.py index 092f03d4..ac443528 100644 --- a/rootly_sdk/models/incident_event_service_list_data_item.py +++ b/rootly_sdk/models/incident_event_service_list_data_item.py @@ -33,6 +33,7 @@ class IncidentEventServiceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_service_response.py b/rootly_sdk/models/incident_event_service_response.py index 60539a21..ddb7faf7 100644 --- a/rootly_sdk/models/incident_event_service_response.py +++ b/rootly_sdk/models/incident_event_service_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_event_service_response_data import IncidentEventServiceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentEventServiceResponse") @@ -18,14 +21,24 @@ class IncidentEventServiceResponse: """ Attributes: data (IncidentEventServiceResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentEventServiceResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_service_response_data import IncidentEventServiceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentEventServiceResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_service_response = cls( data=data, + included=included, ) incident_event_service_response.additional_properties = d diff --git a/rootly_sdk/models/incident_event_service_response_data.py b/rootly_sdk/models/incident_event_service_response_data.py index 01413cba..f1c45109 100644 --- a/rootly_sdk/models/incident_event_service_response_data.py +++ b/rootly_sdk/models/incident_event_service_response_data.py @@ -33,6 +33,7 @@ class IncidentEventServiceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_feedback_list.py b/rootly_sdk/models/incident_feedback_list.py index 3553531b..06f51a82 100644 --- a/rootly_sdk/models/incident_feedback_list.py +++ b/rootly_sdk/models/incident_feedback_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_feedback_list_data_item import IncidentFeedbackListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentFeedbackList: data (list[IncidentFeedbackListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentFeedbackListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_feedback_list_data_item import IncidentFeedbackListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_feedback_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_feedback_list.additional_properties = d diff --git a/rootly_sdk/models/incident_feedback_list_data_item.py b/rootly_sdk/models/incident_feedback_list_data_item.py index a71bc453..90c09921 100644 --- a/rootly_sdk/models/incident_feedback_list_data_item.py +++ b/rootly_sdk/models/incident_feedback_list_data_item.py @@ -33,6 +33,7 @@ class IncidentFeedbackListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_feedback_response.py b/rootly_sdk/models/incident_feedback_response.py index 7ef28981..11592806 100644 --- a/rootly_sdk/models/incident_feedback_response.py +++ b/rootly_sdk/models/incident_feedback_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_feedback_response_data import IncidentFeedbackResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentFeedbackResponse") @@ -18,14 +21,24 @@ class IncidentFeedbackResponse: """ Attributes: data (IncidentFeedbackResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentFeedbackResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_feedback_response_data import IncidentFeedbackResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentFeedbackResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_feedback_response = cls( data=data, + included=included, ) incident_feedback_response.additional_properties = d diff --git a/rootly_sdk/models/incident_feedback_response_data.py b/rootly_sdk/models/incident_feedback_response_data.py index e87ec38d..a152326c 100644 --- a/rootly_sdk/models/incident_feedback_response_data.py +++ b/rootly_sdk/models/incident_feedback_response_data.py @@ -33,6 +33,7 @@ class IncidentFeedbackResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_form_field_selection_list.py b/rootly_sdk/models/incident_form_field_selection_list.py index 18e8816d..01551dd3 100644 --- a/rootly_sdk/models/incident_form_field_selection_list.py +++ b/rootly_sdk/models/incident_form_field_selection_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_form_field_selection_list_data_item import IncidentFormFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentFormFieldSelectionList: data (list[IncidentFormFieldSelectionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentFormFieldSelectionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_form_field_selection_list_data_item import IncidentFormFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_form_field_selection_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_form_field_selection_list.additional_properties = d diff --git a/rootly_sdk/models/incident_form_field_selection_list_data_item.py b/rootly_sdk/models/incident_form_field_selection_list_data_item.py index 4b57072f..009d5fca 100644 --- a/rootly_sdk/models/incident_form_field_selection_list_data_item.py +++ b/rootly_sdk/models/incident_form_field_selection_list_data_item.py @@ -33,6 +33,7 @@ class IncidentFormFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_form_field_selection_response.py b/rootly_sdk/models/incident_form_field_selection_response.py index 61746484..ee4c86c0 100644 --- a/rootly_sdk/models/incident_form_field_selection_response.py +++ b/rootly_sdk/models/incident_form_field_selection_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_form_field_selection_response_data import IncidentFormFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentFormFieldSelectionResponse") @@ -18,14 +21,24 @@ class IncidentFormFieldSelectionResponse: """ Attributes: data (IncidentFormFieldSelectionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentFormFieldSelectionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_form_field_selection_response_data import IncidentFormFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentFormFieldSelectionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_form_field_selection_response = cls( data=data, + included=included, ) incident_form_field_selection_response.additional_properties = d diff --git a/rootly_sdk/models/incident_form_field_selection_response_data.py b/rootly_sdk/models/incident_form_field_selection_response_data.py index 8143f17b..0054ff14 100644 --- a/rootly_sdk/models/incident_form_field_selection_response_data.py +++ b/rootly_sdk/models/incident_form_field_selection_response_data.py @@ -33,6 +33,7 @@ class IncidentFormFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_list.py b/rootly_sdk/models/incident_list.py index ebc240f5..f5784afc 100644 --- a/rootly_sdk/models/incident_list.py +++ b/rootly_sdk/models/incident_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_list_data_item import IncidentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentList: data (list[IncidentListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_list_data_item import IncidentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_list.additional_properties = d diff --git a/rootly_sdk/models/incident_list_data_item.py b/rootly_sdk/models/incident_list_data_item.py index 0087518b..51547f46 100644 --- a/rootly_sdk/models/incident_list_data_item.py +++ b/rootly_sdk/models/incident_list_data_item.py @@ -30,6 +30,7 @@ class IncidentListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_boolean_list.py b/rootly_sdk/models/incident_permission_set_boolean_list.py index 1494db51..311b960e 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_list.py +++ b/rootly_sdk/models/incident_permission_set_boolean_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_permission_set_boolean_list_data_item import IncidentPermissionSetBooleanListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentPermissionSetBooleanList: data (list[IncidentPermissionSetBooleanListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentPermissionSetBooleanListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_boolean_list_data_item import IncidentPermissionSetBooleanListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_boolean_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_permission_set_boolean_list.additional_properties = d diff --git a/rootly_sdk/models/incident_permission_set_boolean_list_data_item.py b/rootly_sdk/models/incident_permission_set_boolean_list_data_item.py index e356914c..9297d83e 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_list_data_item.py +++ b/rootly_sdk/models/incident_permission_set_boolean_list_data_item.py @@ -33,6 +33,7 @@ class IncidentPermissionSetBooleanListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_boolean_response.py b/rootly_sdk/models/incident_permission_set_boolean_response.py index 97d43997..ec8e91de 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_response.py +++ b/rootly_sdk/models/incident_permission_set_boolean_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_permission_set_boolean_response_data import IncidentPermissionSetBooleanResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentPermissionSetBooleanResponse") @@ -18,14 +21,24 @@ class IncidentPermissionSetBooleanResponse: """ Attributes: data (IncidentPermissionSetBooleanResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentPermissionSetBooleanResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_boolean_response_data import IncidentPermissionSetBooleanResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentPermissionSetBooleanResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_boolean_response = cls( data=data, + included=included, ) incident_permission_set_boolean_response.additional_properties = d diff --git a/rootly_sdk/models/incident_permission_set_boolean_response_data.py b/rootly_sdk/models/incident_permission_set_boolean_response_data.py index 5c85b779..1c20c8e0 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_response_data.py +++ b/rootly_sdk/models/incident_permission_set_boolean_response_data.py @@ -33,6 +33,7 @@ class IncidentPermissionSetBooleanResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_list.py b/rootly_sdk/models/incident_permission_set_list.py index c4613dc6..4330dfc6 100644 --- a/rootly_sdk/models/incident_permission_set_list.py +++ b/rootly_sdk/models/incident_permission_set_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_permission_set_list_data_item import IncidentPermissionSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentPermissionSetList: data (list[IncidentPermissionSetListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentPermissionSetListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_list_data_item import IncidentPermissionSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_permission_set_list.additional_properties = d diff --git a/rootly_sdk/models/incident_permission_set_list_data_item.py b/rootly_sdk/models/incident_permission_set_list_data_item.py index 119ee59f..33f81a19 100644 --- a/rootly_sdk/models/incident_permission_set_list_data_item.py +++ b/rootly_sdk/models/incident_permission_set_list_data_item.py @@ -33,6 +33,7 @@ class IncidentPermissionSetListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_resource_list.py b/rootly_sdk/models/incident_permission_set_resource_list.py index aa8b5084..870d831f 100644 --- a/rootly_sdk/models/incident_permission_set_resource_list.py +++ b/rootly_sdk/models/incident_permission_set_resource_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_permission_set_resource_list_data_item import IncidentPermissionSetResourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentPermissionSetResourceList: data (list[IncidentPermissionSetResourceListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentPermissionSetResourceListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_resource_list_data_item import IncidentPermissionSetResourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_resource_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_permission_set_resource_list.additional_properties = d diff --git a/rootly_sdk/models/incident_permission_set_resource_list_data_item.py b/rootly_sdk/models/incident_permission_set_resource_list_data_item.py index 7d14eee6..83bca676 100644 --- a/rootly_sdk/models/incident_permission_set_resource_list_data_item.py +++ b/rootly_sdk/models/incident_permission_set_resource_list_data_item.py @@ -33,6 +33,7 @@ class IncidentPermissionSetResourceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_resource_response.py b/rootly_sdk/models/incident_permission_set_resource_response.py index aa08a65a..6808e8b3 100644 --- a/rootly_sdk/models/incident_permission_set_resource_response.py +++ b/rootly_sdk/models/incident_permission_set_resource_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_permission_set_resource_response_data import IncidentPermissionSetResourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentPermissionSetResourceResponse") @@ -18,14 +21,24 @@ class IncidentPermissionSetResourceResponse: """ Attributes: data (IncidentPermissionSetResourceResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentPermissionSetResourceResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_resource_response_data import IncidentPermissionSetResourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentPermissionSetResourceResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_resource_response = cls( data=data, + included=included, ) incident_permission_set_resource_response.additional_properties = d diff --git a/rootly_sdk/models/incident_permission_set_resource_response_data.py b/rootly_sdk/models/incident_permission_set_resource_response_data.py index 7d77c245..8e10e6a6 100644 --- a/rootly_sdk/models/incident_permission_set_resource_response_data.py +++ b/rootly_sdk/models/incident_permission_set_resource_response_data.py @@ -33,6 +33,7 @@ class IncidentPermissionSetResourceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_response.py b/rootly_sdk/models/incident_permission_set_response.py index 625c9871..ea4b325f 100644 --- a/rootly_sdk/models/incident_permission_set_response.py +++ b/rootly_sdk/models/incident_permission_set_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_permission_set_response_data import IncidentPermissionSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentPermissionSetResponse") @@ -18,14 +21,24 @@ class IncidentPermissionSetResponse: """ Attributes: data (IncidentPermissionSetResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentPermissionSetResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_response_data import IncidentPermissionSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentPermissionSetResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_response = cls( data=data, + included=included, ) incident_permission_set_response.additional_properties = d diff --git a/rootly_sdk/models/incident_permission_set_response_data.py b/rootly_sdk/models/incident_permission_set_response_data.py index 086da0db..d4248f2c 100644 --- a/rootly_sdk/models/incident_permission_set_response_data.py +++ b/rootly_sdk/models/incident_permission_set_response_data.py @@ -33,6 +33,7 @@ class IncidentPermissionSetResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_post_mortem_list.py b/rootly_sdk/models/incident_post_mortem_list.py index dc7e0e30..0fdca1ee 100644 --- a/rootly_sdk/models/incident_post_mortem_list.py +++ b/rootly_sdk/models/incident_post_mortem_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_post_mortem_list_data_item import IncidentPostMortemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentPostMortemList: data (list[IncidentPostMortemListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentPostMortemListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_post_mortem_list_data_item import IncidentPostMortemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_post_mortem_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_post_mortem_list.additional_properties = d diff --git a/rootly_sdk/models/incident_post_mortem_list_data_item.py b/rootly_sdk/models/incident_post_mortem_list_data_item.py index 956c4ed2..55d07674 100644 --- a/rootly_sdk/models/incident_post_mortem_list_data_item.py +++ b/rootly_sdk/models/incident_post_mortem_list_data_item.py @@ -33,6 +33,7 @@ class IncidentPostMortemListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_post_mortem_response.py b/rootly_sdk/models/incident_post_mortem_response.py index bbc06c20..c76380cb 100644 --- a/rootly_sdk/models/incident_post_mortem_response.py +++ b/rootly_sdk/models/incident_post_mortem_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_post_mortem_response_data import IncidentPostMortemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentPostMortemResponse") @@ -18,14 +21,24 @@ class IncidentPostMortemResponse: """ Attributes: data (IncidentPostMortemResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentPostMortemResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_post_mortem_response_data import IncidentPostMortemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentPostMortemResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_post_mortem_response = cls( data=data, + included=included, ) incident_post_mortem_response.additional_properties = d diff --git a/rootly_sdk/models/incident_post_mortem_response_data.py b/rootly_sdk/models/incident_post_mortem_response_data.py index c5f49a4e..0fb9cf28 100644 --- a/rootly_sdk/models/incident_post_mortem_response_data.py +++ b/rootly_sdk/models/incident_post_mortem_response_data.py @@ -33,6 +33,7 @@ class IncidentPostMortemResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_response.py b/rootly_sdk/models/incident_response.py index 956f0f07..b865456f 100644 --- a/rootly_sdk/models/incident_response.py +++ b/rootly_sdk/models/incident_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_response_data import IncidentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentResponse") @@ -18,14 +21,24 @@ class IncidentResponse: """ Attributes: data (IncidentResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_response_data import IncidentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_response = cls( data=data, + included=included, ) incident_response.additional_properties = d diff --git a/rootly_sdk/models/incident_response_data.py b/rootly_sdk/models/incident_response_data.py index 0bbe83f7..99133947 100644 --- a/rootly_sdk/models/incident_response_data.py +++ b/rootly_sdk/models/incident_response_data.py @@ -30,6 +30,7 @@ class IncidentResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_retrospective_step_response.py b/rootly_sdk/models/incident_retrospective_step_response.py index ad7fe343..1459b399 100644 --- a/rootly_sdk/models/incident_retrospective_step_response.py +++ b/rootly_sdk/models/incident_retrospective_step_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_retrospective_step_response_data import IncidentRetrospectiveStepResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentRetrospectiveStepResponse") @@ -18,14 +21,24 @@ class IncidentRetrospectiveStepResponse: """ Attributes: data (IncidentRetrospectiveStepResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentRetrospectiveStepResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_retrospective_step_response_data import IncidentRetrospectiveStepResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentRetrospectiveStepResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_retrospective_step_response = cls( data=data, + included=included, ) incident_retrospective_step_response.additional_properties = d diff --git a/rootly_sdk/models/incident_retrospective_step_response_data.py b/rootly_sdk/models/incident_retrospective_step_response_data.py index d5e1b578..d8ffeff7 100644 --- a/rootly_sdk/models/incident_retrospective_step_response_data.py +++ b/rootly_sdk/models/incident_retrospective_step_response_data.py @@ -33,6 +33,7 @@ class IncidentRetrospectiveStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_role_list.py b/rootly_sdk/models/incident_role_list.py index 753a82f2..22dc9520 100644 --- a/rootly_sdk/models/incident_role_list.py +++ b/rootly_sdk/models/incident_role_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_role_list_data_item import IncidentRoleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentRoleList: data (list[IncidentRoleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentRoleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_role_list_data_item import IncidentRoleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_role_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_role_list.additional_properties = d diff --git a/rootly_sdk/models/incident_role_list_data_item.py b/rootly_sdk/models/incident_role_list_data_item.py index 3a519dc9..4ac3dd10 100644 --- a/rootly_sdk/models/incident_role_list_data_item.py +++ b/rootly_sdk/models/incident_role_list_data_item.py @@ -33,6 +33,7 @@ class IncidentRoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_role_response.py b/rootly_sdk/models/incident_role_response.py index 7f00bd6d..03c42298 100644 --- a/rootly_sdk/models/incident_role_response.py +++ b/rootly_sdk/models/incident_role_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_role_response_data import IncidentRoleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentRoleResponse") @@ -18,14 +21,24 @@ class IncidentRoleResponse: """ Attributes: data (IncidentRoleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentRoleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_role_response_data import IncidentRoleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentRoleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_role_response = cls( data=data, + included=included, ) incident_role_response.additional_properties = d diff --git a/rootly_sdk/models/incident_role_response_data.py b/rootly_sdk/models/incident_role_response_data.py index b6a7a41d..94d09f13 100644 --- a/rootly_sdk/models/incident_role_response_data.py +++ b/rootly_sdk/models/incident_role_response_data.py @@ -33,6 +33,7 @@ class IncidentRoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_role_task_list.py b/rootly_sdk/models/incident_role_task_list.py index 3911239e..5ef2cf2e 100644 --- a/rootly_sdk/models/incident_role_task_list.py +++ b/rootly_sdk/models/incident_role_task_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_role_task_list_data_item import IncidentRoleTaskListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentRoleTaskList: data (list[IncidentRoleTaskListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentRoleTaskListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_role_task_list_data_item import IncidentRoleTaskListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_role_task_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_role_task_list.additional_properties = d diff --git a/rootly_sdk/models/incident_role_task_list_data_item.py b/rootly_sdk/models/incident_role_task_list_data_item.py index f9a55f68..1821b7a9 100644 --- a/rootly_sdk/models/incident_role_task_list_data_item.py +++ b/rootly_sdk/models/incident_role_task_list_data_item.py @@ -33,6 +33,7 @@ class IncidentRoleTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_role_task_response.py b/rootly_sdk/models/incident_role_task_response.py index 06830b79..b92385ae 100644 --- a/rootly_sdk/models/incident_role_task_response.py +++ b/rootly_sdk/models/incident_role_task_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_role_task_response_data import IncidentRoleTaskResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentRoleTaskResponse") @@ -18,14 +21,24 @@ class IncidentRoleTaskResponse: """ Attributes: data (IncidentRoleTaskResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentRoleTaskResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_role_task_response_data import IncidentRoleTaskResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentRoleTaskResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_role_task_response = cls( data=data, + included=included, ) incident_role_task_response.additional_properties = d diff --git a/rootly_sdk/models/incident_role_task_response_data.py b/rootly_sdk/models/incident_role_task_response_data.py index 04f49ff4..7720f509 100644 --- a/rootly_sdk/models/incident_role_task_response_data.py +++ b/rootly_sdk/models/incident_role_task_response_data.py @@ -33,6 +33,7 @@ class IncidentRoleTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_status_page_event_list.py b/rootly_sdk/models/incident_status_page_event_list.py index 81f6df05..d5b6e98d 100644 --- a/rootly_sdk/models/incident_status_page_event_list.py +++ b/rootly_sdk/models/incident_status_page_event_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_status_page_event_list_data_item import IncidentStatusPageEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentStatusPageEventList: data (list[IncidentStatusPageEventListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentStatusPageEventListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_status_page_event_list_data_item import IncidentStatusPageEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_status_page_event_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_status_page_event_list.additional_properties = d diff --git a/rootly_sdk/models/incident_status_page_event_list_data_item.py b/rootly_sdk/models/incident_status_page_event_list_data_item.py index 18ef50a2..3174294c 100644 --- a/rootly_sdk/models/incident_status_page_event_list_data_item.py +++ b/rootly_sdk/models/incident_status_page_event_list_data_item.py @@ -33,6 +33,7 @@ class IncidentStatusPageEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_status_page_event_response.py b/rootly_sdk/models/incident_status_page_event_response.py index 271b772d..314ed314 100644 --- a/rootly_sdk/models/incident_status_page_event_response.py +++ b/rootly_sdk/models/incident_status_page_event_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_status_page_event_response_data import IncidentStatusPageEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentStatusPageEventResponse") @@ -18,14 +21,24 @@ class IncidentStatusPageEventResponse: """ Attributes: data (IncidentStatusPageEventResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentStatusPageEventResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_status_page_event_response_data import IncidentStatusPageEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentStatusPageEventResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_status_page_event_response = cls( data=data, + included=included, ) incident_status_page_event_response.additional_properties = d diff --git a/rootly_sdk/models/incident_status_page_event_response_data.py b/rootly_sdk/models/incident_status_page_event_response_data.py index 7310f9cb..a0374d05 100644 --- a/rootly_sdk/models/incident_status_page_event_response_data.py +++ b/rootly_sdk/models/incident_status_page_event_response_data.py @@ -33,6 +33,7 @@ class IncidentStatusPageEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_sub_status_list.py b/rootly_sdk/models/incident_sub_status_list.py index 0bb5d1a5..f699265c 100644 --- a/rootly_sdk/models/incident_sub_status_list.py +++ b/rootly_sdk/models/incident_sub_status_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_sub_status_list_data_item import IncidentSubStatusListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentSubStatusList: data (list[IncidentSubStatusListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentSubStatusListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_sub_status_list_data_item import IncidentSubStatusListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_sub_status_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_sub_status_list.additional_properties = d diff --git a/rootly_sdk/models/incident_sub_status_list_data_item.py b/rootly_sdk/models/incident_sub_status_list_data_item.py index d008330e..322e748c 100644 --- a/rootly_sdk/models/incident_sub_status_list_data_item.py +++ b/rootly_sdk/models/incident_sub_status_list_data_item.py @@ -33,6 +33,7 @@ class IncidentSubStatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_sub_status_response.py b/rootly_sdk/models/incident_sub_status_response.py index 6856f8e2..5e8bf711 100644 --- a/rootly_sdk/models/incident_sub_status_response.py +++ b/rootly_sdk/models/incident_sub_status_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_sub_status_response_data import IncidentSubStatusResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentSubStatusResponse") @@ -18,14 +21,24 @@ class IncidentSubStatusResponse: """ Attributes: data (IncidentSubStatusResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentSubStatusResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_sub_status_response_data import IncidentSubStatusResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentSubStatusResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_sub_status_response = cls( data=data, + included=included, ) incident_sub_status_response.additional_properties = d diff --git a/rootly_sdk/models/incident_sub_status_response_data.py b/rootly_sdk/models/incident_sub_status_response_data.py index 2ed85e51..7d2e2559 100644 --- a/rootly_sdk/models/incident_sub_status_response_data.py +++ b/rootly_sdk/models/incident_sub_status_response_data.py @@ -33,6 +33,7 @@ class IncidentSubStatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_trigger_params.py b/rootly_sdk/models/incident_trigger_params.py index 003abd73..25c3c93b 100644 --- a/rootly_sdk/models/incident_trigger_params.py +++ b/rootly_sdk/models/incident_trigger_params.py @@ -10,17 +10,17 @@ IncidentTriggerParamsIncidentCondition, check_incident_trigger_params_incident_condition, ) -from ..models.incident_trigger_params_incident_condition_acknowledged_at_type_1 import ( - IncidentTriggerParamsIncidentConditionAcknowledgedAtType1, - check_incident_trigger_params_incident_condition_acknowledged_at_type_1, +from ..models.incident_trigger_params_incident_condition_acknowledged_at import ( + IncidentTriggerParamsIncidentConditionAcknowledgedAt, + check_incident_trigger_params_incident_condition_acknowledged_at, ) from ..models.incident_trigger_params_incident_condition_cause import ( IncidentTriggerParamsIncidentConditionCause, check_incident_trigger_params_incident_condition_cause, ) -from ..models.incident_trigger_params_incident_condition_detected_at_type_1 import ( - IncidentTriggerParamsIncidentConditionDetectedAtType1, - check_incident_trigger_params_incident_condition_detected_at_type_1, +from ..models.incident_trigger_params_incident_condition_detected_at import ( + IncidentTriggerParamsIncidentConditionDetectedAt, + check_incident_trigger_params_incident_condition_detected_at, ) from ..models.incident_trigger_params_incident_condition_environment import ( IncidentTriggerParamsIncidentConditionEnvironment, @@ -46,13 +46,17 @@ IncidentTriggerParamsIncidentConditionKind, check_incident_trigger_params_incident_condition_kind, ) -from ..models.incident_trigger_params_incident_condition_mitigated_at_type_1 import ( - IncidentTriggerParamsIncidentConditionMitigatedAtType1, - check_incident_trigger_params_incident_condition_mitigated_at_type_1, +from ..models.incident_trigger_params_incident_condition_label import ( + IncidentTriggerParamsIncidentConditionLabel, + check_incident_trigger_params_incident_condition_label, ) -from ..models.incident_trigger_params_incident_condition_resolved_at_type_1 import ( - IncidentTriggerParamsIncidentConditionResolvedAtType1, - check_incident_trigger_params_incident_condition_resolved_at_type_1, +from ..models.incident_trigger_params_incident_condition_mitigated_at import ( + IncidentTriggerParamsIncidentConditionMitigatedAt, + check_incident_trigger_params_incident_condition_mitigated_at, +) +from ..models.incident_trigger_params_incident_condition_resolved_at import ( + IncidentTriggerParamsIncidentConditionResolvedAt, + check_incident_trigger_params_incident_condition_resolved_at, ) from ..models.incident_trigger_params_incident_condition_service import ( IncidentTriggerParamsIncidentConditionService, @@ -62,9 +66,9 @@ IncidentTriggerParamsIncidentConditionSeverity, check_incident_trigger_params_incident_condition_severity, ) -from ..models.incident_trigger_params_incident_condition_started_at_type_1 import ( - IncidentTriggerParamsIncidentConditionStartedAtType1, - check_incident_trigger_params_incident_condition_started_at_type_1, +from ..models.incident_trigger_params_incident_condition_started_at import ( + IncidentTriggerParamsIncidentConditionStartedAt, + check_incident_trigger_params_incident_condition_started_at, ) from ..models.incident_trigger_params_incident_condition_status import ( IncidentTriggerParamsIncidentConditionStatus, @@ -74,17 +78,17 @@ IncidentTriggerParamsIncidentConditionSubStatus, check_incident_trigger_params_incident_condition_sub_status, ) -from ..models.incident_trigger_params_incident_condition_summary_type_1 import ( - IncidentTriggerParamsIncidentConditionSummaryType1, - check_incident_trigger_params_incident_condition_summary_type_1, +from ..models.incident_trigger_params_incident_condition_summary import ( + IncidentTriggerParamsIncidentConditionSummary, + check_incident_trigger_params_incident_condition_summary, ) from ..models.incident_trigger_params_incident_condition_visibility import ( IncidentTriggerParamsIncidentConditionVisibility, check_incident_trigger_params_incident_condition_visibility, ) -from ..models.incident_trigger_params_incident_conditional_inactivity_type_1 import ( - IncidentTriggerParamsIncidentConditionalInactivityType1, - check_incident_trigger_params_incident_conditional_inactivity_type_1, +from ..models.incident_trigger_params_incident_conditional_inactivity import ( + IncidentTriggerParamsIncidentConditionalInactivity, + check_incident_trigger_params_incident_conditional_inactivity, ) from ..models.incident_trigger_params_incident_kinds_item import ( IncidentTriggerParamsIncidentKindsItem, @@ -116,7 +120,7 @@ class IncidentTriggerParams: incident_visibilities (list[bool] | Unset): incident_kinds (list[IncidentTriggerParamsIncidentKindsItem] | Unset): incident_statuses (list[IncidentTriggerParamsIncidentStatusesItem] | Unset): - incident_inactivity_duration (None | str | Unset): + incident_inactivity_duration (None | str | Unset): ex. 10 min, 1h, 3 days, 2 weeks incident_condition (IncidentTriggerParamsIncidentCondition | Unset): Default: 'ALL'. incident_condition_visibility (IncidentTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. incident_condition_kind (IncidentTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. @@ -131,15 +135,18 @@ class IncidentTriggerParams: incident_condition_functionality (IncidentTriggerParamsIncidentConditionFunctionality | Unset): Default: 'ANY'. incident_condition_group (IncidentTriggerParamsIncidentConditionGroup | Unset): Default: 'ANY'. incident_condition_cause (IncidentTriggerParamsIncidentConditionCause | Unset): Default: 'ANY'. + incident_condition_label (IncidentTriggerParamsIncidentConditionLabel | Unset): Default: 'ANY'. + incident_condition_label_use_regexp (bool | Unset): Default: False. + incident_labels (list[str] | Unset): incident_post_mortem_condition_cause (IncidentTriggerParamsIncidentPostMortemConditionCause | Unset): [DEPRECATED] Use incident_condition_cause instead Default: 'ANY'. - incident_condition_summary (IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset): - incident_condition_started_at (IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset): - incident_condition_detected_at (IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset): - incident_condition_acknowledged_at (IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset): - incident_condition_mitigated_at (IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset): - incident_condition_resolved_at (IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset): - incident_conditional_inactivity (IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset): + incident_condition_summary (IncidentTriggerParamsIncidentConditionSummary | Unset): + incident_condition_started_at (IncidentTriggerParamsIncidentConditionStartedAt | Unset): + incident_condition_detected_at (IncidentTriggerParamsIncidentConditionDetectedAt | Unset): + incident_condition_acknowledged_at (IncidentTriggerParamsIncidentConditionAcknowledgedAt | Unset): + incident_condition_mitigated_at (IncidentTriggerParamsIncidentConditionMitigatedAt | Unset): + incident_condition_resolved_at (IncidentTriggerParamsIncidentConditionResolvedAt | Unset): + incident_conditional_inactivity (IncidentTriggerParamsIncidentConditionalInactivity | Unset): """ trigger_type: IncidentTriggerParamsTriggerType @@ -161,14 +168,17 @@ class IncidentTriggerParams: incident_condition_functionality: IncidentTriggerParamsIncidentConditionFunctionality | Unset = "ANY" incident_condition_group: IncidentTriggerParamsIncidentConditionGroup | Unset = "ANY" incident_condition_cause: IncidentTriggerParamsIncidentConditionCause | Unset = "ANY" + incident_condition_label: IncidentTriggerParamsIncidentConditionLabel | Unset = "ANY" + incident_condition_label_use_regexp: bool | Unset = False + incident_labels: list[str] | Unset = UNSET incident_post_mortem_condition_cause: IncidentTriggerParamsIncidentPostMortemConditionCause | Unset = "ANY" - incident_condition_summary: IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset = UNSET - incident_condition_started_at: IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset = UNSET - incident_condition_detected_at: IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset = UNSET - incident_condition_acknowledged_at: IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset = UNSET - incident_condition_mitigated_at: IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset = UNSET - incident_condition_resolved_at: IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset = UNSET - incident_conditional_inactivity: IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset = UNSET + incident_condition_summary: IncidentTriggerParamsIncidentConditionSummary | Unset = UNSET + incident_condition_started_at: IncidentTriggerParamsIncidentConditionStartedAt | Unset = UNSET + incident_condition_detected_at: IncidentTriggerParamsIncidentConditionDetectedAt | Unset = UNSET + incident_condition_acknowledged_at: IncidentTriggerParamsIncidentConditionAcknowledgedAt | Unset = UNSET + incident_condition_mitigated_at: IncidentTriggerParamsIncidentConditionMitigatedAt | Unset = UNSET + incident_condition_resolved_at: IncidentTriggerParamsIncidentConditionResolvedAt | Unset = UNSET + incident_conditional_inactivity: IncidentTriggerParamsIncidentConditionalInactivity | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -254,64 +264,46 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.incident_condition_cause, Unset): incident_condition_cause = self.incident_condition_cause + incident_condition_label: str | Unset = UNSET + if not isinstance(self.incident_condition_label, Unset): + incident_condition_label = self.incident_condition_label + + incident_condition_label_use_regexp = self.incident_condition_label_use_regexp + + incident_labels: list[str] | Unset = UNSET + if not isinstance(self.incident_labels, Unset): + incident_labels = self.incident_labels + incident_post_mortem_condition_cause: str | Unset = UNSET if not isinstance(self.incident_post_mortem_condition_cause, Unset): incident_post_mortem_condition_cause = self.incident_post_mortem_condition_cause - incident_condition_summary: None | str | Unset - if isinstance(self.incident_condition_summary, Unset): - incident_condition_summary = UNSET - elif isinstance(self.incident_condition_summary, str): - incident_condition_summary = self.incident_condition_summary - else: + incident_condition_summary: str | Unset = UNSET + if not isinstance(self.incident_condition_summary, Unset): incident_condition_summary = self.incident_condition_summary - incident_condition_started_at: None | str | Unset - if isinstance(self.incident_condition_started_at, Unset): - incident_condition_started_at = UNSET - elif isinstance(self.incident_condition_started_at, str): - incident_condition_started_at = self.incident_condition_started_at - else: + incident_condition_started_at: str | Unset = UNSET + if not isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = self.incident_condition_started_at - incident_condition_detected_at: None | str | Unset - if isinstance(self.incident_condition_detected_at, Unset): - incident_condition_detected_at = UNSET - elif isinstance(self.incident_condition_detected_at, str): - incident_condition_detected_at = self.incident_condition_detected_at - else: + incident_condition_detected_at: str | Unset = UNSET + if not isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = self.incident_condition_detected_at - incident_condition_acknowledged_at: None | str | Unset - if isinstance(self.incident_condition_acknowledged_at, Unset): - incident_condition_acknowledged_at = UNSET - elif isinstance(self.incident_condition_acknowledged_at, str): - incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - else: + incident_condition_acknowledged_at: str | Unset = UNSET + if not isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - incident_condition_mitigated_at: None | str | Unset - if isinstance(self.incident_condition_mitigated_at, Unset): - incident_condition_mitigated_at = UNSET - elif isinstance(self.incident_condition_mitigated_at, str): - incident_condition_mitigated_at = self.incident_condition_mitigated_at - else: + incident_condition_mitigated_at: str | Unset = UNSET + if not isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = self.incident_condition_mitigated_at - incident_condition_resolved_at: None | str | Unset - if isinstance(self.incident_condition_resolved_at, Unset): - incident_condition_resolved_at = UNSET - elif isinstance(self.incident_condition_resolved_at, str): - incident_condition_resolved_at = self.incident_condition_resolved_at - else: + incident_condition_resolved_at: str | Unset = UNSET + if not isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | str | Unset - if isinstance(self.incident_conditional_inactivity, Unset): - incident_conditional_inactivity = UNSET - elif isinstance(self.incident_conditional_inactivity, str): - incident_conditional_inactivity = self.incident_conditional_inactivity - else: + incident_conditional_inactivity: str | Unset = UNSET + if not isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = self.incident_conditional_inactivity field_dict: dict[str, Any] = {} @@ -357,6 +349,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_condition_group"] = incident_condition_group if incident_condition_cause is not UNSET: field_dict["incident_condition_cause"] = incident_condition_cause + if incident_condition_label is not UNSET: + field_dict["incident_condition_label"] = incident_condition_label + if incident_condition_label_use_regexp is not UNSET: + field_dict["incident_condition_label_use_regexp"] = incident_condition_label_use_regexp + if incident_labels is not UNSET: + field_dict["incident_labels"] = incident_labels if incident_post_mortem_condition_cause is not UNSET: field_dict["incident_post_mortem_condition_cause"] = incident_post_mortem_condition_cause if incident_condition_summary is not UNSET: @@ -523,6 +521,17 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: else: incident_condition_cause = check_incident_trigger_params_incident_condition_cause(_incident_condition_cause) + _incident_condition_label = d.pop("incident_condition_label", UNSET) + incident_condition_label: IncidentTriggerParamsIncidentConditionLabel | Unset + if isinstance(_incident_condition_label, Unset): + incident_condition_label = UNSET + else: + incident_condition_label = check_incident_trigger_params_incident_condition_label(_incident_condition_label) + + incident_condition_label_use_regexp = d.pop("incident_condition_label_use_regexp", UNSET) + + incident_labels = cast(list[str], d.pop("incident_labels", UNSET)) + _incident_post_mortem_condition_cause = d.pop("incident_post_mortem_condition_cause", UNSET) incident_post_mortem_condition_cause: IncidentTriggerParamsIncidentPostMortemConditionCause | Unset if isinstance(_incident_post_mortem_condition_cause, Unset): @@ -532,164 +541,68 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: _incident_post_mortem_condition_cause ) - def _parse_incident_condition_summary( - data: object, - ) -> IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_summary_type_1 = check_incident_trigger_params_incident_condition_summary_type_1( - data - ) - - return incident_condition_summary_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset, data) - - incident_condition_summary = _parse_incident_condition_summary(d.pop("incident_condition_summary", UNSET)) - - def _parse_incident_condition_started_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_started_at_type_1 = ( - check_incident_trigger_params_incident_condition_started_at_type_1(data) - ) - - return incident_condition_started_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset, data) - - incident_condition_started_at = _parse_incident_condition_started_at( - d.pop("incident_condition_started_at", UNSET) - ) - - def _parse_incident_condition_detected_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_detected_at_type_1 = ( - check_incident_trigger_params_incident_condition_detected_at_type_1(data) - ) - - return incident_condition_detected_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset, data) - - incident_condition_detected_at = _parse_incident_condition_detected_at( - d.pop("incident_condition_detected_at", UNSET) - ) - - def _parse_incident_condition_acknowledged_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_acknowledged_at_type_1 = ( - check_incident_trigger_params_incident_condition_acknowledged_at_type_1(data) - ) - - return incident_condition_acknowledged_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset, data) - - incident_condition_acknowledged_at = _parse_incident_condition_acknowledged_at( - d.pop("incident_condition_acknowledged_at", UNSET) - ) - - def _parse_incident_condition_mitigated_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_mitigated_at_type_1 = ( - check_incident_trigger_params_incident_condition_mitigated_at_type_1(data) - ) - - return incident_condition_mitigated_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset, data) - - incident_condition_mitigated_at = _parse_incident_condition_mitigated_at( - d.pop("incident_condition_mitigated_at", UNSET) - ) + _incident_condition_summary = d.pop("incident_condition_summary", UNSET) + incident_condition_summary: IncidentTriggerParamsIncidentConditionSummary | Unset + if isinstance(_incident_condition_summary, Unset): + incident_condition_summary = UNSET + else: + incident_condition_summary = check_incident_trigger_params_incident_condition_summary( + _incident_condition_summary + ) - def _parse_incident_condition_resolved_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_resolved_at_type_1 = ( - check_incident_trigger_params_incident_condition_resolved_at_type_1(data) - ) + _incident_condition_started_at = d.pop("incident_condition_started_at", UNSET) + incident_condition_started_at: IncidentTriggerParamsIncidentConditionStartedAt | Unset + if isinstance(_incident_condition_started_at, Unset): + incident_condition_started_at = UNSET + else: + incident_condition_started_at = check_incident_trigger_params_incident_condition_started_at( + _incident_condition_started_at + ) - return incident_condition_resolved_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset, data) + _incident_condition_detected_at = d.pop("incident_condition_detected_at", UNSET) + incident_condition_detected_at: IncidentTriggerParamsIncidentConditionDetectedAt | Unset + if isinstance(_incident_condition_detected_at, Unset): + incident_condition_detected_at = UNSET + else: + incident_condition_detected_at = check_incident_trigger_params_incident_condition_detected_at( + _incident_condition_detected_at + ) - incident_condition_resolved_at = _parse_incident_condition_resolved_at( - d.pop("incident_condition_resolved_at", UNSET) - ) + _incident_condition_acknowledged_at = d.pop("incident_condition_acknowledged_at", UNSET) + incident_condition_acknowledged_at: IncidentTriggerParamsIncidentConditionAcknowledgedAt | Unset + if isinstance(_incident_condition_acknowledged_at, Unset): + incident_condition_acknowledged_at = UNSET + else: + incident_condition_acknowledged_at = check_incident_trigger_params_incident_condition_acknowledged_at( + _incident_condition_acknowledged_at + ) - def _parse_incident_conditional_inactivity( - data: object, - ) -> IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_conditional_inactivity_type_1 = ( - check_incident_trigger_params_incident_conditional_inactivity_type_1(data) - ) + _incident_condition_mitigated_at = d.pop("incident_condition_mitigated_at", UNSET) + incident_condition_mitigated_at: IncidentTriggerParamsIncidentConditionMitigatedAt | Unset + if isinstance(_incident_condition_mitigated_at, Unset): + incident_condition_mitigated_at = UNSET + else: + incident_condition_mitigated_at = check_incident_trigger_params_incident_condition_mitigated_at( + _incident_condition_mitigated_at + ) - return incident_conditional_inactivity_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset, data) + _incident_condition_resolved_at = d.pop("incident_condition_resolved_at", UNSET) + incident_condition_resolved_at: IncidentTriggerParamsIncidentConditionResolvedAt | Unset + if isinstance(_incident_condition_resolved_at, Unset): + incident_condition_resolved_at = UNSET + else: + incident_condition_resolved_at = check_incident_trigger_params_incident_condition_resolved_at( + _incident_condition_resolved_at + ) - incident_conditional_inactivity = _parse_incident_conditional_inactivity( - d.pop("incident_conditional_inactivity", UNSET) - ) + _incident_conditional_inactivity = d.pop("incident_conditional_inactivity", UNSET) + incident_conditional_inactivity: IncidentTriggerParamsIncidentConditionalInactivity | Unset + if isinstance(_incident_conditional_inactivity, Unset): + incident_conditional_inactivity = UNSET + else: + incident_conditional_inactivity = check_incident_trigger_params_incident_conditional_inactivity( + _incident_conditional_inactivity + ) incident_trigger_params = cls( trigger_type=trigger_type, @@ -711,6 +624,9 @@ def _parse_incident_conditional_inactivity( incident_condition_functionality=incident_condition_functionality, incident_condition_group=incident_condition_group, incident_condition_cause=incident_condition_cause, + incident_condition_label=incident_condition_label, + incident_condition_label_use_regexp=incident_condition_label_use_regexp, + incident_labels=incident_labels, incident_post_mortem_condition_cause=incident_post_mortem_condition_cause, incident_condition_summary=incident_condition_summary, incident_condition_started_at=incident_condition_started_at, diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at.py b/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at.py new file mode 100644 index 00000000..68d83d81 --- /dev/null +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +IncidentTriggerParamsIncidentConditionAcknowledgedAt = Literal["SET", "UNSET"] + +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: set[ + IncidentTriggerParamsIncidentConditionAcknowledgedAt +] = { + "SET", + "UNSET", +} + + +def check_incident_trigger_params_incident_condition_acknowledged_at( + value: str | None, +) -> IncidentTriggerParamsIncidentConditionAcknowledgedAt | None: + if value is None: + return None + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionAcknowledgedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at_type_1.py deleted file mode 100644 index 87c71b8a..00000000 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 = Literal["SET", "UNSET"] - -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_incident_trigger_params_incident_condition_acknowledged_at_type_1( - value: str | None, -) -> IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None: - if value is None: - return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionAcknowledgedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_detected_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_detected_at.py similarity index 50% rename from rootly_sdk/models/incident_trigger_params_incident_condition_detected_at_type_1.py rename to rootly_sdk/models/incident_trigger_params_incident_condition_detected_at.py index 43c2fd3a..69645f09 100644 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_detected_at_type_1.py +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_detected_at.py @@ -1,22 +1,20 @@ from typing import Literal, cast -IncidentTriggerParamsIncidentConditionDetectedAtType1 = Literal["SET", "UNSET"] +IncidentTriggerParamsIncidentConditionDetectedAt = Literal["SET", "UNSET"] -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionDetectedAtType1 -] = { +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: set[IncidentTriggerParamsIncidentConditionDetectedAt] = { "SET", "UNSET", } -def check_incident_trigger_params_incident_condition_detected_at_type_1( +def check_incident_trigger_params_incident_condition_detected_at( value: str | None, -) -> IncidentTriggerParamsIncidentConditionDetectedAtType1 | None: +) -> IncidentTriggerParamsIncidentConditionDetectedAt | None: if value is None: return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionDetectedAtType1, value) + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionDetectedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_label.py b/rootly_sdk/models/incident_trigger_params_incident_condition_label.py new file mode 100644 index 00000000..7f2f1c13 --- /dev/null +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_label.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +IncidentTriggerParamsIncidentConditionLabel = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: set[IncidentTriggerParamsIncidentConditionLabel] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_incident_trigger_params_incident_condition_label( + value: str | None, +) -> IncidentTriggerParamsIncidentConditionLabel | None: + if value is None: + return None + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: + return cast(IncidentTriggerParamsIncidentConditionLabel, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES!r}" + ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at.py similarity index 50% rename from rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at_type_1.py rename to rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at.py index 369b81e4..bd798922 100644 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at_type_1.py +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -IncidentTriggerParamsIncidentConditionMitigatedAtType1 = Literal["SET", "UNSET"] +IncidentTriggerParamsIncidentConditionMitigatedAt = Literal["SET", "UNSET"] -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionMitigatedAtType1 +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: set[ + IncidentTriggerParamsIncidentConditionMitigatedAt ] = { "SET", "UNSET", } -def check_incident_trigger_params_incident_condition_mitigated_at_type_1( +def check_incident_trigger_params_incident_condition_mitigated_at( value: str | None, -) -> IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None: +) -> IncidentTriggerParamsIncidentConditionMitigatedAt | None: if value is None: return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionMitigatedAtType1, value) + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionMitigatedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at.py similarity index 50% rename from rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at_type_1.py rename to rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at.py index cc8ce6f7..a53536db 100644 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at_type_1.py +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at.py @@ -1,22 +1,20 @@ from typing import Literal, cast -IncidentTriggerParamsIncidentConditionResolvedAtType1 = Literal["SET", "UNSET"] +IncidentTriggerParamsIncidentConditionResolvedAt = Literal["SET", "UNSET"] -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionResolvedAtType1 -] = { +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: set[IncidentTriggerParamsIncidentConditionResolvedAt] = { "SET", "UNSET", } -def check_incident_trigger_params_incident_condition_resolved_at_type_1( +def check_incident_trigger_params_incident_condition_resolved_at( value: str | None, -) -> IncidentTriggerParamsIncidentConditionResolvedAtType1 | None: +) -> IncidentTriggerParamsIncidentConditionResolvedAt | None: if value is None: return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionResolvedAtType1, value) + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionResolvedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_started_at.py b/rootly_sdk/models/incident_trigger_params_incident_condition_started_at.py new file mode 100644 index 00000000..b54da9c5 --- /dev/null +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_started_at.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +IncidentTriggerParamsIncidentConditionStartedAt = Literal["SET", "UNSET"] + +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: set[IncidentTriggerParamsIncidentConditionStartedAt] = { + "SET", + "UNSET", +} + + +def check_incident_trigger_params_incident_condition_started_at( + value: str | None, +) -> IncidentTriggerParamsIncidentConditionStartedAt | None: + if value is None: + return None + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionStartedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_started_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_started_at_type_1.py deleted file mode 100644 index 6b680522..00000000 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_started_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -IncidentTriggerParamsIncidentConditionStartedAtType1 = Literal["SET", "UNSET"] - -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionStartedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_incident_trigger_params_incident_condition_started_at_type_1( - value: str | None, -) -> IncidentTriggerParamsIncidentConditionStartedAtType1 | None: - if value is None: - return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionStartedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_summary.py b/rootly_sdk/models/incident_trigger_params_incident_condition_summary.py new file mode 100644 index 00000000..59059de1 --- /dev/null +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_summary.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +IncidentTriggerParamsIncidentConditionSummary = Literal["SET", "UNSET"] + +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: set[IncidentTriggerParamsIncidentConditionSummary] = { + "SET", + "UNSET", +} + + +def check_incident_trigger_params_incident_condition_summary( + value: str | None, +) -> IncidentTriggerParamsIncidentConditionSummary | None: + if value is None: + return None + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: + return cast(IncidentTriggerParamsIncidentConditionSummary, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES!r}" + ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_summary_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_summary_type_1.py deleted file mode 100644 index 847088c7..00000000 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_summary_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -IncidentTriggerParamsIncidentConditionSummaryType1 = Literal["SET", "UNSET"] - -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionSummaryType1 -] = { - "SET", - "UNSET", -} - - -def check_incident_trigger_params_incident_condition_summary_type_1( - value: str | None, -) -> IncidentTriggerParamsIncidentConditionSummaryType1 | None: - if value is None: - return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionSummaryType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity.py similarity index 50% rename from rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity_type_1.py rename to rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity.py index 668dfb88..561aff65 100644 --- a/rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity_type_1.py +++ b/rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity.py @@ -1,21 +1,21 @@ from typing import Literal, cast -IncidentTriggerParamsIncidentConditionalInactivityType1 = Literal["IS"] +IncidentTriggerParamsIncidentConditionalInactivity = Literal["IS"] -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionalInactivityType1 +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: set[ + IncidentTriggerParamsIncidentConditionalInactivity ] = { "IS", } -def check_incident_trigger_params_incident_conditional_inactivity_type_1( +def check_incident_trigger_params_incident_conditional_inactivity( value: str | None, -) -> IncidentTriggerParamsIncidentConditionalInactivityType1 | None: +) -> IncidentTriggerParamsIncidentConditionalInactivity | None: if value is None: return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionalInactivityType1, value) + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: + return cast(IncidentTriggerParamsIncidentConditionalInactivity, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES!r}" ) diff --git a/rootly_sdk/models/incident_type.py b/rootly_sdk/models/incident_type.py index a467d2f2..b0f8f6fe 100644 --- a/rootly_sdk/models/incident_type.py +++ b/rootly_sdk/models/incident_type.py @@ -50,6 +50,7 @@ class IncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name created_at = self.created_at diff --git a/rootly_sdk/models/incident_type_list.py b/rootly_sdk/models/incident_type_list.py index 9e9c5c8c..3fcfd517 100644 --- a/rootly_sdk/models/incident_type_list.py +++ b/rootly_sdk/models/incident_type_list.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_type_list_data_item import IncidentTypeListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +25,17 @@ class IncidentTypeList: data (list[IncidentTypeListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentTypeListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +61,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_type_list_data_item import IncidentTypeListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_type_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_type_list.additional_properties = d diff --git a/rootly_sdk/models/incident_type_list_data_item.py b/rootly_sdk/models/incident_type_list_data_item.py index 3f11a9a3..bedeef51 100644 --- a/rootly_sdk/models/incident_type_list_data_item.py +++ b/rootly_sdk/models/incident_type_list_data_item.py @@ -33,6 +33,7 @@ class IncidentTypeListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_type_response.py b/rootly_sdk/models/incident_type_response.py index 4ce5945a..8345322e 100644 --- a/rootly_sdk/models/incident_type_response.py +++ b/rootly_sdk/models/incident_type_response.py @@ -6,8 +6,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.incident_type_response_data import IncidentTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentTypeResponse") @@ -18,14 +21,24 @@ class IncidentTypeResponse: """ Attributes: data (IncidentTypeResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentTypeResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_type_response_data import IncidentTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentTypeResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_type_response = cls( data=data, + included=included, ) incident_type_response.additional_properties = d diff --git a/rootly_sdk/models/incident_type_response_data.py b/rootly_sdk/models/incident_type_response_data.py index 022302b0..0467f19a 100644 --- a/rootly_sdk/models/incident_type_response_data.py +++ b/rootly_sdk/models/incident_type_response_data.py @@ -33,6 +33,7 @@ class IncidentTypeResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incidents_chart_response.py b/rootly_sdk/models/incidents_chart_response.py index df356900..95932b9f 100644 --- a/rootly_sdk/models/incidents_chart_response.py +++ b/rootly_sdk/models/incidents_chart_response.py @@ -1,31 +1,52 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +if TYPE_CHECKING: + from ..models.incidents_chart_response_data import IncidentsChartResponseData + + T = TypeVar("T", bound="IncidentsChartResponse") @_attrs_define class IncidentsChartResponse: - """ """ + """ + Attributes: + data (IncidentsChartResponseData): + """ + data: IncidentsChartResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.incidents_chart_response_data import IncidentsChartResponseData + d = dict(src_dict) - incidents_chart_response = cls() + data = IncidentsChartResponseData.from_dict(d.pop("data")) + + incidents_chart_response = cls( + data=data, + ) incidents_chart_response.additional_properties = d return incidents_chart_response diff --git a/rootly_sdk/models/incidents_chart_response_data.py b/rootly_sdk/models/incidents_chart_response_data.py new file mode 100644 index 00000000..544d592e --- /dev/null +++ b/rootly_sdk/models/incidents_chart_response_data.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="IncidentsChartResponseData") + + +@_attrs_define +class IncidentsChartResponseData: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + incidents_chart_response_data = cls() + + incidents_chart_response_data.additional_properties = d + return incidents_chart_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_google_chat_space_task_params.py b/rootly_sdk/models/invite_to_google_chat_space_task_params.py new file mode 100644 index 00000000..ced72472 --- /dev/null +++ b/rootly_sdk/models/invite_to_google_chat_space_task_params.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.invite_to_google_chat_space_task_params_task_type import ( + InviteToGoogleChatSpaceTaskParamsTaskType, + check_invite_to_google_chat_space_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace + + +T = TypeVar("T", bound="InviteToGoogleChatSpaceTaskParams") + + +@_attrs_define +class InviteToGoogleChatSpaceTaskParams: + """ + Attributes: + space (InviteToGoogleChatSpaceTaskParamsSpace): + emails (str): Comma separated list of emails to invite + task_type (InviteToGoogleChatSpaceTaskParamsTaskType | Unset): + """ + + space: InviteToGoogleChatSpaceTaskParamsSpace + emails: str + task_type: InviteToGoogleChatSpaceTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + space = self.space.to_dict() + + emails = self.emails + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "space": space, + "emails": emails, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace + + d = dict(src_dict) + space = InviteToGoogleChatSpaceTaskParamsSpace.from_dict(d.pop("space")) + + emails = d.pop("emails") + + _task_type = d.pop("task_type", UNSET) + task_type: InviteToGoogleChatSpaceTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_invite_to_google_chat_space_task_params_task_type(_task_type) + + invite_to_google_chat_space_task_params = cls( + space=space, + emails=emails, + task_type=task_type, + ) + + invite_to_google_chat_space_task_params.additional_properties = d + return invite_to_google_chat_space_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py b/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py new file mode 100644 index 00000000..90770cb9 --- /dev/null +++ b/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToGoogleChatSpaceTaskParamsSpace") + + +@_attrs_define +class InviteToGoogleChatSpaceTaskParamsSpace: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_google_chat_space_task_params_space = cls( + id=id, + name=name, + ) + + invite_to_google_chat_space_task_params_space.additional_properties = d + return invite_to_google_chat_space_task_params_space + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_google_chat_space_task_params_task_type.py b/rootly_sdk/models/invite_to_google_chat_space_task_params_task_type.py new file mode 100644 index 00000000..8c0ddf59 --- /dev/null +++ b/rootly_sdk/models/invite_to_google_chat_space_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +InviteToGoogleChatSpaceTaskParamsTaskType = Literal["invite_to_google_chat_space"] + +INVITE_TO_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: set[InviteToGoogleChatSpaceTaskParamsTaskType] = { + "invite_to_google_chat_space", +} + + +def check_invite_to_google_chat_space_task_params_task_type( + value: str | None, +) -> InviteToGoogleChatSpaceTaskParamsTaskType | None: + if value is None: + return None + if value in INVITE_TO_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(InviteToGoogleChatSpaceTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INVITE_TO_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py new file mode 100644 index 00000000..ef3f3b57 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py @@ -0,0 +1,220 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.invite_to_microsoft_teams_channel_rootly_task_params_task_type import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType, + check_invite_to_microsoft_teams_channel_rootly_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_channel import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_group_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_schedule_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_service_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_team import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_user_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget, + ) + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParams") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParams: + """ + Attributes: + team (InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam): + channel (InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel): + task_type (InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType | Unset): + escalation_policy_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget | Unset): + service_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget | Unset): + user_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget | Unset): + group_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget | Unset): + schedule_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget | Unset): + """ + + team: InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam + channel: InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel + task_type: InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType | Unset = UNSET + escalation_policy_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget | Unset = UNSET + service_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget | Unset = UNSET + user_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget | Unset = UNSET + group_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget | Unset = UNSET + schedule_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + team = self.team.to_dict() + + channel = self.channel.to_dict() + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + escalation_policy_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.escalation_policy_target, Unset): + escalation_policy_target = self.escalation_policy_target.to_dict() + + service_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.service_target, Unset): + service_target = self.service_target.to_dict() + + user_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.user_target, Unset): + user_target = self.user_target.to_dict() + + group_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.group_target, Unset): + group_target = self.group_target.to_dict() + + schedule_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.schedule_target, Unset): + schedule_target = self.schedule_target.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "team": team, + "channel": channel, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if escalation_policy_target is not UNSET: + field_dict["escalation_policy_target"] = escalation_policy_target + if service_target is not UNSET: + field_dict["service_target"] = service_target + if user_target is not UNSET: + field_dict["user_target"] = user_target + if group_target is not UNSET: + field_dict["group_target"] = group_target + if schedule_target is not UNSET: + field_dict["schedule_target"] = schedule_target + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_channel import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_group_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_schedule_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_service_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_team import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_user_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget, + ) + + d = dict(src_dict) + team = InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam.from_dict(d.pop("team")) + + channel = InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel.from_dict(d.pop("channel")) + + _task_type = d.pop("task_type", UNSET) + task_type: InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_invite_to_microsoft_teams_channel_rootly_task_params_task_type(_task_type) + + _escalation_policy_target = d.pop("escalation_policy_target", UNSET) + escalation_policy_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget | Unset + if isinstance(_escalation_policy_target, Unset): + escalation_policy_target = UNSET + else: + escalation_policy_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget.from_dict( + _escalation_policy_target + ) + + _service_target = d.pop("service_target", UNSET) + service_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget | Unset + if isinstance(_service_target, Unset): + service_target = UNSET + else: + service_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget.from_dict(_service_target) + + _user_target = d.pop("user_target", UNSET) + user_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget | Unset + if isinstance(_user_target, Unset): + user_target = UNSET + else: + user_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget.from_dict(_user_target) + + _group_target = d.pop("group_target", UNSET) + group_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget | Unset + if isinstance(_group_target, Unset): + group_target = UNSET + else: + group_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget.from_dict(_group_target) + + _schedule_target = d.pop("schedule_target", UNSET) + schedule_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget | Unset + if isinstance(_schedule_target, Unset): + schedule_target = UNSET + else: + schedule_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget.from_dict(_schedule_target) + + invite_to_microsoft_teams_channel_rootly_task_params = cls( + team=team, + channel=channel, + task_type=task_type, + escalation_policy_target=escalation_policy_target, + service_target=service_target, + user_target=user_target, + group_target=group_target, + schedule_target=schedule_target, + ) + + invite_to_microsoft_teams_channel_rootly_task_params.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py new file mode 100644 index 00000000..865e2e95 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_microsoft_teams_channel_rootly_task_params_channel = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_channel.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_channel + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py new file mode 100644 index 00000000..4ef5fc51 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py new file mode 100644 index 00000000..3c2a90e4 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_microsoft_teams_channel_rootly_task_params_group_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_group_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_group_target + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py new file mode 100644 index 00000000..0616c5e2 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_microsoft_teams_channel_rootly_task_params_schedule_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_schedule_target + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py new file mode 100644 index 00000000..167fa3e6 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_microsoft_teams_channel_rootly_task_params_service_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_service_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_service_target + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_task_type.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_task_type.py new file mode 100644 index 00000000..b84a5230 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_task_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType = Literal["invite_to_microsoft_teams_channel_rootly"] + +INVITE_TO_MICROSOFT_TEAMS_CHANNEL_ROOTLY_TASK_PARAMS_TASK_TYPE_VALUES: set[ + InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType +] = { + "invite_to_microsoft_teams_channel_rootly", +} + + +def check_invite_to_microsoft_teams_channel_rootly_task_params_task_type( + value: str | None, +) -> InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType | None: + if value is None: + return None + if value in INVITE_TO_MICROSOFT_TEAMS_CHANNEL_ROOTLY_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INVITE_TO_MICROSOFT_TEAMS_CHANNEL_ROOTLY_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py new file mode 100644 index 00000000..f828e8a0 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_microsoft_teams_channel_rootly_task_params_team = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_team.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_team + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py new file mode 100644 index 00000000..ed58e7af --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_microsoft_teams_channel_rootly_task_params_user_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_user_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_user_target + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py index c9e9c3fa..ae59c5cf 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py @@ -39,6 +39,7 @@ class InviteToMicrosoftTeamsChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + channel = self.channel.to_dict() emails = self.emails diff --git a/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params.py b/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params.py index 7e1b9b24..852ab3a2 100644 --- a/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params.py +++ b/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params.py @@ -39,6 +39,7 @@ class InviteToSlackChannelOpsgenieTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + channels = [] for channels_item_data in self.channels: channels_item = channels_item_data.to_dict() diff --git a/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py new file mode 100644 index 00000000..3351841d --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy") + + +@_attrs_define +class InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy = cls( + id=id, + name=name, + ) + + invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.additional_properties = d + return invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py new file mode 100644 index 00000000..41e59cc3 --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToSlackChannelPagerdutyTaskParamsType1Schedule") + + +@_attrs_define +class InviteToSlackChannelPagerdutyTaskParamsType1Schedule: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_slack_channel_pagerduty_task_params_type_1_schedule = cls( + id=id, + name=name, + ) + + invite_to_slack_channel_pagerduty_task_params_type_1_schedule.additional_properties = d + return invite_to_slack_channel_pagerduty_task_params_type_1_schedule + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py index 591cb3c9..37ac9795 100644 --- a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py +++ b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py @@ -59,6 +59,7 @@ class InviteToSlackChannelRootlyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + channels = [] for channels_item_data in self.channels: channels_item = channels_item_data.to_dict() diff --git a/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py new file mode 100644 index 00000000..c0d9d99d --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToSlackChannelTaskParamsType0SlackUsersItem") + + +@_attrs_define +class InviteToSlackChannelTaskParamsType0SlackUsersItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_slack_channel_task_params_type_0_slack_users_item = cls( + id=id, + name=name, + ) + + invite_to_slack_channel_task_params_type_0_slack_users_item.additional_properties = d + return invite_to_slack_channel_task_params_type_0_slack_users_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py new file mode 100644 index 00000000..97ba21b9 --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InviteToSlackChannelTaskParamsType1SlackUserGroupsItem") + + +@_attrs_define +class InviteToSlackChannelTaskParamsType1SlackUserGroupsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + invite_to_slack_channel_task_params_type_1_slack_user_groups_item = cls( + id=id, + name=name, + ) + + invite_to_slack_channel_task_params_type_1_slack_user_groups_item.additional_properties = d + return invite_to_slack_channel_task_params_type_1_slack_user_groups_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py new file mode 100644 index 00000000..ce51bda3 --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="InviteToSlackChannelTaskParamsType2") + + +@_attrs_define +class InviteToSlackChannelTaskParamsType2: + """ + Attributes: + slack_emails (str): + """ + + slack_emails: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + slack_emails = self.slack_emails + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "slack_emails": slack_emails, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + slack_emails = d.pop("slack_emails") + + invite_to_slack_channel_task_params_type_2 = cls( + slack_emails=slack_emails, + ) + + invite_to_slack_channel_task_params_type_2.additional_properties = d + return invite_to_slack_channel_task_params_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py index 53822b1d..a8e85eaf 100644 --- a/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py +++ b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py @@ -37,6 +37,7 @@ class InviteToSlackChannelVictorOpsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + channels = [] for channels_item_data in self.channels: channels_item = channels_item_data.to_dict() diff --git a/rootly_sdk/models/ip_ranges_response.py b/rootly_sdk/models/ip_ranges_response.py index b38ca535..6cd7d27e 100644 --- a/rootly_sdk/models/ip_ranges_response.py +++ b/rootly_sdk/models/ip_ranges_response.py @@ -24,6 +24,7 @@ class IpRangesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/ip_ranges_response_data.py b/rootly_sdk/models/ip_ranges_response_data.py index 3c0ea6ff..de55248c 100644 --- a/rootly_sdk/models/ip_ranges_response_data.py +++ b/rootly_sdk/models/ip_ranges_response_data.py @@ -30,6 +30,7 @@ class IpRangesResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/jsonapi_included_resource.py b/rootly_sdk/models/jsonapi_included_resource.py new file mode 100644 index 00000000..bb745c1d --- /dev/null +++ b/rootly_sdk/models/jsonapi_included_resource.py @@ -0,0 +1,112 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes + from ..models.jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships + + +T = TypeVar("T", bound="JsonapiIncludedResource") + + +@_attrs_define +class JsonapiIncludedResource: + """ + Attributes: + id (str): + type_ (str): + attributes (JsonapiIncludedResourceAttributes | Unset): + relationships (JsonapiIncludedResourceRelationships | Unset): + """ + + id: str + type_: str + attributes: JsonapiIncludedResourceAttributes | Unset = UNSET + relationships: JsonapiIncludedResourceRelationships | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: dict[str, Any] | Unset = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + } + ) + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes + from ..models.jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships + + d = dict(src_dict) + id = d.pop("id") + + type_ = d.pop("type") + + _attributes = d.pop("attributes", UNSET) + attributes: JsonapiIncludedResourceAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = JsonapiIncludedResourceAttributes.from_dict(_attributes) + + _relationships = d.pop("relationships", UNSET) + relationships: JsonapiIncludedResourceRelationships | Unset + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = JsonapiIncludedResourceRelationships.from_dict(_relationships) + + jsonapi_included_resource = cls( + id=id, + type_=type_, + attributes=attributes, + relationships=relationships, + ) + + jsonapi_included_resource.additional_properties = d + return jsonapi_included_resource + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/jsonapi_included_resource_attributes.py b/rootly_sdk/models/jsonapi_included_resource_attributes.py new file mode 100644 index 00000000..4941c7af --- /dev/null +++ b/rootly_sdk/models/jsonapi_included_resource_attributes.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="JsonapiIncludedResourceAttributes") + + +@_attrs_define +class JsonapiIncludedResourceAttributes: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + jsonapi_included_resource_attributes = cls() + + jsonapi_included_resource_attributes.additional_properties = d + return jsonapi_included_resource_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/jsonapi_included_resource_relationships.py b/rootly_sdk/models/jsonapi_included_resource_relationships.py new file mode 100644 index 00000000..2ed1ed48 --- /dev/null +++ b/rootly_sdk/models/jsonapi_included_resource_relationships.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="JsonapiIncludedResourceRelationships") + + +@_attrs_define +class JsonapiIncludedResourceRelationships: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + jsonapi_included_resource_relationships = cls() + + jsonapi_included_resource_relationships.additional_properties = d + return jsonapi_included_resource_relationships + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/list_alert_events_feed_filteraction.py b/rootly_sdk/models/list_alert_events_feed_filteraction.py new file mode 100644 index 00000000..3fdfb294 --- /dev/null +++ b/rootly_sdk/models/list_alert_events_feed_filteraction.py @@ -0,0 +1,77 @@ +from typing import Literal, cast + +ListAlertEventsFeedFilteraction = Literal[ + "acknowledged", + "added", + "answered", + "attached", + "call_lifecycle", + "called", + "created", + "deferred", + "emailed", + "escalated", + "escalation_policy_paged", + "google_chat_messaged", + "ignored_alert_request", + "level_skipped", + "marked", + "ms_teams_messaged", + "muted", + "not_marked", + "notified", + "open", + "opened", + "paged", + "removed", + "resolved", + "retriggered", + "skipped", + "slacked", + "snoozed", + "texted", + "triggered", + "updated", +] + +LIST_ALERT_EVENTS_FEED_FILTERACTION_VALUES: set[ListAlertEventsFeedFilteraction] = { + "acknowledged", + "added", + "answered", + "attached", + "call_lifecycle", + "called", + "created", + "deferred", + "emailed", + "escalated", + "escalation_policy_paged", + "google_chat_messaged", + "ignored_alert_request", + "level_skipped", + "marked", + "ms_teams_messaged", + "muted", + "not_marked", + "notified", + "open", + "opened", + "paged", + "removed", + "resolved", + "retriggered", + "skipped", + "slacked", + "snoozed", + "texted", + "triggered", + "updated", +} + + +def check_list_alert_events_feed_filteraction(value: str | None) -> ListAlertEventsFeedFilteraction | None: + if value is None: + return None + if value in LIST_ALERT_EVENTS_FEED_FILTERACTION_VALUES: + return cast(ListAlertEventsFeedFilteraction, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ALERT_EVENTS_FEED_FILTERACTION_VALUES!r}") diff --git a/rootly_sdk/models/list_alert_events_feed_filterkind.py b/rootly_sdk/models/list_alert_events_feed_filterkind.py new file mode 100644 index 00000000..511c5438 --- /dev/null +++ b/rootly_sdk/models/list_alert_events_feed_filterkind.py @@ -0,0 +1,39 @@ +from typing import Literal, cast + +ListAlertEventsFeedFilterkind = Literal[ + "action", + "alert_grouping", + "alert_routing", + "alert_urgency", + "deferral", + "informational", + "maintenance", + "noise", + "note", + "notification", + "recording", + "status_update", +] + +LIST_ALERT_EVENTS_FEED_FILTERKIND_VALUES: set[ListAlertEventsFeedFilterkind] = { + "action", + "alert_grouping", + "alert_routing", + "alert_urgency", + "deferral", + "informational", + "maintenance", + "noise", + "note", + "notification", + "recording", + "status_update", +} + + +def check_list_alert_events_feed_filterkind(value: str | None) -> ListAlertEventsFeedFilterkind | None: + if value is None: + return None + if value in LIST_ALERT_EVENTS_FEED_FILTERKIND_VALUES: + return cast(ListAlertEventsFeedFilterkind, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ALERT_EVENTS_FEED_FILTERKIND_VALUES!r}") diff --git a/rootly_sdk/models/list_alert_events_feed_sort.py b/rootly_sdk/models/list_alert_events_feed_sort.py new file mode 100644 index 00000000..f154e60c --- /dev/null +++ b/rootly_sdk/models/list_alert_events_feed_sort.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +ListAlertEventsFeedSort = Literal["-created_at", "created_at"] + +LIST_ALERT_EVENTS_FEED_SORT_VALUES: set[ListAlertEventsFeedSort] = { + "-created_at", + "created_at", +} + + +def check_list_alert_events_feed_sort(value: str | None) -> ListAlertEventsFeedSort | None: + if value is None: + return None + if value in LIST_ALERT_EVENTS_FEED_SORT_VALUES: + return cast(ListAlertEventsFeedSort, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ALERT_EVENTS_FEED_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_alerts_include.py b/rootly_sdk/models/list_alerts_include.py index b1c5e932..239b223d 100644 --- a/rootly_sdk/models/list_alerts_include.py +++ b/rootly_sdk/models/list_alerts_include.py @@ -9,12 +9,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", ] @@ -28,12 +30,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", } diff --git a/rootly_sdk/models/list_escalation_paths_filterpath_type.py b/rootly_sdk/models/list_escalation_paths_filterpath_type.py new file mode 100644 index 00000000..ecde9f6a --- /dev/null +++ b/rootly_sdk/models/list_escalation_paths_filterpath_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +ListEscalationPathsFilterpathType = Literal["deferral", "escalation"] + +LIST_ESCALATION_PATHS_FILTERPATH_TYPE_VALUES: set[ListEscalationPathsFilterpathType] = { + "deferral", + "escalation", +} + + +def check_list_escalation_paths_filterpath_type(value: str | None) -> ListEscalationPathsFilterpathType | None: + if value is None: + return None + if value in LIST_ESCALATION_PATHS_FILTERPATH_TYPE_VALUES: + return cast(ListEscalationPathsFilterpathType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ESCALATION_PATHS_FILTERPATH_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/list_incident_alerts_include.py b/rootly_sdk/models/list_incident_alerts_include.py index a8448883..bc706824 100644 --- a/rootly_sdk/models/list_incident_alerts_include.py +++ b/rootly_sdk/models/list_incident_alerts_include.py @@ -9,12 +9,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", ] @@ -28,12 +30,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", } diff --git a/rootly_sdk/models/list_teams_include.py b/rootly_sdk/models/list_teams_include.py index 8c2db5ef..dd467bfa 100644 --- a/rootly_sdk/models/list_teams_include.py +++ b/rootly_sdk/models/list_teams_include.py @@ -1,8 +1,10 @@ from typing import Literal, cast -ListTeamsInclude = Literal["users"] +ListTeamsInclude = Literal["escalation_policies", "schedules", "users"] LIST_TEAMS_INCLUDE_VALUES: set[ListTeamsInclude] = { + "escalation_policies", + "schedules", "users", } diff --git a/rootly_sdk/models/live_call_router.py b/rootly_sdk/models/live_call_router.py index 99bf8142..199b49a8 100644 --- a/rootly_sdk/models/live_call_router.py +++ b/rootly_sdk/models/live_call_router.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -39,12 +39,19 @@ class LiveCallRouter: to register voicemail_greeting (str | Unset): The voicemail greeting of the live_call_router caller_greeting (str | Unset): The caller greeting message of the live_call_router + unavailable_responder_message (None | str | Unset): The message played to the caller when a responder doesn't + answer and the call moves on to the next person in the escalation. Leave blank to use the default message. waiting_music_url (LiveCallRouterWaitingMusicUrl | Unset): The waiting music URL of the live_call_router sent_to_voicemail_delay (int | Unset): The delay (seconds) after which the caller in redirected to voicemail should_redirect_to_voicemail_on_no_answer (bool | Unset): This prompts the caller to choose voicemail or connect live escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels + notify_via_sms (bool | Unset): Whether responders are also notified via SMS when this router pages them + notify_via_push_notification (bool | Unset): Whether responders are also notified via push notification when + this router pages them + informational_notification_message (None | str | Unset): Optional message included in the SMS/push notification. + Supports variables such as {{ alert.url }}, {{ alert.data.* }}, and {{ alert.alert_urgency.name }}. alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page calling_tree_prompt (str | Unset): The audio instructions callers will hear when they call this number, prompting them to select from available options to route their call @@ -63,11 +70,15 @@ class LiveCallRouter: phone_number: str | Unset = UNSET voicemail_greeting: str | Unset = UNSET caller_greeting: str | Unset = UNSET + unavailable_responder_message: None | str | Unset = UNSET waiting_music_url: LiveCallRouterWaitingMusicUrl | Unset = UNSET sent_to_voicemail_delay: int | Unset = UNSET should_redirect_to_voicemail_on_no_answer: bool | Unset = UNSET escalation_level_delay_in_seconds: int | Unset = UNSET should_auto_resolve_alert_on_call_end: bool | Unset = UNSET + notify_via_sms: bool | Unset = UNSET + notify_via_push_notification: bool | Unset = UNSET + informational_notification_message: None | str | Unset = UNSET alert_urgency_id: str | Unset = UNSET calling_tree_prompt: str | Unset = UNSET paging_targets: list[LiveCallRouterPagingTargetsItem] | Unset = UNSET @@ -75,6 +86,7 @@ class LiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name created_at = self.created_at @@ -101,6 +113,12 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting + unavailable_responder_message: None | str | Unset + if isinstance(self.unavailable_responder_message, Unset): + unavailable_responder_message = UNSET + else: + unavailable_responder_message = self.unavailable_responder_message + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -113,6 +131,16 @@ def to_dict(self) -> dict[str, Any]: should_auto_resolve_alert_on_call_end = self.should_auto_resolve_alert_on_call_end + notify_via_sms = self.notify_via_sms + + notify_via_push_notification = self.notify_via_push_notification + + informational_notification_message: None | str | Unset + if isinstance(self.informational_notification_message, Unset): + informational_notification_message = UNSET + else: + informational_notification_message = self.informational_notification_message + alert_urgency_id = self.alert_urgency_id calling_tree_prompt = self.calling_tree_prompt @@ -151,6 +179,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["voicemail_greeting"] = voicemail_greeting if caller_greeting is not UNSET: field_dict["caller_greeting"] = caller_greeting + if unavailable_responder_message is not UNSET: + field_dict["unavailable_responder_message"] = unavailable_responder_message if waiting_music_url is not UNSET: field_dict["waiting_music_url"] = waiting_music_url if sent_to_voicemail_delay is not UNSET: @@ -161,6 +191,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["escalation_level_delay_in_seconds"] = escalation_level_delay_in_seconds if should_auto_resolve_alert_on_call_end is not UNSET: field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end + if notify_via_sms is not UNSET: + field_dict["notify_via_sms"] = notify_via_sms + if notify_via_push_notification is not UNSET: + field_dict["notify_via_push_notification"] = notify_via_push_notification + if informational_notification_message is not UNSET: + field_dict["informational_notification_message"] = informational_notification_message if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id if calling_tree_prompt is not UNSET: @@ -215,6 +251,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) + def _parse_unavailable_responder_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + unavailable_responder_message = _parse_unavailable_responder_message( + d.pop("unavailable_responder_message", UNSET) + ) + _waiting_music_url = d.pop("waiting_music_url", UNSET) waiting_music_url: LiveCallRouterWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): @@ -230,6 +277,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: should_auto_resolve_alert_on_call_end = d.pop("should_auto_resolve_alert_on_call_end", UNSET) + notify_via_sms = d.pop("notify_via_sms", UNSET) + + notify_via_push_notification = d.pop("notify_via_push_notification", UNSET) + + def _parse_informational_notification_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + informational_notification_message = _parse_informational_notification_message( + d.pop("informational_notification_message", UNSET) + ) + alert_urgency_id = d.pop("alert_urgency_id", UNSET) calling_tree_prompt = d.pop("calling_tree_prompt", UNSET) @@ -263,11 +325,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: phone_number=phone_number, voicemail_greeting=voicemail_greeting, caller_greeting=caller_greeting, + unavailable_responder_message=unavailable_responder_message, waiting_music_url=waiting_music_url, sent_to_voicemail_delay=sent_to_voicemail_delay, should_redirect_to_voicemail_on_no_answer=should_redirect_to_voicemail_on_no_answer, escalation_level_delay_in_seconds=escalation_level_delay_in_seconds, should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end, + notify_via_sms=notify_via_sms, + notify_via_push_notification=notify_via_push_notification, + informational_notification_message=informational_notification_message, alert_urgency_id=alert_urgency_id, calling_tree_prompt=calling_tree_prompt, paging_targets=paging_targets, diff --git a/rootly_sdk/models/live_call_router_country_code.py b/rootly_sdk/models/live_call_router_country_code.py index c9309c8f..3085b226 100644 --- a/rootly_sdk/models/live_call_router_country_code.py +++ b/rootly_sdk/models/live_call_router_country_code.py @@ -1,10 +1,11 @@ from typing import Literal, cast -LiveCallRouterCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] +LiveCallRouterCountryCode = Literal["AU", "CA", "CH", "DE", "GB", "NL", "NZ", "SE", "US"] LIVE_CALL_ROUTER_COUNTRY_CODE_VALUES: set[LiveCallRouterCountryCode] = { "AU", "CA", + "CH", "DE", "GB", "NL", diff --git a/rootly_sdk/models/live_call_router_list.py b/rootly_sdk/models/live_call_router_list.py index 1b74775b..885ce198 100644 --- a/rootly_sdk/models/live_call_router_list.py +++ b/rootly_sdk/models/live_call_router_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.live_call_router_list_data_item import LiveCallRouterListDataItem from ..models.meta import Meta @@ -22,14 +25,17 @@ class LiveCallRouterList: data (list[LiveCallRouterListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[LiveCallRouterListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.live_call_router_list_data_item import LiveCallRouterListDataItem from ..models.meta import Meta @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + live_call_router_list = cls( data=data, links=links, meta=meta, + included=included, ) live_call_router_list.additional_properties = d diff --git a/rootly_sdk/models/live_call_router_list_data_item.py b/rootly_sdk/models/live_call_router_list_data_item.py index 622c19a8..e68c449c 100644 --- a/rootly_sdk/models/live_call_router_list_data_item.py +++ b/rootly_sdk/models/live_call_router_list_data_item.py @@ -33,6 +33,7 @@ class LiveCallRouterListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/live_call_router_response.py b/rootly_sdk/models/live_call_router_response.py index bcf58bdc..e00de14c 100644 --- a/rootly_sdk/models/live_call_router_response.py +++ b/rootly_sdk/models/live_call_router_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.live_call_router_response_data import LiveCallRouterResponseData @@ -18,14 +21,24 @@ class LiveCallRouterResponse: """ Attributes: data (LiveCallRouterResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: LiveCallRouterResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.live_call_router_response_data import LiveCallRouterResponseData d = dict(src_dict) data = LiveCallRouterResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + live_call_router_response = cls( data=data, + included=included, ) live_call_router_response.additional_properties = d diff --git a/rootly_sdk/models/live_call_router_response_data.py b/rootly_sdk/models/live_call_router_response_data.py index 3618b0d6..135ae335 100644 --- a/rootly_sdk/models/live_call_router_response_data.py +++ b/rootly_sdk/models/live_call_router_response_data.py @@ -33,6 +33,7 @@ class LiveCallRouterResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/meeting_recording.py b/rootly_sdk/models/meeting_recording.py index 02298be2..8591364b 100644 --- a/rootly_sdk/models/meeting_recording.py +++ b/rootly_sdk/models/meeting_recording.py @@ -32,7 +32,10 @@ class MeetingRecording: word_count (int | Unset): Total word count across all transcript segments transcript_summary (None | str | Unset): AI-generated summary of the meeting transcript (null if no transcript or not yet analyzed) - has_video (bool | Unset): Whether a video recording file is attached + title (None | str | Unset): Human-readable label for the recording session + meeting_url (None | str | Unset): Original meeting URL + video_url (None | str | Unset): Signed URL to stream/download the video recording + created_by (None | str | Unset): Source that created the recording (e.g. desktop_sdk, recall_bot) """ platform: MeetingRecordingPlatform @@ -46,7 +49,10 @@ class MeetingRecording: speaker_count: int | Unset = UNSET word_count: int | Unset = UNSET transcript_summary: None | str | Unset = UNSET - has_video: bool | Unset = UNSET + title: None | str | Unset = UNSET + meeting_url: None | str | Unset = UNSET + video_url: None | str | Unset = UNSET + created_by: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -92,7 +98,29 @@ def to_dict(self) -> dict[str, Any]: else: transcript_summary = self.transcript_summary - has_video = self.has_video + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + meeting_url: None | str | Unset + if isinstance(self.meeting_url, Unset): + meeting_url = UNSET + else: + meeting_url = self.meeting_url + + video_url: None | str | Unset + if isinstance(self.video_url, Unset): + video_url = UNSET + else: + video_url = self.video_url + + created_by: None | str | Unset + if isinstance(self.created_by, Unset): + created_by = UNSET + else: + created_by = self.created_by field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -117,8 +145,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["word_count"] = word_count if transcript_summary is not UNSET: field_dict["transcript_summary"] = transcript_summary - if has_video is not UNSET: - field_dict["has_video"] = has_video + if title is not UNSET: + field_dict["title"] = title + if meeting_url is not UNSET: + field_dict["meeting_url"] = meeting_url + if video_url is not UNSET: + field_dict["video_url"] = video_url + if created_by is not UNSET: + field_dict["created_by"] = created_by return field_dict @@ -191,7 +225,41 @@ def _parse_transcript_summary(data: object) -> None | str | Unset: transcript_summary = _parse_transcript_summary(d.pop("transcript_summary", UNSET)) - has_video = d.pop("has_video", UNSET) + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + meeting_url = _parse_meeting_url(d.pop("meeting_url", UNSET)) + + def _parse_video_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + video_url = _parse_video_url(d.pop("video_url", UNSET)) + + def _parse_created_by(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + created_by = _parse_created_by(d.pop("created_by", UNSET)) meeting_recording = cls( platform=platform, @@ -205,7 +273,10 @@ def _parse_transcript_summary(data: object) -> None | str | Unset: speaker_count=speaker_count, word_count=word_count, transcript_summary=transcript_summary, - has_video=has_video, + title=title, + meeting_url=meeting_url, + video_url=video_url, + created_by=created_by, ) meeting_recording.additional_properties = d diff --git a/rootly_sdk/models/meeting_recording_detail.py b/rootly_sdk/models/meeting_recording_detail.py new file mode 100644 index 00000000..b736f728 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail.py @@ -0,0 +1,412 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.meeting_recording_platform import MeetingRecordingPlatform, check_meeting_recording_platform +from ..models.meeting_recording_status import MeetingRecordingStatus, check_meeting_recording_status +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 + from ..models.meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment + + +T = TypeVar("T", bound="MeetingRecordingDetail") + + +@_attrs_define +class MeetingRecordingDetail: + """ + Attributes: + platform (MeetingRecordingPlatform): Meeting platform + session_number (int): Session number within the incident for this platform (starts at 1, increments on re- + invite) + status (MeetingRecordingStatus): Current recording lifecycle status + created_at (datetime.datetime): When the recording session was created + updated_at (datetime.datetime): When the recording session was last updated + started_at (datetime.datetime | None | Unset): When the bot started recording (null if bot never joined) + ended_at (datetime.datetime | None | Unset): When the recording ended + duration_minutes (float | None | Unset): Recording duration in minutes (null if not started) + speaker_count (int | Unset): Number of unique speakers detected in the transcript + word_count (int | Unset): Total word count across all transcript segments + transcript_summary (None | str | Unset): AI-generated summary of the meeting transcript (null if no transcript + or not yet analyzed) + title (None | str | Unset): Human-readable label for the recording session + meeting_url (None | str | Unset): Original meeting URL + video_url (None | str | Unset): Signed URL to stream/download the video recording + created_by (None | str | Unset): Source that created the recording (e.g. desktop_sdk, recall_bot) + transcript (list[MeetingRecordingTranscriptSegment] | MeetingRecordingDetailTranscriptType1 | Unset): Array of + speaker segments when populated, empty object when no transcript exists. + recall_upload_id (None | str | Unset): Recall upload identifier + recordable_id (None | str | Unset): UUID of the associated recordable (e.g. incident) + recordable_type (None | str | Unset): Type of the associated recordable (e.g. Incident) + """ + + platform: MeetingRecordingPlatform + session_number: int + status: MeetingRecordingStatus + created_at: datetime.datetime + updated_at: datetime.datetime + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + duration_minutes: float | None | Unset = UNSET + speaker_count: int | Unset = UNSET + word_count: int | Unset = UNSET + transcript_summary: None | str | Unset = UNSET + title: None | str | Unset = UNSET + meeting_url: None | str | Unset = UNSET + video_url: None | str | Unset = UNSET + created_by: None | str | Unset = UNSET + transcript: list[MeetingRecordingTranscriptSegment] | MeetingRecordingDetailTranscriptType1 | Unset = UNSET + recall_upload_id: None | str | Unset = UNSET + recordable_id: None | str | Unset = UNSET + recordable_type: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + platform: str = self.platform + + session_number = self.session_number + + status: str = self.status + + created_at = self.created_at.isoformat() + + updated_at = self.updated_at.isoformat() + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): + started_at = self.started_at.isoformat() + else: + started_at = self.started_at + + ended_at: None | str | Unset + if isinstance(self.ended_at, Unset): + ended_at = UNSET + elif isinstance(self.ended_at, datetime.datetime): + ended_at = self.ended_at.isoformat() + else: + ended_at = self.ended_at + + duration_minutes: float | None | Unset + if isinstance(self.duration_minutes, Unset): + duration_minutes = UNSET + else: + duration_minutes = self.duration_minutes + + speaker_count = self.speaker_count + + word_count = self.word_count + + transcript_summary: None | str | Unset + if isinstance(self.transcript_summary, Unset): + transcript_summary = UNSET + else: + transcript_summary = self.transcript_summary + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + meeting_url: None | str | Unset + if isinstance(self.meeting_url, Unset): + meeting_url = UNSET + else: + meeting_url = self.meeting_url + + video_url: None | str | Unset + if isinstance(self.video_url, Unset): + video_url = UNSET + else: + video_url = self.video_url + + created_by: None | str | Unset + if isinstance(self.created_by, Unset): + created_by = UNSET + else: + created_by = self.created_by + + transcript: dict[str, Any] | list[dict[str, Any]] | Unset + if isinstance(self.transcript, Unset): + transcript = UNSET + elif isinstance(self.transcript, list): + transcript = [] + for transcript_type_0_item_data in self.transcript: + transcript_type_0_item = transcript_type_0_item_data.to_dict() + transcript.append(transcript_type_0_item) + + else: + transcript = self.transcript.to_dict() + + recall_upload_id: None | str | Unset + if isinstance(self.recall_upload_id, Unset): + recall_upload_id = UNSET + else: + recall_upload_id = self.recall_upload_id + + recordable_id: None | str | Unset + if isinstance(self.recordable_id, Unset): + recordable_id = UNSET + else: + recordable_id = self.recordable_id + + recordable_type: None | str | Unset + if isinstance(self.recordable_type, Unset): + recordable_type = UNSET + else: + recordable_type = self.recordable_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "platform": platform, + "session_number": session_number, + "status": status, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if started_at is not UNSET: + field_dict["started_at"] = started_at + if ended_at is not UNSET: + field_dict["ended_at"] = ended_at + if duration_minutes is not UNSET: + field_dict["duration_minutes"] = duration_minutes + if speaker_count is not UNSET: + field_dict["speaker_count"] = speaker_count + if word_count is not UNSET: + field_dict["word_count"] = word_count + if transcript_summary is not UNSET: + field_dict["transcript_summary"] = transcript_summary + if title is not UNSET: + field_dict["title"] = title + if meeting_url is not UNSET: + field_dict["meeting_url"] = meeting_url + if video_url is not UNSET: + field_dict["video_url"] = video_url + if created_by is not UNSET: + field_dict["created_by"] = created_by + if transcript is not UNSET: + field_dict["transcript"] = transcript + if recall_upload_id is not UNSET: + field_dict["recall_upload_id"] = recall_upload_id + if recordable_id is not UNSET: + field_dict["recordable_id"] = recordable_id + if recordable_type is not UNSET: + field_dict["recordable_type"] = recordable_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 + from ..models.meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment + + d = dict(src_dict) + platform = check_meeting_recording_platform(d.pop("platform")) + + session_number = d.pop("session_number") + + status = check_meeting_recording_status(d.pop("status")) + + created_at = isoparse(d.pop("created_at")) + + updated_at = isoparse(d.pop("updated_at")) + + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + ended_at_type_0 = isoparse(data) + + return ended_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) + + def _parse_duration_minutes(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + duration_minutes = _parse_duration_minutes(d.pop("duration_minutes", UNSET)) + + speaker_count = d.pop("speaker_count", UNSET) + + word_count = d.pop("word_count", UNSET) + + def _parse_transcript_summary(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + transcript_summary = _parse_transcript_summary(d.pop("transcript_summary", UNSET)) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + meeting_url = _parse_meeting_url(d.pop("meeting_url", UNSET)) + + def _parse_video_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + video_url = _parse_video_url(d.pop("video_url", UNSET)) + + def _parse_created_by(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + created_by = _parse_created_by(d.pop("created_by", UNSET)) + + def _parse_transcript( + data: object, + ) -> list[MeetingRecordingTranscriptSegment] | MeetingRecordingDetailTranscriptType1 | Unset: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + transcript_type_0 = [] + _transcript_type_0 = data + for transcript_type_0_item_data in _transcript_type_0: + transcript_type_0_item = MeetingRecordingTranscriptSegment.from_dict(transcript_type_0_item_data) + + transcript_type_0.append(transcript_type_0_item) + + return transcript_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + transcript_type_1 = MeetingRecordingDetailTranscriptType1.from_dict(data) + + return transcript_type_1 + + transcript = _parse_transcript(d.pop("transcript", UNSET)) + + def _parse_recall_upload_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recall_upload_id = _parse_recall_upload_id(d.pop("recall_upload_id", UNSET)) + + def _parse_recordable_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recordable_id = _parse_recordable_id(d.pop("recordable_id", UNSET)) + + def _parse_recordable_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recordable_type = _parse_recordable_type(d.pop("recordable_type", UNSET)) + + meeting_recording_detail = cls( + platform=platform, + session_number=session_number, + status=status, + created_at=created_at, + updated_at=updated_at, + started_at=started_at, + ended_at=ended_at, + duration_minutes=duration_minutes, + speaker_count=speaker_count, + word_count=word_count, + transcript_summary=transcript_summary, + title=title, + meeting_url=meeting_url, + video_url=video_url, + created_by=created_by, + transcript=transcript, + recall_upload_id=recall_upload_id, + recordable_id=recordable_id, + recordable_type=recordable_type, + ) + + meeting_recording_detail.additional_properties = d + return meeting_recording_detail + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_detail_response.py b/rootly_sdk/models/meeting_recording_detail_response.py new file mode 100644 index 00000000..2aad46f9 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail_response.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.meeting_recording_detail_response_data import MeetingRecordingDetailResponseData + + +T = TypeVar("T", bound="MeetingRecordingDetailResponse") + + +@_attrs_define +class MeetingRecordingDetailResponse: + """ + Attributes: + data (MeetingRecordingDetailResponseData): + """ + + data: MeetingRecordingDetailResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording_detail_response_data import MeetingRecordingDetailResponseData + + d = dict(src_dict) + data = MeetingRecordingDetailResponseData.from_dict(d.pop("data")) + + meeting_recording_detail_response = cls( + data=data, + ) + + meeting_recording_detail_response.additional_properties = d + return meeting_recording_detail_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_detail_response_data.py b/rootly_sdk/models/meeting_recording_detail_response_data.py new file mode 100644 index 00000000..c50dcff8 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail_response_data.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.meeting_recording_detail_response_data_type import ( + MeetingRecordingDetailResponseDataType, + check_meeting_recording_detail_response_data_type, +) + +if TYPE_CHECKING: + from ..models.meeting_recording_detail import MeetingRecordingDetail + + +T = TypeVar("T", bound="MeetingRecordingDetailResponseData") + + +@_attrs_define +class MeetingRecordingDetailResponseData: + """ + Attributes: + id (str): Unique UUID of the meeting recording + type_ (MeetingRecordingDetailResponseDataType): + attributes (MeetingRecordingDetail): + """ + + id: str + type_: MeetingRecordingDetailResponseDataType + attributes: MeetingRecordingDetail + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording_detail import MeetingRecordingDetail + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_meeting_recording_detail_response_data_type(d.pop("type")) + + attributes = MeetingRecordingDetail.from_dict(d.pop("attributes")) + + meeting_recording_detail_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + meeting_recording_detail_response_data.additional_properties = d + return meeting_recording_detail_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_detail_response_data_type.py b/rootly_sdk/models/meeting_recording_detail_response_data_type.py new file mode 100644 index 00000000..ba51d718 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail_response_data_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +MeetingRecordingDetailResponseDataType = Literal["meeting_recordings"] + +MEETING_RECORDING_DETAIL_RESPONSE_DATA_TYPE_VALUES: set[MeetingRecordingDetailResponseDataType] = { + "meeting_recordings", +} + + +def check_meeting_recording_detail_response_data_type( + value: str | None, +) -> MeetingRecordingDetailResponseDataType | None: + if value is None: + return None + if value in MEETING_RECORDING_DETAIL_RESPONSE_DATA_TYPE_VALUES: + return cast(MeetingRecordingDetailResponseDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {MEETING_RECORDING_DETAIL_RESPONSE_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py b/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py new file mode 100644 index 00000000..6faa6679 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MeetingRecordingDetailTranscriptType1") + + +@_attrs_define +class MeetingRecordingDetailTranscriptType1: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + meeting_recording_detail_transcript_type_1 = cls() + + meeting_recording_detail_transcript_type_1.additional_properties = d + return meeting_recording_detail_transcript_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_list.py b/rootly_sdk/models/meeting_recording_list.py index 0590db47..f60139eb 100644 --- a/rootly_sdk/models/meeting_recording_list.py +++ b/rootly_sdk/models/meeting_recording_list.py @@ -29,6 +29,7 @@ class MeetingRecordingList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() diff --git a/rootly_sdk/models/meeting_recording_list_data_item.py b/rootly_sdk/models/meeting_recording_list_data_item.py index 7b57bf19..be50f1e5 100644 --- a/rootly_sdk/models/meeting_recording_list_data_item.py +++ b/rootly_sdk/models/meeting_recording_list_data_item.py @@ -33,6 +33,7 @@ class MeetingRecordingListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/meeting_recording_response.py b/rootly_sdk/models/meeting_recording_response.py new file mode 100644 index 00000000..eac483c2 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_response.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.meeting_recording_response_data import MeetingRecordingResponseData + + +T = TypeVar("T", bound="MeetingRecordingResponse") + + +@_attrs_define +class MeetingRecordingResponse: + """ + Attributes: + data (MeetingRecordingResponseData): + """ + + data: MeetingRecordingResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording_response_data import MeetingRecordingResponseData + + d = dict(src_dict) + data = MeetingRecordingResponseData.from_dict(d.pop("data")) + + meeting_recording_response = cls( + data=data, + ) + + meeting_recording_response.additional_properties = d + return meeting_recording_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_response_data.py b/rootly_sdk/models/meeting_recording_response_data.py new file mode 100644 index 00000000..bcfe346c --- /dev/null +++ b/rootly_sdk/models/meeting_recording_response_data.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.meeting_recording_response_data_type import ( + MeetingRecordingResponseDataType, + check_meeting_recording_response_data_type, +) + +if TYPE_CHECKING: + from ..models.meeting_recording import MeetingRecording + + +T = TypeVar("T", bound="MeetingRecordingResponseData") + + +@_attrs_define +class MeetingRecordingResponseData: + """ + Attributes: + id (str): Unique UUID of the meeting recording + type_ (MeetingRecordingResponseDataType): + attributes (MeetingRecording): + """ + + id: str + type_: MeetingRecordingResponseDataType + attributes: MeetingRecording + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording import MeetingRecording + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_meeting_recording_response_data_type(d.pop("type")) + + attributes = MeetingRecording.from_dict(d.pop("attributes")) + + meeting_recording_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + meeting_recording_response_data.additional_properties = d + return meeting_recording_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_response_data_type.py b/rootly_sdk/models/meeting_recording_response_data_type.py new file mode 100644 index 00000000..934de58e --- /dev/null +++ b/rootly_sdk/models/meeting_recording_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +MeetingRecordingResponseDataType = Literal["meeting_recordings"] + +MEETING_RECORDING_RESPONSE_DATA_TYPE_VALUES: set[MeetingRecordingResponseDataType] = { + "meeting_recordings", +} + + +def check_meeting_recording_response_data_type(value: str | None) -> MeetingRecordingResponseDataType | None: + if value is None: + return None + if value in MEETING_RECORDING_RESPONSE_DATA_TYPE_VALUES: + return cast(MeetingRecordingResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {MEETING_RECORDING_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/meeting_recording_transcript_segment.py b/rootly_sdk/models/meeting_recording_transcript_segment.py new file mode 100644 index 00000000..7335c4f7 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_transcript_segment.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.meeting_recording_transcript_word import MeetingRecordingTranscriptWord + + +T = TypeVar("T", bound="MeetingRecordingTranscriptSegment") + + +@_attrs_define +class MeetingRecordingTranscriptSegment: + """ + Attributes: + speaker (str): Speaker label (e.g. Speaker 1) + words (list[MeetingRecordingTranscriptWord]): Timestamped words spoken by this speaker + """ + + speaker: str + words: list[MeetingRecordingTranscriptWord] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + speaker = self.speaker + + words = [] + for words_item_data in self.words: + words_item = words_item_data.to_dict() + words.append(words_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "speaker": speaker, + "words": words, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording_transcript_word import MeetingRecordingTranscriptWord + + d = dict(src_dict) + speaker = d.pop("speaker") + + words = [] + _words = d.pop("words") + for words_item_data in _words: + words_item = MeetingRecordingTranscriptWord.from_dict(words_item_data) + + words.append(words_item) + + meeting_recording_transcript_segment = cls( + speaker=speaker, + words=words, + ) + + meeting_recording_transcript_segment.additional_properties = d + return meeting_recording_transcript_segment + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_transcript_word.py b/rootly_sdk/models/meeting_recording_transcript_word.py new file mode 100644 index 00000000..83d7b63f --- /dev/null +++ b/rootly_sdk/models/meeting_recording_transcript_word.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MeetingRecordingTranscriptWord") + + +@_attrs_define +class MeetingRecordingTranscriptWord: + """ + Attributes: + text (str): Transcribed word + start_timestamp (float | Unset): Start time in seconds from recording start + end_timestamp (float | Unset): End time in seconds from recording start + """ + + text: str + start_timestamp: float | Unset = UNSET + end_timestamp: float | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + text = self.text + + start_timestamp = self.start_timestamp + + end_timestamp = self.end_timestamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "text": text, + } + ) + if start_timestamp is not UNSET: + field_dict["start_timestamp"] = start_timestamp + if end_timestamp is not UNSET: + field_dict["end_timestamp"] = end_timestamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + text = d.pop("text") + + start_timestamp = d.pop("start_timestamp", UNSET) + + end_timestamp = d.pop("end_timestamp", UNSET) + + meeting_recording_transcript_word = cls( + text=text, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + ) + + meeting_recording_transcript_word.additional_properties = d + return meeting_recording_transcript_word + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/mitigate_incident.py b/rootly_sdk/models/mitigate_incident.py index a81c52a8..fe1ec922 100644 --- a/rootly_sdk/models/mitigate_incident.py +++ b/rootly_sdk/models/mitigate_incident.py @@ -24,6 +24,7 @@ class MitigateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/mitigate_incident_data.py b/rootly_sdk/models/mitigate_incident_data.py index 755f1f4e..d2daeb4a 100644 --- a/rootly_sdk/models/mitigate_incident_data.py +++ b/rootly_sdk/models/mitigate_incident_data.py @@ -28,6 +28,7 @@ class MitigateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert.py b/rootly_sdk/models/new_alert.py index 37faac29..092db12d 100644 --- a/rootly_sdk/models/new_alert.py +++ b/rootly_sdk/models/new_alert.py @@ -24,6 +24,7 @@ class NewAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_data.py b/rootly_sdk/models/new_alert_data.py index 09c26da5..64f89fa6 100644 --- a/rootly_sdk/models/new_alert_data.py +++ b/rootly_sdk/models/new_alert_data.py @@ -28,6 +28,7 @@ class NewAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_data_attributes.py b/rootly_sdk/models/new_alert_data_attributes.py index 658edf63..31ed11b4 100644 --- a/rootly_sdk/models/new_alert_data_attributes.py +++ b/rootly_sdk/models/new_alert_data_attributes.py @@ -12,10 +12,6 @@ NewAlertDataAttributesNotificationTargetType, check_new_alert_data_attributes_notification_target_type, ) -from ..models.new_alert_data_attributes_source import ( - NewAlertDataAttributesSource, - check_new_alert_data_attributes_source, -) from ..models.new_alert_data_attributes_status import ( NewAlertDataAttributesStatus, check_new_alert_data_attributes_status, @@ -28,6 +24,9 @@ ) from ..models.new_alert_data_attributes_data_type_0 import NewAlertDataAttributesDataType0 from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 + from ..models.new_alert_data_attributes_notification_targets_type_0_item import ( + NewAlertDataAttributesNotificationTargetsType0Item, + ) T = TypeVar("T", bound="NewAlertDataAttributes") @@ -37,9 +36,10 @@ class NewAlertDataAttributes: """ Attributes: - source (NewAlertDataAttributesSource): The source of the alert summary (str): The summary of the alert noise (NewAlertDataAttributesNoise | Unset): Whether the alert is marked as noise + source (str | Unset): Deprecated. Accepted for backwards compatibility; new clients should omit. Defaults to + `api`. status (NewAlertDataAttributesStatus | Unset): Only available for organizations with Rootly On-Call enabled. Can be one of open, triggered. description (None | str | Unset): The description of the alert @@ -47,6 +47,7 @@ class NewAlertDataAttributes: enabled and your notification target is a Service. This field will be automatically set for you. group_ids (list[str] | None | Unset): The Group IDs to attach to the alert. If your organization has On-Call enabled and your notification target is a Group. This field will be automatically set for you. + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the alert environment_ids (list[str] | None | Unset): The Environment IDs to attach to the alert started_at (datetime.datetime | None | Unset): Alert start datetime ended_at (datetime.datetime | None | Unset): Alert end datetime @@ -54,9 +55,16 @@ class NewAlertDataAttributes: external_url (None | str | Unset): External Url alert_urgency_id (None | str | Unset): The ID of the alert urgency notification_target_type (NewAlertDataAttributesNotificationTargetType | Unset): Only available for - organizations with Rootly On-Call enabled. Can be one of Group, Service, EscalationPolicy, User. + organizations with Rootly On-Call enabled. Can be one of Group, Service, EscalationPolicy, Functionality, User. + Please contact support if you encounter issues using `Functionality` as a notification target type. notification_target_id (None | str | Unset): Only available for organizations with Rootly On-Call enabled. The _identifier_ of the notification target object. + notification_targets (list[NewAlertDataAttributesNotificationTargetsType0Item] | None | Unset): Only available + for organizations with Rootly On-Call enabled. Page multiple destinations (any combination of Group, Service, + EscalationPolicy, Functionality, or User) in a single request. `Functionality` targets require the + `enable_paging_functionalities` feature; a request that includes one while it is disabled is rejected. Applies + to alert creation only. When provided, this takes precedence over the singular `notification_target_type` / + `notification_target_id` fields. labels (list[NewAlertDataAttributesLabelsItemType0 | None] | Unset): data (NewAlertDataAttributesDataType0 | None | Unset): Additional data deduplication_key (None | str | Unset): Alerts sharing the same deduplication key are treated as a single alert. @@ -64,13 +72,14 @@ class NewAlertDataAttributes: Custom alert field values to create with the alert """ - source: NewAlertDataAttributesSource summary: str noise: NewAlertDataAttributesNoise | Unset = UNSET + source: str | Unset = UNSET status: NewAlertDataAttributesStatus | Unset = UNSET description: None | str | Unset = UNSET service_ids: list[str] | None | Unset = UNSET group_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET environment_ids: list[str] | None | Unset = UNSET started_at: datetime.datetime | None | Unset = UNSET ended_at: datetime.datetime | None | Unset = UNSET @@ -79,6 +88,7 @@ class NewAlertDataAttributes: alert_urgency_id: None | str | Unset = UNSET notification_target_type: NewAlertDataAttributesNotificationTargetType | Unset = UNSET notification_target_id: None | str | Unset = UNSET + notification_targets: list[NewAlertDataAttributesNotificationTargetsType0Item] | None | Unset = UNSET labels: list[NewAlertDataAttributesLabelsItemType0 | None] | Unset = UNSET data: NewAlertDataAttributesDataType0 | None | Unset = UNSET deduplication_key: None | str | Unset = UNSET @@ -93,14 +103,14 @@ def to_dict(self) -> dict[str, Any]: from ..models.new_alert_data_attributes_data_type_0 import NewAlertDataAttributesDataType0 from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 - source: str = self.source - summary = self.summary noise: str | Unset = UNSET if not isinstance(self.noise, Unset): noise = self.noise + source = self.source + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status @@ -129,6 +139,15 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids + functionality_ids: list[str] | None | Unset + if isinstance(self.functionality_ids, Unset): + functionality_ids = UNSET + elif isinstance(self.functionality_ids, list): + functionality_ids = self.functionality_ids + + else: + functionality_ids = self.functionality_ids + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET @@ -182,6 +201,18 @@ def to_dict(self) -> dict[str, Any]: else: notification_target_id = self.notification_target_id + notification_targets: list[dict[str, Any]] | None | Unset + if isinstance(self.notification_targets, Unset): + notification_targets = UNSET + elif isinstance(self.notification_targets, list): + notification_targets = [] + for notification_targets_type_0_item_data in self.notification_targets: + notification_targets_type_0_item = notification_targets_type_0_item_data.to_dict() + notification_targets.append(notification_targets_type_0_item) + + else: + notification_targets = self.notification_targets + labels: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] @@ -224,12 +255,13 @@ def to_dict(self) -> dict[str, Any]: field_dict.update( { - "source": source, "summary": summary, } ) if noise is not UNSET: field_dict["noise"] = noise + if source is not UNSET: + field_dict["source"] = source if status is not UNSET: field_dict["status"] = status if description is not UNSET: @@ -238,6 +270,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["service_ids"] = service_ids if group_ids is not UNSET: field_dict["group_ids"] = group_ids + if functionality_ids is not UNSET: + field_dict["functionality_ids"] = functionality_ids if environment_ids is not UNSET: field_dict["environment_ids"] = environment_ids if started_at is not UNSET: @@ -254,6 +288,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["notification_target_type"] = notification_target_type if notification_target_id is not UNSET: field_dict["notification_target_id"] = notification_target_id + if notification_targets is not UNSET: + field_dict["notification_targets"] = notification_targets if labels is not UNSET: field_dict["labels"] = labels if data is not UNSET: @@ -272,10 +308,11 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) from ..models.new_alert_data_attributes_data_type_0 import NewAlertDataAttributesDataType0 from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 + from ..models.new_alert_data_attributes_notification_targets_type_0_item import ( + NewAlertDataAttributesNotificationTargetsType0Item, + ) d = dict(src_dict) - source = check_new_alert_data_attributes_source(d.pop("source")) - summary = d.pop("summary") _noise = d.pop("noise", UNSET) @@ -285,6 +322,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: noise = check_new_alert_data_attributes_noise(_noise) + source = d.pop("source", UNSET) + _status = d.pop("status", UNSET) status: NewAlertDataAttributesStatus | Unset if isinstance(_status, Unset): @@ -335,6 +374,23 @@ def _parse_group_ids(data: object) -> list[str] | None | Unset: group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + functionality_ids_type_0 = cast(list[str], data) + + return functionality_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data @@ -431,6 +487,32 @@ def _parse_notification_target_id(data: object) -> None | str | Unset: notification_target_id = _parse_notification_target_id(d.pop("notification_target_id", UNSET)) + def _parse_notification_targets( + data: object, + ) -> list[NewAlertDataAttributesNotificationTargetsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notification_targets_type_0 = [] + _notification_targets_type_0 = data + for notification_targets_type_0_item_data in _notification_targets_type_0: + notification_targets_type_0_item = NewAlertDataAttributesNotificationTargetsType0Item.from_dict( + notification_targets_type_0_item_data + ) + + notification_targets_type_0.append(notification_targets_type_0_item) + + return notification_targets_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[NewAlertDataAttributesNotificationTargetsType0Item] | None | Unset, data) + + notification_targets = _parse_notification_targets(d.pop("notification_targets", UNSET)) + _labels = d.pop("labels", UNSET) labels: list[NewAlertDataAttributesLabelsItemType0 | None] | Unset = UNSET if _labels is not UNSET: @@ -512,13 +594,14 @@ def _parse_alert_field_values_attributes_item( alert_field_values_attributes.append(alert_field_values_attributes_item) new_alert_data_attributes = cls( - source=source, summary=summary, noise=noise, + source=source, status=status, description=description, service_ids=service_ids, group_ids=group_ids, + functionality_ids=functionality_ids, environment_ids=environment_ids, started_at=started_at, ended_at=ended_at, @@ -527,6 +610,7 @@ def _parse_alert_field_values_attributes_item( alert_urgency_id=alert_urgency_id, notification_target_type=notification_target_type, notification_target_id=notification_target_id, + notification_targets=notification_targets, labels=labels, data=data, deduplication_key=deduplication_key, diff --git a/rootly_sdk/models/new_alert_data_attributes_notification_target_type.py b/rootly_sdk/models/new_alert_data_attributes_notification_target_type.py index 84782102..8a0d0429 100644 --- a/rootly_sdk/models/new_alert_data_attributes_notification_target_type.py +++ b/rootly_sdk/models/new_alert_data_attributes_notification_target_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -NewAlertDataAttributesNotificationTargetType = Literal["EscalationPolicy", "Group", "Service", "User"] +NewAlertDataAttributesNotificationTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service", "User"] NEW_ALERT_DATA_ATTRIBUTES_NOTIFICATION_TARGET_TYPE_VALUES: set[NewAlertDataAttributesNotificationTargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", "User", diff --git a/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py new file mode 100644 index 00000000..2016715d --- /dev/null +++ b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +from ..models.new_alert_data_attributes_notification_targets_type_0_item_type import ( + NewAlertDataAttributesNotificationTargetsType0ItemType, + check_new_alert_data_attributes_notification_targets_type_0_item_type, +) + +T = TypeVar("T", bound="NewAlertDataAttributesNotificationTargetsType0Item") + + +@_attrs_define +class NewAlertDataAttributesNotificationTargetsType0Item: + """ + Attributes: + type_ (NewAlertDataAttributesNotificationTargetsType0ItemType): The type of the notification target. Can be one + of Group, Service, EscalationPolicy, Functionality, User. + id (str): The identifier of the notification target object. + """ + + type_: NewAlertDataAttributesNotificationTargetsType0ItemType + id: str + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + id = self.id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "type": type_, + "id": id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_ = check_new_alert_data_attributes_notification_targets_type_0_item_type(d.pop("type")) + + id = d.pop("id") + + new_alert_data_attributes_notification_targets_type_0_item = cls( + type_=type_, + id=id, + ) + + return new_alert_data_attributes_notification_targets_type_0_item diff --git a/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item_type.py b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item_type.py new file mode 100644 index 00000000..4e4263ba --- /dev/null +++ b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item_type.py @@ -0,0 +1,27 @@ +from typing import Literal, cast + +NewAlertDataAttributesNotificationTargetsType0ItemType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service", "User" +] + +NEW_ALERT_DATA_ATTRIBUTES_NOTIFICATION_TARGETS_TYPE_0_ITEM_TYPE_VALUES: set[ + NewAlertDataAttributesNotificationTargetsType0ItemType +] = { + "EscalationPolicy", + "Functionality", + "Group", + "Service", + "User", +} + + +def check_new_alert_data_attributes_notification_targets_type_0_item_type( + value: str | None, +) -> NewAlertDataAttributesNotificationTargetsType0ItemType | None: + if value is None: + return None + if value in NEW_ALERT_DATA_ATTRIBUTES_NOTIFICATION_TARGETS_TYPE_0_ITEM_TYPE_VALUES: + return cast(NewAlertDataAttributesNotificationTargetsType0ItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ALERT_DATA_ATTRIBUTES_NOTIFICATION_TARGETS_TYPE_0_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_alert_data_attributes_source.py b/rootly_sdk/models/new_alert_data_attributes_source.py deleted file mode 100644 index 0dd3748a..00000000 --- a/rootly_sdk/models/new_alert_data_attributes_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -NewAlertDataAttributesSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -NEW_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES: set[NewAlertDataAttributesSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_new_alert_data_attributes_source(value: str | None) -> NewAlertDataAttributesSource | None: - if value is None: - return None - if value in NEW_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES: - return cast(NewAlertDataAttributesSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/new_alert_event.py b/rootly_sdk/models/new_alert_event.py index b15ea50d..e8e54def 100644 --- a/rootly_sdk/models/new_alert_event.py +++ b/rootly_sdk/models/new_alert_event.py @@ -24,6 +24,7 @@ class NewAlertEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_event_data.py b/rootly_sdk/models/new_alert_event_data.py index b1834ca4..1533615e 100644 --- a/rootly_sdk/models/new_alert_event_data.py +++ b/rootly_sdk/models/new_alert_event_data.py @@ -28,6 +28,7 @@ class NewAlertEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_field.py b/rootly_sdk/models/new_alert_field.py index fe39f1f2..be0fa49a 100644 --- a/rootly_sdk/models/new_alert_field.py +++ b/rootly_sdk/models/new_alert_field.py @@ -24,6 +24,7 @@ class NewAlertField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_field_data.py b/rootly_sdk/models/new_alert_field_data.py index e339edd9..2be303ec 100644 --- a/rootly_sdk/models/new_alert_field_data.py +++ b/rootly_sdk/models/new_alert_field_data.py @@ -28,6 +28,7 @@ class NewAlertFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_group.py b/rootly_sdk/models/new_alert_group.py index 31fe2fcf..8f3c7eaf 100644 --- a/rootly_sdk/models/new_alert_group.py +++ b/rootly_sdk/models/new_alert_group.py @@ -24,6 +24,7 @@ class NewAlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_group_data.py b/rootly_sdk/models/new_alert_group_data.py index 9f3ad58e..f11830f5 100644 --- a/rootly_sdk/models/new_alert_group_data.py +++ b/rootly_sdk/models/new_alert_group_data.py @@ -28,6 +28,7 @@ class NewAlertGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_group_data_attributes.py b/rootly_sdk/models/new_alert_group_data_attributes.py index 61040f9b..7fe6b383 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes.py +++ b/rootly_sdk/models/new_alert_group_data_attributes.py @@ -60,6 +60,7 @@ class NewAlertGroupDataAttributes: conditions: list[NewAlertGroupDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/new_alert_group_data_attributes_targets_item.py b/rootly_sdk/models/new_alert_group_data_attributes_targets_item.py index 74afd762..ecc8a286 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes_targets_item.py +++ b/rootly_sdk/models/new_alert_group_data_attributes_targets_item.py @@ -19,8 +19,9 @@ class NewAlertGroupDataAttributesTargetsItem: """ Attributes: - target_type (NewAlertGroupDataAttributesTargetsItemTargetType): The type of the target. - target_id (UUID): id for the Group, Service or EscalationPolicy + target_type (NewAlertGroupDataAttributesTargetsItemTargetType): The type of the target. Please contact support + if you encounter issues using `Functionality` as a target type. + target_id (UUID): id for the Group, Service, EscalationPolicy or Functionality """ target_type: NewAlertGroupDataAttributesTargetsItemTargetType diff --git a/rootly_sdk/models/new_alert_group_data_attributes_targets_item_target_type.py b/rootly_sdk/models/new_alert_group_data_attributes_targets_item_target_type.py index 6423ba1d..aa9c58d0 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes_targets_item_target_type.py +++ b/rootly_sdk/models/new_alert_group_data_attributes_targets_item_target_type.py @@ -1,11 +1,12 @@ from typing import Literal, cast -NewAlertGroupDataAttributesTargetsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +NewAlertGroupDataAttributesTargetsItemTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] NEW_ALERT_GROUP_DATA_ATTRIBUTES_TARGETS_ITEM_TARGET_TYPE_VALUES: set[ NewAlertGroupDataAttributesTargetsItemTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/new_alert_route.py b/rootly_sdk/models/new_alert_route.py index 79625248..12b360a5 100644 --- a/rootly_sdk/models/new_alert_route.py +++ b/rootly_sdk/models/new_alert_route.py @@ -26,6 +26,7 @@ class NewAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alert_route_data.py b/rootly_sdk/models/new_alert_route_data.py index 13b160fb..45913777 100644 --- a/rootly_sdk/models/new_alert_route_data.py +++ b/rootly_sdk/models/new_alert_route_data.py @@ -29,6 +29,7 @@ class NewAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/new_alert_route_data_attributes.py b/rootly_sdk/models/new_alert_route_data_attributes.py index 8ed8b1a7..a68d9865 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes.py +++ b/rootly_sdk/models/new_alert_route_data_attributes.py @@ -35,6 +35,7 @@ class NewAlertRouteDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name alerts_source_ids = [] diff --git a/rootly_sdk/models/new_alert_route_data_attributes_rules_item.py b/rootly_sdk/models/new_alert_route_data_attributes_rules_item.py index 8e5042f2..1c4d8b23 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes_rules_item.py +++ b/rootly_sdk/models/new_alert_route_data_attributes_rules_item.py @@ -39,6 +39,7 @@ class NewAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name destinations = [] diff --git a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item.py b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item.py index b32250f0..f5187e45 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item.py +++ b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item.py @@ -30,6 +30,7 @@ class NewAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + conditions = [] for conditions_item_data in self.conditions: conditions_item = conditions_item_data.to_dict() diff --git a/rootly_sdk/models/new_alert_routing_rule.py b/rootly_sdk/models/new_alert_routing_rule.py index f60b001a..99586182 100644 --- a/rootly_sdk/models/new_alert_routing_rule.py +++ b/rootly_sdk/models/new_alert_routing_rule.py @@ -24,6 +24,7 @@ class NewAlertRoutingRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_routing_rule_data.py b/rootly_sdk/models/new_alert_routing_rule_data.py index 81681d74..82389749 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data.py +++ b/rootly_sdk/models/new_alert_routing_rule_data.py @@ -31,6 +31,7 @@ class NewAlertRoutingRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_routing_rule_data_attributes.py b/rootly_sdk/models/new_alert_routing_rule_data_attributes.py index 384761d5..2fb376e7 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data_attributes.py +++ b/rootly_sdk/models/new_alert_routing_rule_data_attributes.py @@ -49,6 +49,7 @@ class NewAlertRoutingRuleDataAttributes: conditions: list[NewAlertRoutingRuleDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name alerts_source_id = str(self.alerts_source_id) diff --git a/rootly_sdk/models/new_alert_urgency.py b/rootly_sdk/models/new_alert_urgency.py index 14f3b152..bb1f20c0 100644 --- a/rootly_sdk/models/new_alert_urgency.py +++ b/rootly_sdk/models/new_alert_urgency.py @@ -24,6 +24,7 @@ class NewAlertUrgency: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_urgency_data.py b/rootly_sdk/models/new_alert_urgency_data.py index 05d2e804..bfef8677 100644 --- a/rootly_sdk/models/new_alert_urgency_data.py +++ b/rootly_sdk/models/new_alert_urgency_data.py @@ -28,6 +28,7 @@ class NewAlertUrgencyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alerts_source.py b/rootly_sdk/models/new_alerts_source.py index 4ea3cade..f40df906 100644 --- a/rootly_sdk/models/new_alerts_source.py +++ b/rootly_sdk/models/new_alerts_source.py @@ -24,6 +24,7 @@ class NewAlertsSource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alerts_source_data.py b/rootly_sdk/models/new_alerts_source_data.py index 41b6af4d..f5d4b12e 100644 --- a/rootly_sdk/models/new_alerts_source_data.py +++ b/rootly_sdk/models/new_alerts_source_data.py @@ -28,6 +28,7 @@ class NewAlertsSourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alerts_source_data_attributes.py b/rootly_sdk/models/new_alerts_source_data_attributes.py index 72099088..1cec926d 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes.py @@ -41,6 +41,8 @@ class NewAlertsSourceDataAttributes: """ Attributes: name (str): The name of the alert source + enabled (bool | Unset): Whether the alert source is enabled. Disabled sources do not create alerts from incoming + events. source_type (NewAlertsSourceDataAttributesSourceType | Unset): The alert source type alert_urgency_id (str | Unset): ID for the default alert urgency assigned to this alert source deduplicate_alerts_by_key (bool | Unset): Toggle alert deduplication using deduplication key. If enabled, @@ -64,6 +66,7 @@ class NewAlertsSourceDataAttributes: """ name: str + enabled: bool | Unset = UNSET source_type: NewAlertsSourceDataAttributesSourceType | Unset = UNSET alert_urgency_id: str | Unset = UNSET deduplicate_alerts_by_key: bool | Unset = UNSET @@ -92,6 +95,8 @@ def to_dict(self) -> dict[str, Any]: name = self.name + enabled = self.enabled + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -165,6 +170,8 @@ def to_dict(self) -> dict[str, Any]: "name": name, } ) + if enabled is not UNSET: + field_dict["enabled"] = enabled if source_type is not UNSET: field_dict["source_type"] = source_type if alert_urgency_id is not UNSET: @@ -213,6 +220,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") + enabled = d.pop("enabled", UNSET) + _source_type = d.pop("source_type", UNSET) source_type: NewAlertsSourceDataAttributesSourceType | Unset if isinstance(_source_type, Unset): @@ -346,6 +355,7 @@ def _parse_resolution_rule_attributes( new_alerts_source_data_attributes = cls( name=name, + enabled=enabled, source_type=source_type, alert_urgency_id=alert_urgency_id, deduplicate_alerts_by_key=deduplicate_alerts_by_key, diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0.py b/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0.py index f1890f82..7af8435b 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0.py @@ -68,6 +68,7 @@ class NewAlertsSourceDataAttributesResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + enabled = self.enabled condition_type: str | Unset = UNSET diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_source_type.py b/rootly_sdk/models/new_alerts_source_data_attributes_source_type.py index 47ce1af4..e479af82 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_source_type.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_source_type.py @@ -11,6 +11,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", @@ -37,6 +38,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0.py b/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0.py index 3fe2cadd..07b1013b 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0.py @@ -41,6 +41,7 @@ class NewAlertsSourceDataAttributesSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + auto_resolve = self.auto_resolve resolve_state: None | str | Unset diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py b/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py index b76f4001..680df17a 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py @@ -22,7 +22,8 @@ class NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttribu field (NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset): Select the field on which the condition to be evaluated json_path (str | Unset): JSON path expression to extract a specific value from the alert's payload for - evaluation + evaluation. For `notification_target_id` only: if your account has opted in to Dynamic Notification Targets, + this may also be a Liquid template that resolves to a notification target id at routing time. """ field: NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET diff --git a/rootly_sdk/models/new_api_key.py b/rootly_sdk/models/new_api_key.py index 4a091d1c..76000ed8 100644 --- a/rootly_sdk/models/new_api_key.py +++ b/rootly_sdk/models/new_api_key.py @@ -24,6 +24,7 @@ class NewApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_api_key_data.py b/rootly_sdk/models/new_api_key_data.py index ce01acec..f8653689 100644 --- a/rootly_sdk/models/new_api_key_data.py +++ b/rootly_sdk/models/new_api_key_data.py @@ -28,6 +28,7 @@ class NewApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_authorization.py b/rootly_sdk/models/new_authorization.py index 796d7ade..2e9cf0c3 100644 --- a/rootly_sdk/models/new_authorization.py +++ b/rootly_sdk/models/new_authorization.py @@ -24,6 +24,7 @@ class NewAuthorization: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_authorization_data.py b/rootly_sdk/models/new_authorization_data.py index 7d6db6dd..31b084d8 100644 --- a/rootly_sdk/models/new_authorization_data.py +++ b/rootly_sdk/models/new_authorization_data.py @@ -28,6 +28,7 @@ class NewAuthorizationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog.py b/rootly_sdk/models/new_catalog.py index ea8382b6..237fa872 100644 --- a/rootly_sdk/models/new_catalog.py +++ b/rootly_sdk/models/new_catalog.py @@ -24,6 +24,7 @@ class NewCatalog: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_checklist_template.py b/rootly_sdk/models/new_catalog_checklist_template.py index b407d01c..76099d53 100644 --- a/rootly_sdk/models/new_catalog_checklist_template.py +++ b/rootly_sdk/models/new_catalog_checklist_template.py @@ -24,6 +24,7 @@ class NewCatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_checklist_template_data.py b/rootly_sdk/models/new_catalog_checklist_template_data.py index 30791aec..46881d35 100644 --- a/rootly_sdk/models/new_catalog_checklist_template_data.py +++ b/rootly_sdk/models/new_catalog_checklist_template_data.py @@ -31,6 +31,7 @@ class NewCatalogChecklistTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_data.py b/rootly_sdk/models/new_catalog_data.py index 783329ff..cdb82389 100644 --- a/rootly_sdk/models/new_catalog_data.py +++ b/rootly_sdk/models/new_catalog_data.py @@ -28,6 +28,7 @@ class NewCatalogData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_data_attributes.py b/rootly_sdk/models/new_catalog_data_attributes.py index a6d96bb9..ec3d19f4 100644 --- a/rootly_sdk/models/new_catalog_data_attributes.py +++ b/rootly_sdk/models/new_catalog_data_attributes.py @@ -22,12 +22,14 @@ class NewCatalogDataAttributes: description (None | str | Unset): icon (NewCatalogDataAttributesIcon | Unset): position (int | None | Unset): Default position of the catalog when displayed in a list. + external_id (None | str | Unset): An external identifier for this catalog. Must be unique within the team. """ name: str description: None | str | Unset = UNSET icon: NewCatalogDataAttributesIcon | Unset = UNSET position: int | None | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -48,6 +50,12 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update( @@ -61,6 +69,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["icon"] = icon if position is not UNSET: field_dict["position"] = position + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -94,11 +104,21 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + new_catalog_data_attributes = cls( name=name, description=description, icon=icon, position=position, + external_id=external_id, ) return new_catalog_data_attributes diff --git a/rootly_sdk/models/new_catalog_entity.py b/rootly_sdk/models/new_catalog_entity.py index 205712e1..e69bd8cd 100644 --- a/rootly_sdk/models/new_catalog_entity.py +++ b/rootly_sdk/models/new_catalog_entity.py @@ -24,6 +24,7 @@ class NewCatalogEntity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_entity_data.py b/rootly_sdk/models/new_catalog_entity_data.py index c8ccfd27..86bda241 100644 --- a/rootly_sdk/models/new_catalog_entity_data.py +++ b/rootly_sdk/models/new_catalog_entity_data.py @@ -28,6 +28,7 @@ class NewCatalogEntityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_entity_data_attributes.py b/rootly_sdk/models/new_catalog_entity_data_attributes.py index ac88c87a..1afb06cc 100644 --- a/rootly_sdk/models/new_catalog_entity_data_attributes.py +++ b/rootly_sdk/models/new_catalog_entity_data_attributes.py @@ -21,6 +21,9 @@ class NewCatalogEntityDataAttributes: name (str): description (None | str | Unset): position (int | None | Unset): Default position of the item when displayed in a list. + backstage_id (None | str | Unset): The Backstage entity ID this catalog entity is linked to. + external_id (None | str | Unset): An external identifier for this catalog entity. Must be unique within the + catalog. properties (list[NewCatalogEntityDataAttributesPropertiesItem] | Unset): Array of property values for this catalog entity """ @@ -28,9 +31,12 @@ class NewCatalogEntityDataAttributes: name: str description: None | str | Unset = UNSET position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET properties: list[NewCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset @@ -45,6 +51,18 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -63,6 +81,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if external_id is not UNSET: + field_dict["external_id"] = external_id if properties is not UNSET: field_dict["properties"] = properties @@ -95,6 +117,24 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + _properties = d.pop("properties", UNSET) properties: list[NewCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -108,6 +148,8 @@ def _parse_position(data: object) -> int | None | Unset: name=name, description=description, position=position, + backstage_id=backstage_id, + external_id=external_id, properties=properties, ) diff --git a/rootly_sdk/models/new_catalog_entity_property.py b/rootly_sdk/models/new_catalog_entity_property.py index 83d2b11e..3f7f8636 100644 --- a/rootly_sdk/models/new_catalog_entity_property.py +++ b/rootly_sdk/models/new_catalog_entity_property.py @@ -26,6 +26,7 @@ class NewCatalogEntityProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_entity_property_data.py b/rootly_sdk/models/new_catalog_entity_property_data.py index e6683ffd..81053936 100644 --- a/rootly_sdk/models/new_catalog_entity_property_data.py +++ b/rootly_sdk/models/new_catalog_entity_property_data.py @@ -31,6 +31,7 @@ class NewCatalogEntityPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_field.py b/rootly_sdk/models/new_catalog_field.py index b899e41e..e036da74 100644 --- a/rootly_sdk/models/new_catalog_field.py +++ b/rootly_sdk/models/new_catalog_field.py @@ -25,6 +25,7 @@ class NewCatalogField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_field_data.py b/rootly_sdk/models/new_catalog_field_data.py index 095d3491..221de699 100644 --- a/rootly_sdk/models/new_catalog_field_data.py +++ b/rootly_sdk/models/new_catalog_field_data.py @@ -28,6 +28,7 @@ class NewCatalogFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_field_data_attributes.py b/rootly_sdk/models/new_catalog_field_data_attributes.py index e6ed87d5..2de16529 100644 --- a/rootly_sdk/models/new_catalog_field_data_attributes.py +++ b/rootly_sdk/models/new_catalog_field_data_attributes.py @@ -29,6 +29,8 @@ class NewCatalogFieldDataAttributes: position (int | None | Unset): Default position of the item when displayed in a list. required (bool | Unset): Whether the field is required. catalog_type (NewCatalogFieldDataAttributesCatalogType | Unset): The type of catalog the field belongs to. + external_id (None | str | Unset): An external identifier for this catalog field. Must be unique within the + scope. """ name: str @@ -38,6 +40,7 @@ class NewCatalogFieldDataAttributes: position: int | None | Unset = UNSET required: bool | Unset = UNSET catalog_type: NewCatalogFieldDataAttributesCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -64,6 +67,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update( @@ -82,6 +91,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -121,6 +132,15 @@ def _parse_position(data: object) -> int | None | Unset: else: catalog_type = check_new_catalog_field_data_attributes_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + new_catalog_field_data_attributes = cls( name=name, kind=kind, @@ -129,6 +149,7 @@ def _parse_position(data: object) -> int | None | Unset: position=position, required=required, catalog_type=catalog_type, + external_id=external_id, ) return new_catalog_field_data_attributes diff --git a/rootly_sdk/models/new_catalog_property.py b/rootly_sdk/models/new_catalog_property.py index a8c21f3d..2afbc8a2 100644 --- a/rootly_sdk/models/new_catalog_property.py +++ b/rootly_sdk/models/new_catalog_property.py @@ -25,6 +25,7 @@ class NewCatalogProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_property_data.py b/rootly_sdk/models/new_catalog_property_data.py index 2823db19..8e4df1f6 100644 --- a/rootly_sdk/models/new_catalog_property_data.py +++ b/rootly_sdk/models/new_catalog_property_data.py @@ -28,6 +28,7 @@ class NewCatalogPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_property_data_attributes.py b/rootly_sdk/models/new_catalog_property_data_attributes.py index 9e42a192..3a4d155c 100644 --- a/rootly_sdk/models/new_catalog_property_data_attributes.py +++ b/rootly_sdk/models/new_catalog_property_data_attributes.py @@ -29,6 +29,8 @@ class NewCatalogPropertyDataAttributes: position (int | None | Unset): Default position of the item when displayed in a list. required (bool | Unset): Whether the property is required. catalog_type (NewCatalogPropertyDataAttributesCatalogType | Unset): The type of catalog the property belongs to. + external_id (None | str | Unset): An external identifier for this catalog property. Must be unique within the + scope. """ name: str @@ -38,6 +40,7 @@ class NewCatalogPropertyDataAttributes: position: int | None | Unset = UNSET required: bool | Unset = UNSET catalog_type: NewCatalogPropertyDataAttributesCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -64,6 +67,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update( @@ -82,6 +91,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -121,6 +132,15 @@ def _parse_position(data: object) -> int | None | Unset: else: catalog_type = check_new_catalog_property_data_attributes_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + new_catalog_property_data_attributes = cls( name=name, kind=kind, @@ -129,6 +149,7 @@ def _parse_position(data: object) -> int | None | Unset: position=position, required=required, catalog_type=catalog_type, + external_id=external_id, ) return new_catalog_property_data_attributes diff --git a/rootly_sdk/models/new_cause.py b/rootly_sdk/models/new_cause.py index 4daf1828..d00de96f 100644 --- a/rootly_sdk/models/new_cause.py +++ b/rootly_sdk/models/new_cause.py @@ -24,6 +24,7 @@ class NewCause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_cause_data.py b/rootly_sdk/models/new_cause_data.py index 96dd5a44..bbe9ae91 100644 --- a/rootly_sdk/models/new_cause_data.py +++ b/rootly_sdk/models/new_cause_data.py @@ -28,6 +28,7 @@ class NewCauseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_cause_data_attributes.py b/rootly_sdk/models/new_cause_data_attributes.py index f0655b4e..449fdadd 100644 --- a/rootly_sdk/models/new_cause_data_attributes.py +++ b/rootly_sdk/models/new_cause_data_attributes.py @@ -30,6 +30,7 @@ class NewCauseDataAttributes: properties: list[NewCauseDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/new_communications_group.py b/rootly_sdk/models/new_communications_group.py index 5cf224fc..5f9e95a9 100644 --- a/rootly_sdk/models/new_communications_group.py +++ b/rootly_sdk/models/new_communications_group.py @@ -24,6 +24,7 @@ class NewCommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_communications_group_data.py b/rootly_sdk/models/new_communications_group_data.py index 19358383..fb3b0193 100644 --- a/rootly_sdk/models/new_communications_group_data.py +++ b/rootly_sdk/models/new_communications_group_data.py @@ -31,6 +31,7 @@ class NewCommunicationsGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_communications_group_data_attributes.py b/rootly_sdk/models/new_communications_group_data_attributes.py index a605c9dc..e156f4be 100644 --- a/rootly_sdk/models/new_communications_group_data_attributes.py +++ b/rootly_sdk/models/new_communications_group_data_attributes.py @@ -60,6 +60,7 @@ class NewCommunicationsGroupDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name communication_type_id = self.communication_type_id diff --git a/rootly_sdk/models/new_communications_stage.py b/rootly_sdk/models/new_communications_stage.py index d11ef2f1..d57d331d 100644 --- a/rootly_sdk/models/new_communications_stage.py +++ b/rootly_sdk/models/new_communications_stage.py @@ -24,6 +24,7 @@ class NewCommunicationsStage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_communications_stage_data.py b/rootly_sdk/models/new_communications_stage_data.py index e805f5f3..9f3d231c 100644 --- a/rootly_sdk/models/new_communications_stage_data.py +++ b/rootly_sdk/models/new_communications_stage_data.py @@ -31,6 +31,7 @@ class NewCommunicationsStageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_communications_template.py b/rootly_sdk/models/new_communications_template.py index d92e27ed..006dea09 100644 --- a/rootly_sdk/models/new_communications_template.py +++ b/rootly_sdk/models/new_communications_template.py @@ -24,6 +24,7 @@ class NewCommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_communications_template_data.py b/rootly_sdk/models/new_communications_template_data.py index 36258107..086a413b 100644 --- a/rootly_sdk/models/new_communications_template_data.py +++ b/rootly_sdk/models/new_communications_template_data.py @@ -31,6 +31,7 @@ class NewCommunicationsTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_communications_template_data_attributes.py b/rootly_sdk/models/new_communications_template_data_attributes.py index 32c12e4a..e555a355 100644 --- a/rootly_sdk/models/new_communications_template_data_attributes.py +++ b/rootly_sdk/models/new_communications_template_data_attributes.py @@ -38,6 +38,7 @@ class NewCommunicationsTemplateDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name communication_type_id = self.communication_type_id diff --git a/rootly_sdk/models/new_communications_type.py b/rootly_sdk/models/new_communications_type.py index 078ae90a..473d00ca 100644 --- a/rootly_sdk/models/new_communications_type.py +++ b/rootly_sdk/models/new_communications_type.py @@ -24,6 +24,7 @@ class NewCommunicationsType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_communications_type_data.py b/rootly_sdk/models/new_communications_type_data.py index 435176de..709dcbfd 100644 --- a/rootly_sdk/models/new_communications_type_data.py +++ b/rootly_sdk/models/new_communications_type_data.py @@ -31,6 +31,7 @@ class NewCommunicationsTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_custom_field.py b/rootly_sdk/models/new_custom_field.py index 837b303d..eedfff24 100644 --- a/rootly_sdk/models/new_custom_field.py +++ b/rootly_sdk/models/new_custom_field.py @@ -24,6 +24,7 @@ class NewCustomField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_custom_field_data.py b/rootly_sdk/models/new_custom_field_data.py index f6f5a39d..16d37a7b 100644 --- a/rootly_sdk/models/new_custom_field_data.py +++ b/rootly_sdk/models/new_custom_field_data.py @@ -28,6 +28,7 @@ class NewCustomFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_custom_field_option.py b/rootly_sdk/models/new_custom_field_option.py index 818c5ca1..430c0138 100644 --- a/rootly_sdk/models/new_custom_field_option.py +++ b/rootly_sdk/models/new_custom_field_option.py @@ -24,6 +24,7 @@ class NewCustomFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_custom_field_option_data.py b/rootly_sdk/models/new_custom_field_option_data.py index e1cd69c1..559f0951 100644 --- a/rootly_sdk/models/new_custom_field_option_data.py +++ b/rootly_sdk/models/new_custom_field_option_data.py @@ -31,6 +31,7 @@ class NewCustomFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_custom_form.py b/rootly_sdk/models/new_custom_form.py index 82676702..c3bb94a5 100644 --- a/rootly_sdk/models/new_custom_form.py +++ b/rootly_sdk/models/new_custom_form.py @@ -24,6 +24,7 @@ class NewCustomForm: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_custom_form_data.py b/rootly_sdk/models/new_custom_form_data.py index 426c7e13..10b2b5b9 100644 --- a/rootly_sdk/models/new_custom_form_data.py +++ b/rootly_sdk/models/new_custom_form_data.py @@ -28,6 +28,7 @@ class NewCustomFormData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_dashboard.py b/rootly_sdk/models/new_dashboard.py index 108a2f0f..6248ee11 100644 --- a/rootly_sdk/models/new_dashboard.py +++ b/rootly_sdk/models/new_dashboard.py @@ -24,6 +24,7 @@ class NewDashboard: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_dashboard_data.py b/rootly_sdk/models/new_dashboard_data.py index b4f8d6aa..c0551ebc 100644 --- a/rootly_sdk/models/new_dashboard_data.py +++ b/rootly_sdk/models/new_dashboard_data.py @@ -28,6 +28,7 @@ class NewDashboardData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_dashboard_panel.py b/rootly_sdk/models/new_dashboard_panel.py index 5683778a..0a030c43 100644 --- a/rootly_sdk/models/new_dashboard_panel.py +++ b/rootly_sdk/models/new_dashboard_panel.py @@ -24,6 +24,7 @@ class NewDashboardPanel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_dashboard_panel_data.py b/rootly_sdk/models/new_dashboard_panel_data.py index 28985bdf..3cc44773 100644 --- a/rootly_sdk/models/new_dashboard_panel_data.py +++ b/rootly_sdk/models/new_dashboard_panel_data.py @@ -28,6 +28,7 @@ class NewDashboardPanelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py index 3bb4b26d..299e8dc1 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py @@ -46,6 +46,7 @@ class NewDashboardPanelDataAttributesParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.display diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item.py index eba2d965..1a123cb7 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item.py @@ -34,6 +34,7 @@ class NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation diff --git a/rootly_sdk/models/new_edge_connector.py b/rootly_sdk/models/new_edge_connector.py index ad031287..b0ec3196 100644 --- a/rootly_sdk/models/new_edge_connector.py +++ b/rootly_sdk/models/new_edge_connector.py @@ -24,6 +24,7 @@ class NewEdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + edge_connector = self.edge_connector.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_edge_connector_action.py b/rootly_sdk/models/new_edge_connector_action.py index 83cba905..f8c7d5d8 100644 --- a/rootly_sdk/models/new_edge_connector_action.py +++ b/rootly_sdk/models/new_edge_connector_action.py @@ -24,6 +24,7 @@ class NewEdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + action = self.action.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_edge_connector_action_action.py b/rootly_sdk/models/new_edge_connector_action_action.py index de102e90..942ab5ea 100644 --- a/rootly_sdk/models/new_edge_connector_action_action.py +++ b/rootly_sdk/models/new_edge_connector_action_action.py @@ -34,6 +34,7 @@ class NewEdgeConnectorActionAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name action_type: str = self.action_type diff --git a/rootly_sdk/models/new_edge_connector_action_action_metadata.py b/rootly_sdk/models/new_edge_connector_action_action_metadata.py index 19cb7566..fe6cd145 100644 --- a/rootly_sdk/models/new_edge_connector_action_action_metadata.py +++ b/rootly_sdk/models/new_edge_connector_action_action_metadata.py @@ -38,6 +38,7 @@ class NewEdgeConnectorActionActionMetadata: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET diff --git a/rootly_sdk/models/new_environment.py b/rootly_sdk/models/new_environment.py index 2f201db7..8f807574 100644 --- a/rootly_sdk/models/new_environment.py +++ b/rootly_sdk/models/new_environment.py @@ -24,6 +24,7 @@ class NewEnvironment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_environment_data.py b/rootly_sdk/models/new_environment_data.py index c460b14e..c4497ba1 100644 --- a/rootly_sdk/models/new_environment_data.py +++ b/rootly_sdk/models/new_environment_data.py @@ -28,6 +28,7 @@ class NewEnvironmentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_environment_data_attributes.py b/rootly_sdk/models/new_environment_data_attributes.py index d86a5dfe..fe57fc2c 100644 --- a/rootly_sdk/models/new_environment_data_attributes.py +++ b/rootly_sdk/models/new_environment_data_attributes.py @@ -28,6 +28,7 @@ class NewEnvironmentDataAttributes: description (None | str | Unset): The description of the environment color (None | str | Unset): The hex color of the environment position (int | None | Unset): Position of the environment + external_id (None | str | Unset): The external id associated to this environment notify_emails (list[str] | None | Unset): Emails to attach to the environment slack_channels (list[NewEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this environment @@ -41,12 +42,14 @@ class NewEnvironmentDataAttributes: description: None | str | Unset = UNSET color: None | str | Unset = UNSET position: int | None | Unset = UNSET + external_id: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET slack_channels: list[NewEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset = UNSET slack_aliases: list[NewEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset = UNSET properties: list[NewEnvironmentDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset @@ -67,6 +70,12 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET @@ -120,6 +129,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["color"] = color if position is not UNSET: field_dict["position"] = position + if external_id is not UNSET: + field_dict["external_id"] = external_id if notify_emails is not UNSET: field_dict["notify_emails"] = notify_emails if slack_channels is not UNSET: @@ -171,6 +182,15 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data @@ -254,6 +274,7 @@ def _parse_slack_aliases( description=description, color=color, position=position, + external_id=external_id, notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, diff --git a/rootly_sdk/models/new_escalation_policy.py b/rootly_sdk/models/new_escalation_policy.py index 60d3191b..eaf02f09 100644 --- a/rootly_sdk/models/new_escalation_policy.py +++ b/rootly_sdk/models/new_escalation_policy.py @@ -24,6 +24,7 @@ class NewEscalationPolicy: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_escalation_policy_data.py b/rootly_sdk/models/new_escalation_policy_data.py index df094d83..63bf20fd 100644 --- a/rootly_sdk/models/new_escalation_policy_data.py +++ b/rootly_sdk/models/new_escalation_policy_data.py @@ -28,6 +28,7 @@ class NewEscalationPolicyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0_time_zone.py b/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0_time_zone.py index c73cb5a8..306d49f4 100644 --- a/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0_time_zone.py +++ b/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0_time_zone.py @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -306,8 +322,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -323,6 +341,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -334,6 +353,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -388,7 +408,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -409,6 +432,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -418,6 +442,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -524,15 +549,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -572,6 +603,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/new_escalation_policy_level.py b/rootly_sdk/models/new_escalation_policy_level.py index 9564eea6..2470c8e6 100644 --- a/rootly_sdk/models/new_escalation_policy_level.py +++ b/rootly_sdk/models/new_escalation_policy_level.py @@ -24,6 +24,7 @@ class NewEscalationPolicyLevel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_escalation_policy_level_data.py b/rootly_sdk/models/new_escalation_policy_level_data.py index 2e3a2b6b..f8b43279 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data.py +++ b/rootly_sdk/models/new_escalation_policy_level_data.py @@ -31,6 +31,7 @@ class NewEscalationPolicyLevelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py b/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py index 8a9782da..9609b665 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py +++ b/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py @@ -23,7 +23,8 @@ class NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0: """ Attributes: - id (str): The ID of notification target. If Slack channel, then id of the slack channel (eg. C06Q2JK7RQW) + id (str): The ID of notification target. If Slack channel, then id of the slack channel (eg. C06Q2JK7RQW). If + Microsoft Teams channel, then the Rootly channel UUID. type_ (NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type): The type of the notification target team_members (NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers | Unset): For diff --git a/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py b/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py index 9011ac86..b15dd98e 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py +++ b/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py @@ -1,12 +1,13 @@ from typing import Literal, cast NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type = Literal[ - "schedule", "service", "slack_channel", "team", "user" + "microsoft_teams_channel", "schedule", "service", "slack_channel", "team", "user" ] NEW_ESCALATION_POLICY_LEVEL_DATA_ATTRIBUTES_NOTIFICATION_TARGET_PARAMS_ITEM_TYPE_0_TYPE_VALUES: set[ NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type ] = { + "microsoft_teams_channel", "schedule", "service", "slack_channel", diff --git a/rootly_sdk/models/new_escalation_policy_path.py b/rootly_sdk/models/new_escalation_policy_path.py index ad311e9d..9af97aa7 100644 --- a/rootly_sdk/models/new_escalation_policy_path.py +++ b/rootly_sdk/models/new_escalation_policy_path.py @@ -24,6 +24,7 @@ class NewEscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_escalation_policy_path_data.py b/rootly_sdk/models/new_escalation_policy_path_data.py index 355e1ec9..e0b9e314 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data.py +++ b/rootly_sdk/models/new_escalation_policy_path_data.py @@ -31,6 +31,7 @@ class NewEscalationPolicyPathData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes.py index b3313c07..d4d8fd4f 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes.py @@ -28,12 +28,30 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2 import ( + NewEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3 import ( + NewEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4 import ( + NewEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7 import ( + NewEscalationPolicyPathDataAttributesRulesItemType7, + ) from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item import ( NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, ) @@ -63,9 +81,11 @@ class NewEscalationPolicyPathDataAttributes: repeat_count (int | None | Unset): The number of times this path will be executed until someone acknowledges the alert initial_delay (int | Unset): Initial delay for escalation path in minutes. Maximum 1 week (10080). - rules (list[EscalationPathRuleAlertUrgency | EscalationPathRuleDeferralWindow | EscalationPathRuleField | - EscalationPathRuleJsonPath | EscalationPathRuleService | EscalationPathRuleWorkingHour] | Unset): Escalation - path conditions + rules (list[NewEscalationPolicyPathDataAttributesRulesItemType0 | + NewEscalationPolicyPathDataAttributesRulesItemType1 | NewEscalationPolicyPathDataAttributesRulesItemType2 | + NewEscalationPolicyPathDataAttributesRulesItemType3 | NewEscalationPolicyPathDataAttributesRulesItemType4 | + NewEscalationPolicyPathDataAttributesRulesItemType5 | NewEscalationPolicyPathDataAttributesRulesItemType6 | + NewEscalationPolicyPathDataAttributesRulesItemType7] | Unset): Escalation path conditions time_restriction_time_zone (NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset): Time zone used for time restrictions. time_restrictions (list[NewEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset): If time @@ -86,12 +106,14 @@ class NewEscalationPolicyPathDataAttributes: initial_delay: int | Unset = UNSET rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour + NewEscalationPolicyPathDataAttributesRulesItemType0 + | NewEscalationPolicyPathDataAttributesRulesItemType1 + | NewEscalationPolicyPathDataAttributesRulesItemType2 + | NewEscalationPolicyPathDataAttributesRulesItemType3 + | NewEscalationPolicyPathDataAttributesRulesItemType4 + | NewEscalationPolicyPathDataAttributesRulesItemType5 + | NewEscalationPolicyPathDataAttributesRulesItemType6 + | NewEscalationPolicyPathDataAttributesRulesItemType7 ] | Unset ) = UNSET @@ -99,11 +121,27 @@ class NewEscalationPolicyPathDataAttributes: time_restrictions: list[NewEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2 import ( + NewEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3 import ( + NewEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4 import ( + NewEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, + ) name = self.name @@ -156,15 +194,19 @@ def to_dict(self) -> dict[str, Any]: rules = [] for rules_item_data in self.rules: rules_item: dict[str, Any] - if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): + if isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType0): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType1): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleJsonPath): + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType2): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleField): + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType3): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleService): + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType6): rules_item = rules_item_data.to_dict() else: rules_item = rules_item_data.to_dict() @@ -220,12 +262,30 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2 import ( + NewEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3 import ( + NewEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4 import ( + NewEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7 import ( + NewEscalationPolicyPathDataAttributesRulesItemType7, + ) from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item import ( NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, ) @@ -306,12 +366,14 @@ def _parse_repeat_count(data: object) -> int | None | Unset: _rules = d.pop("rules", UNSET) rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour + NewEscalationPolicyPathDataAttributesRulesItemType0 + | NewEscalationPolicyPathDataAttributesRulesItemType1 + | NewEscalationPolicyPathDataAttributesRulesItemType2 + | NewEscalationPolicyPathDataAttributesRulesItemType3 + | NewEscalationPolicyPathDataAttributesRulesItemType4 + | NewEscalationPolicyPathDataAttributesRulesItemType5 + | NewEscalationPolicyPathDataAttributesRulesItemType6 + | NewEscalationPolicyPathDataAttributesRulesItemType7 ] | Unset ) = UNSET @@ -322,17 +384,19 @@ def _parse_repeat_count(data: object) -> int | None | Unset: def _parse_rules_item( data: object, ) -> ( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour + NewEscalationPolicyPathDataAttributesRulesItemType0 + | NewEscalationPolicyPathDataAttributesRulesItemType1 + | NewEscalationPolicyPathDataAttributesRulesItemType2 + | NewEscalationPolicyPathDataAttributesRulesItemType3 + | NewEscalationPolicyPathDataAttributesRulesItemType4 + | NewEscalationPolicyPathDataAttributesRulesItemType5 + | NewEscalationPolicyPathDataAttributesRulesItemType6 + | NewEscalationPolicyPathDataAttributesRulesItemType7 ): try: if not isinstance(data, dict): raise TypeError() - rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) + rules_item_type_0 = NewEscalationPolicyPathDataAttributesRulesItemType0.from_dict(data) return rules_item_type_0 except (TypeError, ValueError, AttributeError, KeyError): @@ -340,7 +404,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) + rules_item_type_1 = NewEscalationPolicyPathDataAttributesRulesItemType1.from_dict(data) return rules_item_type_1 except (TypeError, ValueError, AttributeError, KeyError): @@ -348,7 +412,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) + rules_item_type_2 = NewEscalationPolicyPathDataAttributesRulesItemType2.from_dict(data) return rules_item_type_2 except (TypeError, ValueError, AttributeError, KeyError): @@ -356,7 +420,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_3 = EscalationPathRuleField.from_dict(data) + rules_item_type_3 = NewEscalationPolicyPathDataAttributesRulesItemType3.from_dict(data) return rules_item_type_3 except (TypeError, ValueError, AttributeError, KeyError): @@ -364,16 +428,32 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_4 = EscalationPathRuleService.from_dict(data) + rules_item_type_4 = NewEscalationPolicyPathDataAttributesRulesItemType4.from_dict(data) return rules_item_type_4 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_5 = NewEscalationPolicyPathDataAttributesRulesItemType5.from_dict(data) + + return rules_item_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6 = NewEscalationPolicyPathDataAttributesRulesItemType6.from_dict(data) + + return rules_item_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass if not isinstance(data, dict): raise TypeError() - rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) + rules_item_type_7 = NewEscalationPolicyPathDataAttributesRulesItemType7.from_dict(data) - return rules_item_type_5 + return rules_item_type_7 rules_item = _parse_rules_item(rules_item_data) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py new file mode 100644 index 00000000..7966b6c7 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType0RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type, +) + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType0") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType0: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType0RuleType): The type of the escalation path rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType0RuleType + urgency_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + urgency_ids = self.urgency_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "urgency_ids": urgency_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type(d.pop("rule_type")) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + new_escalation_policy_path_data_attributes_rules_item_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_0.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py new file mode 100644 index 00000000..b1dfa9a7 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType0RuleType = Literal["alert_urgency"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType0RuleType +] = { + "alert_urgency", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType0RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py new file mode 100644 index 00000000..0494dba8 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType1RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type, +) + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType1") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType1: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType1RuleType): The type of the escalation path rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType1RuleType + within_working_hour: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + within_working_hour = self.within_working_hour + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "within_working_hour": within_working_hour, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type(d.pop("rule_type")) + + within_working_hour = d.pop("within_working_hour") + + new_escalation_policy_path_data_attributes_rules_item_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_1.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py new file mode 100644 index 00000000..2c1f68e6 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType1RuleType = Literal["working_hour"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType1RuleType +] = { + "working_hour", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType1RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py new file mode 100644 index 00000000..c367486f --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType2Operator, + check_new_escalation_policy_path_data_attributes_rules_item_type_2_operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType2RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType2") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType2: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (NewEscalationPolicyPathDataAttributesRulesItemType2Operator): How JSON path value should be matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType2RuleType + json_path: str + operator: NewEscalationPolicyPathDataAttributesRulesItemType2Operator + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + json_path = self.json_path + + operator: str = self.operator + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "json_path": json_path, + "operator": operator, + } + ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_new_escalation_policy_path_data_attributes_rules_item_type_2_operator(d.pop("operator")) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) + + new_escalation_policy_path_data_attributes_rules_item_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_2.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_operator.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_operator.py new file mode 100644 index 00000000..87b1e1e7 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_2_operator( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType2Operator | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py new file mode 100644 index 00000000..24525fa5 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType2RuleType = Literal["json_path"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType2RuleType +] = { + "json_path", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType2RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py new file mode 100644 index 00000000..2d43753c --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType3Operator, + check_new_escalation_policy_path_data_attributes_rules_item_type_3_operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType3RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType3") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType3: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType3RuleType): The type of the escalation path rule + fieldable_type (str): The type of the fieldable (e.g., AlertField) + fieldable_id (str): The ID of the alert field + operator (NewEscalationPolicyPathDataAttributesRulesItemType3Operator): How the alert field value should be + matched + values (list[str] | Unset): Values to match against + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType3RuleType + fieldable_type: str + fieldable_id: str + operator: NewEscalationPolicyPathDataAttributesRulesItemType3Operator + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + fieldable_type = self.fieldable_type + + fieldable_id = self.fieldable_id + + operator: str = self.operator + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "fieldable_type": fieldable_type, + "fieldable_id": fieldable_id, + "operator": operator, + } + ) + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type(d.pop("rule_type")) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_new_escalation_policy_path_data_attributes_rules_item_type_3_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values", UNSET)) + + new_escalation_policy_path_data_attributes_rules_item_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_3.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_3 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_operator.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_operator.py new file mode 100644 index 00000000..bc9ff796 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType3Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType3Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_3_operator( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType3Operator | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py new file mode 100644 index 00000000..5e3ed532 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType3RuleType = Literal["field"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType3RuleType +] = { + "field", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType3RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py new file mode 100644 index 00000000..7af44d76 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType4RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type, +) + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType4") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType4: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + new_escalation_policy_path_data_attributes_rules_item_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_4.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py new file mode 100644 index 00000000..8220fddf --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType4RuleType = Literal["service"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType4RuleType +] = { + "service", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType4RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py new file mode 100644 index 00000000..cbb79731 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType5RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone, + check_new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType5") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType5: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType5RuleType): The type of the escalation path rule + time_zone (NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone): Time zone for the deferral window + time_blocks (list[NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem]): Time windows during which + alerts are deferred + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType5RuleType + time_zone: NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone + time_blocks: list[NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone(d.pop("time_zone")) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem.from_dict( + time_blocks_item_data + ) + + time_blocks.append(time_blocks_item) + + new_escalation_policy_path_data_attributes_rules_item_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_5.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py new file mode 100644 index 00000000..0a9a168d --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType5RuleType = Literal["deferral_window"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType5RuleType +] = { + "deferral_window", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType5RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py new file mode 100644 index 00000000..7f77f267 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py @@ -0,0 +1,162 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + all_day = d.pop("all_day", UNSET) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py new file mode 100644 index 00000000..ade83f44 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py new file mode 100644 index 00000000..f96b8c64 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType6Operator, + check_new_escalation_policy_path_data_attributes_rules_item_type_6_operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType6RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type, +) + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType6") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType6: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType6RuleType): The type of the escalation path rule + operator (NewEscalationPolicyPathDataAttributesRulesItemType6Operator): How the alert source should be matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType6RuleType + operator: NewEscalationPolicyPathDataAttributesRulesItemType6Operator + values: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "values": values, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type(d.pop("rule_type")) + + operator = check_new_escalation_policy_path_data_attributes_rules_item_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + new_escalation_policy_path_data_attributes_rules_item_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_6.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_6 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_operator.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_operator.py new file mode 100644 index 00000000..f933ec8d --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_operator.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_6_operator( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType6Operator | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py new file mode 100644 index 00000000..e845dc2e --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType6RuleType = Literal["source"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType6RuleType +] = { + "source", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType6RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py new file mode 100644 index 00000000..34200850 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType7Operator, + check_new_escalation_policy_path_data_attributes_rules_item_type_7_operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType7RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type, +) + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType7") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType7: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType7RuleType): The type of the escalation path rule + operator (NewEscalationPolicyPathDataAttributesRulesItemType7Operator): Whether the alert must (or must not) + have related incidents + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType7RuleType + operator: NewEscalationPolicyPathDataAttributesRulesItemType7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type(d.pop("rule_type")) + + operator = check_new_escalation_policy_path_data_attributes_rules_item_type_7_operator(d.pop("operator")) + + new_escalation_policy_path_data_attributes_rules_item_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_7.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_7 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_operator.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_operator.py new file mode 100644 index 00000000..57e6eef1 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType7Operator = Literal["is_not_set", "is_set"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_7_operator( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType7Operator | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py new file mode 100644 index 00000000..0b7e76b5 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType7RuleType = Literal["related_incidents"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType7RuleType +] = { + "related_incidents", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType7RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py index 750288dc..8f8492c7 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -306,8 +322,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -323,6 +341,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -334,6 +353,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -388,7 +408,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -409,6 +432,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -418,6 +442,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -524,15 +549,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -572,6 +603,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/new_form_field.py b/rootly_sdk/models/new_form_field.py index 23c1709b..b551a72f 100644 --- a/rootly_sdk/models/new_form_field.py +++ b/rootly_sdk/models/new_form_field.py @@ -24,6 +24,7 @@ class NewFormField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_field_data.py b/rootly_sdk/models/new_form_field_data.py index 62d7fcd6..ed8569e0 100644 --- a/rootly_sdk/models/new_form_field_data.py +++ b/rootly_sdk/models/new_form_field_data.py @@ -28,6 +28,7 @@ class NewFormFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_field_data_attributes_kind.py b/rootly_sdk/models/new_form_field_data_attributes_kind.py index 6d6e648d..44de3a00 100644 --- a/rootly_sdk/models/new_form_field_data_attributes_kind.py +++ b/rootly_sdk/models/new_form_field_data_attributes_kind.py @@ -25,6 +25,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", @@ -58,6 +59,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", diff --git a/rootly_sdk/models/new_form_field_option.py b/rootly_sdk/models/new_form_field_option.py index 88305549..250f489a 100644 --- a/rootly_sdk/models/new_form_field_option.py +++ b/rootly_sdk/models/new_form_field_option.py @@ -24,6 +24,7 @@ class NewFormFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_field_option_data.py b/rootly_sdk/models/new_form_field_option_data.py index 4bd5f1a1..0cfabe8d 100644 --- a/rootly_sdk/models/new_form_field_option_data.py +++ b/rootly_sdk/models/new_form_field_option_data.py @@ -28,6 +28,7 @@ class NewFormFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_field_placement.py b/rootly_sdk/models/new_form_field_placement.py index 0bcb1658..0319e261 100644 --- a/rootly_sdk/models/new_form_field_placement.py +++ b/rootly_sdk/models/new_form_field_placement.py @@ -24,6 +24,7 @@ class NewFormFieldPlacement: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_field_placement_condition.py b/rootly_sdk/models/new_form_field_placement_condition.py index bfe8014b..622bd443 100644 --- a/rootly_sdk/models/new_form_field_placement_condition.py +++ b/rootly_sdk/models/new_form_field_placement_condition.py @@ -24,6 +24,7 @@ class NewFormFieldPlacementCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_field_placement_condition_data.py b/rootly_sdk/models/new_form_field_placement_condition_data.py index 76c152f4..5e26d9a4 100644 --- a/rootly_sdk/models/new_form_field_placement_condition_data.py +++ b/rootly_sdk/models/new_form_field_placement_condition_data.py @@ -31,6 +31,7 @@ class NewFormFieldPlacementConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_field_placement_data.py b/rootly_sdk/models/new_form_field_placement_data.py index 4e2ff019..878cd08d 100644 --- a/rootly_sdk/models/new_form_field_placement_data.py +++ b/rootly_sdk/models/new_form_field_placement_data.py @@ -31,6 +31,7 @@ class NewFormFieldPlacementData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_field_position.py b/rootly_sdk/models/new_form_field_position.py index 64dfd111..23be155c 100644 --- a/rootly_sdk/models/new_form_field_position.py +++ b/rootly_sdk/models/new_form_field_position.py @@ -24,6 +24,7 @@ class NewFormFieldPosition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_field_position_data.py b/rootly_sdk/models/new_form_field_position_data.py index d470c33e..29c52e99 100644 --- a/rootly_sdk/models/new_form_field_position_data.py +++ b/rootly_sdk/models/new_form_field_position_data.py @@ -31,6 +31,7 @@ class NewFormFieldPositionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_field_position_data_attributes_form.py b/rootly_sdk/models/new_form_field_position_data_attributes_form.py index 1c6994a7..7903b4c1 100644 --- a/rootly_sdk/models/new_form_field_position_data_attributes_form.py +++ b/rootly_sdk/models/new_form_field_position_data_attributes_form.py @@ -2,6 +2,7 @@ NewFormFieldPositionDataAttributesForm = Literal[ "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -10,6 +11,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", @@ -22,6 +24,7 @@ NEW_FORM_FIELD_POSITION_DATA_ATTRIBUTES_FORM_VALUES: set[NewFormFieldPositionDataAttributesForm] = { "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -30,6 +33,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", diff --git a/rootly_sdk/models/new_form_set.py b/rootly_sdk/models/new_form_set.py index f8cc6714..e8de4c16 100644 --- a/rootly_sdk/models/new_form_set.py +++ b/rootly_sdk/models/new_form_set.py @@ -24,6 +24,7 @@ class NewFormSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_set_condition.py b/rootly_sdk/models/new_form_set_condition.py index 10ca9707..56277d51 100644 --- a/rootly_sdk/models/new_form_set_condition.py +++ b/rootly_sdk/models/new_form_set_condition.py @@ -24,6 +24,7 @@ class NewFormSetCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_set_condition_data.py b/rootly_sdk/models/new_form_set_condition_data.py index 782a46c9..7ddcc521 100644 --- a/rootly_sdk/models/new_form_set_condition_data.py +++ b/rootly_sdk/models/new_form_set_condition_data.py @@ -31,6 +31,7 @@ class NewFormSetConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_set_data.py b/rootly_sdk/models/new_form_set_data.py index 18988ea0..e6242641 100644 --- a/rootly_sdk/models/new_form_set_data.py +++ b/rootly_sdk/models/new_form_set_data.py @@ -28,6 +28,7 @@ class NewFormSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_set_data_attributes.py b/rootly_sdk/models/new_form_set_data_attributes.py index 8547badd..8d930d67 100644 --- a/rootly_sdk/models/new_form_set_data_attributes.py +++ b/rootly_sdk/models/new_form_set_data_attributes.py @@ -19,7 +19,7 @@ class NewFormSetDataAttributes: `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, - `slack_update_scheduled_incident_form` + `slack_update_scheduled_incident_form`, `google_chat_new_incident_form`, `google_chat_update_incident_form` """ name: str diff --git a/rootly_sdk/models/new_functionality.py b/rootly_sdk/models/new_functionality.py index 74f3df0d..1338aa78 100644 --- a/rootly_sdk/models/new_functionality.py +++ b/rootly_sdk/models/new_functionality.py @@ -24,6 +24,7 @@ class NewFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_functionality_data.py b/rootly_sdk/models/new_functionality_data.py index 21eb1b4a..dd92c8a4 100644 --- a/rootly_sdk/models/new_functionality_data.py +++ b/rootly_sdk/models/new_functionality_data.py @@ -28,6 +28,7 @@ class NewFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_functionality_data_attributes.py b/rootly_sdk/models/new_functionality_data_attributes.py index a3f21577..8459211c 100644 --- a/rootly_sdk/models/new_functionality_data_attributes.py +++ b/rootly_sdk/models/new_functionality_data_attributes.py @@ -49,6 +49,7 @@ class NewFunctionalityDataAttributes: service_ids (list[str] | None | Unset): Services associated with this functionality owner_group_ids (list[str] | None | Unset): Owner Teams associated with this functionality owner_user_ids (list[int] | None | Unset): Owner Users associated with this functionality + escalation_policy_id (None | str | Unset): The escalation policy id of the functionality slack_channels (list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this functionality slack_aliases (list[NewFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases @@ -76,11 +77,13 @@ class NewFunctionalityDataAttributes: service_ids: list[str] | None | Unset = UNSET owner_group_ids: list[str] | None | Unset = UNSET owner_user_ids: list[int] | None | Unset = UNSET + escalation_policy_id: None | str | Unset = UNSET slack_channels: list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset = UNSET slack_aliases: list[NewFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET properties: list[NewFunctionalityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset @@ -204,6 +207,12 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids + escalation_policy_id: None | str | Unset + if isinstance(self.escalation_policy_id, Unset): + escalation_policy_id = UNSET + else: + escalation_policy_id = self.escalation_policy_id + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET @@ -278,6 +287,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["owner_group_ids"] = owner_group_ids if owner_user_ids is not UNSET: field_dict["owner_user_ids"] = owner_user_ids + if escalation_policy_id is not UNSET: + field_dict["escalation_policy_id"] = escalation_policy_id if slack_channels is not UNSET: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: @@ -504,6 +515,15 @@ def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) + def _parse_escalation_policy_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) + def _parse_slack_channels( data: object, ) -> list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset: @@ -585,6 +605,7 @@ def _parse_slack_aliases( service_ids=service_ids, owner_group_ids=owner_group_ids, owner_user_ids=owner_user_ids, + escalation_policy_id=escalation_policy_id, slack_channels=slack_channels, slack_aliases=slack_aliases, properties=properties, diff --git a/rootly_sdk/models/new_heartbeat.py b/rootly_sdk/models/new_heartbeat.py index 295e7de4..81b7f3aa 100644 --- a/rootly_sdk/models/new_heartbeat.py +++ b/rootly_sdk/models/new_heartbeat.py @@ -24,6 +24,7 @@ class NewHeartbeat: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_heartbeat_data.py b/rootly_sdk/models/new_heartbeat_data.py index b6263e13..0cc6923b 100644 --- a/rootly_sdk/models/new_heartbeat_data.py +++ b/rootly_sdk/models/new_heartbeat_data.py @@ -28,6 +28,7 @@ class NewHeartbeatData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_heartbeat_data_attributes.py b/rootly_sdk/models/new_heartbeat_data_attributes.py index 05a9817f..d53146f8 100644 --- a/rootly_sdk/models/new_heartbeat_data_attributes.py +++ b/rootly_sdk/models/new_heartbeat_data_attributes.py @@ -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. """ @@ -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]: @@ -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] = {} @@ -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 @@ -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( @@ -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, ) diff --git a/rootly_sdk/models/new_incident.py b/rootly_sdk/models/new_incident.py index 87aa5321..04757579 100644 --- a/rootly_sdk/models/new_incident.py +++ b/rootly_sdk/models/new_incident.py @@ -24,6 +24,7 @@ class NewIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_action_item.py b/rootly_sdk/models/new_incident_action_item.py index 086ae407..849b7b39 100644 --- a/rootly_sdk/models/new_incident_action_item.py +++ b/rootly_sdk/models/new_incident_action_item.py @@ -24,6 +24,7 @@ class NewIncidentActionItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_action_item_data.py b/rootly_sdk/models/new_incident_action_item_data.py index d11d9f3c..7e266944 100644 --- a/rootly_sdk/models/new_incident_action_item_data.py +++ b/rootly_sdk/models/new_incident_action_item_data.py @@ -31,6 +31,7 @@ class NewIncidentActionItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_action_item_data_attributes.py b/rootly_sdk/models/new_incident_action_item_data_attributes.py index 45137063..784b3739 100644 --- a/rootly_sdk/models/new_incident_action_item_data_attributes.py +++ b/rootly_sdk/models/new_incident_action_item_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -19,6 +19,12 @@ ) from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + + T = TypeVar("T", bound="NewIncidentActionItemDataAttributes") @@ -37,6 +43,9 @@ class NewIncidentActionItemDataAttributes: jira_issue_id (None | str | Unset): The Jira issue ID. jira_issue_key (None | str | Unset): The Jira issue key. jira_issue_url (None | str | Unset): The Jira issue URL. + form_field_selections (list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset): + Custom field values to set on the action item. Ignored unless custom fields for action items are enabled for the + organization. """ summary: str @@ -50,8 +59,10 @@ class NewIncidentActionItemDataAttributes: jira_issue_id: None | str | Unset = UNSET jira_issue_key: None | str | Unset = UNSET jira_issue_url: None | str | Unset = UNSET + form_field_selections: list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: + summary = self.summary description: None | str | Unset @@ -106,6 +117,18 @@ def to_dict(self) -> dict[str, Any]: else: jira_issue_url = self.jira_issue_url + form_field_selections: list[dict[str, Any]] | None | Unset + if isinstance(self.form_field_selections, Unset): + form_field_selections = UNSET + elif isinstance(self.form_field_selections, list): + form_field_selections = [] + for form_field_selections_type_0_item_data in self.form_field_selections: + form_field_selections_type_0_item = form_field_selections_type_0_item_data.to_dict() + form_field_selections.append(form_field_selections_type_0_item) + + else: + form_field_selections = self.form_field_selections + field_dict: dict[str, Any] = {} field_dict.update( @@ -133,11 +156,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["jira_issue_key"] = jira_issue_key if jira_issue_url is not UNSET: field_dict["jira_issue_url"] = jira_issue_url + if form_field_selections is not UNSET: + field_dict["form_field_selections"] = form_field_selections return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + d = dict(src_dict) summary = d.pop("summary") @@ -218,6 +247,34 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) + def _parse_form_field_selections( + data: object, + ) -> list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + form_field_selections_type_0 = [] + _form_field_selections_type_0 = data + for form_field_selections_type_0_item_data in _form_field_selections_type_0: + form_field_selections_type_0_item = ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item.from_dict( + form_field_selections_type_0_item_data + ) + ) + + form_field_selections_type_0.append(form_field_selections_type_0_item) + + return form_field_selections_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset, data) + + form_field_selections = _parse_form_field_selections(d.pop("form_field_selections", UNSET)) + new_incident_action_item_data_attributes = cls( summary=summary, description=description, @@ -230,6 +287,7 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_id=jira_issue_id, jira_issue_key=jira_issue_key, jira_issue_url=jira_issue_url, + form_field_selections=form_field_selections, ) return new_incident_action_item_data_attributes diff --git a/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py b/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py new file mode 100644 index 00000000..f8730f92 --- /dev/null +++ b/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py @@ -0,0 +1,204 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item") + + +@_attrs_define +class NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item: + """ + Attributes: + form_field_id (str): ID of the custom field + id (str | Unset): ID of an existing selection. Required when updating or removing a field's existing value. + value (list[str] | None | str | Unset): Value for text, textarea, rich text, date, datetime, number, checkbox, + or tag fields + selected_option_ids (list[str] | Unset): IDs of the selected custom field options + selected_user_ids (list[int] | Unset): IDs of the selected users + selected_group_ids (list[str] | Unset): IDs of the selected teams + selected_service_ids (list[str] | Unset): IDs of the selected services + selected_functionality_ids (list[str] | Unset): IDs of the selected functionalities + selected_catalog_entity_ids (list[str] | Unset): IDs of the selected catalog entities + selected_environment_ids (list[str] | Unset): IDs of the selected environments + selected_cause_ids (list[str] | Unset): IDs of the selected causes + selected_incident_type_ids (list[str] | Unset): IDs of the selected incident types + field_destroy (bool | None | Unset): Set to true to remove the field's value from the action item + """ + + form_field_id: str + id: str | Unset = UNSET + value: list[str] | None | str | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET + field_destroy: bool | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + form_field_id = self.form_field_id + + id = self.id + + value: list[str] | None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + elif isinstance(self.value, list): + value = self.value + + else: + value = self.value + + selected_option_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_option_ids, Unset): + selected_option_ids = self.selected_option_ids + + selected_user_ids: list[int] | Unset = UNSET + if not isinstance(self.selected_user_ids, Unset): + selected_user_ids = self.selected_user_ids + + selected_group_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_group_ids, Unset): + selected_group_ids = self.selected_group_ids + + selected_service_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_service_ids, Unset): + selected_service_ids = self.selected_service_ids + + selected_functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + selected_catalog_entity_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_catalog_entity_ids, Unset): + selected_catalog_entity_ids = self.selected_catalog_entity_ids + + selected_environment_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + selected_cause_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_cause_ids, Unset): + selected_cause_ids = self.selected_cause_ids + + selected_incident_type_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_incident_type_ids, Unset): + selected_incident_type_ids = self.selected_incident_type_ids + + field_destroy: bool | None | Unset + if isinstance(self.field_destroy, Unset): + field_destroy = UNSET + else: + field_destroy = self.field_destroy + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "form_field_id": form_field_id, + } + ) + if id is not UNSET: + field_dict["id"] = id + if value is not UNSET: + field_dict["value"] = value + if selected_option_ids is not UNSET: + field_dict["selected_option_ids"] = selected_option_ids + if selected_user_ids is not UNSET: + field_dict["selected_user_ids"] = selected_user_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_catalog_entity_ids is not UNSET: + field_dict["selected_catalog_entity_ids"] = selected_catalog_entity_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + if field_destroy is not UNSET: + field_dict["_destroy"] = field_destroy + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + form_field_id = d.pop("form_field_id") + + id = d.pop("id", UNSET) + + def _parse_value(data: object) -> list[str] | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + value_type_1 = cast(list[str], data) + + return value_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids", UNSET)) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + def _parse_field_destroy(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + field_destroy = _parse_field_destroy(d.pop("_destroy", UNSET)) + + new_incident_action_item_data_attributes_form_field_selections_type_0_item = cls( + form_field_id=form_field_id, + id=id, + value=value, + selected_option_ids=selected_option_ids, + selected_user_ids=selected_user_ids, + selected_group_ids=selected_group_ids, + selected_service_ids=selected_service_ids, + selected_functionality_ids=selected_functionality_ids, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_environment_ids=selected_environment_ids, + selected_cause_ids=selected_cause_ids, + selected_incident_type_ids=selected_incident_type_ids, + field_destroy=field_destroy, + ) + + return new_incident_action_item_data_attributes_form_field_selections_type_0_item diff --git a/rootly_sdk/models/new_incident_custom_field_selection.py b/rootly_sdk/models/new_incident_custom_field_selection.py index aaac33e2..2b9c1ab1 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection.py +++ b/rootly_sdk/models/new_incident_custom_field_selection.py @@ -24,6 +24,7 @@ class NewIncidentCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_custom_field_selection_data.py b/rootly_sdk/models/new_incident_custom_field_selection_data.py index 326ecdd6..d5151e61 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection_data.py +++ b/rootly_sdk/models/new_incident_custom_field_selection_data.py @@ -33,6 +33,7 @@ class NewIncidentCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_data.py b/rootly_sdk/models/new_incident_data.py index dbe22c6f..34e87501 100644 --- a/rootly_sdk/models/new_incident_data.py +++ b/rootly_sdk/models/new_incident_data.py @@ -28,6 +28,7 @@ class NewIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_event.py b/rootly_sdk/models/new_incident_event.py index 823c24c2..423b6167 100644 --- a/rootly_sdk/models/new_incident_event.py +++ b/rootly_sdk/models/new_incident_event.py @@ -24,6 +24,7 @@ class NewIncidentEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_event_data.py b/rootly_sdk/models/new_incident_event_data.py index 5b1ad4c1..3c9d261d 100644 --- a/rootly_sdk/models/new_incident_event_data.py +++ b/rootly_sdk/models/new_incident_event_data.py @@ -28,6 +28,7 @@ class NewIncidentEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_event_functionality.py b/rootly_sdk/models/new_incident_event_functionality.py index 9fb2df7e..6d66318c 100644 --- a/rootly_sdk/models/new_incident_event_functionality.py +++ b/rootly_sdk/models/new_incident_event_functionality.py @@ -24,6 +24,7 @@ class NewIncidentEventFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_event_functionality_data.py b/rootly_sdk/models/new_incident_event_functionality_data.py index 61b6fde9..3f7e2f4d 100644 --- a/rootly_sdk/models/new_incident_event_functionality_data.py +++ b/rootly_sdk/models/new_incident_event_functionality_data.py @@ -31,6 +31,7 @@ class NewIncidentEventFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_event_service.py b/rootly_sdk/models/new_incident_event_service.py index 098597f3..95f67979 100644 --- a/rootly_sdk/models/new_incident_event_service.py +++ b/rootly_sdk/models/new_incident_event_service.py @@ -24,6 +24,7 @@ class NewIncidentEventService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_event_service_data.py b/rootly_sdk/models/new_incident_event_service_data.py index 786ba6db..72500c26 100644 --- a/rootly_sdk/models/new_incident_event_service_data.py +++ b/rootly_sdk/models/new_incident_event_service_data.py @@ -31,6 +31,7 @@ class NewIncidentEventServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_feedback.py b/rootly_sdk/models/new_incident_feedback.py index 1f6d9c6c..d1a89314 100644 --- a/rootly_sdk/models/new_incident_feedback.py +++ b/rootly_sdk/models/new_incident_feedback.py @@ -24,6 +24,7 @@ class NewIncidentFeedback: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_feedback_data.py b/rootly_sdk/models/new_incident_feedback_data.py index 67126f31..dbc9e5fe 100644 --- a/rootly_sdk/models/new_incident_feedback_data.py +++ b/rootly_sdk/models/new_incident_feedback_data.py @@ -28,6 +28,7 @@ class NewIncidentFeedbackData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_form_field_selection.py b/rootly_sdk/models/new_incident_form_field_selection.py index fd48d34f..6510663e 100644 --- a/rootly_sdk/models/new_incident_form_field_selection.py +++ b/rootly_sdk/models/new_incident_form_field_selection.py @@ -24,6 +24,7 @@ class NewIncidentFormFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_form_field_selection_data.py b/rootly_sdk/models/new_incident_form_field_selection_data.py index 327f7a4a..afba8396 100644 --- a/rootly_sdk/models/new_incident_form_field_selection_data.py +++ b/rootly_sdk/models/new_incident_form_field_selection_data.py @@ -31,6 +31,7 @@ class NewIncidentFormFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_permission_set.py b/rootly_sdk/models/new_incident_permission_set.py index 202c8a3c..ea88d5ab 100644 --- a/rootly_sdk/models/new_incident_permission_set.py +++ b/rootly_sdk/models/new_incident_permission_set.py @@ -24,6 +24,7 @@ class NewIncidentPermissionSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_permission_set_boolean.py b/rootly_sdk/models/new_incident_permission_set_boolean.py index e8f90d1a..7fabf216 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean.py @@ -24,6 +24,7 @@ class NewIncidentPermissionSetBoolean: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_permission_set_boolean_data.py b/rootly_sdk/models/new_incident_permission_set_boolean_data.py index 03268ed5..f522dff8 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean_data.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean_data.py @@ -33,6 +33,7 @@ class NewIncidentPermissionSetBooleanData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes.py b/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes.py index 1410bb1e..6b11f358 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes.py @@ -38,6 +38,7 @@ class NewIncidentPermissionSetBooleanDataAttributes: severity_params: NewIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + incident_permission_set_id = self.incident_permission_set_id kind: str = self.kind diff --git a/rootly_sdk/models/new_incident_permission_set_data.py b/rootly_sdk/models/new_incident_permission_set_data.py index bf0aa2b4..fb6362a2 100644 --- a/rootly_sdk/models/new_incident_permission_set_data.py +++ b/rootly_sdk/models/new_incident_permission_set_data.py @@ -31,6 +31,7 @@ class NewIncidentPermissionSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_permission_set_resource.py b/rootly_sdk/models/new_incident_permission_set_resource.py index f41a674e..409075ea 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource.py +++ b/rootly_sdk/models/new_incident_permission_set_resource.py @@ -24,6 +24,7 @@ class NewIncidentPermissionSetResource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_permission_set_resource_data.py b/rootly_sdk/models/new_incident_permission_set_resource_data.py index 0e9e9b04..6e0dc6ca 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource_data.py +++ b/rootly_sdk/models/new_incident_permission_set_resource_data.py @@ -33,6 +33,7 @@ class NewIncidentPermissionSetResourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_permission_set_resource_data_attributes.py b/rootly_sdk/models/new_incident_permission_set_resource_data_attributes.py index 579e08c2..4ed0a0bf 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource_data_attributes.py +++ b/rootly_sdk/models/new_incident_permission_set_resource_data_attributes.py @@ -40,6 +40,7 @@ class NewIncidentPermissionSetResourceDataAttributes: severity_params: NewIncidentPermissionSetResourceDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + incident_permission_set_id = self.incident_permission_set_id kind: str = self.kind diff --git a/rootly_sdk/models/new_incident_role.py b/rootly_sdk/models/new_incident_role.py index b7ba608f..0904e87b 100644 --- a/rootly_sdk/models/new_incident_role.py +++ b/rootly_sdk/models/new_incident_role.py @@ -24,6 +24,7 @@ class NewIncidentRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_role_data.py b/rootly_sdk/models/new_incident_role_data.py index 2a142da6..1611d57e 100644 --- a/rootly_sdk/models/new_incident_role_data.py +++ b/rootly_sdk/models/new_incident_role_data.py @@ -28,6 +28,7 @@ class NewIncidentRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_role_task.py b/rootly_sdk/models/new_incident_role_task.py index 2513fa9a..b5513090 100644 --- a/rootly_sdk/models/new_incident_role_task.py +++ b/rootly_sdk/models/new_incident_role_task.py @@ -24,6 +24,7 @@ class NewIncidentRoleTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_role_task_data.py b/rootly_sdk/models/new_incident_role_task_data.py index 53735fc8..35bda731 100644 --- a/rootly_sdk/models/new_incident_role_task_data.py +++ b/rootly_sdk/models/new_incident_role_task_data.py @@ -31,6 +31,7 @@ class NewIncidentRoleTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_status_page_event.py b/rootly_sdk/models/new_incident_status_page_event.py index bfb8fbe5..87aec609 100644 --- a/rootly_sdk/models/new_incident_status_page_event.py +++ b/rootly_sdk/models/new_incident_status_page_event.py @@ -24,6 +24,7 @@ class NewIncidentStatusPageEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_status_page_event_data.py b/rootly_sdk/models/new_incident_status_page_event_data.py index 8724c5b4..14e5a75a 100644 --- a/rootly_sdk/models/new_incident_status_page_event_data.py +++ b/rootly_sdk/models/new_incident_status_page_event_data.py @@ -31,6 +31,7 @@ class NewIncidentStatusPageEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_status_page_event_data_attributes.py b/rootly_sdk/models/new_incident_status_page_event_data_attributes.py index 1d5a7003..528e5f80 100644 --- a/rootly_sdk/models/new_incident_status_page_event_data_attributes.py +++ b/rootly_sdk/models/new_incident_status_page_event_data_attributes.py @@ -1,9 +1,11 @@ from __future__ import annotations +import datetime from collections.abc import Mapping from typing import Any, TypeVar, cast from attrs import define as _attrs_define +from dateutil.parser import isoparse from ..models.new_incident_status_page_event_data_attributes_status import ( NewIncidentStatusPageEventDataAttributesStatus, @@ -24,6 +26,7 @@ class NewIncidentStatusPageEventDataAttributes: notify_subscribers (bool | None | Unset): Notify all status pages subscribers Default: False. should_tweet (bool | None | Unset): For Statuspage.io integrated pages auto publishes a tweet for your update Default: False. + started_at (datetime.datetime | None | Unset): When the event started. Defaults to the time of creation. """ event: str @@ -31,6 +34,7 @@ class NewIncidentStatusPageEventDataAttributes: status: NewIncidentStatusPageEventDataAttributesStatus | Unset = UNSET notify_subscribers: bool | None | Unset = False should_tweet: bool | None | Unset = False + started_at: datetime.datetime | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: event = self.event @@ -53,6 +57,14 @@ def to_dict(self) -> dict[str, Any]: else: should_tweet = self.should_tweet + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): + started_at = self.started_at.isoformat() + else: + started_at = self.started_at + field_dict: dict[str, Any] = {} field_dict.update( @@ -68,6 +80,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["notify_subscribers"] = notify_subscribers if should_tweet is not UNSET: field_dict["should_tweet"] = should_tweet + if started_at is not UNSET: + field_dict["started_at"] = started_at return field_dict @@ -103,12 +117,30 @@ def _parse_should_tweet(data: object) -> bool | None | Unset: should_tweet = _parse_should_tweet(d.pop("should_tweet", UNSET)) + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + new_incident_status_page_event_data_attributes = cls( event=event, status_page_id=status_page_id, status=status, notify_subscribers=notify_subscribers, should_tweet=should_tweet, + started_at=started_at, ) return new_incident_status_page_event_data_attributes diff --git a/rootly_sdk/models/new_incident_sub_status.py b/rootly_sdk/models/new_incident_sub_status.py index 8f448073..6514f78e 100644 --- a/rootly_sdk/models/new_incident_sub_status.py +++ b/rootly_sdk/models/new_incident_sub_status.py @@ -24,6 +24,7 @@ class NewIncidentSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_sub_status_data.py b/rootly_sdk/models/new_incident_sub_status_data.py index 2fe9ea36..6124b0a8 100644 --- a/rootly_sdk/models/new_incident_sub_status_data.py +++ b/rootly_sdk/models/new_incident_sub_status_data.py @@ -31,6 +31,7 @@ class NewIncidentSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_type.py b/rootly_sdk/models/new_incident_type.py index 0a7d41a3..e92d9824 100644 --- a/rootly_sdk/models/new_incident_type.py +++ b/rootly_sdk/models/new_incident_type.py @@ -24,6 +24,7 @@ class NewIncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_type_data.py b/rootly_sdk/models/new_incident_type_data.py index ca57d013..9409b7a5 100644 --- a/rootly_sdk/models/new_incident_type_data.py +++ b/rootly_sdk/models/new_incident_type_data.py @@ -28,6 +28,7 @@ class NewIncidentTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_type_data_attributes.py b/rootly_sdk/models/new_incident_type_data_attributes.py index 4d12991d..3c96c37c 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes.py +++ b/rootly_sdk/models/new_incident_type_data_attributes.py @@ -47,6 +47,7 @@ class NewIncidentTypeDataAttributes: properties: list[NewIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/new_live_call_router.py b/rootly_sdk/models/new_live_call_router.py index c1c0d252..bafd6e61 100644 --- a/rootly_sdk/models/new_live_call_router.py +++ b/rootly_sdk/models/new_live_call_router.py @@ -24,6 +24,7 @@ class NewLiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_live_call_router_data.py b/rootly_sdk/models/new_live_call_router_data.py index 594947f7..26152d3d 100644 --- a/rootly_sdk/models/new_live_call_router_data.py +++ b/rootly_sdk/models/new_live_call_router_data.py @@ -28,6 +28,7 @@ class NewLiveCallRouterData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_live_call_router_data_attributes.py b/rootly_sdk/models/new_live_call_router_data_attributes.py index e1bc4571..ffd5bcf2 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -51,6 +51,8 @@ class NewLiveCallRouterDataAttributes: from when this live call router is configured as a phone tree. enabled (bool | Unset): Whether the live_call_router is enabled caller_greeting (str | Unset): The caller greeting message of the live_call_router + unavailable_responder_message (None | str | Unset): The message played to the caller when a responder doesn't + answer and the call moves on to the next person in the escalation. Leave blank to use the default message. waiting_music_url (NewLiveCallRouterDataAttributesWaitingMusicUrl | Unset): The waiting music URL of the live_call_router sent_to_voicemail_delay (int | Unset): The delay (seconds) after which the caller in redirected to voicemail @@ -58,6 +60,11 @@ class NewLiveCallRouterDataAttributes: live escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels + notify_via_sms (bool | Unset): Whether responders are also notified via SMS when this router pages them + notify_via_push_notification (bool | Unset): Whether responders are also notified via push notification when + this router pages them + informational_notification_message (None | str | Unset): Optional message included in the SMS/push notification. + Supports variables such as {{ alert.url }}, {{ alert.data.* }}, and {{ alert.alert_urgency.name }}. alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page calling_tree_enabled (bool | Unset): Whether the live call router is configured as a phone tree, requiring callers to press a key before being connected @@ -75,17 +82,22 @@ class NewLiveCallRouterDataAttributes: paging_targets: list[NewLiveCallRouterDataAttributesPagingTargetsItem] enabled: bool | Unset = UNSET caller_greeting: str | Unset = UNSET + unavailable_responder_message: None | str | Unset = UNSET waiting_music_url: NewLiveCallRouterDataAttributesWaitingMusicUrl | Unset = UNSET sent_to_voicemail_delay: int | Unset = UNSET should_redirect_to_voicemail_on_no_answer: bool | Unset = UNSET escalation_level_delay_in_seconds: int | Unset = UNSET should_auto_resolve_alert_on_call_end: bool | Unset = UNSET + notify_via_sms: bool | Unset = UNSET + notify_via_push_notification: bool | Unset = UNSET + informational_notification_message: None | str | Unset = UNSET alert_urgency_id: str | Unset = UNSET calling_tree_enabled: bool | Unset = UNSET calling_tree_prompt: str | Unset = UNSET escalation_policy_trigger_params: NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + kind: str = self.kind name = self.name @@ -107,6 +119,12 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting + unavailable_responder_message: None | str | Unset + if isinstance(self.unavailable_responder_message, Unset): + unavailable_responder_message = UNSET + else: + unavailable_responder_message = self.unavailable_responder_message + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -119,6 +137,16 @@ def to_dict(self) -> dict[str, Any]: should_auto_resolve_alert_on_call_end = self.should_auto_resolve_alert_on_call_end + notify_via_sms = self.notify_via_sms + + notify_via_push_notification = self.notify_via_push_notification + + informational_notification_message: None | str | Unset + if isinstance(self.informational_notification_message, Unset): + informational_notification_message = UNSET + else: + informational_notification_message = self.informational_notification_message + alert_urgency_id = self.alert_urgency_id calling_tree_enabled = self.calling_tree_enabled @@ -146,6 +174,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["enabled"] = enabled if caller_greeting is not UNSET: field_dict["caller_greeting"] = caller_greeting + if unavailable_responder_message is not UNSET: + field_dict["unavailable_responder_message"] = unavailable_responder_message if waiting_music_url is not UNSET: field_dict["waiting_music_url"] = waiting_music_url if sent_to_voicemail_delay is not UNSET: @@ -156,6 +186,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["escalation_level_delay_in_seconds"] = escalation_level_delay_in_seconds if should_auto_resolve_alert_on_call_end is not UNSET: field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end + if notify_via_sms is not UNSET: + field_dict["notify_via_sms"] = notify_via_sms + if notify_via_push_notification is not UNSET: + field_dict["notify_via_push_notification"] = notify_via_push_notification + if informational_notification_message is not UNSET: + field_dict["informational_notification_message"] = informational_notification_message if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id if calling_tree_enabled is not UNSET: @@ -200,6 +236,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) + def _parse_unavailable_responder_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + unavailable_responder_message = _parse_unavailable_responder_message( + d.pop("unavailable_responder_message", UNSET) + ) + _waiting_music_url = d.pop("waiting_music_url", UNSET) waiting_music_url: NewLiveCallRouterDataAttributesWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): @@ -215,6 +262,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: should_auto_resolve_alert_on_call_end = d.pop("should_auto_resolve_alert_on_call_end", UNSET) + notify_via_sms = d.pop("notify_via_sms", UNSET) + + notify_via_push_notification = d.pop("notify_via_push_notification", UNSET) + + def _parse_informational_notification_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + informational_notification_message = _parse_informational_notification_message( + d.pop("informational_notification_message", UNSET) + ) + alert_urgency_id = d.pop("alert_urgency_id", UNSET) calling_tree_enabled = d.pop("calling_tree_enabled", UNSET) @@ -240,11 +302,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: paging_targets=paging_targets, enabled=enabled, caller_greeting=caller_greeting, + unavailable_responder_message=unavailable_responder_message, waiting_music_url=waiting_music_url, sent_to_voicemail_delay=sent_to_voicemail_delay, should_redirect_to_voicemail_on_no_answer=should_redirect_to_voicemail_on_no_answer, escalation_level_delay_in_seconds=escalation_level_delay_in_seconds, should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end, + notify_via_sms=notify_via_sms, + notify_via_push_notification=notify_via_push_notification, + informational_notification_message=informational_notification_message, alert_urgency_id=alert_urgency_id, calling_tree_enabled=calling_tree_enabled, calling_tree_prompt=calling_tree_prompt, diff --git a/rootly_sdk/models/new_live_call_router_data_attributes_country_code.py b/rootly_sdk/models/new_live_call_router_data_attributes_country_code.py index e60e3f08..c4917ffb 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes_country_code.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes_country_code.py @@ -1,10 +1,11 @@ from typing import Literal, cast -NewLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] +NewLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "CH", "DE", "GB", "NL", "NZ", "SE", "US"] NEW_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_COUNTRY_CODE_VALUES: set[NewLiveCallRouterDataAttributesCountryCode] = { "AU", "CA", + "CH", "DE", "GB", "NL", diff --git a/rootly_sdk/models/new_on_call_pay_report.py b/rootly_sdk/models/new_on_call_pay_report.py index 7e2724df..dedd08a5 100644 --- a/rootly_sdk/models/new_on_call_pay_report.py +++ b/rootly_sdk/models/new_on_call_pay_report.py @@ -24,6 +24,7 @@ class NewOnCallPayReport: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_on_call_pay_report_data.py b/rootly_sdk/models/new_on_call_pay_report_data.py index 3c6e1181..a50b78a5 100644 --- a/rootly_sdk/models/new_on_call_pay_report_data.py +++ b/rootly_sdk/models/new_on_call_pay_report_data.py @@ -28,6 +28,7 @@ class NewOnCallPayReportData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_on_call_pay_report_data_attributes.py b/rootly_sdk/models/new_on_call_pay_report_data_attributes.py index 0f1861c1..ee306056 100644 --- a/rootly_sdk/models/new_on_call_pay_report_data_attributes.py +++ b/rootly_sdk/models/new_on_call_pay_report_data_attributes.py @@ -19,11 +19,17 @@ class NewOnCallPayReportDataAttributes: start_date (datetime.date): The start date for the report period. end_date (datetime.date): The end date for the report period. schedule_ids (list[str] | Unset): List of schedule UUIDs to scope the report. + time_zone (str | Unset): IANA timezone used to compute day and weekend boundaries. Defaults to the team's + timezone. + use_responders_time_zone (bool | Unset): When true, day and weekend boundaries are computed in each responder's + personal timezone instead of the report-wide timezone. """ start_date: datetime.date end_date: datetime.date schedule_ids: list[str] | Unset = UNSET + time_zone: str | Unset = UNSET + use_responders_time_zone: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: start_date = self.start_date.isoformat() @@ -34,6 +40,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.schedule_ids, Unset): schedule_ids = self.schedule_ids + time_zone = self.time_zone + + use_responders_time_zone = self.use_responders_time_zone + field_dict: dict[str, Any] = {} field_dict.update( @@ -44,6 +54,10 @@ def to_dict(self) -> dict[str, Any]: ) if schedule_ids is not UNSET: field_dict["schedule_ids"] = schedule_ids + if time_zone is not UNSET: + field_dict["time_zone"] = time_zone + if use_responders_time_zone is not UNSET: + field_dict["use_responders_time_zone"] = use_responders_time_zone return field_dict @@ -56,10 +70,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_ids = cast(list[str], d.pop("schedule_ids", UNSET)) + time_zone = d.pop("time_zone", UNSET) + + use_responders_time_zone = d.pop("use_responders_time_zone", UNSET) + new_on_call_pay_report_data_attributes = cls( start_date=start_date, end_date=end_date, schedule_ids=schedule_ids, + time_zone=time_zone, + use_responders_time_zone=use_responders_time_zone, ) return new_on_call_pay_report_data_attributes diff --git a/rootly_sdk/models/new_on_call_role.py b/rootly_sdk/models/new_on_call_role.py index 5d5272ff..da10105a 100644 --- a/rootly_sdk/models/new_on_call_role.py +++ b/rootly_sdk/models/new_on_call_role.py @@ -24,6 +24,7 @@ class NewOnCallRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_on_call_role_data.py b/rootly_sdk/models/new_on_call_role_data.py index 2dc68062..e48c91f9 100644 --- a/rootly_sdk/models/new_on_call_role_data.py +++ b/rootly_sdk/models/new_on_call_role_data.py @@ -28,6 +28,7 @@ class NewOnCallRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_on_call_role_data_attributes.py b/rootly_sdk/models/new_on_call_role_data_attributes.py index fb8da60a..6b1abb86 100644 --- a/rootly_sdk/models/new_on_call_role_data_attributes.py +++ b/rootly_sdk/models/new_on_call_role_data_attributes.py @@ -37,6 +37,10 @@ NewOnCallRoleDataAttributesAuditsPermissionsItem, check_new_on_call_role_data_attributes_audits_permissions_item, ) +from ..models.new_on_call_role_data_attributes_catalogs_permissions_item import ( + NewOnCallRoleDataAttributesCatalogsPermissionsItem, + check_new_on_call_role_data_attributes_catalogs_permissions_item, +) from ..models.new_on_call_role_data_attributes_contacts_permissions_item import ( NewOnCallRoleDataAttributesContactsPermissionsItem, check_new_on_call_role_data_attributes_contacts_permissions_item, @@ -45,6 +49,10 @@ NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, check_new_on_call_role_data_attributes_escalation_policies_permissions_item, ) +from ..models.new_on_call_role_data_attributes_functionalities_permissions_item import ( + NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem, + check_new_on_call_role_data_attributes_functionalities_permissions_item, +) from ..models.new_on_call_role_data_attributes_groups_permissions_item import ( NewOnCallRoleDataAttributesGroupsPermissionsItem, check_new_on_call_role_data_attributes_groups_permissions_item, @@ -125,8 +133,10 @@ class NewOnCallRoleDataAttributes: schedule_override_permissions (list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset): schedules_permissions (list[NewOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset): services_permissions (list[NewOnCallRoleDataAttributesServicesPermissionsItem] | Unset): + functionalities_permissions (list[NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset): webhooks_permissions (list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset): workflows_permissions (list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[NewOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset): """ name: str @@ -153,8 +163,10 @@ class NewOnCallRoleDataAttributes: schedule_override_permissions: list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset = UNSET schedules_permissions: list[NewOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset = UNSET services_permissions: list[NewOnCallRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + functionalities_permissions: list[NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET webhooks_permissions: list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET workflows_permissions: list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[NewOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -301,6 +313,13 @@ def to_dict(self) -> dict[str, Any]: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) + functionalities_permissions: list[str] | Unset = UNSET + if not isinstance(self.functionalities_permissions, Unset): + functionalities_permissions = [] + for functionalities_permissions_item_data in self.functionalities_permissions: + functionalities_permissions_item: str = functionalities_permissions_item_data + functionalities_permissions.append(functionalities_permissions_item) + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] @@ -315,6 +334,13 @@ def to_dict(self) -> dict[str, Any]: workflows_permissions_item: str = workflows_permissions_item_data workflows_permissions.append(workflows_permissions_item) + catalogs_permissions: list[str] | Unset = UNSET + if not isinstance(self.catalogs_permissions, Unset): + catalogs_permissions = [] + for catalogs_permissions_item_data in self.catalogs_permissions: + catalogs_permissions_item: str = catalogs_permissions_item_data + catalogs_permissions.append(catalogs_permissions_item) + field_dict: dict[str, Any] = {} field_dict.update( @@ -364,10 +390,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["schedules_permissions"] = schedules_permissions if services_permissions is not UNSET: field_dict["services_permissions"] = services_permissions + if functionalities_permissions is not UNSET: + field_dict["functionalities_permissions"] = functionalities_permissions if webhooks_permissions is not UNSET: field_dict["webhooks_permissions"] = webhooks_permissions if workflows_permissions is not UNSET: field_dict["workflows_permissions"] = workflows_permissions + if catalogs_permissions is not UNSET: + field_dict["catalogs_permissions"] = catalogs_permissions return field_dict @@ -614,6 +644,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: services_permissions.append(services_permissions_item) + _functionalities_permissions = d.pop("functionalities_permissions", UNSET) + functionalities_permissions: list[NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = ( + check_new_on_call_role_data_attributes_functionalities_permissions_item( + functionalities_permissions_item_data + ) + ) + + functionalities_permissions.append(functionalities_permissions_item) + _webhooks_permissions = d.pop("webhooks_permissions", UNSET) webhooks_permissions: list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET if _webhooks_permissions is not UNSET: @@ -636,6 +679,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: workflows_permissions.append(workflows_permissions_item) + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[NewOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_new_on_call_role_data_attributes_catalogs_permissions_item( + catalogs_permissions_item_data + ) + + catalogs_permissions.append(catalogs_permissions_item) + new_on_call_role_data_attributes = cls( name=name, system_role=system_role, @@ -659,8 +713,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_override_permissions=schedule_override_permissions, schedules_permissions=schedules_permissions, services_permissions=services_permissions, + functionalities_permissions=functionalities_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, ) return new_on_call_role_data_attributes diff --git a/rootly_sdk/models/new_on_call_role_data_attributes_catalogs_permissions_item.py b/rootly_sdk/models/new_on_call_role_data_attributes_catalogs_permissions_item.py new file mode 100644 index 00000000..67995029 --- /dev/null +++ b/rootly_sdk/models/new_on_call_role_data_attributes_catalogs_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewOnCallRoleDataAttributesCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: set[ + NewOnCallRoleDataAttributesCatalogsPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_on_call_role_data_attributes_catalogs_permissions_item( + value: str | None, +) -> NewOnCallRoleDataAttributesCatalogsPermissionsItem | None: + if value is None: + return None + if value in NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(NewOnCallRoleDataAttributesCatalogsPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_on_call_role_data_attributes_functionalities_permissions_item.py b/rootly_sdk/models/new_on_call_role_data_attributes_functionalities_permissions_item.py new file mode 100644 index 00000000..8782bccc --- /dev/null +++ b/rootly_sdk/models/new_on_call_role_data_attributes_functionalities_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: set[ + NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_on_call_role_data_attributes_functionalities_permissions_item( + value: str | None, +) -> NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem | None: + if value is None: + return None + if value in NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: + return cast(NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_on_call_shadow.py b/rootly_sdk/models/new_on_call_shadow.py index 7eecd798..a4930c3e 100644 --- a/rootly_sdk/models/new_on_call_shadow.py +++ b/rootly_sdk/models/new_on_call_shadow.py @@ -24,6 +24,7 @@ class NewOnCallShadow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_on_call_shadow_data.py b/rootly_sdk/models/new_on_call_shadow_data.py index c649641d..52139f94 100644 --- a/rootly_sdk/models/new_on_call_shadow_data.py +++ b/rootly_sdk/models/new_on_call_shadow_data.py @@ -28,6 +28,7 @@ class NewOnCallShadowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_override_shift.py b/rootly_sdk/models/new_override_shift.py index a0bda87a..b2a8ebc8 100644 --- a/rootly_sdk/models/new_override_shift.py +++ b/rootly_sdk/models/new_override_shift.py @@ -24,6 +24,7 @@ class NewOverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_override_shift_data.py b/rootly_sdk/models/new_override_shift_data.py index 2be8633b..8164aa47 100644 --- a/rootly_sdk/models/new_override_shift_data.py +++ b/rootly_sdk/models/new_override_shift_data.py @@ -28,6 +28,7 @@ class NewOverrideShiftData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_playbook.py b/rootly_sdk/models/new_playbook.py index dac6a6d8..2877e31f 100644 --- a/rootly_sdk/models/new_playbook.py +++ b/rootly_sdk/models/new_playbook.py @@ -24,6 +24,7 @@ class NewPlaybook: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_playbook_data.py b/rootly_sdk/models/new_playbook_data.py index 7c263a52..85e7114a 100644 --- a/rootly_sdk/models/new_playbook_data.py +++ b/rootly_sdk/models/new_playbook_data.py @@ -28,6 +28,7 @@ class NewPlaybookData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_playbook_task.py b/rootly_sdk/models/new_playbook_task.py index 47a722bb..2358ad45 100644 --- a/rootly_sdk/models/new_playbook_task.py +++ b/rootly_sdk/models/new_playbook_task.py @@ -24,6 +24,7 @@ class NewPlaybookTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_playbook_task_data.py b/rootly_sdk/models/new_playbook_task_data.py index 7537c231..68af70e6 100644 --- a/rootly_sdk/models/new_playbook_task_data.py +++ b/rootly_sdk/models/new_playbook_task_data.py @@ -28,6 +28,7 @@ class NewPlaybookTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_post_mortem_template.py b/rootly_sdk/models/new_post_mortem_template.py index a5337ac9..9e51b0d5 100644 --- a/rootly_sdk/models/new_post_mortem_template.py +++ b/rootly_sdk/models/new_post_mortem_template.py @@ -24,6 +24,7 @@ class NewPostMortemTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_post_mortem_template_data.py b/rootly_sdk/models/new_post_mortem_template_data.py index e18d907e..96041417 100644 --- a/rootly_sdk/models/new_post_mortem_template_data.py +++ b/rootly_sdk/models/new_post_mortem_template_data.py @@ -31,6 +31,7 @@ class NewPostMortemTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_pulse.py b/rootly_sdk/models/new_pulse.py index cdd2c0cc..b674db54 100644 --- a/rootly_sdk/models/new_pulse.py +++ b/rootly_sdk/models/new_pulse.py @@ -24,6 +24,7 @@ class NewPulse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_pulse_data.py b/rootly_sdk/models/new_pulse_data.py index 4b26421b..7e407845 100644 --- a/rootly_sdk/models/new_pulse_data.py +++ b/rootly_sdk/models/new_pulse_data.py @@ -28,6 +28,7 @@ class NewPulseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_retrospective_process.py b/rootly_sdk/models/new_retrospective_process.py index db872de5..b503747b 100644 --- a/rootly_sdk/models/new_retrospective_process.py +++ b/rootly_sdk/models/new_retrospective_process.py @@ -24,6 +24,7 @@ class NewRetrospectiveProcess: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_retrospective_process_data.py b/rootly_sdk/models/new_retrospective_process_data.py index a81d545f..0784fceb 100644 --- a/rootly_sdk/models/new_retrospective_process_data.py +++ b/rootly_sdk/models/new_retrospective_process_data.py @@ -31,6 +31,7 @@ class NewRetrospectiveProcessData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_retrospective_process_group.py b/rootly_sdk/models/new_retrospective_process_group.py index b4879e14..8af8a734 100644 --- a/rootly_sdk/models/new_retrospective_process_group.py +++ b/rootly_sdk/models/new_retrospective_process_group.py @@ -24,6 +24,7 @@ class NewRetrospectiveProcessGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_retrospective_process_group_data.py b/rootly_sdk/models/new_retrospective_process_group_data.py index 95af45ea..10615645 100644 --- a/rootly_sdk/models/new_retrospective_process_group_data.py +++ b/rootly_sdk/models/new_retrospective_process_group_data.py @@ -31,6 +31,7 @@ class NewRetrospectiveProcessGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_retrospective_process_group_step.py b/rootly_sdk/models/new_retrospective_process_group_step.py index 51c3de7e..b700bfc2 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step.py +++ b/rootly_sdk/models/new_retrospective_process_group_step.py @@ -24,6 +24,7 @@ class NewRetrospectiveProcessGroupStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_retrospective_process_group_step_data.py b/rootly_sdk/models/new_retrospective_process_group_step_data.py index 55e5225b..7aeeb8b3 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step_data.py +++ b/rootly_sdk/models/new_retrospective_process_group_step_data.py @@ -33,6 +33,7 @@ class NewRetrospectiveProcessGroupStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_retrospective_step.py b/rootly_sdk/models/new_retrospective_step.py index fcd3c6f9..f1f314d6 100644 --- a/rootly_sdk/models/new_retrospective_step.py +++ b/rootly_sdk/models/new_retrospective_step.py @@ -24,6 +24,7 @@ class NewRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_retrospective_step_data.py b/rootly_sdk/models/new_retrospective_step_data.py index c2d74e95..940e62ff 100644 --- a/rootly_sdk/models/new_retrospective_step_data.py +++ b/rootly_sdk/models/new_retrospective_step_data.py @@ -31,6 +31,7 @@ class NewRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_role.py b/rootly_sdk/models/new_role.py index 7ecd0d51..ec5324cb 100644 --- a/rootly_sdk/models/new_role.py +++ b/rootly_sdk/models/new_role.py @@ -24,6 +24,7 @@ class NewRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_role_data.py b/rootly_sdk/models/new_role_data.py index 75843462..f591f76f 100644 --- a/rootly_sdk/models/new_role_data.py +++ b/rootly_sdk/models/new_role_data.py @@ -28,6 +28,7 @@ class NewRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_schedule.py b/rootly_sdk/models/new_schedule.py index 8dfa2c2f..b82c394e 100644 --- a/rootly_sdk/models/new_schedule.py +++ b/rootly_sdk/models/new_schedule.py @@ -24,6 +24,7 @@ class NewSchedule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_schedule_data.py b/rootly_sdk/models/new_schedule_data.py index 3503c7c1..04b89e20 100644 --- a/rootly_sdk/models/new_schedule_data.py +++ b/rootly_sdk/models/new_schedule_data.py @@ -28,6 +28,7 @@ class NewScheduleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_schedule_data_attributes.py b/rootly_sdk/models/new_schedule_data_attributes.py index dd1a68e6..9495aef6 100644 --- a/rootly_sdk/models/new_schedule_data_attributes.py +++ b/rootly_sdk/models/new_schedule_data_attributes.py @@ -5,6 +5,10 @@ from attrs import define as _attrs_define +from ..models.new_schedule_data_attributes_shift_report_day_of_week import ( + NewScheduleDataAttributesShiftReportDayOfWeek, + check_new_schedule_data_attributes_shift_report_day_of_week, +) from ..types import UNSET, Unset if TYPE_CHECKING: @@ -26,6 +30,21 @@ class NewScheduleDataAttributes: slack_user_group (NewScheduleDataAttributesSlackUserGroup | Unset): slack_channel (NewScheduleDataAttributesSlackChannelType0 | None | Unset): owner_group_ids (list[str] | Unset): Owning teams. + sync_linear_enabled (bool | None | Unset): Whether the schedule is synced with Linear + include_shadows_in_slack_notifications (bool | None | Unset): Whether shadow users are included in Slack + notifications and user group syncing. Requires `slack_channel` to be set; otherwise this value is forced to + false on save. + shift_start_notifications_enabled (bool | None | Unset): Whether shift-start notifications are enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_update_notifications_enabled (bool | None | Unset): Whether shift-update notifications are enabled. + Requires `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_enabled (bool | None | Unset): Whether the weekly shift summary report is enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_day_of_week (NewScheduleDataAttributesShiftReportDayOfWeek | Unset): Day of week the weekly shift + summary is sent + shift_report_time_of_day (None | str | Unset): Time of day the weekly shift summary is sent, in HH:MM 24-hour + format + shift_report_time_zone (None | str | Unset): IANA time zone used for the weekly shift summary """ name: str @@ -35,6 +54,14 @@ class NewScheduleDataAttributes: slack_user_group: NewScheduleDataAttributesSlackUserGroup | Unset = UNSET slack_channel: NewScheduleDataAttributesSlackChannelType0 | None | Unset = UNSET owner_group_ids: list[str] | Unset = UNSET + sync_linear_enabled: bool | None | Unset = UNSET + include_shadows_in_slack_notifications: bool | None | Unset = UNSET + shift_start_notifications_enabled: bool | None | Unset = UNSET + shift_update_notifications_enabled: bool | None | Unset = UNSET + shift_report_enabled: bool | None | Unset = UNSET + shift_report_day_of_week: NewScheduleDataAttributesShiftReportDayOfWeek | Unset = UNSET + shift_report_time_of_day: None | str | Unset = UNSET + shift_report_time_zone: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_schedule_data_attributes_slack_channel_type_0 import ( @@ -73,6 +100,52 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids + sync_linear_enabled: bool | None | Unset + if isinstance(self.sync_linear_enabled, Unset): + sync_linear_enabled = UNSET + else: + sync_linear_enabled = self.sync_linear_enabled + + include_shadows_in_slack_notifications: bool | None | Unset + if isinstance(self.include_shadows_in_slack_notifications, Unset): + include_shadows_in_slack_notifications = UNSET + else: + include_shadows_in_slack_notifications = self.include_shadows_in_slack_notifications + + shift_start_notifications_enabled: bool | None | Unset + if isinstance(self.shift_start_notifications_enabled, Unset): + shift_start_notifications_enabled = UNSET + else: + shift_start_notifications_enabled = self.shift_start_notifications_enabled + + shift_update_notifications_enabled: bool | None | Unset + if isinstance(self.shift_update_notifications_enabled, Unset): + shift_update_notifications_enabled = UNSET + else: + shift_update_notifications_enabled = self.shift_update_notifications_enabled + + shift_report_enabled: bool | None | Unset + if isinstance(self.shift_report_enabled, Unset): + shift_report_enabled = UNSET + else: + shift_report_enabled = self.shift_report_enabled + + shift_report_day_of_week: str | Unset = UNSET + if not isinstance(self.shift_report_day_of_week, Unset): + shift_report_day_of_week = self.shift_report_day_of_week + + shift_report_time_of_day: None | str | Unset + if isinstance(self.shift_report_time_of_day, Unset): + shift_report_time_of_day = UNSET + else: + shift_report_time_of_day = self.shift_report_time_of_day + + shift_report_time_zone: None | str | Unset + if isinstance(self.shift_report_time_zone, Unset): + shift_report_time_zone = UNSET + else: + shift_report_time_zone = self.shift_report_time_zone + field_dict: dict[str, Any] = {} field_dict.update( @@ -91,6 +164,22 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channel"] = slack_channel if owner_group_ids is not UNSET: field_dict["owner_group_ids"] = owner_group_ids + if sync_linear_enabled is not UNSET: + field_dict["sync_linear_enabled"] = sync_linear_enabled + if include_shadows_in_slack_notifications is not UNSET: + field_dict["include_shadows_in_slack_notifications"] = include_shadows_in_slack_notifications + if shift_start_notifications_enabled is not UNSET: + field_dict["shift_start_notifications_enabled"] = shift_start_notifications_enabled + if shift_update_notifications_enabled is not UNSET: + field_dict["shift_update_notifications_enabled"] = shift_update_notifications_enabled + if shift_report_enabled is not UNSET: + field_dict["shift_report_enabled"] = shift_report_enabled + if shift_report_day_of_week is not UNSET: + field_dict["shift_report_day_of_week"] = shift_report_day_of_week + if shift_report_time_of_day is not UNSET: + field_dict["shift_report_time_of_day"] = shift_report_time_of_day + if shift_report_time_zone is not UNSET: + field_dict["shift_report_time_zone"] = shift_report_time_zone return field_dict @@ -150,6 +239,84 @@ def _parse_slack_channel(data: object) -> NewScheduleDataAttributesSlackChannelT owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) + def _parse_sync_linear_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + sync_linear_enabled = _parse_sync_linear_enabled(d.pop("sync_linear_enabled", UNSET)) + + def _parse_include_shadows_in_slack_notifications(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + include_shadows_in_slack_notifications = _parse_include_shadows_in_slack_notifications( + d.pop("include_shadows_in_slack_notifications", UNSET) + ) + + def _parse_shift_start_notifications_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_start_notifications_enabled = _parse_shift_start_notifications_enabled( + d.pop("shift_start_notifications_enabled", UNSET) + ) + + def _parse_shift_update_notifications_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_update_notifications_enabled = _parse_shift_update_notifications_enabled( + d.pop("shift_update_notifications_enabled", UNSET) + ) + + def _parse_shift_report_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_report_enabled = _parse_shift_report_enabled(d.pop("shift_report_enabled", UNSET)) + + _shift_report_day_of_week = d.pop("shift_report_day_of_week", UNSET) + shift_report_day_of_week: NewScheduleDataAttributesShiftReportDayOfWeek | Unset + if isinstance(_shift_report_day_of_week, Unset): + shift_report_day_of_week = UNSET + else: + shift_report_day_of_week = check_new_schedule_data_attributes_shift_report_day_of_week( + _shift_report_day_of_week + ) + + def _parse_shift_report_time_of_day(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shift_report_time_of_day = _parse_shift_report_time_of_day(d.pop("shift_report_time_of_day", UNSET)) + + def _parse_shift_report_time_zone(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shift_report_time_zone = _parse_shift_report_time_zone(d.pop("shift_report_time_zone", UNSET)) + new_schedule_data_attributes = cls( name=name, owner_user_id=owner_user_id, @@ -158,6 +325,14 @@ def _parse_slack_channel(data: object) -> NewScheduleDataAttributesSlackChannelT slack_user_group=slack_user_group, slack_channel=slack_channel, owner_group_ids=owner_group_ids, + sync_linear_enabled=sync_linear_enabled, + include_shadows_in_slack_notifications=include_shadows_in_slack_notifications, + shift_start_notifications_enabled=shift_start_notifications_enabled, + shift_update_notifications_enabled=shift_update_notifications_enabled, + shift_report_enabled=shift_report_enabled, + shift_report_day_of_week=shift_report_day_of_week, + shift_report_time_of_day=shift_report_time_of_day, + shift_report_time_zone=shift_report_time_zone, ) return new_schedule_data_attributes diff --git a/rootly_sdk/models/new_schedule_data_attributes_shift_report_day_of_week.py b/rootly_sdk/models/new_schedule_data_attributes_shift_report_day_of_week.py new file mode 100644 index 00000000..06bc44a2 --- /dev/null +++ b/rootly_sdk/models/new_schedule_data_attributes_shift_report_day_of_week.py @@ -0,0 +1,27 @@ +from typing import Literal, cast + +NewScheduleDataAttributesShiftReportDayOfWeek = Literal[ + "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" +] + +NEW_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES: set[NewScheduleDataAttributesShiftReportDayOfWeek] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_new_schedule_data_attributes_shift_report_day_of_week( + value: str | None, +) -> NewScheduleDataAttributesShiftReportDayOfWeek | None: + if value is None: + return None + if value in NEW_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES: + return cast(NewScheduleDataAttributesShiftReportDayOfWeek, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_schedule_rotation.py b/rootly_sdk/models/new_schedule_rotation.py index 258896ae..8aee39c4 100644 --- a/rootly_sdk/models/new_schedule_rotation.py +++ b/rootly_sdk/models/new_schedule_rotation.py @@ -24,6 +24,7 @@ class NewScheduleRotation: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_schedule_rotation_active_day.py b/rootly_sdk/models/new_schedule_rotation_active_day.py index 8eaeed71..864d684e 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day.py @@ -24,6 +24,7 @@ class NewScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_schedule_rotation_active_day_data.py b/rootly_sdk/models/new_schedule_rotation_active_day_data.py index c53fded7..50b7ea10 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day_data.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day_data.py @@ -31,6 +31,7 @@ class NewScheduleRotationActiveDayData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes.py b/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes.py index d8ce7dc3..5c90b1da 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes.py @@ -33,6 +33,7 @@ class NewScheduleRotationActiveDayDataAttributes: active_time_attributes: list[NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] def to_dict(self) -> dict[str, Any]: + day_name: str = self.day_name active_time_attributes = [] diff --git a/rootly_sdk/models/new_schedule_rotation_data.py b/rootly_sdk/models/new_schedule_rotation_data.py index 6738b8cb..98a6852d 100644 --- a/rootly_sdk/models/new_schedule_rotation_data.py +++ b/rootly_sdk/models/new_schedule_rotation_data.py @@ -28,6 +28,7 @@ class NewScheduleRotationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes.py b/rootly_sdk/models/new_schedule_rotation_data_attributes.py index a070e8e0..58de8732 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes.py @@ -58,9 +58,9 @@ class NewScheduleRotationDataAttributes: active_time_attributes (list[NewScheduleRotationDataAttributesActiveTimeAttributesItem] | Unset): Schedule rotation's active times time_zone (str | Unset): A valid IANA time zone name. Default: 'Etc/UTC'. - start_time (datetime.date | None | Unset): ISO8601 date and time when rotation starts. Shifts will only be + start_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation starts. Shifts will only be created after this time. - end_time (datetime.date | None | Unset): ISO8601 date and time when rotation ends. Shifts will only be created + end_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation ends. Shifts will only be created before this time. schedule_rotation_members (list[NewScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset): You can only add schedule rotation members if your account has schedule nesting feature enabled @@ -80,8 +80,8 @@ class NewScheduleRotationDataAttributes: active_time_type: str | Unset = UNSET active_time_attributes: list[NewScheduleRotationDataAttributesActiveTimeAttributesItem] | Unset = UNSET time_zone: str | Unset = "Etc/UTC" - start_time: datetime.date | None | Unset = UNSET - end_time: datetime.date | None | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET schedule_rotation_members: ( list[NewScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset ) = UNSET @@ -142,7 +142,7 @@ def to_dict(self) -> dict[str, Any]: start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET - elif isinstance(self.start_time, datetime.date): + elif isinstance(self.start_time, datetime.datetime): start_time = self.start_time.isoformat() else: start_time = self.start_time @@ -150,7 +150,7 @@ def to_dict(self) -> dict[str, Any]: end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET - elif isinstance(self.end_time, datetime.date): + elif isinstance(self.end_time, datetime.datetime): end_time = self.end_time.isoformat() else: end_time = self.end_time @@ -303,7 +303,7 @@ def _parse_schedule_rotationable_attributes( time_zone = d.pop("time_zone", UNSET) - def _parse_start_time(data: object) -> datetime.date | None | Unset: + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -311,16 +311,16 @@ def _parse_start_time(data: object) -> datetime.date | None | Unset: try: if not isinstance(data, str): raise TypeError() - start_time_type_0 = isoparse(data).date() + start_time_type_0 = isoparse(data) return start_time_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(datetime.date | None | Unset, data) + return cast(datetime.datetime | None | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> datetime.date | None | Unset: + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -328,12 +328,12 @@ def _parse_end_time(data: object) -> datetime.date | None | Unset: try: if not isinstance(data, str): raise TypeError() - end_time_type_0 = isoparse(data).date() + end_time_type_0 = isoparse(data) return end_time_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(datetime.date | None | Unset, data) + return cast(datetime.datetime | None | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) diff --git a/rootly_sdk/models/new_schedule_rotation_user.py b/rootly_sdk/models/new_schedule_rotation_user.py index 9bfed8be..a6ff2183 100644 --- a/rootly_sdk/models/new_schedule_rotation_user.py +++ b/rootly_sdk/models/new_schedule_rotation_user.py @@ -26,6 +26,7 @@ class NewScheduleRotationUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/new_schedule_rotation_user_data.py b/rootly_sdk/models/new_schedule_rotation_user_data.py index dae70928..e7939952 100644 --- a/rootly_sdk/models/new_schedule_rotation_user_data.py +++ b/rootly_sdk/models/new_schedule_rotation_user_data.py @@ -32,6 +32,7 @@ class NewScheduleRotationUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/new_secret.py b/rootly_sdk/models/new_secret.py index e6b520cb..159467a5 100644 --- a/rootly_sdk/models/new_secret.py +++ b/rootly_sdk/models/new_secret.py @@ -24,6 +24,7 @@ class NewSecret: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_secret_data.py b/rootly_sdk/models/new_secret_data.py index 9936cb2e..39ddaac2 100644 --- a/rootly_sdk/models/new_secret_data.py +++ b/rootly_sdk/models/new_secret_data.py @@ -28,6 +28,7 @@ class NewSecretData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_service.py b/rootly_sdk/models/new_service.py index 87867ede..85709594 100644 --- a/rootly_sdk/models/new_service.py +++ b/rootly_sdk/models/new_service.py @@ -24,6 +24,7 @@ class NewService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_service_data.py b/rootly_sdk/models/new_service_data.py index c38a2dc7..bfa03fd3 100644 --- a/rootly_sdk/models/new_service_data.py +++ b/rootly_sdk/models/new_service_data.py @@ -28,6 +28,7 @@ class NewServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_severity.py b/rootly_sdk/models/new_severity.py index bf2f358f..261efd5e 100644 --- a/rootly_sdk/models/new_severity.py +++ b/rootly_sdk/models/new_severity.py @@ -24,6 +24,7 @@ class NewSeverity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_severity_data.py b/rootly_sdk/models/new_severity_data.py index 288d9c37..b34b5cd8 100644 --- a/rootly_sdk/models/new_severity_data.py +++ b/rootly_sdk/models/new_severity_data.py @@ -28,6 +28,7 @@ class NewSeverityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_severity_data_attributes.py b/rootly_sdk/models/new_severity_data_attributes.py index d13b25ac..f90fa798 100644 --- a/rootly_sdk/models/new_severity_data_attributes.py +++ b/rootly_sdk/models/new_severity_data_attributes.py @@ -49,6 +49,7 @@ class NewSeverityDataAttributes: slack_aliases: list[NewSeverityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/new_shift_coverage_request.py b/rootly_sdk/models/new_shift_coverage_request.py new file mode 100644 index 00000000..310e914f --- /dev/null +++ b/rootly_sdk/models/new_shift_coverage_request.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.new_shift_coverage_request_data import NewShiftCoverageRequestData + + +T = TypeVar("T", bound="NewShiftCoverageRequest") + + +@_attrs_define +class NewShiftCoverageRequest: + """ + Attributes: + data (NewShiftCoverageRequestData): + """ + + data: NewShiftCoverageRequestData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_shift_coverage_request_data import NewShiftCoverageRequestData + + d = dict(src_dict) + data = NewShiftCoverageRequestData.from_dict(d.pop("data")) + + new_shift_coverage_request = cls( + data=data, + ) + + new_shift_coverage_request.additional_properties = d + return new_shift_coverage_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_shift_coverage_request_data.py b/rootly_sdk/models/new_shift_coverage_request_data.py new file mode 100644 index 00000000..d5a821e9 --- /dev/null +++ b/rootly_sdk/models/new_shift_coverage_request_data.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_shift_coverage_request_data_type import ( + NewShiftCoverageRequestDataType, + check_new_shift_coverage_request_data_type, +) + +if TYPE_CHECKING: + from ..models.new_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes + + +T = TypeVar("T", bound="NewShiftCoverageRequestData") + + +@_attrs_define +class NewShiftCoverageRequestData: + """ + Attributes: + type_ (NewShiftCoverageRequestDataType): + attributes (NewShiftCoverageRequestDataAttributes): + """ + + type_: NewShiftCoverageRequestDataType + attributes: NewShiftCoverageRequestDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes + + d = dict(src_dict) + type_ = check_new_shift_coverage_request_data_type(d.pop("type")) + + attributes = NewShiftCoverageRequestDataAttributes.from_dict(d.pop("attributes")) + + new_shift_coverage_request_data = cls( + type_=type_, + attributes=attributes, + ) + + new_shift_coverage_request_data.additional_properties = d + return new_shift_coverage_request_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_shift_coverage_request_data_attributes.py b/rootly_sdk/models/new_shift_coverage_request_data_attributes.py new file mode 100644 index 00000000..f709df3b --- /dev/null +++ b/rootly_sdk/models/new_shift_coverage_request_data_attributes.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewShiftCoverageRequestDataAttributes") + + +@_attrs_define +class NewShiftCoverageRequestDataAttributes: + """ + Attributes: + starts_at (datetime.datetime): Start datetime of the time range to request coverage for + ends_at (datetime.datetime): End datetime of the time range to request coverage for + user_id (int | Unset): Optional. Restrict coverage to shifts assigned to this user. When omitted, every shift + overlapping the time range is covered. + """ + + starts_at: datetime.datetime + ends_at: datetime.datetime + user_id: int | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + starts_at = self.starts_at.isoformat() + + ends_at = self.ends_at.isoformat() + + user_id = self.user_id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "starts_at": starts_at, + "ends_at": ends_at, + } + ) + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + starts_at = isoparse(d.pop("starts_at")) + + ends_at = isoparse(d.pop("ends_at")) + + user_id = d.pop("user_id", UNSET) + + new_shift_coverage_request_data_attributes = cls( + starts_at=starts_at, + ends_at=ends_at, + user_id=user_id, + ) + + return new_shift_coverage_request_data_attributes diff --git a/rootly_sdk/models/new_shift_coverage_request_data_type.py b/rootly_sdk/models/new_shift_coverage_request_data_type.py new file mode 100644 index 00000000..3880a968 --- /dev/null +++ b/rootly_sdk/models/new_shift_coverage_request_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +NewShiftCoverageRequestDataType = Literal["shift_coverage_requests"] + +NEW_SHIFT_COVERAGE_REQUEST_DATA_TYPE_VALUES: set[NewShiftCoverageRequestDataType] = { + "shift_coverage_requests", +} + + +def check_new_shift_coverage_request_data_type(value: str | None) -> NewShiftCoverageRequestDataType | None: + if value is None: + return None + if value in NEW_SHIFT_COVERAGE_REQUEST_DATA_TYPE_VALUES: + return cast(NewShiftCoverageRequestDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_SHIFT_COVERAGE_REQUEST_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/new_sla.py b/rootly_sdk/models/new_sla.py index 22576867..d7e331d4 100644 --- a/rootly_sdk/models/new_sla.py +++ b/rootly_sdk/models/new_sla.py @@ -24,6 +24,7 @@ class NewSla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_sla_data.py b/rootly_sdk/models/new_sla_data.py index e309aa9b..c1b1c15d 100644 --- a/rootly_sdk/models/new_sla_data.py +++ b/rootly_sdk/models/new_sla_data.py @@ -28,6 +28,7 @@ class NewSlaData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_sla_data_attributes.py b/rootly_sdk/models/new_sla_data_attributes.py index e5113257..ad31ed6d 100644 --- a/rootly_sdk/models/new_sla_data_attributes.py +++ b/rootly_sdk/models/new_sla_data_attributes.py @@ -88,6 +88,7 @@ class NewSlaDataAttributes: notification_configurations: list[NewSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name assignment_deadline_days: int = self.assignment_deadline_days diff --git a/rootly_sdk/models/new_sla_data_attributes_conditions_item.py b/rootly_sdk/models/new_sla_data_attributes_conditions_item.py index c46c27c4..12795ef1 100644 --- a/rootly_sdk/models/new_sla_data_attributes_conditions_item.py +++ b/rootly_sdk/models/new_sla_data_attributes_conditions_item.py @@ -27,7 +27,9 @@ class NewSlaDataAttributesConditionsItem: conditionable_type (NewSlaDataAttributesConditionsItemConditionableType): The type of condition operator (str): The comparison operator property_ (NewSlaDataAttributesConditionsItemProperty | Unset): The property to evaluate (for built-in field - conditions) + conditions). When the team has custom lifecycle statuses enabled, use 'sub_status' (with sub-status IDs as + values); otherwise use 'status' (with parent status names). Sending the wrong one will return a validation + error. values (list[str] | None | Unset): The values to compare against form_field_id (None | Unset | UUID): The ID of the form field (for custom field conditions) position (int | Unset): The position of the condition for ordering diff --git a/rootly_sdk/models/new_status_page.py b/rootly_sdk/models/new_status_page.py index 61ef3293..f3db92c7 100644 --- a/rootly_sdk/models/new_status_page.py +++ b/rootly_sdk/models/new_status_page.py @@ -24,6 +24,7 @@ class NewStatusPage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_status_page_data.py b/rootly_sdk/models/new_status_page_data.py index 5ea4944d..5d400e07 100644 --- a/rootly_sdk/models/new_status_page_data.py +++ b/rootly_sdk/models/new_status_page_data.py @@ -28,6 +28,7 @@ class NewStatusPageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_status_page_template.py b/rootly_sdk/models/new_status_page_template.py index 38d7f145..be295a5d 100644 --- a/rootly_sdk/models/new_status_page_template.py +++ b/rootly_sdk/models/new_status_page_template.py @@ -24,6 +24,7 @@ class NewStatusPageTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_status_page_template_data.py b/rootly_sdk/models/new_status_page_template_data.py index 0ab02f3e..a5f25d1c 100644 --- a/rootly_sdk/models/new_status_page_template_data.py +++ b/rootly_sdk/models/new_status_page_template_data.py @@ -31,6 +31,7 @@ class NewStatusPageTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_sub_status.py b/rootly_sdk/models/new_sub_status.py index 290c756f..02753d5a 100644 --- a/rootly_sdk/models/new_sub_status.py +++ b/rootly_sdk/models/new_sub_status.py @@ -24,6 +24,7 @@ class NewSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_sub_status_data.py b/rootly_sdk/models/new_sub_status_data.py index 7c29942c..fb4d42e9 100644 --- a/rootly_sdk/models/new_sub_status_data.py +++ b/rootly_sdk/models/new_sub_status_data.py @@ -28,6 +28,7 @@ class NewSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_team.py b/rootly_sdk/models/new_team.py index fb3a16a2..cf16853b 100644 --- a/rootly_sdk/models/new_team.py +++ b/rootly_sdk/models/new_team.py @@ -24,6 +24,7 @@ class NewTeam: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_team_data.py b/rootly_sdk/models/new_team_data.py index 4aecd241..91f45014 100644 --- a/rootly_sdk/models/new_team_data.py +++ b/rootly_sdk/models/new_team_data.py @@ -28,6 +28,7 @@ class NewTeamData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_team_data_attributes.py b/rootly_sdk/models/new_team_data_attributes.py index 9ab22d75..a05a78f5 100644 --- a/rootly_sdk/models/new_team_data_attributes.py +++ b/rootly_sdk/models/new_team_data_attributes.py @@ -5,6 +5,10 @@ from attrs import define as _attrs_define +from ..models.new_team_data_attributes_auto_add_members_scope import ( + NewTeamDataAttributesAutoAddMembersScope, + check_new_team_data_attributes_auto_add_members_scope, +) from ..types import UNSET, Unset if TYPE_CHECKING: @@ -58,6 +62,9 @@ class NewTeamDataAttributes: incident_broadcast_channel (NewTeamDataAttributesIncidentBroadcastChannelType0 | None | Unset): Slack channel to broadcast incidents to auto_add_members_when_attached (bool | None | Unset): Auto add members to incident channel when team is attached + auto_add_members_scope (NewTeamDataAttributesAutoAddMembersScope | Unset): Visibility-scoped auto-add behavior. + Only present when the `enable_scoped_incident_channel_auto_add` feature flag is on for the organization. When + set, it overrides `auto_add_members_when_attached`. properties (list[NewTeamDataAttributesPropertiesItem] | Unset): Array of property values for this team. """ @@ -87,6 +94,7 @@ class NewTeamDataAttributes: incident_broadcast_enabled: bool | None | Unset = UNSET incident_broadcast_channel: NewTeamDataAttributesIncidentBroadcastChannelType0 | None | Unset = UNSET auto_add_members_when_attached: bool | None | Unset = UNSET + auto_add_members_scope: NewTeamDataAttributesAutoAddMembersScope | Unset = UNSET properties: list[NewTeamDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: @@ -274,6 +282,10 @@ def to_dict(self) -> dict[str, Any]: else: auto_add_members_when_attached = self.auto_add_members_when_attached + auto_add_members_scope: str | Unset = UNSET + if not isinstance(self.auto_add_members_scope, Unset): + auto_add_members_scope = self.auto_add_members_scope + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -338,6 +350,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_channel"] = incident_broadcast_channel if auto_add_members_when_attached is not UNSET: field_dict["auto_add_members_when_attached"] = auto_add_members_when_attached + if auto_add_members_scope is not UNSET: + field_dict["auto_add_members_scope"] = auto_add_members_scope if properties is not UNSET: field_dict["properties"] = properties @@ -663,6 +677,13 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: d.pop("auto_add_members_when_attached", UNSET) ) + _auto_add_members_scope = d.pop("auto_add_members_scope", UNSET) + auto_add_members_scope: NewTeamDataAttributesAutoAddMembersScope | Unset + if isinstance(_auto_add_members_scope, Unset): + auto_add_members_scope = UNSET + else: + auto_add_members_scope = check_new_team_data_attributes_auto_add_members_scope(_auto_add_members_scope) + _properties = d.pop("properties", UNSET) properties: list[NewTeamDataAttributesPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -699,6 +720,7 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, + auto_add_members_scope=auto_add_members_scope, properties=properties, ) diff --git a/rootly_sdk/models/new_team_data_attributes_auto_add_members_scope.py b/rootly_sdk/models/new_team_data_attributes_auto_add_members_scope.py new file mode 100644 index 00000000..86b962c6 --- /dev/null +++ b/rootly_sdk/models/new_team_data_attributes_auto_add_members_scope.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewTeamDataAttributesAutoAddMembersScope = Literal["all", "off", "public_and_test", "public_only"] + +NEW_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES: set[NewTeamDataAttributesAutoAddMembersScope] = { + "all", + "off", + "public_and_test", + "public_only", +} + + +def check_new_team_data_attributes_auto_add_members_scope( + value: str | None, +) -> NewTeamDataAttributesAutoAddMembersScope | None: + if value is None: + return None + if value in NEW_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES: + return cast(NewTeamDataAttributesAutoAddMembersScope, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_user_email_address.py b/rootly_sdk/models/new_user_email_address.py index 3a0e04da..44365818 100644 --- a/rootly_sdk/models/new_user_email_address.py +++ b/rootly_sdk/models/new_user_email_address.py @@ -24,6 +24,7 @@ class NewUserEmailAddress: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_user_email_address_data.py b/rootly_sdk/models/new_user_email_address_data.py index dc5e0749..39826d81 100644 --- a/rootly_sdk/models/new_user_email_address_data.py +++ b/rootly_sdk/models/new_user_email_address_data.py @@ -31,6 +31,7 @@ class NewUserEmailAddressData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_user_notification_rule.py b/rootly_sdk/models/new_user_notification_rule.py index bbab1368..87bbb9bb 100644 --- a/rootly_sdk/models/new_user_notification_rule.py +++ b/rootly_sdk/models/new_user_notification_rule.py @@ -24,6 +24,7 @@ class NewUserNotificationRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_user_notification_rule_data.py b/rootly_sdk/models/new_user_notification_rule_data.py index a620e47c..0fd914eb 100644 --- a/rootly_sdk/models/new_user_notification_rule_data.py +++ b/rootly_sdk/models/new_user_notification_rule_data.py @@ -31,6 +31,7 @@ class NewUserNotificationRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_user_notification_rule_data_attributes_enabled_contact_types_item.py b/rootly_sdk/models/new_user_notification_rule_data_attributes_enabled_contact_types_item.py index 8a7a6146..fe523a7e 100644 --- a/rootly_sdk/models/new_user_notification_rule_data_attributes_enabled_contact_types_item.py +++ b/rootly_sdk/models/new_user_notification_rule_data_attributes_enabled_contact_types_item.py @@ -1,7 +1,7 @@ from typing import Literal, cast NewUserNotificationRuleDataAttributesEnabledContactTypesItem = Literal[ - "call", "device", "email", "non_critical_device", "slack", "sms" + "call", "device", "email", "google_chat", "non_critical_device", "slack", "sms" ] NEW_USER_NOTIFICATION_RULE_DATA_ATTRIBUTES_ENABLED_CONTACT_TYPES_ITEM_VALUES: set[ @@ -10,6 +10,7 @@ "call", "device", "email", + "google_chat", "non_critical_device", "slack", "sms", diff --git a/rootly_sdk/models/new_user_phone_number.py b/rootly_sdk/models/new_user_phone_number.py index 619a9bc9..77d68eb2 100644 --- a/rootly_sdk/models/new_user_phone_number.py +++ b/rootly_sdk/models/new_user_phone_number.py @@ -24,6 +24,7 @@ class NewUserPhoneNumber: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_user_phone_number_data.py b/rootly_sdk/models/new_user_phone_number_data.py index f8594381..e5bb6a12 100644 --- a/rootly_sdk/models/new_user_phone_number_data.py +++ b/rootly_sdk/models/new_user_phone_number_data.py @@ -28,6 +28,7 @@ class NewUserPhoneNumberData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_webhooks_endpoint.py b/rootly_sdk/models/new_webhooks_endpoint.py index 3c2e4976..086d10ce 100644 --- a/rootly_sdk/models/new_webhooks_endpoint.py +++ b/rootly_sdk/models/new_webhooks_endpoint.py @@ -24,6 +24,7 @@ class NewWebhooksEndpoint: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_webhooks_endpoint_data.py b/rootly_sdk/models/new_webhooks_endpoint_data.py index 63c5b888..08c54004 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data.py @@ -28,6 +28,7 @@ class NewWebhooksEndpointData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py index d4e0e058..ee615dde 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -11,6 +11,12 @@ ) from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.new_webhooks_endpoint_data_attributes_custom_headers_item import ( + NewWebhooksEndpointDataAttributesCustomHeadersItem, + ) + + T = TypeVar("T", bound="NewWebhooksEndpointDataAttributes") @@ -23,6 +29,8 @@ class NewWebhooksEndpointDataAttributes: secret (str | Unset): The webhook signing secret used to verify webhook requests. event_types (list[NewWebhooksEndpointDataAttributesEventTypesItem] | Unset): enabled (bool | Unset): + custom_headers (list[NewWebhooksEndpointDataAttributesCustomHeadersItem] | Unset): Custom HTTP headers sent with + each delivery. Max 10. Reserved names (Content-Type, X-Rootly-Signature, Host, etc.) are rejected. """ name: str @@ -30,8 +38,10 @@ class NewWebhooksEndpointDataAttributes: secret: str | Unset = UNSET event_types: list[NewWebhooksEndpointDataAttributesEventTypesItem] | Unset = UNSET enabled: bool | Unset = UNSET + custom_headers: list[NewWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name url = self.url @@ -47,6 +57,13 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled + custom_headers: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.custom_headers, Unset): + custom_headers = [] + for custom_headers_item_data in self.custom_headers: + custom_headers_item = custom_headers_item_data.to_dict() + custom_headers.append(custom_headers_item) + field_dict: dict[str, Any] = {} field_dict.update( @@ -61,11 +78,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["event_types"] = event_types if enabled is not UNSET: field_dict["enabled"] = enabled + if custom_headers is not UNSET: + field_dict["custom_headers"] = custom_headers return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_webhooks_endpoint_data_attributes_custom_headers_item import ( + NewWebhooksEndpointDataAttributesCustomHeadersItem, + ) + d = dict(src_dict) name = d.pop("name") @@ -84,12 +107,24 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) + _custom_headers = d.pop("custom_headers", UNSET) + custom_headers: list[NewWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET + if _custom_headers is not UNSET: + custom_headers = [] + for custom_headers_item_data in _custom_headers: + custom_headers_item = NewWebhooksEndpointDataAttributesCustomHeadersItem.from_dict( + custom_headers_item_data + ) + + custom_headers.append(custom_headers_item) + new_webhooks_endpoint_data_attributes = cls( name=name, url=url, secret=secret, event_types=event_types, enabled=enabled, + custom_headers=custom_headers, ) return new_webhooks_endpoint_data_attributes diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py new file mode 100644 index 00000000..3ffe6bda --- /dev/null +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="NewWebhooksEndpointDataAttributesCustomHeadersItem") + + +@_attrs_define +class NewWebhooksEndpointDataAttributesCustomHeadersItem: + """ + Attributes: + name (str): + value (str): + """ + + name: str + value: str + + def to_dict(self) -> dict[str, Any]: + name = self.name + + value = self.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + value = d.pop("value") + + new_webhooks_endpoint_data_attributes_custom_headers_item = cls( + name=name, + value=value, + ) + + return new_webhooks_endpoint_data_attributes_custom_headers_item diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes_event_types_item.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_event_types_item.py index d88b85f3..0ba141cc 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data_attributes_event_types_item.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_event_types_item.py @@ -2,6 +2,7 @@ NewWebhooksEndpointDataAttributesEventTypesItem = Literal[ "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -30,10 +31,12 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", ] NEW_WEBHOOKS_ENDPOINT_DATA_ATTRIBUTES_EVENT_TYPES_ITEM_VALUES: set[NewWebhooksEndpointDataAttributesEventTypesItem] = { "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -62,6 +65,7 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", } diff --git a/rootly_sdk/models/new_workflow.py b/rootly_sdk/models/new_workflow.py index b425b0f9..e499f14c 100644 --- a/rootly_sdk/models/new_workflow.py +++ b/rootly_sdk/models/new_workflow.py @@ -24,6 +24,7 @@ class NewWorkflow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..9033a121 --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.new_workflow_action_item_form_field_condition_data import NewWorkflowActionItemFormFieldConditionData + + +T = TypeVar("T", bound="NewWorkflowActionItemFormFieldCondition") + + +@_attrs_define +class NewWorkflowActionItemFormFieldCondition: + """ + Attributes: + data (NewWorkflowActionItemFormFieldConditionData): + """ + + data: NewWorkflowActionItemFormFieldConditionData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_workflow_action_item_form_field_condition_data import ( + NewWorkflowActionItemFormFieldConditionData, + ) + + d = dict(src_dict) + data = NewWorkflowActionItemFormFieldConditionData.from_dict(d.pop("data")) + + new_workflow_action_item_form_field_condition = cls( + data=data, + ) + + new_workflow_action_item_form_field_condition.additional_properties = d + return new_workflow_action_item_form_field_condition + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py new file mode 100644 index 00000000..5fc82e95 --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_workflow_action_item_form_field_condition_data_type import ( + NewWorkflowActionItemFormFieldConditionDataType, + check_new_workflow_action_item_form_field_condition_data_type, +) + +if TYPE_CHECKING: + from ..models.new_workflow_action_item_form_field_condition_data_attributes import ( + NewWorkflowActionItemFormFieldConditionDataAttributes, + ) + + +T = TypeVar("T", bound="NewWorkflowActionItemFormFieldConditionData") + + +@_attrs_define +class NewWorkflowActionItemFormFieldConditionData: + """ + Attributes: + type_ (NewWorkflowActionItemFormFieldConditionDataType): + attributes (NewWorkflowActionItemFormFieldConditionDataAttributes): + """ + + type_: NewWorkflowActionItemFormFieldConditionDataType + attributes: NewWorkflowActionItemFormFieldConditionDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_workflow_action_item_form_field_condition_data_attributes import ( + NewWorkflowActionItemFormFieldConditionDataAttributes, + ) + + d = dict(src_dict) + type_ = check_new_workflow_action_item_form_field_condition_data_type(d.pop("type")) + + attributes = NewWorkflowActionItemFormFieldConditionDataAttributes.from_dict(d.pop("attributes")) + + new_workflow_action_item_form_field_condition_data = cls( + type_=type_, + attributes=attributes, + ) + + new_workflow_action_item_form_field_condition_data.additional_properties = d + return new_workflow_action_item_form_field_condition_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py new file mode 100644 index 00000000..9e6b01df --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py @@ -0,0 +1,171 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.new_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, + check_new_workflow_action_item_form_field_condition_data_attributes_action_item_condition, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewWorkflowActionItemFormFieldConditionDataAttributes") + + +@_attrs_define +class NewWorkflowActionItemFormFieldConditionDataAttributes: + """ + Attributes: + form_field_id (str): The custom field for this condition + action_item_condition (NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition): The trigger + condition Default: 'ANY'. + values (list[str] | Unset): + selected_catalog_entity_ids (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_option_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_user_ids (list[int] | Unset): + selected_cause_ids (list[str] | Unset): + selected_environment_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): + """ + + form_field_id: str + action_item_condition: NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition = "ANY" + values: list[str] | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + form_field_id = self.form_field_id + + action_item_condition: str = self.action_item_condition + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + selected_catalog_entity_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_catalog_entity_ids, Unset): + selected_catalog_entity_ids = self.selected_catalog_entity_ids + + selected_functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + selected_group_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_group_ids, Unset): + selected_group_ids = self.selected_group_ids + + selected_option_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_option_ids, Unset): + selected_option_ids = self.selected_option_ids + + selected_service_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_service_ids, Unset): + selected_service_ids = self.selected_service_ids + + selected_user_ids: list[int] | Unset = UNSET + if not isinstance(self.selected_user_ids, Unset): + selected_user_ids = self.selected_user_ids + + selected_cause_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_cause_ids, Unset): + selected_cause_ids = self.selected_cause_ids + + selected_environment_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + selected_incident_type_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_incident_type_ids, Unset): + selected_incident_type_ids = self.selected_incident_type_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "form_field_id": form_field_id, + "action_item_condition": action_item_condition, + } + ) + if values is not UNSET: + field_dict["values"] = values + if selected_catalog_entity_ids is not UNSET: + field_dict["selected_catalog_entity_ids"] = selected_catalog_entity_ids + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_option_ids is not UNSET: + field_dict["selected_option_ids"] = selected_option_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_user_ids is not UNSET: + field_dict["selected_user_ids"] = selected_user_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + form_field_id = d.pop("form_field_id") + + action_item_condition = ( + check_new_workflow_action_item_form_field_condition_data_attributes_action_item_condition( + d.pop("action_item_condition") + ) + ) + + values = cast(list[str], d.pop("values", UNSET)) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + new_workflow_action_item_form_field_condition_data_attributes = cls( + form_field_id=form_field_id, + action_item_condition=action_item_condition, + values=values, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_functionality_ids=selected_functionality_ids, + selected_group_ids=selected_group_ids, + selected_option_ids=selected_option_ids, + selected_service_ids=selected_service_ids, + selected_user_ids=selected_user_ids, + selected_cause_ids=selected_cause_ids, + selected_environment_ids=selected_environment_ids, + selected_incident_type_ids=selected_incident_type_ids, + ) + + return new_workflow_action_item_form_field_condition_data_attributes diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py new file mode 100644 index 00000000..074b8b71 --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py @@ -0,0 +1,31 @@ +from typing import Literal, cast + +NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES: set[ + NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition +] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_new_workflow_action_item_form_field_condition_data_attributes_action_item_condition( + value: str | None, +) -> NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | None: + if value is None: + return None + if value in NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES: + return cast(NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_type.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_type.py new file mode 100644 index 00000000..ed3349fe --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +NewWorkflowActionItemFormFieldConditionDataType = Literal["workflow_action_item_form_field_conditions"] + +NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES: set[NewWorkflowActionItemFormFieldConditionDataType] = { + "workflow_action_item_form_field_conditions", +} + + +def check_new_workflow_action_item_form_field_condition_data_type( + value: str | None, +) -> NewWorkflowActionItemFormFieldConditionDataType | None: + if value is None: + return None + if value in NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES: + return cast(NewWorkflowActionItemFormFieldConditionDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_workflow_custom_field_selection.py b/rootly_sdk/models/new_workflow_custom_field_selection.py index 72ba1344..975e1d93 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection.py @@ -24,6 +24,7 @@ class NewWorkflowCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_custom_field_selection_data.py b/rootly_sdk/models/new_workflow_custom_field_selection_data.py index 170d0090..7a299699 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection_data.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection_data.py @@ -33,6 +33,7 @@ class NewWorkflowCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_workflow_data.py b/rootly_sdk/models/new_workflow_data.py index 6ba3ef1b..3cf1a8d0 100644 --- a/rootly_sdk/models/new_workflow_data.py +++ b/rootly_sdk/models/new_workflow_data.py @@ -28,6 +28,7 @@ class NewWorkflowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_workflow_form_field_condition.py b/rootly_sdk/models/new_workflow_form_field_condition.py index 774c79b3..ac32f11d 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition.py +++ b/rootly_sdk/models/new_workflow_form_field_condition.py @@ -24,6 +24,7 @@ class NewWorkflowFormFieldCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_form_field_condition_data.py b/rootly_sdk/models/new_workflow_form_field_condition_data.py index 3e2578eb..ccbc5b02 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition_data.py +++ b/rootly_sdk/models/new_workflow_form_field_condition_data.py @@ -31,6 +31,7 @@ class NewWorkflowFormFieldConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_workflow_group.py b/rootly_sdk/models/new_workflow_group.py index bb41aa39..cbe30f10 100644 --- a/rootly_sdk/models/new_workflow_group.py +++ b/rootly_sdk/models/new_workflow_group.py @@ -24,6 +24,7 @@ class NewWorkflowGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_group_data.py b/rootly_sdk/models/new_workflow_group_data.py index 9325f311..00fab324 100644 --- a/rootly_sdk/models/new_workflow_group_data.py +++ b/rootly_sdk/models/new_workflow_group_data.py @@ -28,6 +28,7 @@ class NewWorkflowGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_workflow_run.py b/rootly_sdk/models/new_workflow_run.py index 86601dd8..489e4c89 100644 --- a/rootly_sdk/models/new_workflow_run.py +++ b/rootly_sdk/models/new_workflow_run.py @@ -24,6 +24,7 @@ class NewWorkflowRun: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_0.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_0.py index 08d05bd7..75346b25 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_0.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_0.py @@ -32,6 +32,7 @@ class NewWorkflowRunDataAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + immediate: bool | None | Unset if isinstance(self.immediate, Unset): immediate = UNSET diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_1.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_1.py index 6111792e..9bc7f2a1 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_1.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_1.py @@ -33,6 +33,7 @@ class NewWorkflowRunDataAttributesType1: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + incident_id = self.incident_id immediate: bool | None | Unset diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_2.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_2.py index 7344a64d..7e8c4507 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_2.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_2.py @@ -33,6 +33,7 @@ class NewWorkflowRunDataAttributesType2: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + post_mortem_id = self.post_mortem_id immediate: bool | None | Unset diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_3.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_3.py index 9b25708a..4b82e605 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_3.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_3.py @@ -33,6 +33,7 @@ class NewWorkflowRunDataAttributesType3: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + action_item_id = self.action_item_id immediate: bool | None | Unset diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_4.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_4.py index a01ead3d..b55b35af 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_4.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_4.py @@ -33,6 +33,7 @@ class NewWorkflowRunDataAttributesType4: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + alert_id = self.alert_id immediate: bool | None | Unset diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_5.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_5.py index 678f16da..797c45f2 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_5.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_5.py @@ -33,6 +33,7 @@ class NewWorkflowRunDataAttributesType5: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + pulse_id = self.pulse_id immediate: bool | None | Unset diff --git a/rootly_sdk/models/new_workflow_task.py b/rootly_sdk/models/new_workflow_task.py index d32d2579..0e065727 100644 --- a/rootly_sdk/models/new_workflow_task.py +++ b/rootly_sdk/models/new_workflow_task.py @@ -24,6 +24,7 @@ class NewWorkflowTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_task_data.py b/rootly_sdk/models/new_workflow_task_data.py index 7888ac5a..eab5be62 100644 --- a/rootly_sdk/models/new_workflow_task_data.py +++ b/rootly_sdk/models/new_workflow_task_data.py @@ -28,6 +28,7 @@ class NewWorkflowTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_workflow_task_data_attributes.py b/rootly_sdk/models/new_workflow_task_data_attributes.py index 58fa6ade..a38f85cc 100644 --- a/rootly_sdk/models/new_workflow_task_data_attributes.py +++ b/rootly_sdk/models/new_workflow_task_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -10,16 +10,25 @@ if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import AttachRetrospectivePdfToJiraIssueTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -34,6 +43,7 @@ from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -60,6 +70,8 @@ from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -70,26 +82,60 @@ from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -110,6 +156,7 @@ from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -141,41 +188,56 @@ class NewWorkflowTaskDataAttributes: """ Attributes: - task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddRoleTaskParams | - AddTeamTaskParams | AddToTimelineTaskParams | Any | ArchiveMicrosoftTeamsChannelsTaskParams | - ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams | AutoAssignRoleOpsgenieTaskParams | - AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams | - ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | - CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | CreateAsanaTaskTaskParams | - CreateClickupTaskTaskParams | CreateCodaPageTaskParams | CreateConfluencePageTaskParams | - CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | CreateGithubIssueTaskParams | - CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | CreateGoogleDocsPageTaskParams | - CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams | - CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | CreateIncidentPostmortemTaskParams | - CreateIncidentTaskParams | CreateJiraIssueTaskParams | CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams - | CreateLinearIssueCommentTaskParams | CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | - CreateMicrosoftTeamsChannelTaskParams | CreateMicrosoftTeamsChatTaskParams | - CreateMicrosoftTeamsMeetingTaskParams | CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | - CreateNotionPageTaskParams | CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | - CreateOutlookEventTaskParams | CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | - CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | - CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams | - CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | CreateWebexMeetingTaskParams | - CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | - GetAlertsTaskParams | GetPulsesTaskParams | HttpClientTaskParams | InviteToMicrosoftTeamsChannelTaskParams | - InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelRootlyTaskParams | - InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams | AddSlackBookmarkTaskParamsType0 | + AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams | + ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | + AttachDatadogDashboardsTaskParams | AttachRetrospectivePdfToJiraIssueTaskParams | + AutoAssignRoleOpsgenieTaskParams | AutoAssignRolePagerdutyTaskParamsType0 | + AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | + CallPeopleTaskParams | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | + CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | + CreateAsanaTaskTaskParams | CreateClickupTaskTaskParams | CreateCodaPageTaskParams | + CreateConfluencePageTaskParams | CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | + CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | + CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | + CreateGoogleGeminiChatCompletionTaskParams | CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | + CreateIncidentPostmortemTaskParams | CreateIncidentTaskParams | CreateJiraIssueTaskParams | + CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams | CreateLinearIssueCommentTaskParams | + CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | CreateMicrosoftTeamsChannelTaskParams | + CreateMicrosoftTeamsChatTaskParams | CreateMicrosoftTeamsMeetingTaskParams | + CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | CreateNotionPageTaskParams | + CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | CreateOutlookEventTaskParams | + CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | CreateQuipPageTaskParams | + CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | CreateShortcutStoryTaskParamsType0 | + CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | + CreateSubIncidentTaskParams | CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | + CreateWebexMeetingTaskParams | CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | + CreateZoomMeetingTaskParams | GetAlertsTaskParams | GetGithubCommitsTaskParamsType0 | + GetGithubCommitsTaskParamsType1 | GetGitlabCommitsTaskParamsType0 | GetGitlabCommitsTaskParamsType1 | + GetPulsesTaskParams | HttpClientTaskParams | InviteToGoogleChatSpaceTaskParams | + InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelPagerdutyTaskParamsType0 | + InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelTaskParamsType0 | InviteToSlackChannelTaskParamsType1 | InviteToSlackChannelTaskParamsType2 + | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | - PageRootlyOnCallRespondersTaskParams | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | - RemoveGoogleDocsPermissionsTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | - RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams | - SendMicrosoftTeamsChatMessageTaskParams | SendSmsTaskParams | SendWhatsappMessageTaskParams | - SnapshotDatadogGraphTaskParams | SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | - SnapshotNewRelicGraphTaskParams | TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | - UpdateActionItemTaskParams | UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | - UpdateAttachedAlertsTaskParams | UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | - UpdateConfluencePageTaskParams | UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | - UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | + PageRootlyOnCallRespondersTaskParams | PageVictorOpsOnCallRespondersTaskParamsType0 | + PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | + RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams | RenameGoogleChatSpaceTaskParams | + RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | + SendDashboardReportTaskParams | SendEmailTaskParams | SendGoogleChatAttachmentsTaskParams | + SendGoogleChatMessageTaskParams | SendMicrosoftTeamsBlocksTaskParamsType0 | + SendMicrosoftTeamsChatMessageTaskParams | SendMicrosoftTeamsMessageTaskParamsType0 | + SendSlackBlocksTaskParamsType0 | SendSlackBlocksTaskParamsType1 | SendSlackBlocksTaskParamsType2 | + SendSlackMessageTaskParamsType0 | SendSlackMessageTaskParamsType1 | SendSlackMessageTaskParamsType2 | + SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams | + SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | SnapshotNewRelicGraphTaskParams | + TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | UpdateActionItemTaskParams | + UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | UpdateAttachedAlertsTaskParams | + UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | UpdateConfluencePageTaskParams | + UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | UpdateGithubIssueTaskParams | + UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | @@ -192,17 +254,25 @@ class NewWorkflowTaskDataAttributes: task_params: ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -216,6 +286,7 @@ class NewWorkflowTaskDataAttributes: | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -243,6 +314,8 @@ class NewWorkflowTaskDataAttributes: | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -253,26 +326,50 @@ class NewWorkflowTaskDataAttributes: | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -293,6 +390,7 @@ class NewWorkflowTaskDataAttributes: | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -324,19 +422,29 @@ class NewWorkflowTaskDataAttributes: def to_dict(self) -> dict[str, Any]: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams @@ -348,6 +456,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -374,6 +483,8 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -384,26 +495,60 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -424,6 +569,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -447,13 +593,17 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams - task_params: Any | dict[str, Any] + task_params: dict[str, Any] if isinstance(self.task_params, AddActionItemTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateActionItemTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddRoleTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddTeamTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddToTimelineTaskParams): @@ -466,6 +616,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, AutoAssignRoleRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdatePagerdutyIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreatePagerdutyStatusUpdateTaskParams): @@ -530,6 +684,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateJiraSubtaskTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AttachRetrospectivePdfToJiraIssueTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearIssueTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearSubtaskIssueTaskParams): @@ -542,8 +698,28 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMicrosoftTeamsChatTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddMicrosoftTeamsChatTabTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatMessageTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatAttachmentsTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ArchiveGoogleChatSpacesTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, RenameGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, UpdateGoogleChatSpaceDescriptionTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ChangeGoogleChatSpacePrivacyTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, ArchiveMicrosoftTeamsChannelsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, RenameMicrosoftTeamsChannelTaskParams): @@ -552,8 +728,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateNotionPageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsMessageTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendMicrosoftTeamsChatMessageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsBlocksTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateNotionPageTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateQuipPageTaskParams): @@ -568,6 +748,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateServiceNowIncidentTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateShortcutTaskTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateTrelloCardTaskParams): @@ -584,6 +768,14 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateZoomMeetingTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetPulsesTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetAlertsTaskParams): @@ -594,6 +786,18 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToMicrosoftTeamsChannelRootlyTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelVictorOpsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PageOpsgenieOnCallRespondersTaskParams): @@ -612,6 +816,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, PagePagerdutyOnCallRespondersTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateVictorOpsIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PrintTaskParams): @@ -632,6 +840,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateSlackChannelTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendSmsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendWhatsappMessageTaskParams): @@ -686,6 +900,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, TriggerWorkflowTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpenaiChatCompletionTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateWatsonxChatCompletionTaskParams): @@ -694,10 +914,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMistralChatCompletionTaskParams): task_params = self.task_params.to_dict() - elif isinstance(self.task_params, CreateAnthropicChatCompletionTaskParams): - task_params = self.task_params.to_dict() else: - task_params = self.task_params + task_params = self.task_params.to_dict() name = self.name @@ -729,16 +947,27 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -753,6 +982,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -779,6 +1009,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -789,26 +1021,60 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -829,6 +1095,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -859,17 +1126,25 @@ def _parse_task_params( ) -> ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -883,6 +1158,7 @@ def _parse_task_params( | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -910,6 +1186,8 @@ def _parse_task_params( | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -920,26 +1198,50 @@ def _parse_task_params( | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -960,6 +1262,7 @@ def _parse_task_params( | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -1007,6 +1310,22 @@ def _parse_task_params( return task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_0 = AddSlackBookmarkTaskParamsType0.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_1 = AddSlackBookmarkTaskParamsType1.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1055,6 +1374,26 @@ def _parse_task_params( return task_params_type_9 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_0 = ( + AutoAssignRolePagerdutyTaskParamsType0.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_1 = ( + AutoAssignRolePagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1314,7 +1653,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) + task_params_type_43 = AttachRetrospectivePdfToJiraIssueTaskParams.from_dict(data) return task_params_type_43 except (TypeError, ValueError, AttributeError, KeyError): @@ -1322,7 +1661,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) + task_params_type_44 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_44 except (TypeError, ValueError, AttributeError, KeyError): @@ -1330,7 +1669,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) + task_params_type_45 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_45 except (TypeError, ValueError, AttributeError, KeyError): @@ -1338,7 +1677,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) + task_params_type_46 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_46 except (TypeError, ValueError, AttributeError, KeyError): @@ -1346,7 +1685,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_47 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_47 except (TypeError, ValueError, AttributeError, KeyError): @@ -1354,7 +1693,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + task_params_type_48 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_48 except (TypeError, ValueError, AttributeError, KeyError): @@ -1362,15 +1701,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) + task_params_type_49 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + + return task_params_type_49 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_microsoft_teams_tab_task_params_type_0 = ( + AddMicrosoftTeamsTabTaskParamsType0.from_dict(data) + ) - return task_params_type_50 + return componentsschemasadd_microsoft_teams_tab_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) + componentsschemasadd_microsoft_teams_tab_task_params_type_1 = ( + AddMicrosoftTeamsTabTaskParamsType1.from_dict(data) + ) + + return componentsschemasadd_microsoft_teams_tab_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_51 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_51 except (TypeError, ValueError, AttributeError, KeyError): @@ -1378,7 +1737,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_52 = CreateGoogleChatSpaceTaskParams.from_dict(data) return task_params_type_52 except (TypeError, ValueError, AttributeError, KeyError): @@ -1386,7 +1745,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_53 = SendGoogleChatMessageTaskParams.from_dict(data) return task_params_type_53 except (TypeError, ValueError, AttributeError, KeyError): @@ -1394,7 +1753,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) + task_params_type_54 = SendGoogleChatAttachmentsTaskParams.from_dict(data) return task_params_type_54 except (TypeError, ValueError, AttributeError, KeyError): @@ -1402,7 +1761,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) + task_params_type_55 = InviteToGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_55 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_56 = ArchiveGoogleChatSpacesTaskParams.from_dict(data) return task_params_type_56 except (TypeError, ValueError, AttributeError, KeyError): @@ -1410,7 +1777,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) + task_params_type_57 = RenameGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_57 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_58 = UpdateGoogleChatSpaceDescriptionTaskParams.from_dict(data) return task_params_type_58 except (TypeError, ValueError, AttributeError, KeyError): @@ -1418,7 +1793,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) + task_params_type_59 = ChangeGoogleChatSpacePrivacyTaskParams.from_dict(data) return task_params_type_59 except (TypeError, ValueError, AttributeError, KeyError): @@ -1426,7 +1801,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) + task_params_type_60 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_60 except (TypeError, ValueError, AttributeError, KeyError): @@ -1434,7 +1809,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) + task_params_type_61 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_61 except (TypeError, ValueError, AttributeError, KeyError): @@ -1442,7 +1817,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) + task_params_type_62 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_62 except (TypeError, ValueError, AttributeError, KeyError): @@ -1450,7 +1825,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) + task_params_type_63 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_63 except (TypeError, ValueError, AttributeError, KeyError): @@ -1458,23 +1833,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_message_task_params_type_0 = ( + SendMicrosoftTeamsMessageTaskParamsType0.from_dict(data) + ) - return task_params_type_64 + return componentsschemassend_microsoft_teams_message_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) + task_params_type_65 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) - return task_params_type_66 + return task_params_type_65 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_blocks_task_params_type_0 = ( + SendMicrosoftTeamsBlocksTaskParamsType0.from_dict(data) + ) + + return componentsschemassend_microsoft_teams_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_67 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_67 except (TypeError, ValueError, AttributeError, KeyError): @@ -1482,7 +1869,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) + task_params_type_68 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_68 except (TypeError, ValueError, AttributeError, KeyError): @@ -1490,7 +1877,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) + task_params_type_69 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_69 except (TypeError, ValueError, AttributeError, KeyError): @@ -1498,7 +1885,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) + task_params_type_70 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_70 except (TypeError, ValueError, AttributeError, KeyError): @@ -1506,7 +1893,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) + task_params_type_71 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_71 except (TypeError, ValueError, AttributeError, KeyError): @@ -1514,7 +1901,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) + task_params_type_72 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_72 except (TypeError, ValueError, AttributeError, KeyError): @@ -1522,7 +1909,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) + task_params_type_73 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_73 except (TypeError, ValueError, AttributeError, KeyError): @@ -1530,7 +1917,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_76 = GetPulsesTaskParams.from_dict(data) + componentsschemascreate_shortcut_story_task_params_type_0 = ( + CreateShortcutStoryTaskParamsType0.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemascreate_shortcut_story_task_params_type_1 = ( + CreateShortcutStoryTaskParamsType1.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_75 = CreateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_75 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_76 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_76 except (TypeError, ValueError, AttributeError, KeyError): @@ -1538,7 +1953,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_77 = GetAlertsTaskParams.from_dict(data) + task_params_type_77 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_77 except (TypeError, ValueError, AttributeError, KeyError): @@ -1546,7 +1961,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_78 = HttpClientTaskParams.from_dict(data) + task_params_type_78 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_78 except (TypeError, ValueError, AttributeError, KeyError): @@ -1554,7 +1969,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) + task_params_type_79 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_79 except (TypeError, ValueError, AttributeError, KeyError): @@ -1562,7 +1977,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) + task_params_type_80 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_80 except (TypeError, ValueError, AttributeError, KeyError): @@ -1570,23 +1985,55 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) + task_params_type_81 = CreateMotionTaskTaskParams.from_dict(data) + + return task_params_type_81 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_82 = CreateZoomMeetingTaskParams.from_dict(data) + + return task_params_type_82 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_0 = GetGithubCommitsTaskParamsType0.from_dict(data) + + return componentsschemasget_github_commits_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_1 = GetGithubCommitsTaskParamsType1.from_dict(data) - return task_params_type_83 + return componentsschemasget_github_commits_task_params_type_1 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_0 = GetGitlabCommitsTaskParamsType0.from_dict(data) - return task_params_type_84 + return componentsschemasget_gitlab_commits_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_1 = GetGitlabCommitsTaskParamsType1.from_dict(data) + + return componentsschemasget_gitlab_commits_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_85 = GetPulsesTaskParams.from_dict(data) return task_params_type_85 except (TypeError, ValueError, AttributeError, KeyError): @@ -1594,7 +2041,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) + task_params_type_86 = GetAlertsTaskParams.from_dict(data) return task_params_type_86 except (TypeError, ValueError, AttributeError, KeyError): @@ -1602,7 +2049,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) + task_params_type_87 = HttpClientTaskParams.from_dict(data) return task_params_type_87 except (TypeError, ValueError, AttributeError, KeyError): @@ -1610,7 +2057,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_88 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_88 except (TypeError, ValueError, AttributeError, KeyError): @@ -1618,7 +2065,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_89 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_89 except (TypeError, ValueError, AttributeError, KeyError): @@ -1626,7 +2073,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_90 = InviteToMicrosoftTeamsChannelRootlyTaskParams.from_dict(data) return task_params_type_90 except (TypeError, ValueError, AttributeError, KeyError): @@ -1634,15 +2081,57 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 = ( + InviteToSlackChannelPagerdutyTaskParamsType0.from_dict(data) + ) - return task_params_type_91 + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 = ( + InviteToSlackChannelPagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_0 = ( + InviteToSlackChannelTaskParamsType0.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_1 = ( + InviteToSlackChannelTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_2 = ( + InviteToSlackChannelTaskParamsType2.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_93 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_93 except (TypeError, ValueError, AttributeError, KeyError): @@ -1650,7 +2139,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = PrintTaskParams.from_dict(data) + task_params_type_94 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_94 except (TypeError, ValueError, AttributeError, KeyError): @@ -1658,7 +2147,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = PublishIncidentTaskParams.from_dict(data) + task_params_type_95 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_95 except (TypeError, ValueError, AttributeError, KeyError): @@ -1666,7 +2155,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = RedisClientTaskParams.from_dict(data) + task_params_type_96 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_96 except (TypeError, ValueError, AttributeError, KeyError): @@ -1674,7 +2163,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_97 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_97 except (TypeError, ValueError, AttributeError, KeyError): @@ -1682,7 +2171,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_98 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_98 except (TypeError, ValueError, AttributeError, KeyError): @@ -1690,7 +2179,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_99 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_99 except (TypeError, ValueError, AttributeError, KeyError): @@ -1698,7 +2187,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = SendEmailTaskParams.from_dict(data) + task_params_type_100 = PageRootlyOnCallRespondersTaskParams.from_dict(data) return task_params_type_100 except (TypeError, ValueError, AttributeError, KeyError): @@ -1706,7 +2195,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_101 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) return task_params_type_101 except (TypeError, ValueError, AttributeError, KeyError): @@ -1714,15 +2203,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) + componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 = ( + PageVictorOpsOnCallRespondersTaskParamsType0.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 = ( + PageVictorOpsOnCallRespondersTaskParamsType1.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_103 = UpdateVictorOpsIncidentTaskParams.from_dict(data) - return task_params_type_102 + return task_params_type_103 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SendSmsTaskParams.from_dict(data) + task_params_type_104 = PrintTaskParams.from_dict(data) return task_params_type_104 except (TypeError, ValueError, AttributeError, KeyError): @@ -1730,7 +2239,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_105 = PublishIncidentTaskParams.from_dict(data) return task_params_type_105 except (TypeError, ValueError, AttributeError, KeyError): @@ -1738,7 +2247,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_106 = RedisClientTaskParams.from_dict(data) return task_params_type_106 except (TypeError, ValueError, AttributeError, KeyError): @@ -1746,7 +2255,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_107 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_107 except (TypeError, ValueError, AttributeError, KeyError): @@ -1754,7 +2263,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_108 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_108 except (TypeError, ValueError, AttributeError, KeyError): @@ -1762,7 +2271,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_109 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_109 except (TypeError, ValueError, AttributeError, KeyError): @@ -1770,7 +2279,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_110 = SendEmailTaskParams.from_dict(data) return task_params_type_110 except (TypeError, ValueError, AttributeError, KeyError): @@ -1778,7 +2287,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_111 = SendDashboardReportTaskParams.from_dict(data) return task_params_type_111 except (TypeError, ValueError, AttributeError, KeyError): @@ -1786,7 +2295,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_112 = CreateSlackChannelTaskParams.from_dict(data) return task_params_type_112 except (TypeError, ValueError, AttributeError, KeyError): @@ -1794,15 +2303,31 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_0 = SendSlackMessageTaskParamsType0.from_dict(data) - return task_params_type_113 + return componentsschemassend_slack_message_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_1 = SendSlackMessageTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_2 = SendSlackMessageTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_114 = SendSmsTaskParams.from_dict(data) return task_params_type_114 except (TypeError, ValueError, AttributeError, KeyError): @@ -1810,7 +2335,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_115 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_115 except (TypeError, ValueError, AttributeError, KeyError): @@ -1818,7 +2343,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_116 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_116 except (TypeError, ValueError, AttributeError, KeyError): @@ -1826,7 +2351,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_117 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_117 except (TypeError, ValueError, AttributeError, KeyError): @@ -1834,7 +2359,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_118 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_118 except (TypeError, ValueError, AttributeError, KeyError): @@ -1842,7 +2367,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_119 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_119 except (TypeError, ValueError, AttributeError, KeyError): @@ -1850,7 +2375,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_120 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_120 except (TypeError, ValueError, AttributeError, KeyError): @@ -1858,7 +2383,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_121 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_121 except (TypeError, ValueError, AttributeError, KeyError): @@ -1866,7 +2391,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_122 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_122 except (TypeError, ValueError, AttributeError, KeyError): @@ -1874,7 +2399,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateStatusTaskParams.from_dict(data) + task_params_type_123 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_123 except (TypeError, ValueError, AttributeError, KeyError): @@ -1882,7 +2407,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_124 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_124 except (TypeError, ValueError, AttributeError, KeyError): @@ -1890,7 +2415,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_125 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_125 except (TypeError, ValueError, AttributeError, KeyError): @@ -1898,7 +2423,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_126 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_126 except (TypeError, ValueError, AttributeError, KeyError): @@ -1906,7 +2431,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_127 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_127 except (TypeError, ValueError, AttributeError, KeyError): @@ -1914,7 +2439,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_128 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_128 except (TypeError, ValueError, AttributeError, KeyError): @@ -1922,7 +2447,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_129 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_129 except (TypeError, ValueError, AttributeError, KeyError): @@ -1930,7 +2455,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_130 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_130 except (TypeError, ValueError, AttributeError, KeyError): @@ -1938,7 +2463,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_131 = UpdateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_131 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_132 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_132 except (TypeError, ValueError, AttributeError, KeyError): @@ -1946,7 +2479,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_133 = UpdateStatusTaskParams.from_dict(data) return task_params_type_133 except (TypeError, ValueError, AttributeError, KeyError): @@ -1954,7 +2487,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_134 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_134 except (TypeError, ValueError, AttributeError, KeyError): @@ -1962,7 +2495,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_135 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_135 except (TypeError, ValueError, AttributeError, KeyError): @@ -1970,139 +2503,104 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_136 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_136 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - AddActionItemTaskParams - | AddMicrosoftTeamsChatTabTaskParams - | AddRoleTaskParams - | AddTeamTaskParams - | AddToTimelineTaskParams - | Any - | ArchiveMicrosoftTeamsChannelsTaskParams - | ArchiveSlackChannelsTaskParams - | AttachDatadogDashboardsTaskParams - | AutoAssignRoleOpsgenieTaskParams - | AutoAssignRoleRootlyTaskParams - | AutoAssignRoleVictorOpsTaskParams - | CallPeopleTaskParams - | ChangeSlackChannelPrivacyTaskParams - | CreateAirtableTableRecordTaskParams - | CreateAnthropicChatCompletionTaskParams - | CreateAsanaSubtaskTaskParams - | CreateAsanaTaskTaskParams - | CreateClickupTaskTaskParams - | CreateCodaPageTaskParams - | CreateConfluencePageTaskParams - | CreateDatadogNotebookTaskParams - | CreateDropboxPaperPageTaskParams - | CreateGithubIssueTaskParams - | CreateGitlabIssueTaskParams - | CreateGoogleCalendarEventTaskParams - | CreateGoogleDocsPageTaskParams - | CreateGoogleDocsPermissionsTaskParams - | CreateGoogleGeminiChatCompletionTaskParams - | CreateGoogleMeetingTaskParams - | CreateGoToMeetingTaskParams - | CreateIncidentPostmortemTaskParams - | CreateIncidentTaskParams - | CreateJiraIssueTaskParams - | CreateJiraSubtaskTaskParams - | CreateJsmopsAlertTaskParams - | CreateLinearIssueCommentTaskParams - | CreateLinearIssueTaskParams - | CreateLinearSubtaskIssueTaskParams - | CreateMicrosoftTeamsChannelTaskParams - | CreateMicrosoftTeamsChatTaskParams - | CreateMicrosoftTeamsMeetingTaskParams - | CreateMistralChatCompletionTaskParams - | CreateMotionTaskTaskParams - | CreateNotionPageTaskParams - | CreateOpenaiChatCompletionTaskParams - | CreateOpsgenieAlertTaskParams - | CreateOutlookEventTaskParams - | CreatePagerdutyStatusUpdateTaskParams - | CreatePagertreeAlertTaskParams - | CreateQuipPageTaskParams - | CreateServiceNowIncidentTaskParams - | CreateSharepointPageTaskParams - | CreateShortcutTaskTaskParams - | CreateSlackChannelTaskParams - | CreateSubIncidentTaskParams - | CreateTrelloCardTaskParams - | CreateWatsonxChatCompletionTaskParams - | CreateWebexMeetingTaskParams - | CreateZendeskJiraLinkTaskParams - | CreateZendeskTicketTaskParams - | CreateZoomMeetingTaskParams - | GetAlertsTaskParams - | GetPulsesTaskParams - | HttpClientTaskParams - | InviteToMicrosoftTeamsChannelTaskParams - | InviteToSlackChannelOpsgenieTaskParams - | InviteToSlackChannelRootlyTaskParams - | InviteToSlackChannelVictorOpsTaskParams - | PageJsmopsOnCallRespondersTaskParams - | PageOpsgenieOnCallRespondersTaskParams - | PagePagerdutyOnCallRespondersTaskParams - | PageRootlyOnCallRespondersTaskParams - | PrintTaskParams - | PublishIncidentTaskParams - | RedisClientTaskParams - | RemoveGoogleDocsPermissionsTaskParams - | RenameMicrosoftTeamsChannelTaskParams - | RenameSlackChannelTaskParams - | RunCommandHerokuTaskParams - | SendDashboardReportTaskParams - | SendEmailTaskParams - | SendMicrosoftTeamsChatMessageTaskParams - | SendSmsTaskParams - | SendWhatsappMessageTaskParams - | SnapshotDatadogGraphTaskParams - | SnapshotGrafanaDashboardTaskParams - | SnapshotLookerLookTaskParams - | SnapshotNewRelicGraphTaskParams - | TriggerWorkflowTaskParams - | TweetTwitterMessageTaskParams - | UpdateActionItemTaskParams - | UpdateAirtableTableRecordTaskParams - | UpdateAsanaTaskTaskParams - | UpdateAttachedAlertsTaskParams - | UpdateClickupTaskTaskParams - | UpdateCodaPageTaskParams - | UpdateConfluencePageTaskParams - | UpdateDatadogNotebookTaskParams - | UpdateDropboxPaperPageTaskParams - | UpdateGithubIssueTaskParams - | UpdateGitlabIssueTaskParams - | UpdateGoogleCalendarEventTaskParams - | UpdateGoogleDocsPageTaskParams - | UpdateIncidentPostmortemTaskParams - | UpdateIncidentStatusTimestampTaskParams - | UpdateIncidentTaskParams - | UpdateJiraIssueTaskParams - | UpdateLinearIssueTaskParams - | UpdateMotionTaskTaskParams - | UpdateNotionPageTaskParams - | UpdateOpsgenieAlertTaskParams - | UpdateOpsgenieIncidentTaskParams - | UpdatePagerdutyIncidentTaskParams - | UpdatePagertreeAlertTaskParams - | UpdateQuipPageTaskParams - | UpdateServiceNowIncidentTaskParams - | UpdateSharepointPageTaskParams - | UpdateShortcutStoryTaskParams - | UpdateShortcutTaskTaskParams - | UpdateSlackChannelTopicTaskParams - | UpdateStatusTaskParams - | UpdateTrelloCardTaskParams - | UpdateVictorOpsIncidentTaskParams - | UpdateZendeskTicketTaskParams, - data, - ) + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_137 = UpdateMotionTaskTaskParams.from_dict(data) + + return task_params_type_137 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_138 = UpdateZendeskTicketTaskParams.from_dict(data) + + return task_params_type_138 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_139 = UpdateAttachedAlertsTaskParams.from_dict(data) + + return task_params_type_139 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_140 = TriggerWorkflowTaskParams.from_dict(data) + + return task_params_type_140 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_0 = SendSlackBlocksTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_1 = SendSlackBlocksTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_2 = SendSlackBlocksTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_142 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + + return task_params_type_142 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_143 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + + return task_params_type_143 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_144 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + + return task_params_type_144 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_145 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_145 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + task_params_type_146 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_146 task_params = _parse_task_params(d.pop("task_params")) diff --git a/rootly_sdk/models/on_call_pay_report.py b/rootly_sdk/models/on_call_pay_report.py index 566fea98..dad69a6f 100644 --- a/rootly_sdk/models/on_call_pay_report.py +++ b/rootly_sdk/models/on_call_pay_report.py @@ -36,7 +36,10 @@ class OnCallPayReport: has_single_rate (bool | Unset): Whether a single rate is applied to all users. enabled_granular_time_breakdown (bool | Unset): Whether granular time breakdown is enabled. last_generated_at (datetime.datetime | None | Unset): When the report was last generated. - time_zone (None | str | Unset): The team's IANA timezone used to interpret start_date and end_date. + time_zone (None | str | Unset): The IANA timezone used to compute day and weekend boundaries for this report. + Defaults to the team's timezone. + use_responders_time_zone (bool | Unset): When true, each responder's personal timezone is used for their pay + calculation; otherwise the report-wide time_zone is used. csv_file_url (None | str | Unset): Download URL for the generated CSV report. Null until the report is generated. xlsx_file_url (None | str | Unset): Download URL for the generated XLSX report. Null until the report is @@ -61,6 +64,7 @@ class OnCallPayReport: enabled_granular_time_breakdown: bool | Unset = UNSET last_generated_at: datetime.datetime | None | Unset = UNSET time_zone: None | str | Unset = UNSET + use_responders_time_zone: bool | Unset = UNSET csv_file_url: None | str | Unset = UNSET xlsx_file_url: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -114,6 +118,8 @@ def to_dict(self) -> dict[str, Any]: else: time_zone = self.time_zone + use_responders_time_zone = self.use_responders_time_zone + csv_file_url: None | str | Unset if isinstance(self.csv_file_url, Unset): csv_file_url = UNSET @@ -163,6 +169,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["last_generated_at"] = last_generated_at if time_zone is not UNSET: field_dict["time_zone"] = time_zone + if use_responders_time_zone is not UNSET: + field_dict["use_responders_time_zone"] = use_responders_time_zone if csv_file_url is not UNSET: field_dict["csv_file_url"] = csv_file_url if xlsx_file_url is not UNSET: @@ -236,6 +244,8 @@ def _parse_time_zone(data: object) -> None | str | Unset: time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) + use_responders_time_zone = d.pop("use_responders_time_zone", UNSET) + def _parse_csv_file_url(data: object) -> None | str | Unset: if data is None: return data @@ -273,6 +283,7 @@ def _parse_xlsx_file_url(data: object) -> None | str | Unset: enabled_granular_time_breakdown=enabled_granular_time_breakdown, last_generated_at=last_generated_at, time_zone=time_zone, + use_responders_time_zone=use_responders_time_zone, csv_file_url=csv_file_url, xlsx_file_url=xlsx_file_url, ) diff --git a/rootly_sdk/models/on_call_pay_report_list.py b/rootly_sdk/models/on_call_pay_report_list.py index 57e63961..8bf6f298 100644 --- a/rootly_sdk/models/on_call_pay_report_list.py +++ b/rootly_sdk/models/on_call_pay_report_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_pay_report_list_data_item import OnCallPayReportListDataItem @@ -22,14 +25,17 @@ class OnCallPayReportList: data (list[OnCallPayReportListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[OnCallPayReportListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_pay_report_list_data_item import OnCallPayReportListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_pay_report_list = cls( data=data, links=links, meta=meta, + included=included, ) on_call_pay_report_list.additional_properties = d diff --git a/rootly_sdk/models/on_call_pay_report_list_data_item.py b/rootly_sdk/models/on_call_pay_report_list_data_item.py index 19d63be2..4de3e80b 100644 --- a/rootly_sdk/models/on_call_pay_report_list_data_item.py +++ b/rootly_sdk/models/on_call_pay_report_list_data_item.py @@ -33,6 +33,7 @@ class OnCallPayReportListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_pay_report_response.py b/rootly_sdk/models/on_call_pay_report_response.py index 28700909..4094814e 100644 --- a/rootly_sdk/models/on_call_pay_report_response.py +++ b/rootly_sdk/models/on_call_pay_report_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData @@ -18,14 +21,24 @@ class OnCallPayReportResponse: """ Attributes: data (OnCallPayReportResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: OnCallPayReportResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData d = dict(src_dict) data = OnCallPayReportResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_pay_report_response = cls( data=data, + included=included, ) on_call_pay_report_response.additional_properties = d diff --git a/rootly_sdk/models/on_call_pay_report_response_data.py b/rootly_sdk/models/on_call_pay_report_response_data.py index b783bdaa..c072c414 100644 --- a/rootly_sdk/models/on_call_pay_report_response_data.py +++ b/rootly_sdk/models/on_call_pay_report_response_data.py @@ -33,6 +33,7 @@ class OnCallPayReportResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_role.py b/rootly_sdk/models/on_call_role.py index b948aaca..6f9fbc29 100644 --- a/rootly_sdk/models/on_call_role.py +++ b/rootly_sdk/models/on_call_role.py @@ -38,6 +38,10 @@ OnCallRoleAuditsPermissionsItem, check_on_call_role_audits_permissions_item, ) +from ..models.on_call_role_catalogs_permissions_item import ( + OnCallRoleCatalogsPermissionsItem, + check_on_call_role_catalogs_permissions_item, +) from ..models.on_call_role_contacts_permissions_item import ( OnCallRoleContactsPermissionsItem, check_on_call_role_contacts_permissions_item, @@ -46,6 +50,10 @@ OnCallRoleEscalationPoliciesPermissionsItem, check_on_call_role_escalation_policies_permissions_item, ) +from ..models.on_call_role_functionalities_permissions_item import ( + OnCallRoleFunctionalitiesPermissionsItem, + check_on_call_role_functionalities_permissions_item, +) from ..models.on_call_role_groups_permissions_item import ( OnCallRoleGroupsPermissionsItem, check_on_call_role_groups_permissions_item, @@ -128,8 +136,10 @@ class OnCallRole: schedule_override_permissions (list[OnCallRoleScheduleOverridePermissionsItem] | Unset): schedules_permissions (list[OnCallRoleSchedulesPermissionsItem] | Unset): services_permissions (list[OnCallRoleServicesPermissionsItem] | Unset): + functionalities_permissions (list[OnCallRoleFunctionalitiesPermissionsItem] | Unset): webhooks_permissions (list[OnCallRoleWebhooksPermissionsItem] | Unset): workflows_permissions (list[OnCallRoleWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[OnCallRoleCatalogsPermissionsItem] | Unset): """ name: str @@ -157,8 +167,10 @@ class OnCallRole: schedule_override_permissions: list[OnCallRoleScheduleOverridePermissionsItem] | Unset = UNSET schedules_permissions: list[OnCallRoleSchedulesPermissionsItem] | Unset = UNSET services_permissions: list[OnCallRoleServicesPermissionsItem] | Unset = UNSET + functionalities_permissions: list[OnCallRoleFunctionalitiesPermissionsItem] | Unset = UNSET webhooks_permissions: list[OnCallRoleWebhooksPermissionsItem] | Unset = UNSET workflows_permissions: list[OnCallRoleWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[OnCallRoleCatalogsPermissionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -312,6 +324,13 @@ def to_dict(self) -> dict[str, Any]: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) + functionalities_permissions: list[str] | Unset = UNSET + if not isinstance(self.functionalities_permissions, Unset): + functionalities_permissions = [] + for functionalities_permissions_item_data in self.functionalities_permissions: + functionalities_permissions_item: str = functionalities_permissions_item_data + functionalities_permissions.append(functionalities_permissions_item) + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] @@ -326,6 +345,13 @@ def to_dict(self) -> dict[str, Any]: workflows_permissions_item: str = workflows_permissions_item_data workflows_permissions.append(workflows_permissions_item) + catalogs_permissions: list[str] | Unset = UNSET + if not isinstance(self.catalogs_permissions, Unset): + catalogs_permissions = [] + for catalogs_permissions_item_data in self.catalogs_permissions: + catalogs_permissions_item: str = catalogs_permissions_item_data + catalogs_permissions.append(catalogs_permissions_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -379,10 +405,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["schedules_permissions"] = schedules_permissions if services_permissions is not UNSET: field_dict["services_permissions"] = services_permissions + if functionalities_permissions is not UNSET: + field_dict["functionalities_permissions"] = functionalities_permissions if webhooks_permissions is not UNSET: field_dict["webhooks_permissions"] = webhooks_permissions if workflows_permissions is not UNSET: field_dict["workflows_permissions"] = workflows_permissions + if catalogs_permissions is not UNSET: + field_dict["catalogs_permissions"] = catalogs_permissions return field_dict @@ -609,6 +639,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: services_permissions.append(services_permissions_item) + _functionalities_permissions = d.pop("functionalities_permissions", UNSET) + functionalities_permissions: list[OnCallRoleFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = check_on_call_role_functionalities_permissions_item( + functionalities_permissions_item_data + ) + + functionalities_permissions.append(functionalities_permissions_item) + _webhooks_permissions = d.pop("webhooks_permissions", UNSET) webhooks_permissions: list[OnCallRoleWebhooksPermissionsItem] | Unset = UNSET if _webhooks_permissions is not UNSET: @@ -629,6 +670,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: workflows_permissions.append(workflows_permissions_item) + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[OnCallRoleCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_on_call_role_catalogs_permissions_item(catalogs_permissions_item_data) + + catalogs_permissions.append(catalogs_permissions_item) + on_call_role = cls( name=name, created_at=created_at, @@ -655,8 +705,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_override_permissions=schedule_override_permissions, schedules_permissions=schedules_permissions, services_permissions=services_permissions, + functionalities_permissions=functionalities_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, ) on_call_role.additional_properties = d diff --git a/rootly_sdk/models/on_call_role_catalogs_permissions_item.py b/rootly_sdk/models/on_call_role_catalogs_permissions_item.py new file mode 100644 index 00000000..bf74a60e --- /dev/null +++ b/rootly_sdk/models/on_call_role_catalogs_permissions_item.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +OnCallRoleCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +ON_CALL_ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES: set[OnCallRoleCatalogsPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_on_call_role_catalogs_permissions_item(value: str | None) -> OnCallRoleCatalogsPermissionsItem | None: + if value is None: + return None + if value in ON_CALL_ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(OnCallRoleCatalogsPermissionsItem, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ON_CALL_ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/on_call_role_functionalities_permissions_item.py b/rootly_sdk/models/on_call_role_functionalities_permissions_item.py new file mode 100644 index 00000000..851ab807 --- /dev/null +++ b/rootly_sdk/models/on_call_role_functionalities_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +OnCallRoleFunctionalitiesPermissionsItem = Literal["create", "delete", "read", "update"] + +ON_CALL_ROLE_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: set[OnCallRoleFunctionalitiesPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_on_call_role_functionalities_permissions_item( + value: str | None, +) -> OnCallRoleFunctionalitiesPermissionsItem | None: + if value is None: + return None + if value in ON_CALL_ROLE_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: + return cast(OnCallRoleFunctionalitiesPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ON_CALL_ROLE_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/on_call_role_list.py b/rootly_sdk/models/on_call_role_list.py index 18aeada7..ae3d3942 100644 --- a/rootly_sdk/models/on_call_role_list.py +++ b/rootly_sdk/models/on_call_role_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_role_list_data_item import OnCallRoleListDataItem @@ -22,14 +25,17 @@ class OnCallRoleList: data (list[OnCallRoleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[OnCallRoleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_role_list_data_item import OnCallRoleListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_role_list = cls( data=data, links=links, meta=meta, + included=included, ) on_call_role_list.additional_properties = d diff --git a/rootly_sdk/models/on_call_role_list_data_item.py b/rootly_sdk/models/on_call_role_list_data_item.py index bd50500c..2de264b6 100644 --- a/rootly_sdk/models/on_call_role_list_data_item.py +++ b/rootly_sdk/models/on_call_role_list_data_item.py @@ -30,6 +30,7 @@ class OnCallRoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_role_response.py b/rootly_sdk/models/on_call_role_response.py index b574095c..f6ba050c 100644 --- a/rootly_sdk/models/on_call_role_response.py +++ b/rootly_sdk/models/on_call_role_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_role_response_data import OnCallRoleResponseData @@ -18,14 +21,24 @@ class OnCallRoleResponse: """ Attributes: data (OnCallRoleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: OnCallRoleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_role_response_data import OnCallRoleResponseData d = dict(src_dict) data = OnCallRoleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_role_response = cls( data=data, + included=included, ) on_call_role_response.additional_properties = d diff --git a/rootly_sdk/models/on_call_role_response_data.py b/rootly_sdk/models/on_call_role_response_data.py index 2a33ab10..6a49a2a1 100644 --- a/rootly_sdk/models/on_call_role_response_data.py +++ b/rootly_sdk/models/on_call_role_response_data.py @@ -30,6 +30,7 @@ class OnCallRoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_shadow_response.py b/rootly_sdk/models/on_call_shadow_response.py index 1aff7e81..e9e20b04 100644 --- a/rootly_sdk/models/on_call_shadow_response.py +++ b/rootly_sdk/models/on_call_shadow_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_shadow_response_data import OnCallShadowResponseData @@ -18,14 +21,24 @@ class OnCallShadowResponse: """ Attributes: data (OnCallShadowResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: OnCallShadowResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_shadow_response_data import OnCallShadowResponseData d = dict(src_dict) data = OnCallShadowResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_shadow_response = cls( data=data, + included=included, ) on_call_shadow_response.additional_properties = d diff --git a/rootly_sdk/models/on_call_shadow_response_data.py b/rootly_sdk/models/on_call_shadow_response_data.py index 021f310f..b0b5e603 100644 --- a/rootly_sdk/models/on_call_shadow_response_data.py +++ b/rootly_sdk/models/on_call_shadow_response_data.py @@ -33,6 +33,7 @@ class OnCallShadowResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_shadows_list.py b/rootly_sdk/models/on_call_shadows_list.py index 1a0e65b1..cd3e8af6 100644 --- a/rootly_sdk/models/on_call_shadows_list.py +++ b/rootly_sdk/models/on_call_shadows_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_shadows_list_data_item import OnCallShadowsListDataItem @@ -22,14 +25,17 @@ class OnCallShadowsList: data (list[OnCallShadowsListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[OnCallShadowsListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_shadows_list_data_item import OnCallShadowsListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_shadows_list = cls( data=data, links=links, meta=meta, + included=included, ) on_call_shadows_list.additional_properties = d diff --git a/rootly_sdk/models/on_call_shadows_list_data_item.py b/rootly_sdk/models/on_call_shadows_list_data_item.py index 5709fc25..ce854fcf 100644 --- a/rootly_sdk/models/on_call_shadows_list_data_item.py +++ b/rootly_sdk/models/on_call_shadows_list_data_item.py @@ -33,6 +33,7 @@ class OnCallShadowsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/oncall.py b/rootly_sdk/models/oncall.py new file mode 100644 index 00000000..7e3fac08 --- /dev/null +++ b/rootly_sdk/models/oncall.py @@ -0,0 +1,223 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.oncall_notification_type import OncallNotificationType, check_oncall_notification_type +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Oncall") + + +@_attrs_define +class Oncall: + """ + Attributes: + escalation_policy_id (str): ID of the escalation policy + escalation_policy_name (str): Name of the escalation policy + user_id (int): ID of the on-call user + starts_at (datetime.datetime): Start datetime of the on-call shift + ends_at (datetime.datetime): End datetime of the on-call shift + escalation_policy_path_id (None | str | Unset): ID of the escalation policy path + escalation_policy_path_name (None | str | Unset): Name of the escalation policy path + notification_type (OncallNotificationType | Unset): Notification type of the escalation path (audible or quiet) + is_default_path (bool | None | Unset): Whether this is the default escalation path + escalation_level (int | Unset): Level within the escalation policy + schedule_id (None | str | Unset): ID of the schedule + schedule_name (None | str | Unset): Name of the schedule + """ + + escalation_policy_id: str + escalation_policy_name: str + user_id: int + starts_at: datetime.datetime + ends_at: datetime.datetime + escalation_policy_path_id: None | str | Unset = UNSET + escalation_policy_path_name: None | str | Unset = UNSET + notification_type: OncallNotificationType | Unset = UNSET + is_default_path: bool | None | Unset = UNSET + escalation_level: int | Unset = UNSET + schedule_id: None | str | Unset = UNSET + schedule_name: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + escalation_policy_id = self.escalation_policy_id + + escalation_policy_name = self.escalation_policy_name + + user_id = self.user_id + + starts_at = self.starts_at.isoformat() + + ends_at = self.ends_at.isoformat() + + escalation_policy_path_id: None | str | Unset + if isinstance(self.escalation_policy_path_id, Unset): + escalation_policy_path_id = UNSET + else: + escalation_policy_path_id = self.escalation_policy_path_id + + escalation_policy_path_name: None | str | Unset + if isinstance(self.escalation_policy_path_name, Unset): + escalation_policy_path_name = UNSET + else: + escalation_policy_path_name = self.escalation_policy_path_name + + notification_type: str | Unset = UNSET + if not isinstance(self.notification_type, Unset): + notification_type = self.notification_type + + is_default_path: bool | None | Unset + if isinstance(self.is_default_path, Unset): + is_default_path = UNSET + else: + is_default_path = self.is_default_path + + escalation_level = self.escalation_level + + schedule_id: None | str | Unset + if isinstance(self.schedule_id, Unset): + schedule_id = UNSET + else: + schedule_id = self.schedule_id + + schedule_name: None | str | Unset + if isinstance(self.schedule_name, Unset): + schedule_name = UNSET + else: + schedule_name = self.schedule_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "escalation_policy_id": escalation_policy_id, + "escalation_policy_name": escalation_policy_name, + "user_id": user_id, + "starts_at": starts_at, + "ends_at": ends_at, + } + ) + if escalation_policy_path_id is not UNSET: + field_dict["escalation_policy_path_id"] = escalation_policy_path_id + if escalation_policy_path_name is not UNSET: + field_dict["escalation_policy_path_name"] = escalation_policy_path_name + if notification_type is not UNSET: + field_dict["notification_type"] = notification_type + if is_default_path is not UNSET: + field_dict["is_default_path"] = is_default_path + if escalation_level is not UNSET: + field_dict["escalation_level"] = escalation_level + if schedule_id is not UNSET: + field_dict["schedule_id"] = schedule_id + if schedule_name is not UNSET: + field_dict["schedule_name"] = schedule_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + escalation_policy_id = d.pop("escalation_policy_id") + + escalation_policy_name = d.pop("escalation_policy_name") + + user_id = d.pop("user_id") + + starts_at = isoparse(d.pop("starts_at")) + + ends_at = isoparse(d.pop("ends_at")) + + def _parse_escalation_policy_path_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + escalation_policy_path_id = _parse_escalation_policy_path_id(d.pop("escalation_policy_path_id", UNSET)) + + def _parse_escalation_policy_path_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + escalation_policy_path_name = _parse_escalation_policy_path_name(d.pop("escalation_policy_path_name", UNSET)) + + _notification_type = d.pop("notification_type", UNSET) + notification_type: OncallNotificationType | Unset + if isinstance(_notification_type, Unset): + notification_type = UNSET + else: + notification_type = check_oncall_notification_type(_notification_type) + + def _parse_is_default_path(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_default_path = _parse_is_default_path(d.pop("is_default_path", UNSET)) + + escalation_level = d.pop("escalation_level", UNSET) + + def _parse_schedule_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + schedule_id = _parse_schedule_id(d.pop("schedule_id", UNSET)) + + def _parse_schedule_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + schedule_name = _parse_schedule_name(d.pop("schedule_name", UNSET)) + + oncall = cls( + escalation_policy_id=escalation_policy_id, + escalation_policy_name=escalation_policy_name, + user_id=user_id, + starts_at=starts_at, + ends_at=ends_at, + escalation_policy_path_id=escalation_policy_path_id, + escalation_policy_path_name=escalation_policy_path_name, + notification_type=notification_type, + is_default_path=is_default_path, + escalation_level=escalation_level, + schedule_id=schedule_id, + schedule_name=schedule_name, + ) + + oncall.additional_properties = d + return oncall + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_list.py b/rootly_sdk/models/oncall_list.py new file mode 100644 index 00000000..30e12715 --- /dev/null +++ b/rootly_sdk/models/oncall_list.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.oncall_list_data_item import OncallListDataItem + + +T = TypeVar("T", bound="OncallList") + + +@_attrs_define +class OncallList: + """ + Attributes: + data (list[OncallListDataItem]): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: list[OncallListDataItem] + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.oncall_list_data_item import OncallListDataItem + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = OncallListDataItem.from_dict(data_item_data) + + data.append(data_item) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + oncall_list = cls( + data=data, + included=included, + ) + + oncall_list.additional_properties = d + return oncall_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_list_data_item.py b/rootly_sdk/models/oncall_list_data_item.py new file mode 100644 index 00000000..b1860ed4 --- /dev/null +++ b/rootly_sdk/models/oncall_list_data_item.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.oncall_list_data_item_type import OncallListDataItemType, check_oncall_list_data_item_type +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.oncall import Oncall + from ..models.oncall_relationships import OncallRelationships + + +T = TypeVar("T", bound="OncallListDataItem") + + +@_attrs_define +class OncallListDataItem: + """ + Attributes: + id (str): Unique ID of the on-call entry + type_ (OncallListDataItemType): + attributes (Oncall): + relationships (OncallRelationships | Unset): + """ + + id: str + type_: OncallListDataItemType + attributes: Oncall + relationships: OncallRelationships | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + relationships: dict[str, Any] | Unset = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.oncall import Oncall + from ..models.oncall_relationships import OncallRelationships + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_oncall_list_data_item_type(d.pop("type")) + + attributes = Oncall.from_dict(d.pop("attributes")) + + _relationships = d.pop("relationships", UNSET) + relationships: OncallRelationships | Unset + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = OncallRelationships.from_dict(_relationships) + + oncall_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + relationships=relationships, + ) + + oncall_list_data_item.additional_properties = d + return oncall_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_list_data_item_type.py b/rootly_sdk/models/oncall_list_data_item_type.py new file mode 100644 index 00000000..f95be48a --- /dev/null +++ b/rootly_sdk/models/oncall_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +OncallListDataItemType = Literal["on_call_resources"] + +ONCALL_LIST_DATA_ITEM_TYPE_VALUES: set[OncallListDataItemType] = { + "on_call_resources", +} + + +def check_oncall_list_data_item_type(value: str | None) -> OncallListDataItemType | None: + if value is None: + return None + if value in ONCALL_LIST_DATA_ITEM_TYPE_VALUES: + return cast(OncallListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ONCALL_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/oncall_notification_type.py b/rootly_sdk/models/oncall_notification_type.py new file mode 100644 index 00000000..7795813b --- /dev/null +++ b/rootly_sdk/models/oncall_notification_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +OncallNotificationType = Literal["audible", "quiet"] + +ONCALL_NOTIFICATION_TYPE_VALUES: set[OncallNotificationType] = { + "audible", + "quiet", +} + + +def check_oncall_notification_type(value: str | None) -> OncallNotificationType | None: + if value is None: + return None + if value in ONCALL_NOTIFICATION_TYPE_VALUES: + return cast(OncallNotificationType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ONCALL_NOTIFICATION_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/oncall_relationships.py b/rootly_sdk/models/oncall_relationships.py new file mode 100644 index 00000000..c31f0763 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy + from ..models.oncall_relationships_schedule import OncallRelationshipsSchedule + from ..models.oncall_relationships_user import OncallRelationshipsUser + + +T = TypeVar("T", bound="OncallRelationships") + + +@_attrs_define +class OncallRelationships: + """ + Attributes: + user (OncallRelationshipsUser | Unset): + schedule (OncallRelationshipsSchedule | Unset): + escalation_policy (OncallRelationshipsEscalationPolicy | Unset): + """ + + user: OncallRelationshipsUser | Unset = UNSET + schedule: OncallRelationshipsSchedule | Unset = UNSET + escalation_policy: OncallRelationshipsEscalationPolicy | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + user: dict[str, Any] | Unset = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + schedule: dict[str, Any] | Unset = UNSET + if not isinstance(self.schedule, Unset): + schedule = self.schedule.to_dict() + + escalation_policy: dict[str, Any] | Unset = UNSET + if not isinstance(self.escalation_policy, Unset): + escalation_policy = self.escalation_policy.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user is not UNSET: + field_dict["user"] = user + if schedule is not UNSET: + field_dict["schedule"] = schedule + if escalation_policy is not UNSET: + field_dict["escalation_policy"] = escalation_policy + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy + from ..models.oncall_relationships_schedule import OncallRelationshipsSchedule + from ..models.oncall_relationships_user import OncallRelationshipsUser + + d = dict(src_dict) + _user = d.pop("user", UNSET) + user: OncallRelationshipsUser | Unset + if isinstance(_user, Unset): + user = UNSET + else: + user = OncallRelationshipsUser.from_dict(_user) + + _schedule = d.pop("schedule", UNSET) + schedule: OncallRelationshipsSchedule | Unset + if isinstance(_schedule, Unset): + schedule = UNSET + else: + schedule = OncallRelationshipsSchedule.from_dict(_schedule) + + _escalation_policy = d.pop("escalation_policy", UNSET) + escalation_policy: OncallRelationshipsEscalationPolicy | Unset + if isinstance(_escalation_policy, Unset): + escalation_policy = UNSET + else: + escalation_policy = OncallRelationshipsEscalationPolicy.from_dict(_escalation_policy) + + oncall_relationships = cls( + user=user, + schedule=schedule, + escalation_policy=escalation_policy, + ) + + oncall_relationships.additional_properties = d + return oncall_relationships + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_relationships_escalation_policy.py b/rootly_sdk/models/oncall_relationships_escalation_policy.py new file mode 100644 index 00000000..6d5b37df --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_escalation_policy.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.oncall_relationships_escalation_policy_data_type_0 import OncallRelationshipsEscalationPolicyDataType0 + + +T = TypeVar("T", bound="OncallRelationshipsEscalationPolicy") + + +@_attrs_define +class OncallRelationshipsEscalationPolicy: + """ + Attributes: + data (None | OncallRelationshipsEscalationPolicyDataType0 | Unset): + """ + + data: None | OncallRelationshipsEscalationPolicyDataType0 | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.oncall_relationships_escalation_policy_data_type_0 import ( + OncallRelationshipsEscalationPolicyDataType0, + ) + + data: dict[str, Any] | None | Unset + if isinstance(self.data, Unset): + data = UNSET + elif isinstance(self.data, OncallRelationshipsEscalationPolicyDataType0): + data = self.data.to_dict() + else: + data = self.data + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.oncall_relationships_escalation_policy_data_type_0 import ( + OncallRelationshipsEscalationPolicyDataType0, + ) + + d = dict(src_dict) + + def _parse_data(data: object) -> None | OncallRelationshipsEscalationPolicyDataType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + data_type_0 = OncallRelationshipsEscalationPolicyDataType0.from_dict(data) + + return data_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | OncallRelationshipsEscalationPolicyDataType0 | Unset, data) + + data = _parse_data(d.pop("data", UNSET)) + + oncall_relationships_escalation_policy = cls( + data=data, + ) + + oncall_relationships_escalation_policy.additional_properties = d + return oncall_relationships_escalation_policy + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py new file mode 100644 index 00000000..5f4db389 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.oncall_relationships_escalation_policy_data_type_0_type import ( + OncallRelationshipsEscalationPolicyDataType0Type, + check_oncall_relationships_escalation_policy_data_type_0_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OncallRelationshipsEscalationPolicyDataType0") + + +@_attrs_define +class OncallRelationshipsEscalationPolicyDataType0: + """ + Attributes: + id (str | Unset): + type_ (OncallRelationshipsEscalationPolicyDataType0Type | Unset): + """ + + id: str | Unset = UNSET + type_: OncallRelationshipsEscalationPolicyDataType0Type | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: OncallRelationshipsEscalationPolicyDataType0Type | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_oncall_relationships_escalation_policy_data_type_0_type(_type_) + + oncall_relationships_escalation_policy_data_type_0 = cls( + id=id, + type_=type_, + ) + + oncall_relationships_escalation_policy_data_type_0.additional_properties = d + return oncall_relationships_escalation_policy_data_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0_type.py b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0_type.py new file mode 100644 index 00000000..1ccacf6c --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +OncallRelationshipsEscalationPolicyDataType0Type = Literal["escalation_policies"] + +ONCALL_RELATIONSHIPS_ESCALATION_POLICY_DATA_TYPE_0_TYPE_VALUES: set[ + OncallRelationshipsEscalationPolicyDataType0Type +] = { + "escalation_policies", +} + + +def check_oncall_relationships_escalation_policy_data_type_0_type( + value: str | None, +) -> OncallRelationshipsEscalationPolicyDataType0Type | None: + if value is None: + return None + if value in ONCALL_RELATIONSHIPS_ESCALATION_POLICY_DATA_TYPE_0_TYPE_VALUES: + return cast(OncallRelationshipsEscalationPolicyDataType0Type, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ONCALL_RELATIONSHIPS_ESCALATION_POLICY_DATA_TYPE_0_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/oncall_relationships_schedule.py b/rootly_sdk/models/oncall_relationships_schedule.py new file mode 100644 index 00000000..e09c49b7 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_schedule.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 + + +T = TypeVar("T", bound="OncallRelationshipsSchedule") + + +@_attrs_define +class OncallRelationshipsSchedule: + """ + Attributes: + data (None | OncallRelationshipsScheduleDataType0 | Unset): + """ + + data: None | OncallRelationshipsScheduleDataType0 | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 + + data: dict[str, Any] | None | Unset + if isinstance(self.data, Unset): + data = UNSET + elif isinstance(self.data, OncallRelationshipsScheduleDataType0): + data = self.data.to_dict() + else: + data = self.data + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 + + d = dict(src_dict) + + def _parse_data(data: object) -> None | OncallRelationshipsScheduleDataType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + data_type_0 = OncallRelationshipsScheduleDataType0.from_dict(data) + + return data_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | OncallRelationshipsScheduleDataType0 | Unset, data) + + data = _parse_data(d.pop("data", UNSET)) + + oncall_relationships_schedule = cls( + data=data, + ) + + oncall_relationships_schedule.additional_properties = d + return oncall_relationships_schedule + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py b/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py new file mode 100644 index 00000000..c9919c8a --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.oncall_relationships_schedule_data_type_0_type import ( + OncallRelationshipsScheduleDataType0Type, + check_oncall_relationships_schedule_data_type_0_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OncallRelationshipsScheduleDataType0") + + +@_attrs_define +class OncallRelationshipsScheduleDataType0: + """ + Attributes: + id (str | Unset): + type_ (OncallRelationshipsScheduleDataType0Type | Unset): + """ + + id: str | Unset = UNSET + type_: OncallRelationshipsScheduleDataType0Type | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: OncallRelationshipsScheduleDataType0Type | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_oncall_relationships_schedule_data_type_0_type(_type_) + + oncall_relationships_schedule_data_type_0 = cls( + id=id, + type_=type_, + ) + + oncall_relationships_schedule_data_type_0.additional_properties = d + return oncall_relationships_schedule_data_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_relationships_schedule_data_type_0_type.py b/rootly_sdk/models/oncall_relationships_schedule_data_type_0_type.py new file mode 100644 index 00000000..16aec7b8 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_schedule_data_type_0_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +OncallRelationshipsScheduleDataType0Type = Literal["schedules"] + +ONCALL_RELATIONSHIPS_SCHEDULE_DATA_TYPE_0_TYPE_VALUES: set[OncallRelationshipsScheduleDataType0Type] = { + "schedules", +} + + +def check_oncall_relationships_schedule_data_type_0_type( + value: str | None, +) -> OncallRelationshipsScheduleDataType0Type | None: + if value is None: + return None + if value in ONCALL_RELATIONSHIPS_SCHEDULE_DATA_TYPE_0_TYPE_VALUES: + return cast(OncallRelationshipsScheduleDataType0Type, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ONCALL_RELATIONSHIPS_SCHEDULE_DATA_TYPE_0_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/oncall_relationships_user.py b/rootly_sdk/models/oncall_relationships_user.py new file mode 100644 index 00000000..6c35d047 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_user.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 + + +T = TypeVar("T", bound="OncallRelationshipsUser") + + +@_attrs_define +class OncallRelationshipsUser: + """ + Attributes: + data (None | OncallRelationshipsUserDataType0 | Unset): + """ + + data: None | OncallRelationshipsUserDataType0 | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 + + data: dict[str, Any] | None | Unset + if isinstance(self.data, Unset): + data = UNSET + elif isinstance(self.data, OncallRelationshipsUserDataType0): + data = self.data.to_dict() + else: + data = self.data + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 + + d = dict(src_dict) + + def _parse_data(data: object) -> None | OncallRelationshipsUserDataType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + data_type_0 = OncallRelationshipsUserDataType0.from_dict(data) + + return data_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | OncallRelationshipsUserDataType0 | Unset, data) + + data = _parse_data(d.pop("data", UNSET)) + + oncall_relationships_user = cls( + data=data, + ) + + oncall_relationships_user.additional_properties = d + return oncall_relationships_user + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_relationships_user_data_type_0.py b/rootly_sdk/models/oncall_relationships_user_data_type_0.py new file mode 100644 index 00000000..0554b0fc --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_user_data_type_0.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.oncall_relationships_user_data_type_0_type import ( + OncallRelationshipsUserDataType0Type, + check_oncall_relationships_user_data_type_0_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OncallRelationshipsUserDataType0") + + +@_attrs_define +class OncallRelationshipsUserDataType0: + """ + Attributes: + id (str | Unset): + type_ (OncallRelationshipsUserDataType0Type | Unset): + """ + + id: str | Unset = UNSET + type_: OncallRelationshipsUserDataType0Type | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: OncallRelationshipsUserDataType0Type | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_oncall_relationships_user_data_type_0_type(_type_) + + oncall_relationships_user_data_type_0 = cls( + id=id, + type_=type_, + ) + + oncall_relationships_user_data_type_0.additional_properties = d + return oncall_relationships_user_data_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/oncall_relationships_user_data_type_0_type.py b/rootly_sdk/models/oncall_relationships_user_data_type_0_type.py new file mode 100644 index 00000000..12ea76ea --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_user_data_type_0_type.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +OncallRelationshipsUserDataType0Type = Literal["users"] + +ONCALL_RELATIONSHIPS_USER_DATA_TYPE_0_TYPE_VALUES: set[OncallRelationshipsUserDataType0Type] = { + "users", +} + + +def check_oncall_relationships_user_data_type_0_type(value: str | None) -> OncallRelationshipsUserDataType0Type | None: + if value is None: + return None + if value in ONCALL_RELATIONSHIPS_USER_DATA_TYPE_0_TYPE_VALUES: + return cast(OncallRelationshipsUserDataType0Type, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ONCALL_RELATIONSHIPS_USER_DATA_TYPE_0_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/override_shift.py b/rootly_sdk/models/override_shift.py index 5e3e9dd1..287ca8fe 100644 --- a/rootly_sdk/models/override_shift.py +++ b/rootly_sdk/models/override_shift.py @@ -45,6 +45,7 @@ class OverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + schedule_id = self.schedule_id rotation_id: None | str diff --git a/rootly_sdk/models/override_shift_list.py b/rootly_sdk/models/override_shift_list.py index 70a96a4b..d589839b 100644 --- a/rootly_sdk/models/override_shift_list.py +++ b/rootly_sdk/models/override_shift_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.override_shift_list_data_item import OverrideShiftListDataItem @@ -22,14 +25,17 @@ class OverrideShiftList: data (list[OverrideShiftListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[OverrideShiftListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.override_shift_list_data_item import OverrideShiftListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + override_shift_list = cls( data=data, links=links, meta=meta, + included=included, ) override_shift_list.additional_properties = d diff --git a/rootly_sdk/models/override_shift_list_data_item.py b/rootly_sdk/models/override_shift_list_data_item.py index 512ffce1..391a89d5 100644 --- a/rootly_sdk/models/override_shift_list_data_item.py +++ b/rootly_sdk/models/override_shift_list_data_item.py @@ -33,6 +33,7 @@ class OverrideShiftListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/override_shift_response.py b/rootly_sdk/models/override_shift_response.py index e216bac1..9c0c2d7b 100644 --- a/rootly_sdk/models/override_shift_response.py +++ b/rootly_sdk/models/override_shift_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.override_shift_response_data import OverrideShiftResponseData @@ -18,14 +21,24 @@ class OverrideShiftResponse: """ Attributes: data (OverrideShiftResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: OverrideShiftResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.override_shift_response_data import OverrideShiftResponseData d = dict(src_dict) data = OverrideShiftResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + override_shift_response = cls( data=data, + included=included, ) override_shift_response.additional_properties = d diff --git a/rootly_sdk/models/override_shift_response_data.py b/rootly_sdk/models/override_shift_response_data.py index ee954420..3b051c10 100644 --- a/rootly_sdk/models/override_shift_response_data.py +++ b/rootly_sdk/models/override_shift_response_data.py @@ -33,6 +33,7 @@ class OverrideShiftResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py b/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py index 23fc21d3..916d1784 100644 --- a/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py @@ -52,6 +52,7 @@ class PageJsmopsOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type diff --git a/rootly_sdk/models/page_opsgenie_on_call_responders_task_params.py b/rootly_sdk/models/page_opsgenie_on_call_responders_task_params.py index 635e4069..a278eb46 100644 --- a/rootly_sdk/models/page_opsgenie_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_opsgenie_on_call_responders_task_params.py @@ -52,6 +52,7 @@ class PageOpsgenieOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type diff --git a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params.py b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params.py index 07ecfd04..cd792d21 100644 --- a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params.py @@ -62,6 +62,7 @@ class PagePagerdutyOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + service = self.service.to_dict() task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/page_rootly_on_call_responders_task_params.py b/rootly_sdk/models/page_rootly_on_call_responders_task_params.py index 9fff57f9..e35e7ba7 100644 --- a/rootly_sdk/models/page_rootly_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_rootly_on_call_responders_task_params.py @@ -47,6 +47,8 @@ class PageRootlyOnCallRespondersTaskParams: functionality_target (PageRootlyOnCallRespondersTaskParamsFunctionalityTarget | Unset): description (str | Unset): Alert description escalation_note (str | Unset): + create_new_alert (bool | Unset): When true, always create a new alert instead of re-paging the alert that + triggered the workflow Default: False. """ alert_urgency_id: str @@ -59,9 +61,11 @@ class PageRootlyOnCallRespondersTaskParams: functionality_target: PageRootlyOnCallRespondersTaskParamsFunctionalityTarget | Unset = UNSET description: str | Unset = UNSET escalation_note: str | Unset = UNSET + create_new_alert: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + alert_urgency_id = self.alert_urgency_id summary = self.summary @@ -94,6 +98,8 @@ def to_dict(self) -> dict[str, Any]: escalation_note = self.escalation_note + create_new_alert = self.create_new_alert + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -118,6 +124,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if escalation_note is not UNSET: field_dict["escalation_note"] = escalation_note + if create_new_alert is not UNSET: + field_dict["create_new_alert"] = create_new_alert return field_dict @@ -194,6 +202,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: escalation_note = d.pop("escalation_note", UNSET) + create_new_alert = d.pop("create_new_alert", UNSET) + page_rootly_on_call_responders_task_params = cls( alert_urgency_id=alert_urgency_id, summary=summary, @@ -205,6 +215,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: functionality_target=functionality_target, description=description, escalation_note=escalation_note, + create_new_alert=create_new_alert, ) page_rootly_on_call_responders_task_params.additional_properties = d diff --git a/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py new file mode 100644 index 00000000..941d2835 --- /dev/null +++ b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PageVictorOpsOnCallRespondersTaskParamsType0UsersItem") + + +@_attrs_define +class PageVictorOpsOnCallRespondersTaskParamsType0UsersItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + page_victor_ops_on_call_responders_task_params_type_0_users_item = cls( + id=id, + name=name, + ) + + page_victor_ops_on_call_responders_task_params_type_0_users_item.additional_properties = d + return page_victor_ops_on_call_responders_task_params_type_0_users_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py new file mode 100644 index 00000000..5848af71 --- /dev/null +++ b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem") + + +@_attrs_define +class PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item = cls( + id=id, + name=name, + ) + + page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.additional_properties = d + return page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/patch_alert_route.py b/rootly_sdk/models/patch_alert_route.py index 3de7ca00..ad87d4c5 100644 --- a/rootly_sdk/models/patch_alert_route.py +++ b/rootly_sdk/models/patch_alert_route.py @@ -24,6 +24,7 @@ class PatchAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/patch_alert_route_data.py b/rootly_sdk/models/patch_alert_route_data.py index 7bfa311f..334bec3e 100644 --- a/rootly_sdk/models/patch_alert_route_data.py +++ b/rootly_sdk/models/patch_alert_route_data.py @@ -28,6 +28,7 @@ class PatchAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/patch_alert_route_data_attributes.py b/rootly_sdk/models/patch_alert_route_data_attributes.py index b6dde929..04d8dd16 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes.py @@ -33,6 +33,7 @@ class PatchAlertRouteDataAttributes: rules: list[PatchAlertRouteDataAttributesRulesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name enabled = self.enabled diff --git a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item.py b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item.py index 28b135b6..83f9eba3 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item.py @@ -44,6 +44,7 @@ class PatchAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) diff --git a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item.py b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item.py index 763e8dd0..dde7d127 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item.py @@ -35,6 +35,7 @@ class PatchAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) diff --git a/rootly_sdk/models/playbook_list.py b/rootly_sdk/models/playbook_list.py index 02de0316..41883360 100644 --- a/rootly_sdk/models/playbook_list.py +++ b/rootly_sdk/models/playbook_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.playbook_list_data_item import PlaybookListDataItem @@ -22,14 +25,17 @@ class PlaybookList: data (list[PlaybookListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[PlaybookListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.playbook_list_data_item import PlaybookListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + playbook_list = cls( data=data, links=links, meta=meta, + included=included, ) playbook_list.additional_properties = d diff --git a/rootly_sdk/models/playbook_list_data_item.py b/rootly_sdk/models/playbook_list_data_item.py index 598e3cdc..90c8ddde 100644 --- a/rootly_sdk/models/playbook_list_data_item.py +++ b/rootly_sdk/models/playbook_list_data_item.py @@ -30,6 +30,7 @@ class PlaybookListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/playbook_response.py b/rootly_sdk/models/playbook_response.py index bbefb288..09e9cb31 100644 --- a/rootly_sdk/models/playbook_response.py +++ b/rootly_sdk/models/playbook_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_response_data import PlaybookResponseData @@ -18,14 +21,24 @@ class PlaybookResponse: """ Attributes: data (PlaybookResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: PlaybookResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_response_data import PlaybookResponseData d = dict(src_dict) data = PlaybookResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + playbook_response = cls( data=data, + included=included, ) playbook_response.additional_properties = d diff --git a/rootly_sdk/models/playbook_response_data.py b/rootly_sdk/models/playbook_response_data.py index b559f9f7..8c844e20 100644 --- a/rootly_sdk/models/playbook_response_data.py +++ b/rootly_sdk/models/playbook_response_data.py @@ -30,6 +30,7 @@ class PlaybookResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/playbook_task_list.py b/rootly_sdk/models/playbook_task_list.py index 128b3689..da771781 100644 --- a/rootly_sdk/models/playbook_task_list.py +++ b/rootly_sdk/models/playbook_task_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.playbook_task_list_data_item import PlaybookTaskListDataItem @@ -22,14 +25,17 @@ class PlaybookTaskList: data (list[PlaybookTaskListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[PlaybookTaskListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.playbook_task_list_data_item import PlaybookTaskListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + playbook_task_list = cls( data=data, links=links, meta=meta, + included=included, ) playbook_task_list.additional_properties = d diff --git a/rootly_sdk/models/playbook_task_list_data_item.py b/rootly_sdk/models/playbook_task_list_data_item.py index 9c529ab0..6a1a8b7e 100644 --- a/rootly_sdk/models/playbook_task_list_data_item.py +++ b/rootly_sdk/models/playbook_task_list_data_item.py @@ -33,6 +33,7 @@ class PlaybookTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/playbook_task_response.py b/rootly_sdk/models/playbook_task_response.py index 0753e7a1..cfa83e2b 100644 --- a/rootly_sdk/models/playbook_task_response.py +++ b/rootly_sdk/models/playbook_task_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_task_response_data import PlaybookTaskResponseData @@ -18,14 +21,24 @@ class PlaybookTaskResponse: """ Attributes: data (PlaybookTaskResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: PlaybookTaskResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_task_response_data import PlaybookTaskResponseData d = dict(src_dict) data = PlaybookTaskResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + playbook_task_response = cls( data=data, + included=included, ) playbook_task_response.additional_properties = d diff --git a/rootly_sdk/models/playbook_task_response_data.py b/rootly_sdk/models/playbook_task_response_data.py index 3cb5185c..8dda77d8 100644 --- a/rootly_sdk/models/playbook_task_response_data.py +++ b/rootly_sdk/models/playbook_task_response_data.py @@ -33,6 +33,7 @@ class PlaybookTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/post_mortem_template_list.py b/rootly_sdk/models/post_mortem_template_list.py index 83676bfc..f855b333 100644 --- a/rootly_sdk/models/post_mortem_template_list.py +++ b/rootly_sdk/models/post_mortem_template_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.post_mortem_template_list_data_item import PostMortemTemplateListDataItem @@ -22,14 +25,17 @@ class PostMortemTemplateList: data (list[PostMortemTemplateListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[PostMortemTemplateListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.post_mortem_template_list_data_item import PostMortemTemplateListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + post_mortem_template_list = cls( data=data, links=links, meta=meta, + included=included, ) post_mortem_template_list.additional_properties = d diff --git a/rootly_sdk/models/post_mortem_template_list_data_item.py b/rootly_sdk/models/post_mortem_template_list_data_item.py index e3823d0d..18004832 100644 --- a/rootly_sdk/models/post_mortem_template_list_data_item.py +++ b/rootly_sdk/models/post_mortem_template_list_data_item.py @@ -33,6 +33,7 @@ class PostMortemTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/post_mortem_template_response.py b/rootly_sdk/models/post_mortem_template_response.py index cb8516aa..19995e60 100644 --- a/rootly_sdk/models/post_mortem_template_response.py +++ b/rootly_sdk/models/post_mortem_template_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.post_mortem_template_response_data import PostMortemTemplateResponseData @@ -18,14 +21,24 @@ class PostMortemTemplateResponse: """ Attributes: data (PostMortemTemplateResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: PostMortemTemplateResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.post_mortem_template_response_data import PostMortemTemplateResponseData d = dict(src_dict) data = PostMortemTemplateResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + post_mortem_template_response = cls( data=data, + included=included, ) post_mortem_template_response.additional_properties = d diff --git a/rootly_sdk/models/post_mortem_template_response_data.py b/rootly_sdk/models/post_mortem_template_response_data.py index 4e622ebb..839a4498 100644 --- a/rootly_sdk/models/post_mortem_template_response_data.py +++ b/rootly_sdk/models/post_mortem_template_response_data.py @@ -33,6 +33,7 @@ class PostMortemTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/post_mortem_trigger_params.py b/rootly_sdk/models/post_mortem_trigger_params.py index 0f6c8673..a045bbe9 100644 --- a/rootly_sdk/models/post_mortem_trigger_params.py +++ b/rootly_sdk/models/post_mortem_trigger_params.py @@ -10,17 +10,17 @@ PostMortemTriggerParamsIncidentCondition, check_post_mortem_trigger_params_incident_condition, ) -from ..models.post_mortem_trigger_params_incident_condition_acknowledged_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1, - check_post_mortem_trigger_params_incident_condition_acknowledged_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_acknowledged_at import ( + PostMortemTriggerParamsIncidentConditionAcknowledgedAt, + check_post_mortem_trigger_params_incident_condition_acknowledged_at, ) from ..models.post_mortem_trigger_params_incident_condition_cause import ( PostMortemTriggerParamsIncidentConditionCause, check_post_mortem_trigger_params_incident_condition_cause, ) -from ..models.post_mortem_trigger_params_incident_condition_detected_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionDetectedAtType1, - check_post_mortem_trigger_params_incident_condition_detected_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_detected_at import ( + PostMortemTriggerParamsIncidentConditionDetectedAt, + check_post_mortem_trigger_params_incident_condition_detected_at, ) from ..models.post_mortem_trigger_params_incident_condition_environment import ( PostMortemTriggerParamsIncidentConditionEnvironment, @@ -46,13 +46,17 @@ PostMortemTriggerParamsIncidentConditionKind, check_post_mortem_trigger_params_incident_condition_kind, ) -from ..models.post_mortem_trigger_params_incident_condition_mitigated_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionMitigatedAtType1, - check_post_mortem_trigger_params_incident_condition_mitigated_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_label import ( + PostMortemTriggerParamsIncidentConditionLabel, + check_post_mortem_trigger_params_incident_condition_label, ) -from ..models.post_mortem_trigger_params_incident_condition_resolved_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionResolvedAtType1, - check_post_mortem_trigger_params_incident_condition_resolved_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_mitigated_at import ( + PostMortemTriggerParamsIncidentConditionMitigatedAt, + check_post_mortem_trigger_params_incident_condition_mitigated_at, +) +from ..models.post_mortem_trigger_params_incident_condition_resolved_at import ( + PostMortemTriggerParamsIncidentConditionResolvedAt, + check_post_mortem_trigger_params_incident_condition_resolved_at, ) from ..models.post_mortem_trigger_params_incident_condition_service import ( PostMortemTriggerParamsIncidentConditionService, @@ -62,9 +66,9 @@ PostMortemTriggerParamsIncidentConditionSeverity, check_post_mortem_trigger_params_incident_condition_severity, ) -from ..models.post_mortem_trigger_params_incident_condition_started_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionStartedAtType1, - check_post_mortem_trigger_params_incident_condition_started_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_started_at import ( + PostMortemTriggerParamsIncidentConditionStartedAt, + check_post_mortem_trigger_params_incident_condition_started_at, ) from ..models.post_mortem_trigger_params_incident_condition_status import ( PostMortemTriggerParamsIncidentConditionStatus, @@ -74,17 +78,17 @@ PostMortemTriggerParamsIncidentConditionSubStatus, check_post_mortem_trigger_params_incident_condition_sub_status, ) -from ..models.post_mortem_trigger_params_incident_condition_summary_type_1 import ( - PostMortemTriggerParamsIncidentConditionSummaryType1, - check_post_mortem_trigger_params_incident_condition_summary_type_1, +from ..models.post_mortem_trigger_params_incident_condition_summary import ( + PostMortemTriggerParamsIncidentConditionSummary, + check_post_mortem_trigger_params_incident_condition_summary, ) from ..models.post_mortem_trigger_params_incident_condition_visibility import ( PostMortemTriggerParamsIncidentConditionVisibility, check_post_mortem_trigger_params_incident_condition_visibility, ) -from ..models.post_mortem_trigger_params_incident_conditional_inactivity_type_1 import ( - PostMortemTriggerParamsIncidentConditionalInactivityType1, - check_post_mortem_trigger_params_incident_conditional_inactivity_type_1, +from ..models.post_mortem_trigger_params_incident_conditional_inactivity import ( + PostMortemTriggerParamsIncidentConditionalInactivity, + check_post_mortem_trigger_params_incident_conditional_inactivity, ) from ..models.post_mortem_trigger_params_incident_kinds_item import ( PostMortemTriggerParamsIncidentKindsItem, @@ -128,7 +132,7 @@ class PostMortemTriggerParams: incident_visibilities (list[bool] | Unset): incident_kinds (list[PostMortemTriggerParamsIncidentKindsItem] | Unset): incident_statuses (list[PostMortemTriggerParamsIncidentStatusesItem] | Unset): - incident_inactivity_duration (None | str | Unset): + incident_inactivity_duration (None | str | Unset): ex. 10 min, 1h, 3 days, 2 weeks incident_condition (PostMortemTriggerParamsIncidentCondition | Unset): Default: 'ALL'. incident_condition_visibility (PostMortemTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. incident_condition_kind (PostMortemTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. @@ -145,15 +149,18 @@ class PostMortemTriggerParams: 'ANY'. incident_condition_group (PostMortemTriggerParamsIncidentConditionGroup | Unset): Default: 'ANY'. incident_condition_cause (PostMortemTriggerParamsIncidentConditionCause | Unset): Default: 'ANY'. + incident_condition_label (PostMortemTriggerParamsIncidentConditionLabel | Unset): Default: 'ANY'. + incident_condition_label_use_regexp (bool | Unset): Default: False. + incident_labels (list[str] | Unset): incident_post_mortem_condition_cause (PostMortemTriggerParamsIncidentPostMortemConditionCause | Unset): [DEPRECATED] Use incident_condition_cause instead Default: 'ANY'. - incident_condition_summary (None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset): - incident_condition_started_at (None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset): - incident_condition_detected_at (None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset): - incident_condition_acknowledged_at (None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset): - incident_condition_mitigated_at (None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset): - incident_condition_resolved_at (None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset): - incident_conditional_inactivity (None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset): + incident_condition_summary (PostMortemTriggerParamsIncidentConditionSummary | Unset): + incident_condition_started_at (PostMortemTriggerParamsIncidentConditionStartedAt | Unset): + incident_condition_detected_at (PostMortemTriggerParamsIncidentConditionDetectedAt | Unset): + incident_condition_acknowledged_at (PostMortemTriggerParamsIncidentConditionAcknowledgedAt | Unset): + incident_condition_mitigated_at (PostMortemTriggerParamsIncidentConditionMitigatedAt | Unset): + incident_condition_resolved_at (PostMortemTriggerParamsIncidentConditionResolvedAt | Unset): + incident_conditional_inactivity (PostMortemTriggerParamsIncidentConditionalInactivity | Unset): incident_post_mortem_condition (PostMortemTriggerParamsIncidentPostMortemCondition | Unset): incident_post_mortem_condition_status (PostMortemTriggerParamsIncidentPostMortemConditionStatus | Unset): Default: 'ANY'. @@ -179,16 +186,17 @@ class PostMortemTriggerParams: incident_condition_functionality: PostMortemTriggerParamsIncidentConditionFunctionality | Unset = "ANY" incident_condition_group: PostMortemTriggerParamsIncidentConditionGroup | Unset = "ANY" incident_condition_cause: PostMortemTriggerParamsIncidentConditionCause | Unset = "ANY" + incident_condition_label: PostMortemTriggerParamsIncidentConditionLabel | Unset = "ANY" + incident_condition_label_use_regexp: bool | Unset = False + incident_labels: list[str] | Unset = UNSET incident_post_mortem_condition_cause: PostMortemTriggerParamsIncidentPostMortemConditionCause | Unset = "ANY" - incident_condition_summary: None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset = UNSET - incident_condition_started_at: None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset = UNSET - incident_condition_detected_at: None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset = UNSET - incident_condition_acknowledged_at: None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset = ( - UNSET - ) - incident_condition_mitigated_at: None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset = UNSET - incident_condition_resolved_at: None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset = UNSET - incident_conditional_inactivity: None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset = UNSET + incident_condition_summary: PostMortemTriggerParamsIncidentConditionSummary | Unset = UNSET + incident_condition_started_at: PostMortemTriggerParamsIncidentConditionStartedAt | Unset = UNSET + incident_condition_detected_at: PostMortemTriggerParamsIncidentConditionDetectedAt | Unset = UNSET + incident_condition_acknowledged_at: PostMortemTriggerParamsIncidentConditionAcknowledgedAt | Unset = UNSET + incident_condition_mitigated_at: PostMortemTriggerParamsIncidentConditionMitigatedAt | Unset = UNSET + incident_condition_resolved_at: PostMortemTriggerParamsIncidentConditionResolvedAt | Unset = UNSET + incident_conditional_inactivity: PostMortemTriggerParamsIncidentConditionalInactivity | Unset = UNSET incident_post_mortem_condition: PostMortemTriggerParamsIncidentPostMortemCondition | Unset = UNSET incident_post_mortem_condition_status: PostMortemTriggerParamsIncidentPostMortemConditionStatus | Unset = "ANY" incident_post_mortem_statuses: list[PostMortemTriggerParamsIncidentPostMortemStatusesItem] | Unset = UNSET @@ -277,64 +285,46 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.incident_condition_cause, Unset): incident_condition_cause = self.incident_condition_cause + incident_condition_label: str | Unset = UNSET + if not isinstance(self.incident_condition_label, Unset): + incident_condition_label = self.incident_condition_label + + incident_condition_label_use_regexp = self.incident_condition_label_use_regexp + + incident_labels: list[str] | Unset = UNSET + if not isinstance(self.incident_labels, Unset): + incident_labels = self.incident_labels + incident_post_mortem_condition_cause: str | Unset = UNSET if not isinstance(self.incident_post_mortem_condition_cause, Unset): incident_post_mortem_condition_cause = self.incident_post_mortem_condition_cause - incident_condition_summary: None | str | Unset - if isinstance(self.incident_condition_summary, Unset): - incident_condition_summary = UNSET - elif isinstance(self.incident_condition_summary, str): - incident_condition_summary = self.incident_condition_summary - else: + incident_condition_summary: str | Unset = UNSET + if not isinstance(self.incident_condition_summary, Unset): incident_condition_summary = self.incident_condition_summary - incident_condition_started_at: None | str | Unset - if isinstance(self.incident_condition_started_at, Unset): - incident_condition_started_at = UNSET - elif isinstance(self.incident_condition_started_at, str): - incident_condition_started_at = self.incident_condition_started_at - else: + incident_condition_started_at: str | Unset = UNSET + if not isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = self.incident_condition_started_at - incident_condition_detected_at: None | str | Unset - if isinstance(self.incident_condition_detected_at, Unset): - incident_condition_detected_at = UNSET - elif isinstance(self.incident_condition_detected_at, str): - incident_condition_detected_at = self.incident_condition_detected_at - else: + incident_condition_detected_at: str | Unset = UNSET + if not isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = self.incident_condition_detected_at - incident_condition_acknowledged_at: None | str | Unset - if isinstance(self.incident_condition_acknowledged_at, Unset): - incident_condition_acknowledged_at = UNSET - elif isinstance(self.incident_condition_acknowledged_at, str): - incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - else: + incident_condition_acknowledged_at: str | Unset = UNSET + if not isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - incident_condition_mitigated_at: None | str | Unset - if isinstance(self.incident_condition_mitigated_at, Unset): - incident_condition_mitigated_at = UNSET - elif isinstance(self.incident_condition_mitigated_at, str): - incident_condition_mitigated_at = self.incident_condition_mitigated_at - else: + incident_condition_mitigated_at: str | Unset = UNSET + if not isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = self.incident_condition_mitigated_at - incident_condition_resolved_at: None | str | Unset - if isinstance(self.incident_condition_resolved_at, Unset): - incident_condition_resolved_at = UNSET - elif isinstance(self.incident_condition_resolved_at, str): - incident_condition_resolved_at = self.incident_condition_resolved_at - else: + incident_condition_resolved_at: str | Unset = UNSET + if not isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | str | Unset - if isinstance(self.incident_conditional_inactivity, Unset): - incident_conditional_inactivity = UNSET - elif isinstance(self.incident_conditional_inactivity, str): - incident_conditional_inactivity = self.incident_conditional_inactivity - else: + incident_conditional_inactivity: str | Unset = UNSET + if not isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = self.incident_conditional_inactivity incident_post_mortem_condition: str | Unset = UNSET @@ -395,6 +385,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_condition_group"] = incident_condition_group if incident_condition_cause is not UNSET: field_dict["incident_condition_cause"] = incident_condition_cause + if incident_condition_label is not UNSET: + field_dict["incident_condition_label"] = incident_condition_label + if incident_condition_label_use_regexp is not UNSET: + field_dict["incident_condition_label_use_regexp"] = incident_condition_label_use_regexp + if incident_labels is not UNSET: + field_dict["incident_labels"] = incident_labels if incident_post_mortem_condition_cause is not UNSET: field_dict["incident_post_mortem_condition_cause"] = incident_post_mortem_condition_cause if incident_condition_summary is not UNSET: @@ -571,6 +567,19 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: _incident_condition_cause ) + _incident_condition_label = d.pop("incident_condition_label", UNSET) + incident_condition_label: PostMortemTriggerParamsIncidentConditionLabel | Unset + if isinstance(_incident_condition_label, Unset): + incident_condition_label = UNSET + else: + incident_condition_label = check_post_mortem_trigger_params_incident_condition_label( + _incident_condition_label + ) + + incident_condition_label_use_regexp = d.pop("incident_condition_label_use_regexp", UNSET) + + incident_labels = cast(list[str], d.pop("incident_labels", UNSET)) + _incident_post_mortem_condition_cause = d.pop("incident_post_mortem_condition_cause", UNSET) incident_post_mortem_condition_cause: PostMortemTriggerParamsIncidentPostMortemConditionCause | Unset if isinstance(_incident_post_mortem_condition_cause, Unset): @@ -582,164 +591,68 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: ) ) - def _parse_incident_condition_summary( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_summary_type_1 = check_post_mortem_trigger_params_incident_condition_summary_type_1( - data - ) - - return incident_condition_summary_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset, data) - - incident_condition_summary = _parse_incident_condition_summary(d.pop("incident_condition_summary", UNSET)) - - def _parse_incident_condition_started_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_started_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_started_at_type_1(data) - ) - - return incident_condition_started_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset, data) - - incident_condition_started_at = _parse_incident_condition_started_at( - d.pop("incident_condition_started_at", UNSET) - ) - - def _parse_incident_condition_detected_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_detected_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_detected_at_type_1(data) - ) - - return incident_condition_detected_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset, data) - - incident_condition_detected_at = _parse_incident_condition_detected_at( - d.pop("incident_condition_detected_at", UNSET) - ) - - def _parse_incident_condition_acknowledged_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_acknowledged_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_acknowledged_at_type_1(data) - ) - - return incident_condition_acknowledged_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset, data) - - incident_condition_acknowledged_at = _parse_incident_condition_acknowledged_at( - d.pop("incident_condition_acknowledged_at", UNSET) - ) - - def _parse_incident_condition_mitigated_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_mitigated_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_mitigated_at_type_1(data) - ) - - return incident_condition_mitigated_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset, data) - - incident_condition_mitigated_at = _parse_incident_condition_mitigated_at( - d.pop("incident_condition_mitigated_at", UNSET) - ) + _incident_condition_summary = d.pop("incident_condition_summary", UNSET) + incident_condition_summary: PostMortemTriggerParamsIncidentConditionSummary | Unset + if isinstance(_incident_condition_summary, Unset): + incident_condition_summary = UNSET + else: + incident_condition_summary = check_post_mortem_trigger_params_incident_condition_summary( + _incident_condition_summary + ) - def _parse_incident_condition_resolved_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_resolved_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_resolved_at_type_1(data) - ) + _incident_condition_started_at = d.pop("incident_condition_started_at", UNSET) + incident_condition_started_at: PostMortemTriggerParamsIncidentConditionStartedAt | Unset + if isinstance(_incident_condition_started_at, Unset): + incident_condition_started_at = UNSET + else: + incident_condition_started_at = check_post_mortem_trigger_params_incident_condition_started_at( + _incident_condition_started_at + ) - return incident_condition_resolved_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset, data) + _incident_condition_detected_at = d.pop("incident_condition_detected_at", UNSET) + incident_condition_detected_at: PostMortemTriggerParamsIncidentConditionDetectedAt | Unset + if isinstance(_incident_condition_detected_at, Unset): + incident_condition_detected_at = UNSET + else: + incident_condition_detected_at = check_post_mortem_trigger_params_incident_condition_detected_at( + _incident_condition_detected_at + ) - incident_condition_resolved_at = _parse_incident_condition_resolved_at( - d.pop("incident_condition_resolved_at", UNSET) - ) + _incident_condition_acknowledged_at = d.pop("incident_condition_acknowledged_at", UNSET) + incident_condition_acknowledged_at: PostMortemTriggerParamsIncidentConditionAcknowledgedAt | Unset + if isinstance(_incident_condition_acknowledged_at, Unset): + incident_condition_acknowledged_at = UNSET + else: + incident_condition_acknowledged_at = check_post_mortem_trigger_params_incident_condition_acknowledged_at( + _incident_condition_acknowledged_at + ) - def _parse_incident_conditional_inactivity( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_conditional_inactivity_type_1 = ( - check_post_mortem_trigger_params_incident_conditional_inactivity_type_1(data) - ) + _incident_condition_mitigated_at = d.pop("incident_condition_mitigated_at", UNSET) + incident_condition_mitigated_at: PostMortemTriggerParamsIncidentConditionMitigatedAt | Unset + if isinstance(_incident_condition_mitigated_at, Unset): + incident_condition_mitigated_at = UNSET + else: + incident_condition_mitigated_at = check_post_mortem_trigger_params_incident_condition_mitigated_at( + _incident_condition_mitigated_at + ) - return incident_conditional_inactivity_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset, data) + _incident_condition_resolved_at = d.pop("incident_condition_resolved_at", UNSET) + incident_condition_resolved_at: PostMortemTriggerParamsIncidentConditionResolvedAt | Unset + if isinstance(_incident_condition_resolved_at, Unset): + incident_condition_resolved_at = UNSET + else: + incident_condition_resolved_at = check_post_mortem_trigger_params_incident_condition_resolved_at( + _incident_condition_resolved_at + ) - incident_conditional_inactivity = _parse_incident_conditional_inactivity( - d.pop("incident_conditional_inactivity", UNSET) - ) + _incident_conditional_inactivity = d.pop("incident_conditional_inactivity", UNSET) + incident_conditional_inactivity: PostMortemTriggerParamsIncidentConditionalInactivity | Unset + if isinstance(_incident_conditional_inactivity, Unset): + incident_conditional_inactivity = UNSET + else: + incident_conditional_inactivity = check_post_mortem_trigger_params_incident_conditional_inactivity( + _incident_conditional_inactivity + ) _incident_post_mortem_condition = d.pop("incident_post_mortem_condition", UNSET) incident_post_mortem_condition: PostMortemTriggerParamsIncidentPostMortemCondition | Unset @@ -794,6 +707,9 @@ def _parse_incident_conditional_inactivity( incident_condition_functionality=incident_condition_functionality, incident_condition_group=incident_condition_group, incident_condition_cause=incident_condition_cause, + incident_condition_label=incident_condition_label, + incident_condition_label_use_regexp=incident_condition_label_use_regexp, + incident_labels=incident_labels, incident_post_mortem_condition_cause=incident_post_mortem_condition_cause, incident_condition_summary=incident_condition_summary, incident_condition_started_at=incident_condition_started_at, diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at.py new file mode 100644 index 00000000..8e2e6426 --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionAcknowledgedAt = Literal["SET", "UNSET"] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionAcknowledgedAt +] = { + "SET", + "UNSET", +} + + +def check_post_mortem_trigger_params_incident_condition_acknowledged_at( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionAcknowledgedAt | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionAcknowledgedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at_type_1.py deleted file mode 100644 index bf9de673..00000000 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 = Literal["SET", "UNSET"] - -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_post_mortem_trigger_params_incident_condition_acknowledged_at_type_1( - value: str | None, -) -> PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | None: - if value is None: - return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at.py similarity index 50% rename from rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at_type_1.py rename to rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at.py index aa6622e9..f1118d2b 100644 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at_type_1.py +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -PostMortemTriggerParamsIncidentConditionDetectedAtType1 = Literal["SET", "UNSET"] +PostMortemTriggerParamsIncidentConditionDetectedAt = Literal["SET", "UNSET"] -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionDetectedAtType1 +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionDetectedAt ] = { "SET", "UNSET", } -def check_post_mortem_trigger_params_incident_condition_detected_at_type_1( +def check_post_mortem_trigger_params_incident_condition_detected_at( value: str | None, -) -> PostMortemTriggerParamsIncidentConditionDetectedAtType1 | None: +) -> PostMortemTriggerParamsIncidentConditionDetectedAt | None: if value is None: return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionDetectedAtType1, value) + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionDetectedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_label.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_label.py new file mode 100644 index 00000000..20d5d0a7 --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_label.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionLabel = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: set[PostMortemTriggerParamsIncidentConditionLabel] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_post_mortem_trigger_params_incident_condition_label( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionLabel | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionLabel, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at.py new file mode 100644 index 00000000..0c8665b0 --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionMitigatedAt = Literal["SET", "UNSET"] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionMitigatedAt +] = { + "SET", + "UNSET", +} + + +def check_post_mortem_trigger_params_incident_condition_mitigated_at( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionMitigatedAt | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionMitigatedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at_type_1.py deleted file mode 100644 index d81c4ad4..00000000 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -PostMortemTriggerParamsIncidentConditionMitigatedAtType1 = Literal["SET", "UNSET"] - -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionMitigatedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_post_mortem_trigger_params_incident_condition_mitigated_at_type_1( - value: str | None, -) -> PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | None: - if value is None: - return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionMitigatedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at.py similarity index 50% rename from rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at_type_1.py rename to rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at.py index 3762f4a3..844afdf3 100644 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at_type_1.py +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -PostMortemTriggerParamsIncidentConditionResolvedAtType1 = Literal["SET", "UNSET"] +PostMortemTriggerParamsIncidentConditionResolvedAt = Literal["SET", "UNSET"] -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionResolvedAtType1 +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionResolvedAt ] = { "SET", "UNSET", } -def check_post_mortem_trigger_params_incident_condition_resolved_at_type_1( +def check_post_mortem_trigger_params_incident_condition_resolved_at( value: str | None, -) -> PostMortemTriggerParamsIncidentConditionResolvedAtType1 | None: +) -> PostMortemTriggerParamsIncidentConditionResolvedAt | None: if value is None: return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionResolvedAtType1, value) + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionResolvedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at.py similarity index 50% rename from rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at_type_1.py rename to rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at.py index a4b9246f..6e5ef9f7 100644 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at_type_1.py +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -PostMortemTriggerParamsIncidentConditionStartedAtType1 = Literal["SET", "UNSET"] +PostMortemTriggerParamsIncidentConditionStartedAt = Literal["SET", "UNSET"] -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionStartedAtType1 +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionStartedAt ] = { "SET", "UNSET", } -def check_post_mortem_trigger_params_incident_condition_started_at_type_1( +def check_post_mortem_trigger_params_incident_condition_started_at( value: str | None, -) -> PostMortemTriggerParamsIncidentConditionStartedAtType1 | None: +) -> PostMortemTriggerParamsIncidentConditionStartedAt | None: if value is None: return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionStartedAtType1, value) + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionStartedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary.py new file mode 100644 index 00000000..d3ffa58a --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionSummary = Literal["SET", "UNSET"] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: set[PostMortemTriggerParamsIncidentConditionSummary] = { + "SET", + "UNSET", +} + + +def check_post_mortem_trigger_params_incident_condition_summary( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionSummary | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionSummary, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary_type_1.py deleted file mode 100644 index f9b7ca36..00000000 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -PostMortemTriggerParamsIncidentConditionSummaryType1 = Literal["SET", "UNSET"] - -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionSummaryType1 -] = { - "SET", - "UNSET", -} - - -def check_post_mortem_trigger_params_incident_condition_summary_type_1( - value: str | None, -) -> PostMortemTriggerParamsIncidentConditionSummaryType1 | None: - if value is None: - return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionSummaryType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity.py b/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity.py new file mode 100644 index 00000000..22520d48 --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionalInactivity = Literal["IS"] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: set[ + PostMortemTriggerParamsIncidentConditionalInactivity +] = { + "IS", +} + + +def check_post_mortem_trigger_params_incident_conditional_inactivity( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionalInactivity | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionalInactivity, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity_type_1.py deleted file mode 100644 index b1a3bca7..00000000 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity_type_1.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -PostMortemTriggerParamsIncidentConditionalInactivityType1 = Literal["IS"] - -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionalInactivityType1 -] = { - "IS", -} - - -def check_post_mortem_trigger_params_incident_conditional_inactivity_type_1( - value: str | None, -) -> PostMortemTriggerParamsIncidentConditionalInactivityType1 | None: - if value is None: - return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionalInactivityType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/publish_incident_task_params.py b/rootly_sdk/models/publish_incident_task_params.py index f5600ce0..62a95e4c 100644 --- a/rootly_sdk/models/publish_incident_task_params.py +++ b/rootly_sdk/models/publish_incident_task_params.py @@ -56,6 +56,7 @@ class PublishIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + incident = self.incident.to_dict() public_title = self.public_title diff --git a/rootly_sdk/models/pulse_list.py b/rootly_sdk/models/pulse_list.py index ec980c37..39a986bc 100644 --- a/rootly_sdk/models/pulse_list.py +++ b/rootly_sdk/models/pulse_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.pulse_list_data_item import PulseListDataItem @@ -22,14 +25,17 @@ class PulseList: data (list[PulseListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[PulseListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.pulse_list_data_item import PulseListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + pulse_list = cls( data=data, links=links, meta=meta, + included=included, ) pulse_list.additional_properties = d diff --git a/rootly_sdk/models/pulse_list_data_item.py b/rootly_sdk/models/pulse_list_data_item.py index 8a4f7e68..2b770f8e 100644 --- a/rootly_sdk/models/pulse_list_data_item.py +++ b/rootly_sdk/models/pulse_list_data_item.py @@ -30,6 +30,7 @@ class PulseListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/pulse_response.py b/rootly_sdk/models/pulse_response.py index 663d9fec..6268b8b5 100644 --- a/rootly_sdk/models/pulse_response.py +++ b/rootly_sdk/models/pulse_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.pulse_response_data import PulseResponseData @@ -18,14 +21,24 @@ class PulseResponse: """ Attributes: data (PulseResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: PulseResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.pulse_response_data import PulseResponseData d = dict(src_dict) data = PulseResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + pulse_response = cls( data=data, + included=included, ) pulse_response.additional_properties = d diff --git a/rootly_sdk/models/pulse_response_data.py b/rootly_sdk/models/pulse_response_data.py index f9fe8791..6efc7c8f 100644 --- a/rootly_sdk/models/pulse_response_data.py +++ b/rootly_sdk/models/pulse_response_data.py @@ -30,6 +30,7 @@ class PulseResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/receipt.py b/rootly_sdk/models/receipt.py new file mode 100644 index 00000000..1e6442b7 --- /dev/null +++ b/rootly_sdk/models/receipt.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.receipt_reason import ReceiptReason, check_receipt_reason +from ..models.receipt_state import ReceiptState, check_receipt_state +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Receipt") + + +@_attrs_define +class Receipt: + """ + Attributes: + state (ReceiptState): Delivery state of the receipt. + reason (ReceiptReason | Unset): Reason a receipt failed. Present when state is failed. + resource_type (str | Unset): Type of the referenced resource (present when set). + resource_id (str | Unset): ID of the referenced resource (present when set). + """ + + state: ReceiptState + reason: ReceiptReason | Unset = UNSET + resource_type: str | Unset = UNSET + resource_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + state: str = self.state + + reason: str | Unset = UNSET + if not isinstance(self.reason, Unset): + reason = self.reason + + resource_type = self.resource_type + + resource_id = self.resource_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "state": state, + } + ) + if reason is not UNSET: + field_dict["reason"] = reason + if resource_type is not UNSET: + field_dict["resource_type"] = resource_type + if resource_id is not UNSET: + field_dict["resource_id"] = resource_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + state = check_receipt_state(d.pop("state")) + + _reason = d.pop("reason", UNSET) + reason: ReceiptReason | Unset + if isinstance(_reason, Unset): + reason = UNSET + else: + reason = check_receipt_reason(_reason) + + resource_type = d.pop("resource_type", UNSET) + + resource_id = d.pop("resource_id", UNSET) + + receipt = cls( + state=state, + reason=reason, + resource_type=resource_type, + resource_id=resource_id, + ) + + receipt.additional_properties = d + return receipt + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/receipt_reason.py b/rootly_sdk/models/receipt_reason.py new file mode 100644 index 00000000..ebafb401 --- /dev/null +++ b/rootly_sdk/models/receipt_reason.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +ReceiptReason = Literal["deduplicated", "no_route_matched", "suppressed", "validation_error"] + +RECEIPT_REASON_VALUES: set[ReceiptReason] = { + "deduplicated", + "no_route_matched", + "suppressed", + "validation_error", +} + + +def check_receipt_reason(value: str | None) -> ReceiptReason | None: + if value is None: + return None + if value in RECEIPT_REASON_VALUES: + return cast(ReceiptReason, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {RECEIPT_REASON_VALUES!r}") diff --git a/rootly_sdk/models/receipt_state.py b/rootly_sdk/models/receipt_state.py new file mode 100644 index 00000000..b4e11286 --- /dev/null +++ b/rootly_sdk/models/receipt_state.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +ReceiptState = Literal["done", "failed", "pending"] + +RECEIPT_STATE_VALUES: set[ReceiptState] = { + "done", + "failed", + "pending", +} + + +def check_receipt_state(value: str | None) -> ReceiptState | None: + if value is None: + return None + if value in RECEIPT_STATE_VALUES: + return cast(ReceiptState, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {RECEIPT_STATE_VALUES!r}") diff --git a/rootly_sdk/models/redis_client_task_params.py b/rootly_sdk/models/redis_client_task_params.py index 62446bca..4d4b9aab 100644 --- a/rootly_sdk/models/redis_client_task_params.py +++ b/rootly_sdk/models/redis_client_task_params.py @@ -44,6 +44,7 @@ class RedisClientTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + url = self.url commands = self.commands diff --git a/rootly_sdk/models/remove_subscribers.py b/rootly_sdk/models/remove_subscribers.py index 7393a0e3..84417031 100644 --- a/rootly_sdk/models/remove_subscribers.py +++ b/rootly_sdk/models/remove_subscribers.py @@ -24,6 +24,7 @@ class RemoveSubscribers: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/remove_subscribers_data.py b/rootly_sdk/models/remove_subscribers_data.py index cc8fd21e..0b101a4c 100644 --- a/rootly_sdk/models/remove_subscribers_data.py +++ b/rootly_sdk/models/remove_subscribers_data.py @@ -28,6 +28,7 @@ class RemoveSubscribersData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/rename_google_chat_space_task_params.py b/rootly_sdk/models/rename_google_chat_space_task_params.py new file mode 100644 index 00000000..d1b918ec --- /dev/null +++ b/rootly_sdk/models/rename_google_chat_space_task_params.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.rename_google_chat_space_task_params_task_type import ( + RenameGoogleChatSpaceTaskParamsTaskType, + check_rename_google_chat_space_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace + + +T = TypeVar("T", bound="RenameGoogleChatSpaceTaskParams") + + +@_attrs_define +class RenameGoogleChatSpaceTaskParams: + """ + Attributes: + space (RenameGoogleChatSpaceTaskParamsSpace): + title (str): + task_type (RenameGoogleChatSpaceTaskParamsTaskType | Unset): + """ + + space: RenameGoogleChatSpaceTaskParamsSpace + title: str + task_type: RenameGoogleChatSpaceTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + space = self.space.to_dict() + + title = self.title + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "space": space, + "title": title, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace + + d = dict(src_dict) + space = RenameGoogleChatSpaceTaskParamsSpace.from_dict(d.pop("space")) + + title = d.pop("title") + + _task_type = d.pop("task_type", UNSET) + task_type: RenameGoogleChatSpaceTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_rename_google_chat_space_task_params_task_type(_task_type) + + rename_google_chat_space_task_params = cls( + space=space, + title=title, + task_type=task_type, + ) + + rename_google_chat_space_task_params.additional_properties = d + return rename_google_chat_space_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/rename_google_chat_space_task_params_space.py b/rootly_sdk/models/rename_google_chat_space_task_params_space.py new file mode 100644 index 00000000..5b28cfb2 --- /dev/null +++ b/rootly_sdk/models/rename_google_chat_space_task_params_space.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RenameGoogleChatSpaceTaskParamsSpace") + + +@_attrs_define +class RenameGoogleChatSpaceTaskParamsSpace: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + rename_google_chat_space_task_params_space = cls( + id=id, + name=name, + ) + + rename_google_chat_space_task_params_space.additional_properties = d + return rename_google_chat_space_task_params_space + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/rename_google_chat_space_task_params_task_type.py b/rootly_sdk/models/rename_google_chat_space_task_params_task_type.py new file mode 100644 index 00000000..1b672166 --- /dev/null +++ b/rootly_sdk/models/rename_google_chat_space_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +RenameGoogleChatSpaceTaskParamsTaskType = Literal["rename_google_chat_space"] + +RENAME_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: set[RenameGoogleChatSpaceTaskParamsTaskType] = { + "rename_google_chat_space", +} + + +def check_rename_google_chat_space_task_params_task_type( + value: str | None, +) -> RenameGoogleChatSpaceTaskParamsTaskType | None: + if value is None: + return None + if value in RENAME_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(RenameGoogleChatSpaceTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {RENAME_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py b/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py index c5ecded6..c11439a6 100644 --- a/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py @@ -37,6 +37,7 @@ class RenameMicrosoftTeamsChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + team = self.team.to_dict() channel = self.channel.to_dict() diff --git a/rootly_sdk/models/rename_slack_channel_task_params.py b/rootly_sdk/models/rename_slack_channel_task_params.py index e5b419ff..1f7b3787 100644 --- a/rootly_sdk/models/rename_slack_channel_task_params.py +++ b/rootly_sdk/models/rename_slack_channel_task_params.py @@ -34,6 +34,7 @@ class RenameSlackChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + channel = self.channel.to_dict() title = self.title diff --git a/rootly_sdk/models/resolve_alert.py b/rootly_sdk/models/resolve_alert.py index 70892c51..5ceee88f 100644 --- a/rootly_sdk/models/resolve_alert.py +++ b/rootly_sdk/models/resolve_alert.py @@ -26,6 +26,7 @@ class ResolveAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/resolve_alert_data.py b/rootly_sdk/models/resolve_alert_data.py index e35a0113..52f09fcf 100644 --- a/rootly_sdk/models/resolve_alert_data.py +++ b/rootly_sdk/models/resolve_alert_data.py @@ -29,6 +29,7 @@ class ResolveAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/resolve_incident.py b/rootly_sdk/models/resolve_incident.py index 466294e2..3b7dca45 100644 --- a/rootly_sdk/models/resolve_incident.py +++ b/rootly_sdk/models/resolve_incident.py @@ -24,6 +24,7 @@ class ResolveIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/resolve_incident_data.py b/rootly_sdk/models/resolve_incident_data.py index 79454ac7..2a3d672f 100644 --- a/rootly_sdk/models/resolve_incident_data.py +++ b/rootly_sdk/models/resolve_incident_data.py @@ -28,6 +28,7 @@ class ResolveIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/restart_incident.py b/rootly_sdk/models/restart_incident.py index 87a940c1..491f2a4a 100644 --- a/rootly_sdk/models/restart_incident.py +++ b/rootly_sdk/models/restart_incident.py @@ -24,6 +24,7 @@ class RestartIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/restart_incident_data.py b/rootly_sdk/models/restart_incident_data.py index 149161b4..0be77f7c 100644 --- a/rootly_sdk/models/restart_incident_data.py +++ b/rootly_sdk/models/restart_incident_data.py @@ -29,6 +29,7 @@ class RestartIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes: dict[str, Any] | Unset = UNSET diff --git a/rootly_sdk/models/retrospective_configuration_list.py b/rootly_sdk/models/retrospective_configuration_list.py index 30398957..729d9b07 100644 --- a/rootly_sdk/models/retrospective_configuration_list.py +++ b/rootly_sdk/models/retrospective_configuration_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_list_data_item import RetrospectiveConfigurationListDataItem @@ -18,17 +21,27 @@ class RetrospectiveConfigurationList: """ Attributes: data (list[RetrospectiveConfigurationListDataItem]): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveConfigurationListDataItem] + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() data.append(data_item) + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -36,11 +49,14 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_list_data_item import RetrospectiveConfigurationListDataItem d = dict(src_dict) @@ -51,8 +67,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_configuration_list = cls( data=data, + included=included, ) retrospective_configuration_list.additional_properties = d diff --git a/rootly_sdk/models/retrospective_configuration_list_data_item.py b/rootly_sdk/models/retrospective_configuration_list_data_item.py index 55494c90..fc365e1b 100644 --- a/rootly_sdk/models/retrospective_configuration_list_data_item.py +++ b/rootly_sdk/models/retrospective_configuration_list_data_item.py @@ -33,6 +33,7 @@ class RetrospectiveConfigurationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_configuration_response.py b/rootly_sdk/models/retrospective_configuration_response.py index 56b42d68..bd588e56 100644 --- a/rootly_sdk/models/retrospective_configuration_response.py +++ b/rootly_sdk/models/retrospective_configuration_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_response_data import RetrospectiveConfigurationResponseData @@ -18,14 +21,24 @@ class RetrospectiveConfigurationResponse: """ Attributes: data (RetrospectiveConfigurationResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveConfigurationResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_response_data import RetrospectiveConfigurationResponseData d = dict(src_dict) data = RetrospectiveConfigurationResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_configuration_response = cls( data=data, + included=included, ) retrospective_configuration_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_configuration_response_data.py b/rootly_sdk/models/retrospective_configuration_response_data.py index 430c8851..0de247d5 100644 --- a/rootly_sdk/models/retrospective_configuration_response_data.py +++ b/rootly_sdk/models/retrospective_configuration_response_data.py @@ -33,6 +33,7 @@ class RetrospectiveConfigurationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_group_list.py b/rootly_sdk/models/retrospective_process_group_list.py index e55e6833..c61ee6a9 100644 --- a/rootly_sdk/models/retrospective_process_group_list.py +++ b/rootly_sdk/models/retrospective_process_group_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_group_list_data_item import RetrospectiveProcessGroupListDataItem @@ -22,14 +25,17 @@ class RetrospectiveProcessGroupList: data (list[RetrospectiveProcessGroupListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveProcessGroupListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_group_list_data_item import RetrospectiveProcessGroupListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_group_list = cls( data=data, links=links, meta=meta, + included=included, ) retrospective_process_group_list.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_group_list_data_item.py b/rootly_sdk/models/retrospective_process_group_list_data_item.py index bd83fc5d..019912a5 100644 --- a/rootly_sdk/models/retrospective_process_group_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_group_list_data_item.py @@ -33,6 +33,7 @@ class RetrospectiveProcessGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_group_response.py b/rootly_sdk/models/retrospective_process_group_response.py index 28a77ec2..0b29d413 100644 --- a/rootly_sdk/models/retrospective_process_group_response.py +++ b/rootly_sdk/models/retrospective_process_group_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_response_data import RetrospectiveProcessGroupResponseData @@ -18,14 +21,24 @@ class RetrospectiveProcessGroupResponse: """ Attributes: data (RetrospectiveProcessGroupResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveProcessGroupResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_response_data import RetrospectiveProcessGroupResponseData d = dict(src_dict) data = RetrospectiveProcessGroupResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_group_response = cls( data=data, + included=included, ) retrospective_process_group_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_group_response_data.py b/rootly_sdk/models/retrospective_process_group_response_data.py index e031954a..ea3a5523 100644 --- a/rootly_sdk/models/retrospective_process_group_response_data.py +++ b/rootly_sdk/models/retrospective_process_group_response_data.py @@ -33,6 +33,7 @@ class RetrospectiveProcessGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_group_step_list.py b/rootly_sdk/models/retrospective_process_group_step_list.py index 215c2e5f..555ec62f 100644 --- a/rootly_sdk/models/retrospective_process_group_step_list.py +++ b/rootly_sdk/models/retrospective_process_group_step_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_group_step_list_data_item import RetrospectiveProcessGroupStepListDataItem @@ -22,14 +25,17 @@ class RetrospectiveProcessGroupStepList: data (list[RetrospectiveProcessGroupStepListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveProcessGroupStepListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_group_step_list_data_item import RetrospectiveProcessGroupStepListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_group_step_list = cls( data=data, links=links, meta=meta, + included=included, ) retrospective_process_group_step_list.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_group_step_list_data_item.py b/rootly_sdk/models/retrospective_process_group_step_list_data_item.py index 51a6371d..ebf584e3 100644 --- a/rootly_sdk/models/retrospective_process_group_step_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_group_step_list_data_item.py @@ -33,6 +33,7 @@ class RetrospectiveProcessGroupStepListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_group_step_response.py b/rootly_sdk/models/retrospective_process_group_step_response.py index 2a20a98c..857efd29 100644 --- a/rootly_sdk/models/retrospective_process_group_step_response.py +++ b/rootly_sdk/models/retrospective_process_group_step_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_step_response_data import RetrospectiveProcessGroupStepResponseData @@ -18,14 +21,24 @@ class RetrospectiveProcessGroupStepResponse: """ Attributes: data (RetrospectiveProcessGroupStepResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveProcessGroupStepResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_step_response_data import RetrospectiveProcessGroupStepResponseData d = dict(src_dict) data = RetrospectiveProcessGroupStepResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_group_step_response = cls( data=data, + included=included, ) retrospective_process_group_step_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_group_step_response_data.py b/rootly_sdk/models/retrospective_process_group_step_response_data.py index 786a454c..22381d50 100644 --- a/rootly_sdk/models/retrospective_process_group_step_response_data.py +++ b/rootly_sdk/models/retrospective_process_group_step_response_data.py @@ -33,6 +33,7 @@ class RetrospectiveProcessGroupStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_list.py b/rootly_sdk/models/retrospective_process_list.py index 1026fd52..5afa0273 100644 --- a/rootly_sdk/models/retrospective_process_list.py +++ b/rootly_sdk/models/retrospective_process_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_list_data_item import RetrospectiveProcessListDataItem @@ -22,14 +25,17 @@ class RetrospectiveProcessList: data (list[RetrospectiveProcessListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveProcessListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_list_data_item import RetrospectiveProcessListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_list = cls( data=data, links=links, meta=meta, + included=included, ) retrospective_process_list.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_list_data_item.py b/rootly_sdk/models/retrospective_process_list_data_item.py index a63c45f5..2d5f8fd7 100644 --- a/rootly_sdk/models/retrospective_process_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_list_data_item.py @@ -33,6 +33,7 @@ class RetrospectiveProcessListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_response.py b/rootly_sdk/models/retrospective_process_response.py index 7070b2eb..0ee37bf2 100644 --- a/rootly_sdk/models/retrospective_process_response.py +++ b/rootly_sdk/models/retrospective_process_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_response_data import RetrospectiveProcessResponseData @@ -18,14 +21,24 @@ class RetrospectiveProcessResponse: """ Attributes: data (RetrospectiveProcessResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveProcessResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_response_data import RetrospectiveProcessResponseData d = dict(src_dict) data = RetrospectiveProcessResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_response = cls( data=data, + included=included, ) retrospective_process_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_response_data.py b/rootly_sdk/models/retrospective_process_response_data.py index 2b72ed88..de0061c5 100644 --- a/rootly_sdk/models/retrospective_process_response_data.py +++ b/rootly_sdk/models/retrospective_process_response_data.py @@ -33,6 +33,7 @@ class RetrospectiveProcessResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_step_list.py b/rootly_sdk/models/retrospective_step_list.py index 0637abde..217ff699 100644 --- a/rootly_sdk/models/retrospective_step_list.py +++ b/rootly_sdk/models/retrospective_step_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_step_list_data_item import RetrospectiveStepListDataItem @@ -22,14 +25,17 @@ class RetrospectiveStepList: data (list[RetrospectiveStepListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveStepListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_step_list_data_item import RetrospectiveStepListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_step_list = cls( data=data, links=links, meta=meta, + included=included, ) retrospective_step_list.additional_properties = d diff --git a/rootly_sdk/models/retrospective_step_list_data_item.py b/rootly_sdk/models/retrospective_step_list_data_item.py index 3080ab76..8b3f2ac7 100644 --- a/rootly_sdk/models/retrospective_step_list_data_item.py +++ b/rootly_sdk/models/retrospective_step_list_data_item.py @@ -33,6 +33,7 @@ class RetrospectiveStepListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_step_response.py b/rootly_sdk/models/retrospective_step_response.py index 4b45f083..be53a1f7 100644 --- a/rootly_sdk/models/retrospective_step_response.py +++ b/rootly_sdk/models/retrospective_step_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_step_response_data import RetrospectiveStepResponseData @@ -18,14 +21,24 @@ class RetrospectiveStepResponse: """ Attributes: data (RetrospectiveStepResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveStepResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_step_response_data import RetrospectiveStepResponseData d = dict(src_dict) data = RetrospectiveStepResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_step_response = cls( data=data, + included=included, ) retrospective_step_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_step_response_data.py b/rootly_sdk/models/retrospective_step_response_data.py index db9cd74c..61cc6489 100644 --- a/rootly_sdk/models/retrospective_step_response_data.py +++ b/rootly_sdk/models/retrospective_step_response_data.py @@ -33,6 +33,7 @@ class RetrospectiveStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/role_list.py b/rootly_sdk/models/role_list.py index c7559c21..84c2a73f 100644 --- a/rootly_sdk/models/role_list.py +++ b/rootly_sdk/models/role_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.role_list_data_item import RoleListDataItem @@ -22,14 +25,17 @@ class RoleList: data (list[RoleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RoleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.role_list_data_item import RoleListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + role_list = cls( data=data, links=links, meta=meta, + included=included, ) role_list.additional_properties = d diff --git a/rootly_sdk/models/role_list_data_item.py b/rootly_sdk/models/role_list_data_item.py index 8fccfd1c..71ba6db3 100644 --- a/rootly_sdk/models/role_list_data_item.py +++ b/rootly_sdk/models/role_list_data_item.py @@ -30,6 +30,7 @@ class RoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/role_response.py b/rootly_sdk/models/role_response.py index 6c71767b..a8768453 100644 --- a/rootly_sdk/models/role_response.py +++ b/rootly_sdk/models/role_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.role_response_data import RoleResponseData @@ -18,14 +21,24 @@ class RoleResponse: """ Attributes: data (RoleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RoleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.role_response_data import RoleResponseData d = dict(src_dict) data = RoleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + role_response = cls( data=data, + included=included, ) role_response.additional_properties = d diff --git a/rootly_sdk/models/role_response_data.py b/rootly_sdk/models/role_response_data.py index 9f83836c..a238ec70 100644 --- a/rootly_sdk/models/role_response_data.py +++ b/rootly_sdk/models/role_response_data.py @@ -30,6 +30,7 @@ class RoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/rotate_api_key.py b/rootly_sdk/models/rotate_api_key.py index 56c7a0ae..1b5e928b 100644 --- a/rootly_sdk/models/rotate_api_key.py +++ b/rootly_sdk/models/rotate_api_key.py @@ -24,6 +24,7 @@ class RotateApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/rotate_api_key_data.py b/rootly_sdk/models/rotate_api_key_data.py index 9ba610bb..be73db86 100644 --- a/rootly_sdk/models/rotate_api_key_data.py +++ b/rootly_sdk/models/rotate_api_key_data.py @@ -28,6 +28,7 @@ class RotateApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/run_command_heroku_task_params.py b/rootly_sdk/models/run_command_heroku_task_params.py index 8535d2cc..cfc9232e 100644 --- a/rootly_sdk/models/run_command_heroku_task_params.py +++ b/rootly_sdk/models/run_command_heroku_task_params.py @@ -46,6 +46,7 @@ class RunCommandHerokuTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + command = self.command app_name = self.app_name diff --git a/rootly_sdk/models/schedule.py b/rootly_sdk/models/schedule.py index d1398fe7..a876f69e 100644 --- a/rootly_sdk/models/schedule.py +++ b/rootly_sdk/models/schedule.py @@ -6,6 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.schedule_shift_report_day_of_week import ( + ScheduleShiftReportDayOfWeek, + check_schedule_shift_report_day_of_week, +) from ..types import UNSET, Unset if TYPE_CHECKING: @@ -29,6 +33,18 @@ class Schedule: slack_user_group (None | ScheduleSlackUserGroupType0 | Unset): Synced slack group of the schedule slack_channel (None | ScheduleSlackChannelType0 | Unset): Synced slack channel of the schedule owner_group_ids (list[str] | Unset): Owning teams. + sync_linear_enabled (bool | Unset): Whether the schedule is synced with Linear + include_shadows_in_slack_notifications (bool | Unset): Whether shadow users are included in Slack notifications + and user group syncing. Requires `slack_channel` to be set; otherwise this value is forced to false on save. + shift_start_notifications_enabled (bool | Unset): Whether shift-start notifications are enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_update_notifications_enabled (bool | Unset): Whether shift-update notifications are enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_enabled (bool | Unset): Whether the weekly shift summary report is enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_day_of_week (ScheduleShiftReportDayOfWeek | Unset): Day of week the weekly shift summary is sent + shift_report_time_of_day (str | Unset): Time of day the weekly shift summary is sent, in HH:MM 24-hour format + shift_report_time_zone (str | Unset): IANA time zone used for the weekly shift summary """ name: str @@ -40,6 +56,14 @@ class Schedule: slack_user_group: None | ScheduleSlackUserGroupType0 | Unset = UNSET slack_channel: None | ScheduleSlackChannelType0 | Unset = UNSET owner_group_ids: list[str] | Unset = UNSET + sync_linear_enabled: bool | Unset = UNSET + include_shadows_in_slack_notifications: bool | Unset = UNSET + shift_start_notifications_enabled: bool | Unset = UNSET + shift_update_notifications_enabled: bool | Unset = UNSET + shift_report_enabled: bool | Unset = UNSET + shift_report_day_of_week: ScheduleShiftReportDayOfWeek | Unset = UNSET + shift_report_time_of_day: str | Unset = UNSET + shift_report_time_zone: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -86,6 +110,24 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids + sync_linear_enabled = self.sync_linear_enabled + + include_shadows_in_slack_notifications = self.include_shadows_in_slack_notifications + + shift_start_notifications_enabled = self.shift_start_notifications_enabled + + shift_update_notifications_enabled = self.shift_update_notifications_enabled + + shift_report_enabled = self.shift_report_enabled + + shift_report_day_of_week: str | Unset = UNSET + if not isinstance(self.shift_report_day_of_week, Unset): + shift_report_day_of_week = self.shift_report_day_of_week + + shift_report_time_of_day = self.shift_report_time_of_day + + shift_report_time_zone = self.shift_report_time_zone + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -106,6 +148,22 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channel"] = slack_channel if owner_group_ids is not UNSET: field_dict["owner_group_ids"] = owner_group_ids + if sync_linear_enabled is not UNSET: + field_dict["sync_linear_enabled"] = sync_linear_enabled + if include_shadows_in_slack_notifications is not UNSET: + field_dict["include_shadows_in_slack_notifications"] = include_shadows_in_slack_notifications + if shift_start_notifications_enabled is not UNSET: + field_dict["shift_start_notifications_enabled"] = shift_start_notifications_enabled + if shift_update_notifications_enabled is not UNSET: + field_dict["shift_update_notifications_enabled"] = shift_update_notifications_enabled + if shift_report_enabled is not UNSET: + field_dict["shift_report_enabled"] = shift_report_enabled + if shift_report_day_of_week is not UNSET: + field_dict["shift_report_day_of_week"] = shift_report_day_of_week + if shift_report_time_of_day is not UNSET: + field_dict["shift_report_time_of_day"] = shift_report_time_of_day + if shift_report_time_zone is not UNSET: + field_dict["shift_report_time_zone"] = shift_report_time_zone return field_dict @@ -177,6 +235,27 @@ def _parse_slack_channel(data: object) -> None | ScheduleSlackChannelType0 | Uns owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) + sync_linear_enabled = d.pop("sync_linear_enabled", UNSET) + + include_shadows_in_slack_notifications = d.pop("include_shadows_in_slack_notifications", UNSET) + + shift_start_notifications_enabled = d.pop("shift_start_notifications_enabled", UNSET) + + shift_update_notifications_enabled = d.pop("shift_update_notifications_enabled", UNSET) + + shift_report_enabled = d.pop("shift_report_enabled", UNSET) + + _shift_report_day_of_week = d.pop("shift_report_day_of_week", UNSET) + shift_report_day_of_week: ScheduleShiftReportDayOfWeek | Unset + if isinstance(_shift_report_day_of_week, Unset): + shift_report_day_of_week = UNSET + else: + shift_report_day_of_week = check_schedule_shift_report_day_of_week(_shift_report_day_of_week) + + shift_report_time_of_day = d.pop("shift_report_time_of_day", UNSET) + + shift_report_time_zone = d.pop("shift_report_time_zone", UNSET) + schedule = cls( name=name, owner_user_id=owner_user_id, @@ -187,6 +266,14 @@ def _parse_slack_channel(data: object) -> None | ScheduleSlackChannelType0 | Uns slack_user_group=slack_user_group, slack_channel=slack_channel, owner_group_ids=owner_group_ids, + sync_linear_enabled=sync_linear_enabled, + include_shadows_in_slack_notifications=include_shadows_in_slack_notifications, + shift_start_notifications_enabled=shift_start_notifications_enabled, + shift_update_notifications_enabled=shift_update_notifications_enabled, + shift_report_enabled=shift_report_enabled, + shift_report_day_of_week=shift_report_day_of_week, + shift_report_time_of_day=shift_report_time_of_day, + shift_report_time_zone=shift_report_time_zone, ) schedule.additional_properties = d diff --git a/rootly_sdk/models/schedule_list.py b/rootly_sdk/models/schedule_list.py index 352c0968..1565c112 100644 --- a/rootly_sdk/models/schedule_list.py +++ b/rootly_sdk/models/schedule_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_list_data_item import ScheduleListDataItem @@ -22,14 +25,17 @@ class ScheduleList: data (list[ScheduleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ScheduleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_list_data_item import ScheduleListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_list = cls( data=data, links=links, meta=meta, + included=included, ) schedule_list.additional_properties = d diff --git a/rootly_sdk/models/schedule_list_data_item.py b/rootly_sdk/models/schedule_list_data_item.py index f3cd6fdb..9e0cb37f 100644 --- a/rootly_sdk/models/schedule_list_data_item.py +++ b/rootly_sdk/models/schedule_list_data_item.py @@ -30,6 +30,7 @@ class ScheduleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_response.py b/rootly_sdk/models/schedule_response.py index 8cde142a..35a66c8e 100644 --- a/rootly_sdk/models/schedule_response.py +++ b/rootly_sdk/models/schedule_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_response_data import ScheduleResponseData @@ -18,14 +21,24 @@ class ScheduleResponse: """ Attributes: data (ScheduleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ScheduleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_response_data import ScheduleResponseData d = dict(src_dict) data = ScheduleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_response = cls( data=data, + included=included, ) schedule_response.additional_properties = d diff --git a/rootly_sdk/models/schedule_response_data.py b/rootly_sdk/models/schedule_response_data.py index 1d25406d..523ab23b 100644 --- a/rootly_sdk/models/schedule_response_data.py +++ b/rootly_sdk/models/schedule_response_data.py @@ -30,6 +30,7 @@ class ScheduleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation.py b/rootly_sdk/models/schedule_rotation.py index 3b2997a6..18d78321 100644 --- a/rootly_sdk/models/schedule_rotation.py +++ b/rootly_sdk/models/schedule_rotation.py @@ -54,9 +54,9 @@ class ScheduleRotation: active_time_attributes (list[ScheduleRotationActiveTimeAttributesItem] | Unset): Schedule rotation's active times time_zone (str | Unset): A valid IANA time zone name. Default: 'Etc/UTC'. - start_time (datetime.date | None | Unset): ISO8601 date and time when rotation starts. Shifts will only be + start_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation starts. Shifts will only be created after this time. - end_time (datetime.date | None | Unset): ISO8601 date and time when rotation ends. Shifts will only be created + end_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation ends. Shifts will only be created before this time. """ @@ -75,8 +75,8 @@ class ScheduleRotation: active_time_type: str | Unset = UNSET active_time_attributes: list[ScheduleRotationActiveTimeAttributesItem] | Unset = UNSET time_zone: str | Unset = "Etc/UTC" - start_time: datetime.date | None | Unset = UNSET - end_time: datetime.date | None | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -131,7 +131,7 @@ def to_dict(self) -> dict[str, Any]: start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET - elif isinstance(self.start_time, datetime.date): + elif isinstance(self.start_time, datetime.datetime): start_time = self.start_time.isoformat() else: start_time = self.start_time @@ -139,7 +139,7 @@ def to_dict(self) -> dict[str, Any]: end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET - elif isinstance(self.end_time, datetime.date): + elif isinstance(self.end_time, datetime.datetime): end_time = self.end_time.isoformat() else: end_time = self.end_time @@ -276,7 +276,7 @@ def _parse_schedule_rotationable_attributes( time_zone = d.pop("time_zone", UNSET) - def _parse_start_time(data: object) -> datetime.date | None | Unset: + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -284,16 +284,16 @@ def _parse_start_time(data: object) -> datetime.date | None | Unset: try: if not isinstance(data, str): raise TypeError() - start_time_type_0 = isoparse(data).date() + start_time_type_0 = isoparse(data) return start_time_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(datetime.date | None | Unset, data) + return cast(datetime.datetime | None | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> datetime.date | None | Unset: + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -301,12 +301,12 @@ def _parse_end_time(data: object) -> datetime.date | None | Unset: try: if not isinstance(data, str): raise TypeError() - end_time_type_0 = isoparse(data).date() + end_time_type_0 = isoparse(data) return end_time_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(datetime.date | None | Unset, data) + return cast(datetime.datetime | None | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) diff --git a/rootly_sdk/models/schedule_rotation_active_day.py b/rootly_sdk/models/schedule_rotation_active_day.py index d21d18dd..1410cc1e 100644 --- a/rootly_sdk/models/schedule_rotation_active_day.py +++ b/rootly_sdk/models/schedule_rotation_active_day.py @@ -40,6 +40,7 @@ class ScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + schedule_rotation_id = self.schedule_rotation_id day_name: str = self.day_name diff --git a/rootly_sdk/models/schedule_rotation_active_day_list.py b/rootly_sdk/models/schedule_rotation_active_day_list.py index c8db539a..f359204a 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_list.py +++ b/rootly_sdk/models/schedule_rotation_active_day_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_active_day_list_data_item import ScheduleRotationActiveDayListDataItem @@ -22,14 +25,17 @@ class ScheduleRotationActiveDayList: data (list[ScheduleRotationActiveDayListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ScheduleRotationActiveDayListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_active_day_list_data_item import ScheduleRotationActiveDayListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_active_day_list = cls( data=data, links=links, meta=meta, + included=included, ) schedule_rotation_active_day_list.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_active_day_list_data_item.py b/rootly_sdk/models/schedule_rotation_active_day_list_data_item.py index 89218d8f..4b9438f4 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_active_day_list_data_item.py @@ -33,6 +33,7 @@ class ScheduleRotationActiveDayListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation_active_day_response.py b/rootly_sdk/models/schedule_rotation_active_day_response.py index c1367dc9..bd8158a0 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_response.py +++ b/rootly_sdk/models/schedule_rotation_active_day_response.py @@ -9,6 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_active_day_response_data import ScheduleRotationActiveDayResponseData @@ -20,26 +21,39 @@ class ScheduleRotationActiveDayResponse: """ Attributes: data (ScheduleRotationActiveDayResponseData | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: ScheduleRotationActiveDayResponseData | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if data is not UNSET: field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_active_day_response_data import ScheduleRotationActiveDayResponseData d = dict(src_dict) @@ -50,8 +64,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: data = ScheduleRotationActiveDayResponseData.from_dict(_data) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_active_day_response = cls( data=data, + included=included, ) schedule_rotation_active_day_response.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_active_day_response_data.py b/rootly_sdk/models/schedule_rotation_active_day_response_data.py index de8b9b12..c24c7a76 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_response_data.py +++ b/rootly_sdk/models/schedule_rotation_active_day_response_data.py @@ -34,6 +34,7 @@ class ScheduleRotationActiveDayResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str | Unset = UNSET diff --git a/rootly_sdk/models/schedule_rotation_list.py b/rootly_sdk/models/schedule_rotation_list.py index ffb96650..9881f2ff 100644 --- a/rootly_sdk/models/schedule_rotation_list.py +++ b/rootly_sdk/models/schedule_rotation_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_list_data_item import ScheduleRotationListDataItem @@ -22,14 +25,17 @@ class ScheduleRotationList: data (list[ScheduleRotationListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ScheduleRotationListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_list_data_item import ScheduleRotationListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_list = cls( data=data, links=links, meta=meta, + included=included, ) schedule_rotation_list.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_list_data_item.py b/rootly_sdk/models/schedule_rotation_list_data_item.py index a05d662e..032ca96c 100644 --- a/rootly_sdk/models/schedule_rotation_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_list_data_item.py @@ -33,6 +33,7 @@ class ScheduleRotationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation_response.py b/rootly_sdk/models/schedule_rotation_response.py index f6161b5a..651e9a21 100644 --- a/rootly_sdk/models/schedule_rotation_response.py +++ b/rootly_sdk/models/schedule_rotation_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_response_data import ScheduleRotationResponseData @@ -18,14 +21,24 @@ class ScheduleRotationResponse: """ Attributes: data (ScheduleRotationResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ScheduleRotationResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_response_data import ScheduleRotationResponseData d = dict(src_dict) data = ScheduleRotationResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_response = cls( data=data, + included=included, ) schedule_rotation_response.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_response_data.py b/rootly_sdk/models/schedule_rotation_response_data.py index 23264402..4e1354bb 100644 --- a/rootly_sdk/models/schedule_rotation_response_data.py +++ b/rootly_sdk/models/schedule_rotation_response_data.py @@ -33,6 +33,7 @@ class ScheduleRotationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation_user_list.py b/rootly_sdk/models/schedule_rotation_user_list.py index aa284d9c..8eadaa63 100644 --- a/rootly_sdk/models/schedule_rotation_user_list.py +++ b/rootly_sdk/models/schedule_rotation_user_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_user_list_data_item import ScheduleRotationUserListDataItem @@ -22,14 +25,17 @@ class ScheduleRotationUserList: data (list[ScheduleRotationUserListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ScheduleRotationUserListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_user_list_data_item import ScheduleRotationUserListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_user_list = cls( data=data, links=links, meta=meta, + included=included, ) schedule_rotation_user_list.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_user_list_data_item.py b/rootly_sdk/models/schedule_rotation_user_list_data_item.py index 0ad5a6bf..08da3d88 100644 --- a/rootly_sdk/models/schedule_rotation_user_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_user_list_data_item.py @@ -33,6 +33,7 @@ class ScheduleRotationUserListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation_user_response.py b/rootly_sdk/models/schedule_rotation_user_response.py index 35fafdb4..a77b9c0b 100644 --- a/rootly_sdk/models/schedule_rotation_user_response.py +++ b/rootly_sdk/models/schedule_rotation_user_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_user_response_data import ScheduleRotationUserResponseData @@ -18,14 +21,24 @@ class ScheduleRotationUserResponse: """ Attributes: data (ScheduleRotationUserResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ScheduleRotationUserResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_user_response_data import ScheduleRotationUserResponseData d = dict(src_dict) data = ScheduleRotationUserResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_user_response = cls( data=data, + included=included, ) schedule_rotation_user_response.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_user_response_data.py b/rootly_sdk/models/schedule_rotation_user_response_data.py index bfb24d1c..c13bc9a8 100644 --- a/rootly_sdk/models/schedule_rotation_user_response_data.py +++ b/rootly_sdk/models/schedule_rotation_user_response_data.py @@ -33,6 +33,7 @@ class ScheduleRotationUserResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_shift_report_day_of_week.py b/rootly_sdk/models/schedule_shift_report_day_of_week.py new file mode 100644 index 00000000..5f403843 --- /dev/null +++ b/rootly_sdk/models/schedule_shift_report_day_of_week.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +ScheduleShiftReportDayOfWeek = Literal["friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday"] + +SCHEDULE_SHIFT_REPORT_DAY_OF_WEEK_VALUES: set[ScheduleShiftReportDayOfWeek] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_schedule_shift_report_day_of_week(value: str | None) -> ScheduleShiftReportDayOfWeek | None: + if value is None: + return None + if value in SCHEDULE_SHIFT_REPORT_DAY_OF_WEEK_VALUES: + return cast(ScheduleShiftReportDayOfWeek, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SCHEDULE_SHIFT_REPORT_DAY_OF_WEEK_VALUES!r}") diff --git a/rootly_sdk/models/secret_list.py b/rootly_sdk/models/secret_list.py index 3dd6f324..702a4e5a 100644 --- a/rootly_sdk/models/secret_list.py +++ b/rootly_sdk/models/secret_list.py @@ -32,6 +32,7 @@ class SecretList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() diff --git a/rootly_sdk/models/secret_list_data_item.py b/rootly_sdk/models/secret_list_data_item.py index 77572c28..31a72676 100644 --- a/rootly_sdk/models/secret_list_data_item.py +++ b/rootly_sdk/models/secret_list_data_item.py @@ -30,6 +30,7 @@ class SecretListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/secret_response.py b/rootly_sdk/models/secret_response.py index 19eff24a..841888e2 100644 --- a/rootly_sdk/models/secret_response.py +++ b/rootly_sdk/models/secret_response.py @@ -24,6 +24,7 @@ class SecretResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/secret_response_data.py b/rootly_sdk/models/secret_response_data.py index a0383993..e7b5504d 100644 --- a/rootly_sdk/models/secret_response_data.py +++ b/rootly_sdk/models/secret_response_data.py @@ -30,6 +30,7 @@ class SecretResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/send_google_chat_attachments_task_params.py b/rootly_sdk/models/send_google_chat_attachments_task_params.py new file mode 100644 index 00000000..dd445380 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_attachments_task_params.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.send_google_chat_attachments_task_params_task_type import ( + SendGoogleChatAttachmentsTaskParamsTaskType, + check_send_google_chat_attachments_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.send_google_chat_attachments_task_params_spaces_item import ( + SendGoogleChatAttachmentsTaskParamsSpacesItem, + ) + + +T = TypeVar("T", bound="SendGoogleChatAttachmentsTaskParams") + + +@_attrs_define +class SendGoogleChatAttachmentsTaskParams: + """ + Attributes: + spaces (list[SendGoogleChatAttachmentsTaskParamsSpacesItem]): + attachments (str): + task_type (SendGoogleChatAttachmentsTaskParamsTaskType | Unset): + """ + + spaces: list[SendGoogleChatAttachmentsTaskParamsSpacesItem] + attachments: str + task_type: SendGoogleChatAttachmentsTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + spaces = [] + for spaces_item_data in self.spaces: + spaces_item = spaces_item_data.to_dict() + spaces.append(spaces_item) + + attachments = self.attachments + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "spaces": spaces, + "attachments": attachments, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.send_google_chat_attachments_task_params_spaces_item import ( + SendGoogleChatAttachmentsTaskParamsSpacesItem, + ) + + d = dict(src_dict) + spaces = [] + _spaces = d.pop("spaces") + for spaces_item_data in _spaces: + spaces_item = SendGoogleChatAttachmentsTaskParamsSpacesItem.from_dict(spaces_item_data) + + spaces.append(spaces_item) + + attachments = d.pop("attachments") + + _task_type = d.pop("task_type", UNSET) + task_type: SendGoogleChatAttachmentsTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_send_google_chat_attachments_task_params_task_type(_task_type) + + send_google_chat_attachments_task_params = cls( + spaces=spaces, + attachments=attachments, + task_type=task_type, + ) + + send_google_chat_attachments_task_params.additional_properties = d + return send_google_chat_attachments_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py b/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py new file mode 100644 index 00000000..0b80e5f7 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendGoogleChatAttachmentsTaskParamsSpacesItem") + + +@_attrs_define +class SendGoogleChatAttachmentsTaskParamsSpacesItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_google_chat_attachments_task_params_spaces_item = cls( + id=id, + name=name, + ) + + send_google_chat_attachments_task_params_spaces_item.additional_properties = d + return send_google_chat_attachments_task_params_spaces_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_google_chat_attachments_task_params_task_type.py b/rootly_sdk/models/send_google_chat_attachments_task_params_task_type.py new file mode 100644 index 00000000..17b37e81 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_attachments_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +SendGoogleChatAttachmentsTaskParamsTaskType = Literal["send_google_chat_attachments"] + +SEND_GOOGLE_CHAT_ATTACHMENTS_TASK_PARAMS_TASK_TYPE_VALUES: set[SendGoogleChatAttachmentsTaskParamsTaskType] = { + "send_google_chat_attachments", +} + + +def check_send_google_chat_attachments_task_params_task_type( + value: str | None, +) -> SendGoogleChatAttachmentsTaskParamsTaskType | None: + if value is None: + return None + if value in SEND_GOOGLE_CHAT_ATTACHMENTS_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(SendGoogleChatAttachmentsTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {SEND_GOOGLE_CHAT_ATTACHMENTS_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/send_google_chat_message_task_params.py b/rootly_sdk/models/send_google_chat_message_task_params.py new file mode 100644 index 00000000..db4a5839 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_message_task_params.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.send_google_chat_message_task_params_task_type import ( + SendGoogleChatMessageTaskParamsTaskType, + check_send_google_chat_message_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem + + +T = TypeVar("T", bound="SendGoogleChatMessageTaskParams") + + +@_attrs_define +class SendGoogleChatMessageTaskParams: + """ + Attributes: + spaces (list[SendGoogleChatMessageTaskParamsSpacesItem]): + text (str): + task_type (SendGoogleChatMessageTaskParamsTaskType | Unset): + thread_key (None | str | Unset): Thread key to reply within a thread. Messages with the same thread key are + grouped together + """ + + spaces: list[SendGoogleChatMessageTaskParamsSpacesItem] + text: str + task_type: SendGoogleChatMessageTaskParamsTaskType | Unset = UNSET + thread_key: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + spaces = [] + for spaces_item_data in self.spaces: + spaces_item = spaces_item_data.to_dict() + spaces.append(spaces_item) + + text = self.text + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + thread_key: None | str | Unset + if isinstance(self.thread_key, Unset): + thread_key = UNSET + else: + thread_key = self.thread_key + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "spaces": spaces, + "text": text, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if thread_key is not UNSET: + field_dict["thread_key"] = thread_key + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem + + d = dict(src_dict) + spaces = [] + _spaces = d.pop("spaces") + for spaces_item_data in _spaces: + spaces_item = SendGoogleChatMessageTaskParamsSpacesItem.from_dict(spaces_item_data) + + spaces.append(spaces_item) + + text = d.pop("text") + + _task_type = d.pop("task_type", UNSET) + task_type: SendGoogleChatMessageTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_send_google_chat_message_task_params_task_type(_task_type) + + def _parse_thread_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + thread_key = _parse_thread_key(d.pop("thread_key", UNSET)) + + send_google_chat_message_task_params = cls( + spaces=spaces, + text=text, + task_type=task_type, + thread_key=thread_key, + ) + + send_google_chat_message_task_params.additional_properties = d + return send_google_chat_message_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py b/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py new file mode 100644 index 00000000..71a9a418 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendGoogleChatMessageTaskParamsSpacesItem") + + +@_attrs_define +class SendGoogleChatMessageTaskParamsSpacesItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_google_chat_message_task_params_spaces_item = cls( + id=id, + name=name, + ) + + send_google_chat_message_task_params_spaces_item.additional_properties = d + return send_google_chat_message_task_params_spaces_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_google_chat_message_task_params_task_type.py b/rootly_sdk/models/send_google_chat_message_task_params_task_type.py new file mode 100644 index 00000000..c32fa899 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_message_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +SendGoogleChatMessageTaskParamsTaskType = Literal["send_google_chat_message"] + +SEND_GOOGLE_CHAT_MESSAGE_TASK_PARAMS_TASK_TYPE_VALUES: set[SendGoogleChatMessageTaskParamsTaskType] = { + "send_google_chat_message", +} + + +def check_send_google_chat_message_task_params_task_type( + value: str | None, +) -> SendGoogleChatMessageTaskParamsTaskType | None: + if value is None: + return None + if value in SEND_GOOGLE_CHAT_MESSAGE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(SendGoogleChatMessageTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {SEND_GOOGLE_CHAT_MESSAGE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py b/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py new file mode 100644 index 00000000..6aa1da64 --- /dev/null +++ b/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem") + + +@_attrs_define +class SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_microsoft_teams_blocks_task_params_type_0_channels_item = cls( + id=id, + name=name, + ) + + send_microsoft_teams_blocks_task_params_type_0_channels_item.additional_properties = d + return send_microsoft_teams_blocks_task_params_type_0_channels_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py b/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py index 4e82900e..9fe2be40 100644 --- a/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py +++ b/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py @@ -36,6 +36,7 @@ class SendMicrosoftTeamsChatMessageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + chats = [] for chats_item_data in self.chats: chats_item = chats_item_data.to_dict() diff --git a/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py b/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py new file mode 100644 index 00000000..62d56aa3 --- /dev/null +++ b/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem") + + +@_attrs_define +class SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_microsoft_teams_message_task_params_type_0_channels_item = cls( + id=id, + name=name, + ) + + send_microsoft_teams_message_task_params_type_0_channels_item.additional_properties = d + return send_microsoft_teams_message_task_params_type_0_channels_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py new file mode 100644 index 00000000..1d13245f --- /dev/null +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendSlackBlocksTaskParamsType0ChannelsItem") + + +@_attrs_define +class SendSlackBlocksTaskParamsType0ChannelsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_slack_blocks_task_params_type_0_channels_item = cls( + id=id, + name=name, + ) + + send_slack_blocks_task_params_type_0_channels_item.additional_properties = d + return send_slack_blocks_task_params_type_0_channels_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py new file mode 100644 index 00000000..fb401ba9 --- /dev/null +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendSlackBlocksTaskParamsType1SlackUsersItem") + + +@_attrs_define +class SendSlackBlocksTaskParamsType1SlackUsersItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_slack_blocks_task_params_type_1_slack_users_item = cls( + id=id, + name=name, + ) + + send_slack_blocks_task_params_type_1_slack_users_item.additional_properties = d + return send_slack_blocks_task_params_type_1_slack_users_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py new file mode 100644 index 00000000..54a82d43 --- /dev/null +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendSlackBlocksTaskParamsType2SlackUserGroupsItem") + + +@_attrs_define +class SendSlackBlocksTaskParamsType2SlackUserGroupsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_slack_blocks_task_params_type_2_slack_user_groups_item = cls( + id=id, + name=name, + ) + + send_slack_blocks_task_params_type_2_slack_user_groups_item.additional_properties = d + return send_slack_blocks_task_params_type_2_slack_user_groups_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py b/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py new file mode 100644 index 00000000..07a0fed2 --- /dev/null +++ b/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendSlackMessageTaskParamsType0ChannelsItem") + + +@_attrs_define +class SendSlackMessageTaskParamsType0ChannelsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_slack_message_task_params_type_0_channels_item = cls( + id=id, + name=name, + ) + + send_slack_message_task_params_type_0_channels_item.additional_properties = d + return send_slack_message_task_params_type_0_channels_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py b/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py new file mode 100644 index 00000000..7aa7cd68 --- /dev/null +++ b/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendSlackMessageTaskParamsType1SlackUsersItem") + + +@_attrs_define +class SendSlackMessageTaskParamsType1SlackUsersItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_slack_message_task_params_type_1_slack_users_item = cls( + id=id, + name=name, + ) + + send_slack_message_task_params_type_1_slack_users_item.additional_properties = d + return send_slack_message_task_params_type_1_slack_users_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py b/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py new file mode 100644 index 00000000..8a055aa3 --- /dev/null +++ b/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SendSlackMessageTaskParamsType2SlackUserGroupsItem") + + +@_attrs_define +class SendSlackMessageTaskParamsType2SlackUserGroupsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + send_slack_message_task_params_type_2_slack_user_groups_item = cls( + id=id, + name=name, + ) + + send_slack_message_task_params_type_2_slack_user_groups_item.additional_properties = d + return send_slack_message_task_params_type_2_slack_user_groups_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/service.py b/rootly_sdk/models/service.py index 78e50976..78237e7e 100644 --- a/rootly_sdk/models/service.py +++ b/rootly_sdk/models/service.py @@ -6,6 +6,7 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.service_managed_by import ServiceManagedBy, check_service_managed_by from ..types import UNSET, Unset if TYPE_CHECKING: @@ -27,6 +28,8 @@ class Service: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the service + managed_by (ServiceManagedBy | Unset): How this service is managed (provenance): web, api, terraform, etc. Read- + only. description (None | str | Unset): The description of the service public_description (None | str | Unset): The public description of the service notify_emails (list[str] | None | Unset): Emails attached to the service @@ -69,6 +72,7 @@ class Service: created_at: str updated_at: str slug: str | Unset = UNSET + managed_by: ServiceManagedBy | Unset = UNSET description: None | str | Unset = UNSET public_description: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET @@ -114,6 +118,10 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET @@ -348,6 +356,8 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by if description is not UNSET: field_dict["description"] = description if public_description is not UNSET: @@ -430,6 +440,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _managed_by = d.pop("managed_by", UNSET) + managed_by: ServiceManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_service_managed_by(_managed_by) + def _parse_description(data: object) -> None | str | Unset: if data is None: return data @@ -811,6 +828,7 @@ def _parse_properties(data: object) -> list[ServicePropertiesType0Item] | None | created_at=created_at, updated_at=updated_at, slug=slug, + managed_by=managed_by, description=description, public_description=public_description, notify_emails=notify_emails, diff --git a/rootly_sdk/models/service_list.py b/rootly_sdk/models/service_list.py index fb54a8c7..b5abbabc 100644 --- a/rootly_sdk/models/service_list.py +++ b/rootly_sdk/models/service_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.service_list_data_item import ServiceListDataItem @@ -22,14 +25,17 @@ class ServiceList: data (list[ServiceListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ServiceListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.service_list_data_item import ServiceListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + service_list = cls( data=data, links=links, meta=meta, + included=included, ) service_list.additional_properties = d diff --git a/rootly_sdk/models/service_list_data_item.py b/rootly_sdk/models/service_list_data_item.py index 809cde14..9134e55d 100644 --- a/rootly_sdk/models/service_list_data_item.py +++ b/rootly_sdk/models/service_list_data_item.py @@ -30,6 +30,7 @@ class ServiceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/service_managed_by.py b/rootly_sdk/models/service_managed_by.py new file mode 100644 index 00000000..b66a3a05 --- /dev/null +++ b/rootly_sdk/models/service_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +ServiceManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +SERVICE_MANAGED_BY_VALUES: set[ServiceManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_service_managed_by(value: str | None) -> ServiceManagedBy | None: + if value is None: + return None + if value in SERVICE_MANAGED_BY_VALUES: + return cast(ServiceManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SERVICE_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/service_response.py b/rootly_sdk/models/service_response.py index 2b2849d3..3309f183 100644 --- a/rootly_sdk/models/service_response.py +++ b/rootly_sdk/models/service_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.service_response_data import ServiceResponseData @@ -18,14 +21,24 @@ class ServiceResponse: """ Attributes: data (ServiceResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ServiceResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.service_response_data import ServiceResponseData d = dict(src_dict) data = ServiceResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + service_response = cls( data=data, + included=included, ) service_response.additional_properties = d diff --git a/rootly_sdk/models/service_response_data.py b/rootly_sdk/models/service_response_data.py index 3ee17f08..0ebacacd 100644 --- a/rootly_sdk/models/service_response_data.py +++ b/rootly_sdk/models/service_response_data.py @@ -30,6 +30,7 @@ class ServiceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/severity.py b/rootly_sdk/models/severity.py index a3bee45c..7e2ec960 100644 --- a/rootly_sdk/models/severity.py +++ b/rootly_sdk/models/severity.py @@ -49,6 +49,7 @@ class Severity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name created_at = self.created_at diff --git a/rootly_sdk/models/severity_list.py b/rootly_sdk/models/severity_list.py index 7cfa514c..fbde9c29 100644 --- a/rootly_sdk/models/severity_list.py +++ b/rootly_sdk/models/severity_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.severity_list_data_item import SeverityListDataItem @@ -22,14 +25,17 @@ class SeverityList: data (list[SeverityListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[SeverityListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.severity_list_data_item import SeverityListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + severity_list = cls( data=data, links=links, meta=meta, + included=included, ) severity_list.additional_properties = d diff --git a/rootly_sdk/models/severity_list_data_item.py b/rootly_sdk/models/severity_list_data_item.py index 70b771d4..c720e231 100644 --- a/rootly_sdk/models/severity_list_data_item.py +++ b/rootly_sdk/models/severity_list_data_item.py @@ -30,6 +30,7 @@ class SeverityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/severity_response.py b/rootly_sdk/models/severity_response.py index 9eb6fb82..46d0252d 100644 --- a/rootly_sdk/models/severity_response.py +++ b/rootly_sdk/models/severity_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.severity_response_data import SeverityResponseData @@ -18,14 +21,24 @@ class SeverityResponse: """ Attributes: data (SeverityResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: SeverityResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.severity_response_data import SeverityResponseData d = dict(src_dict) data = SeverityResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + severity_response = cls( data=data, + included=included, ) severity_response.additional_properties = d diff --git a/rootly_sdk/models/severity_response_data.py b/rootly_sdk/models/severity_response_data.py index 0e33a4b6..9382039a 100644 --- a/rootly_sdk/models/severity_response_data.py +++ b/rootly_sdk/models/severity_response_data.py @@ -30,6 +30,7 @@ class SeverityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/shift_coverage_request.py b/rootly_sdk/models/shift_coverage_request.py new file mode 100644 index 00000000..88ab9880 --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request.py @@ -0,0 +1,196 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.schedule_response import ScheduleResponse + from ..models.shift import Shift + from ..models.user_response import UserResponse + + +T = TypeVar("T", bound="ShiftCoverageRequest") + + +@_attrs_define +class ShiftCoverageRequest: + """ + Attributes: + schedule_id (str): ID of schedule + shift_id (str): ID of the shift being covered + original_shift_user_id (int): ID of the user whose shift is being covered + created_by_user_id (int): ID of the user who created the coverage request + starts_at (str): Start datetime of the coverage request + ends_at (str): End datetime of the coverage request + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + schedule (ScheduleResponse | Unset): + shift (Shift | Unset): + original_shift_user (UserResponse | Unset): + created_by_user (UserResponse | Unset): + """ + + schedule_id: str + shift_id: str + original_shift_user_id: int + created_by_user_id: int + starts_at: str + ends_at: str + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + schedule: ScheduleResponse | Unset = UNSET + shift: Shift | Unset = UNSET + original_shift_user: UserResponse | Unset = UNSET + created_by_user: UserResponse | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + schedule_id = self.schedule_id + + shift_id = self.shift_id + + original_shift_user_id = self.original_shift_user_id + + created_by_user_id = self.created_by_user_id + + starts_at = self.starts_at + + ends_at = self.ends_at + + created_at = self.created_at + + updated_at = self.updated_at + + schedule: dict[str, Any] | Unset = UNSET + if not isinstance(self.schedule, Unset): + schedule = self.schedule.to_dict() + + shift: dict[str, Any] | Unset = UNSET + if not isinstance(self.shift, Unset): + shift = self.shift.to_dict() + + original_shift_user: dict[str, Any] | Unset = UNSET + if not isinstance(self.original_shift_user, Unset): + original_shift_user = self.original_shift_user.to_dict() + + created_by_user: dict[str, Any] | Unset = UNSET + if not isinstance(self.created_by_user, Unset): + created_by_user = self.created_by_user.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "schedule_id": schedule_id, + "shift_id": shift_id, + "original_shift_user_id": original_shift_user_id, + "created_by_user_id": created_by_user_id, + "starts_at": starts_at, + "ends_at": ends_at, + } + ) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if schedule is not UNSET: + field_dict["schedule"] = schedule + if shift is not UNSET: + field_dict["shift"] = shift + if original_shift_user is not UNSET: + field_dict["original_shift_user"] = original_shift_user + if created_by_user is not UNSET: + field_dict["created_by_user"] = created_by_user + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.schedule_response import ScheduleResponse + from ..models.shift import Shift + from ..models.user_response import UserResponse + + d = dict(src_dict) + schedule_id = d.pop("schedule_id") + + shift_id = d.pop("shift_id") + + original_shift_user_id = d.pop("original_shift_user_id") + + created_by_user_id = d.pop("created_by_user_id") + + starts_at = d.pop("starts_at") + + ends_at = d.pop("ends_at") + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + _schedule = d.pop("schedule", UNSET) + schedule: ScheduleResponse | Unset + if isinstance(_schedule, Unset): + schedule = UNSET + else: + schedule = ScheduleResponse.from_dict(_schedule) + + _shift = d.pop("shift", UNSET) + shift: Shift | Unset + if isinstance(_shift, Unset): + shift = UNSET + else: + shift = Shift.from_dict(_shift) + + _original_shift_user = d.pop("original_shift_user", UNSET) + original_shift_user: UserResponse | Unset + if isinstance(_original_shift_user, Unset): + original_shift_user = UNSET + else: + original_shift_user = UserResponse.from_dict(_original_shift_user) + + _created_by_user = d.pop("created_by_user", UNSET) + created_by_user: UserResponse | Unset + if isinstance(_created_by_user, Unset): + created_by_user = UNSET + else: + created_by_user = UserResponse.from_dict(_created_by_user) + + shift_coverage_request = cls( + schedule_id=schedule_id, + shift_id=shift_id, + original_shift_user_id=original_shift_user_id, + created_by_user_id=created_by_user_id, + starts_at=starts_at, + ends_at=ends_at, + created_at=created_at, + updated_at=updated_at, + schedule=schedule, + shift=shift, + original_shift_user=original_shift_user, + created_by_user=created_by_user, + ) + + shift_coverage_request.additional_properties = d + return shift_coverage_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/shift_coverage_request_list.py b/rootly_sdk/models/shift_coverage_request_list.py new file mode 100644 index 00000000..59327bd2 --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_list.py @@ -0,0 +1,137 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.meta import Meta + from ..models.shift_coverage_request_list_data_item import ShiftCoverageRequestListDataItem + + +T = TypeVar("T", bound="ShiftCoverageRequestList") + + +@_attrs_define +class ShiftCoverageRequestList: + """ + Attributes: + data (list[ShiftCoverageRequestListDataItem]): + links (Links | Unset): + meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: list[ShiftCoverageRequestListDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links: dict[str, Any] | Unset = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + meta: dict[str, Any] | Unset = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if links is not UNSET: + field_dict["links"] = links + if meta is not UNSET: + field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.meta import Meta + from ..models.shift_coverage_request_list_data_item import ShiftCoverageRequestListDataItem + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = ShiftCoverageRequestListDataItem.from_dict(data_item_data) + + data.append(data_item) + + _links = d.pop("links", UNSET) + links: Links | Unset + if isinstance(_links, Unset): + links = UNSET + else: + links = Links.from_dict(_links) + + _meta = d.pop("meta", UNSET) + meta: Meta | Unset + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = Meta.from_dict(_meta) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + shift_coverage_request_list = cls( + data=data, + links=links, + meta=meta, + included=included, + ) + + shift_coverage_request_list.additional_properties = d + return shift_coverage_request_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/shift_coverage_request_list_data_item.py b/rootly_sdk/models/shift_coverage_request_list_data_item.py new file mode 100644 index 00000000..a7c95baa --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_list_data_item.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.shift_coverage_request_list_data_item_type import ( + ShiftCoverageRequestListDataItemType, + check_shift_coverage_request_list_data_item_type, +) + +if TYPE_CHECKING: + from ..models.shift_coverage_request import ShiftCoverageRequest + + +T = TypeVar("T", bound="ShiftCoverageRequestListDataItem") + + +@_attrs_define +class ShiftCoverageRequestListDataItem: + """ + Attributes: + id (str): Unique ID of the coverage request + type_ (ShiftCoverageRequestListDataItemType): + attributes (ShiftCoverageRequest): + """ + + id: str + type_: ShiftCoverageRequestListDataItemType + attributes: ShiftCoverageRequest + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.shift_coverage_request import ShiftCoverageRequest + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_shift_coverage_request_list_data_item_type(d.pop("type")) + + attributes = ShiftCoverageRequest.from_dict(d.pop("attributes")) + + shift_coverage_request_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + shift_coverage_request_list_data_item.additional_properties = d + return shift_coverage_request_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/shift_coverage_request_list_data_item_type.py b/rootly_sdk/models/shift_coverage_request_list_data_item_type.py new file mode 100644 index 00000000..621284cd --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_list_data_item_type.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +ShiftCoverageRequestListDataItemType = Literal["shift_coverage_requests"] + +SHIFT_COVERAGE_REQUEST_LIST_DATA_ITEM_TYPE_VALUES: set[ShiftCoverageRequestListDataItemType] = { + "shift_coverage_requests", +} + + +def check_shift_coverage_request_list_data_item_type(value: str | None) -> ShiftCoverageRequestListDataItemType | None: + if value is None: + return None + if value in SHIFT_COVERAGE_REQUEST_LIST_DATA_ITEM_TYPE_VALUES: + return cast(ShiftCoverageRequestListDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {SHIFT_COVERAGE_REQUEST_LIST_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/shift_coverage_request_response.py b/rootly_sdk/models/shift_coverage_request_response.py new file mode 100644 index 00000000..8157d142 --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_response.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.shift_coverage_request_response_data import ShiftCoverageRequestResponseData + + +T = TypeVar("T", bound="ShiftCoverageRequestResponse") + + +@_attrs_define +class ShiftCoverageRequestResponse: + """ + Attributes: + data (ShiftCoverageRequestResponseData): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: ShiftCoverageRequestResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.shift_coverage_request_response_data import ShiftCoverageRequestResponseData + + d = dict(src_dict) + data = ShiftCoverageRequestResponseData.from_dict(d.pop("data")) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + shift_coverage_request_response = cls( + data=data, + included=included, + ) + + shift_coverage_request_response.additional_properties = d + return shift_coverage_request_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/shift_coverage_request_response_data.py b/rootly_sdk/models/shift_coverage_request_response_data.py new file mode 100644 index 00000000..e81cffef --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_response_data.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.shift_coverage_request_response_data_type import ( + ShiftCoverageRequestResponseDataType, + check_shift_coverage_request_response_data_type, +) + +if TYPE_CHECKING: + from ..models.shift_coverage_request import ShiftCoverageRequest + + +T = TypeVar("T", bound="ShiftCoverageRequestResponseData") + + +@_attrs_define +class ShiftCoverageRequestResponseData: + """ + Attributes: + id (str): Unique ID of the coverage request + type_ (ShiftCoverageRequestResponseDataType): + attributes (ShiftCoverageRequest): + """ + + id: str + type_: ShiftCoverageRequestResponseDataType + attributes: ShiftCoverageRequest + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.shift_coverage_request import ShiftCoverageRequest + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_shift_coverage_request_response_data_type(d.pop("type")) + + attributes = ShiftCoverageRequest.from_dict(d.pop("attributes")) + + shift_coverage_request_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + shift_coverage_request_response_data.additional_properties = d + return shift_coverage_request_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/shift_coverage_request_response_data_type.py b/rootly_sdk/models/shift_coverage_request_response_data_type.py new file mode 100644 index 00000000..d371ff31 --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ShiftCoverageRequestResponseDataType = Literal["shift_coverage_requests"] + +SHIFT_COVERAGE_REQUEST_RESPONSE_DATA_TYPE_VALUES: set[ShiftCoverageRequestResponseDataType] = { + "shift_coverage_requests", +} + + +def check_shift_coverage_request_response_data_type(value: str | None) -> ShiftCoverageRequestResponseDataType | None: + if value is None: + return None + if value in SHIFT_COVERAGE_REQUEST_RESPONSE_DATA_TYPE_VALUES: + return cast(ShiftCoverageRequestResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SHIFT_COVERAGE_REQUEST_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/shift_list.py b/rootly_sdk/models/shift_list.py index 81d9997b..211abcdd 100644 --- a/rootly_sdk/models/shift_list.py +++ b/rootly_sdk/models/shift_list.py @@ -9,6 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.meta import Meta from ..models.shift_list_data_item import ShiftListDataItem @@ -22,13 +23,16 @@ class ShiftList: Attributes: data (list[ShiftListDataItem]): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ShiftListDataItem] meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -38,6 +42,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -47,11 +58,14 @@ def to_dict(self) -> dict[str, Any]: ) if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.meta import Meta from ..models.shift_list_data_item import ShiftListDataItem @@ -70,9 +84,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + shift_list = cls( data=data, meta=meta, + included=included, ) shift_list.additional_properties = d diff --git a/rootly_sdk/models/shift_list_data_item.py b/rootly_sdk/models/shift_list_data_item.py index 12519c88..fb83466c 100644 --- a/rootly_sdk/models/shift_list_data_item.py +++ b/rootly_sdk/models/shift_list_data_item.py @@ -34,6 +34,7 @@ class ShiftListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/shift_override_response.py b/rootly_sdk/models/shift_override_response.py index 63b4796b..ee694604 100644 --- a/rootly_sdk/models/shift_override_response.py +++ b/rootly_sdk/models/shift_override_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.shift_override_response_data import ShiftOverrideResponseData @@ -18,14 +21,24 @@ class ShiftOverrideResponse: """ Attributes: data (ShiftOverrideResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ShiftOverrideResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.shift_override_response_data import ShiftOverrideResponseData d = dict(src_dict) data = ShiftOverrideResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + shift_override_response = cls( data=data, + included=included, ) shift_override_response.additional_properties = d diff --git a/rootly_sdk/models/shift_override_response_data.py b/rootly_sdk/models/shift_override_response_data.py index c290bb53..c49176ef 100644 --- a/rootly_sdk/models/shift_override_response_data.py +++ b/rootly_sdk/models/shift_override_response_data.py @@ -33,6 +33,7 @@ class ShiftOverrideResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/shift_relationships.py b/rootly_sdk/models/shift_relationships.py index f258b100..bd1f2776 100644 --- a/rootly_sdk/models/shift_relationships.py +++ b/rootly_sdk/models/shift_relationships.py @@ -32,6 +32,7 @@ class ShiftRelationships: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + shift_override: dict[str, Any] | Unset = UNSET if not isinstance(self.shift_override, Unset): shift_override = self.shift_override.to_dict() diff --git a/rootly_sdk/models/sla.py b/rootly_sdk/models/sla.py index c153570e..cd69fc88 100644 --- a/rootly_sdk/models/sla.py +++ b/rootly_sdk/models/sla.py @@ -73,6 +73,7 @@ class Sla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name condition_match_type: str = self.condition_match_type diff --git a/rootly_sdk/models/sla_list.py b/rootly_sdk/models/sla_list.py index e0f39cea..50204fc5 100644 --- a/rootly_sdk/models/sla_list.py +++ b/rootly_sdk/models/sla_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.sla_list_data_item import SlaListDataItem @@ -22,14 +25,17 @@ class SlaList: data (list[SlaListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[SlaListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.sla_list_data_item import SlaListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + sla_list = cls( data=data, links=links, meta=meta, + included=included, ) sla_list.additional_properties = d diff --git a/rootly_sdk/models/sla_list_data_item.py b/rootly_sdk/models/sla_list_data_item.py index 5b7c4779..9810e984 100644 --- a/rootly_sdk/models/sla_list_data_item.py +++ b/rootly_sdk/models/sla_list_data_item.py @@ -30,6 +30,7 @@ class SlaListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/sla_response.py b/rootly_sdk/models/sla_response.py index 967627f5..8876ead5 100644 --- a/rootly_sdk/models/sla_response.py +++ b/rootly_sdk/models/sla_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sla_response_data import SlaResponseData @@ -18,14 +21,24 @@ class SlaResponse: """ Attributes: data (SlaResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: SlaResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sla_response_data import SlaResponseData d = dict(src_dict) data = SlaResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + sla_response = cls( data=data, + included=included, ) sla_response.additional_properties = d diff --git a/rootly_sdk/models/sla_response_data.py b/rootly_sdk/models/sla_response_data.py index b1b876c7..df5ff9fc 100644 --- a/rootly_sdk/models/sla_response_data.py +++ b/rootly_sdk/models/sla_response_data.py @@ -30,6 +30,7 @@ class SlaResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/slack_channel.py b/rootly_sdk/models/slack_channel.py new file mode 100644 index 00000000..845201cd --- /dev/null +++ b/rootly_sdk/models/slack_channel.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SlackChannel") + + +@_attrs_define +class SlackChannel: + """ + Attributes: + id (str): + slack_channel_name (str): + slack_channel_id (str): + slack_team_id (str): + created_at (str): + updated_at (str): + """ + + id: str + slack_channel_name: str + slack_channel_id: str + slack_team_id: str + created_at: str + updated_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + slack_channel_name = self.slack_channel_name + + slack_channel_id = self.slack_channel_id + + slack_team_id = self.slack_team_id + + created_at = self.created_at + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "slack_channel_name": slack_channel_name, + "slack_channel_id": slack_channel_id, + "slack_team_id": slack_team_id, + "created_at": created_at, + "updated_at": updated_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + slack_channel_name = d.pop("slack_channel_name") + + slack_channel_id = d.pop("slack_channel_id") + + slack_team_id = d.pop("slack_team_id") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + slack_channel = cls( + id=id, + slack_channel_name=slack_channel_name, + slack_channel_id=slack_channel_id, + slack_team_id=slack_team_id, + created_at=created_at, + updated_at=updated_at, + ) + + slack_channel.additional_properties = d + return slack_channel + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/snapshot_datadog_graph_task_params.py b/rootly_sdk/models/snapshot_datadog_graph_task_params.py index a527230a..2781d577 100644 --- a/rootly_sdk/models/snapshot_datadog_graph_task_params.py +++ b/rootly_sdk/models/snapshot_datadog_graph_task_params.py @@ -43,6 +43,7 @@ class SnapshotDatadogGraphTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + past_duration = self.past_duration task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py b/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py index dfda8c8d..48b44fbd 100644 --- a/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py +++ b/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py @@ -41,6 +41,7 @@ class SnapshotGrafanaDashboardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + dashboards = [] for dashboards_item_data in self.dashboards: dashboards_item = dashboards_item_data.to_dict() diff --git a/rootly_sdk/models/snapshot_looker_look_task_params.py b/rootly_sdk/models/snapshot_looker_look_task_params.py index f30ca13f..967ee38b 100644 --- a/rootly_sdk/models/snapshot_looker_look_task_params.py +++ b/rootly_sdk/models/snapshot_looker_look_task_params.py @@ -39,6 +39,7 @@ class SnapshotLookerLookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + dashboards = [] for dashboards_item_data in self.dashboards: dashboards_item = dashboards_item_data.to_dict() diff --git a/rootly_sdk/models/snapshot_new_relic_graph_task_params.py b/rootly_sdk/models/snapshot_new_relic_graph_task_params.py index 364069f3..be80e08d 100644 --- a/rootly_sdk/models/snapshot_new_relic_graph_task_params.py +++ b/rootly_sdk/models/snapshot_new_relic_graph_task_params.py @@ -44,6 +44,7 @@ class SnapshotNewRelicGraphTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + metric_query = self.metric_query metric_type: str = self.metric_type diff --git a/rootly_sdk/models/snooze_alert.py b/rootly_sdk/models/snooze_alert.py new file mode 100644 index 00000000..d4b37fda --- /dev/null +++ b/rootly_sdk/models/snooze_alert.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.snooze_alert_data import SnoozeAlertData + + +T = TypeVar("T", bound="SnoozeAlert") + + +@_attrs_define +class SnoozeAlert: + """ + Attributes: + data (SnoozeAlertData): + """ + + data: SnoozeAlertData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.snooze_alert_data import SnoozeAlertData + + d = dict(src_dict) + data = SnoozeAlertData.from_dict(d.pop("data")) + + snooze_alert = cls( + data=data, + ) + + snooze_alert.additional_properties = d + return snooze_alert + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/snooze_alert_data.py b/rootly_sdk/models/snooze_alert_data.py new file mode 100644 index 00000000..32aaae38 --- /dev/null +++ b/rootly_sdk/models/snooze_alert_data.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.snooze_alert_data_type import SnoozeAlertDataType, check_snooze_alert_data_type + +if TYPE_CHECKING: + from ..models.snooze_alert_data_attributes import SnoozeAlertDataAttributes + + +T = TypeVar("T", bound="SnoozeAlertData") + + +@_attrs_define +class SnoozeAlertData: + """ + Attributes: + type_ (SnoozeAlertDataType): + attributes (SnoozeAlertDataAttributes): + """ + + type_: SnoozeAlertDataType + attributes: SnoozeAlertDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.snooze_alert_data_attributes import SnoozeAlertDataAttributes + + d = dict(src_dict) + type_ = check_snooze_alert_data_type(d.pop("type")) + + attributes = SnoozeAlertDataAttributes.from_dict(d.pop("attributes")) + + snooze_alert_data = cls( + type_=type_, + attributes=attributes, + ) + + snooze_alert_data.additional_properties = d + return snooze_alert_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/snooze_alert_data_attributes.py b/rootly_sdk/models/snooze_alert_data_attributes.py new file mode 100644 index 00000000..812d1f44 --- /dev/null +++ b/rootly_sdk/models/snooze_alert_data_attributes.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="SnoozeAlertDataAttributes") + + +@_attrs_define +class SnoozeAlertDataAttributes: + """ + Attributes: + delay_minutes (int): Number of minutes to snooze the alert for + """ + + delay_minutes: int + + def to_dict(self) -> dict[str, Any]: + delay_minutes = self.delay_minutes + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "delay_minutes": delay_minutes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + delay_minutes = d.pop("delay_minutes") + + snooze_alert_data_attributes = cls( + delay_minutes=delay_minutes, + ) + + return snooze_alert_data_attributes diff --git a/rootly_sdk/models/snooze_alert_data_type.py b/rootly_sdk/models/snooze_alert_data_type.py new file mode 100644 index 00000000..c7260a30 --- /dev/null +++ b/rootly_sdk/models/snooze_alert_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +SnoozeAlertDataType = Literal["alerts"] + +SNOOZE_ALERT_DATA_TYPE_VALUES: set[SnoozeAlertDataType] = { + "alerts", +} + + +def check_snooze_alert_data_type(value: str | None) -> SnoozeAlertDataType | None: + if value is None: + return None + if value in SNOOZE_ALERT_DATA_TYPE_VALUES: + return cast(SnoozeAlertDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SNOOZE_ALERT_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/start_session_request.py b/rootly_sdk/models/start_session_request.py new file mode 100644 index 00000000..bc7434a4 --- /dev/null +++ b/rootly_sdk/models/start_session_request.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.start_session_request_platform import StartSessionRequestPlatform, check_start_session_request_platform +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StartSessionRequest") + + +@_attrs_define +class StartSessionRequest: + """ + Attributes: + platform (StartSessionRequestPlatform | Unset): Meeting platform + title (None | str | Unset): Human-readable label for the recording session + """ + + platform: StartSessionRequestPlatform | Unset = UNSET + title: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + platform: str | Unset = UNSET + if not isinstance(self.platform, Unset): + platform = self.platform + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if platform is not UNSET: + field_dict["platform"] = platform + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _platform = d.pop("platform", UNSET) + platform: StartSessionRequestPlatform | Unset + if isinstance(_platform, Unset): + platform = UNSET + else: + platform = check_start_session_request_platform(_platform) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + start_session_request = cls( + platform=platform, + title=title, + ) + + start_session_request.additional_properties = d + return start_session_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/start_session_request_platform.py b/rootly_sdk/models/start_session_request_platform.py new file mode 100644 index 00000000..4fc63e8c --- /dev/null +++ b/rootly_sdk/models/start_session_request_platform.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +StartSessionRequestPlatform = Literal["google_meet", "microsoft_teams", "webex", "zoom"] + +START_SESSION_REQUEST_PLATFORM_VALUES: set[StartSessionRequestPlatform] = { + "google_meet", + "microsoft_teams", + "webex", + "zoom", +} + + +def check_start_session_request_platform(value: str | None) -> StartSessionRequestPlatform | None: + if value is None: + return None + if value in START_SESSION_REQUEST_PLATFORM_VALUES: + return cast(StartSessionRequestPlatform, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {START_SESSION_REQUEST_PLATFORM_VALUES!r}") diff --git a/rootly_sdk/models/start_session_response.py b/rootly_sdk/models/start_session_response.py new file mode 100644 index 00000000..330d0ce5 --- /dev/null +++ b/rootly_sdk/models/start_session_response.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.start_session_response_data import StartSessionResponseData + + +T = TypeVar("T", bound="StartSessionResponse") + + +@_attrs_define +class StartSessionResponse: + """ + Attributes: + data (StartSessionResponseData | Unset): + """ + + data: StartSessionResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.start_session_response_data import StartSessionResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: StartSessionResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = StartSessionResponseData.from_dict(_data) + + start_session_response = cls( + data=data, + ) + + start_session_response.additional_properties = d + return start_session_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/start_session_response_data.py b/rootly_sdk/models/start_session_response_data.py new file mode 100644 index 00000000..50fc32db --- /dev/null +++ b/rootly_sdk/models/start_session_response_data.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StartSessionResponseData") + + +@_attrs_define +class StartSessionResponseData: + """ + Attributes: + session_id (UUID): Meeting recording UUID + stream_token (str): Token for the desktop client to stream audio + meeting_recording_id (UUID): Meeting recording UUID + """ + + session_id: UUID + stream_token: str + meeting_recording_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + session_id = str(self.session_id) + + stream_token = self.stream_token + + meeting_recording_id = str(self.meeting_recording_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "session_id": session_id, + "stream_token": stream_token, + "meeting_recording_id": meeting_recording_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_id = UUID(d.pop("session_id")) + + stream_token = d.pop("stream_token") + + meeting_recording_id = UUID(d.pop("meeting_recording_id")) + + start_session_response_data = cls( + session_id=session_id, + stream_token=stream_token, + meeting_recording_id=meeting_recording_id, + ) + + start_session_response_data.additional_properties = d + return start_session_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/status_list.py b/rootly_sdk/models/status_list.py index 56778c66..5f0e0083 100644 --- a/rootly_sdk/models/status_list.py +++ b/rootly_sdk/models/status_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_list_data_item import StatusListDataItem @@ -22,14 +25,17 @@ class StatusList: data (list[StatusListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[StatusListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_list_data_item import StatusListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_list = cls( data=data, links=links, meta=meta, + included=included, ) status_list.additional_properties = d diff --git a/rootly_sdk/models/status_list_data_item.py b/rootly_sdk/models/status_list_data_item.py index 14605fe4..95d811a0 100644 --- a/rootly_sdk/models/status_list_data_item.py +++ b/rootly_sdk/models/status_list_data_item.py @@ -30,6 +30,7 @@ class StatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_page_list.py b/rootly_sdk/models/status_page_list.py index 7522d23a..216a7858 100644 --- a/rootly_sdk/models/status_page_list.py +++ b/rootly_sdk/models/status_page_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_page_list_data_item import StatusPageListDataItem @@ -22,14 +25,17 @@ class StatusPageList: data (list[StatusPageListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[StatusPageListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_page_list_data_item import StatusPageListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_page_list = cls( data=data, links=links, meta=meta, + included=included, ) status_page_list.additional_properties = d diff --git a/rootly_sdk/models/status_page_list_data_item.py b/rootly_sdk/models/status_page_list_data_item.py index 997d37f3..8269723b 100644 --- a/rootly_sdk/models/status_page_list_data_item.py +++ b/rootly_sdk/models/status_page_list_data_item.py @@ -30,6 +30,7 @@ class StatusPageListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_page_response.py b/rootly_sdk/models/status_page_response.py index 6e42cf5d..68387501 100644 --- a/rootly_sdk/models/status_page_response.py +++ b/rootly_sdk/models/status_page_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_response_data import StatusPageResponseData @@ -18,14 +21,24 @@ class StatusPageResponse: """ Attributes: data (StatusPageResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: StatusPageResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_response_data import StatusPageResponseData d = dict(src_dict) data = StatusPageResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_page_response = cls( data=data, + included=included, ) status_page_response.additional_properties = d diff --git a/rootly_sdk/models/status_page_response_data.py b/rootly_sdk/models/status_page_response_data.py index 6c86f9e6..0b9f0474 100644 --- a/rootly_sdk/models/status_page_response_data.py +++ b/rootly_sdk/models/status_page_response_data.py @@ -30,6 +30,7 @@ class StatusPageResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_page_template_list.py b/rootly_sdk/models/status_page_template_list.py index 798c5c46..8eec7a41 100644 --- a/rootly_sdk/models/status_page_template_list.py +++ b/rootly_sdk/models/status_page_template_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_page_template_list_data_item import StatusPageTemplateListDataItem @@ -22,14 +25,17 @@ class StatusPageTemplateList: data (list[StatusPageTemplateListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[StatusPageTemplateListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_page_template_list_data_item import StatusPageTemplateListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_page_template_list = cls( data=data, links=links, meta=meta, + included=included, ) status_page_template_list.additional_properties = d diff --git a/rootly_sdk/models/status_page_template_list_data_item.py b/rootly_sdk/models/status_page_template_list_data_item.py index ae1a0142..4073c903 100644 --- a/rootly_sdk/models/status_page_template_list_data_item.py +++ b/rootly_sdk/models/status_page_template_list_data_item.py @@ -33,6 +33,7 @@ class StatusPageTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_page_template_response.py b/rootly_sdk/models/status_page_template_response.py index 0152dc65..4c1b4eda 100644 --- a/rootly_sdk/models/status_page_template_response.py +++ b/rootly_sdk/models/status_page_template_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_template_response_data import StatusPageTemplateResponseData @@ -18,14 +21,24 @@ class StatusPageTemplateResponse: """ Attributes: data (StatusPageTemplateResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: StatusPageTemplateResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_template_response_data import StatusPageTemplateResponseData d = dict(src_dict) data = StatusPageTemplateResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_page_template_response = cls( data=data, + included=included, ) status_page_template_response.additional_properties = d diff --git a/rootly_sdk/models/status_page_template_response_data.py b/rootly_sdk/models/status_page_template_response_data.py index aa4d8b7a..5134cc54 100644 --- a/rootly_sdk/models/status_page_template_response_data.py +++ b/rootly_sdk/models/status_page_template_response_data.py @@ -33,6 +33,7 @@ class StatusPageTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_response.py b/rootly_sdk/models/status_response.py index e7d2809e..3dc0cb9c 100644 --- a/rootly_sdk/models/status_response.py +++ b/rootly_sdk/models/status_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_response_data import StatusResponseData @@ -18,14 +21,24 @@ class StatusResponse: """ Attributes: data (StatusResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: StatusResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_response_data import StatusResponseData d = dict(src_dict) data = StatusResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_response = cls( data=data, + included=included, ) status_response.additional_properties = d diff --git a/rootly_sdk/models/status_response_data.py b/rootly_sdk/models/status_response_data.py index d5ff8e77..e99a2a6d 100644 --- a/rootly_sdk/models/status_response_data.py +++ b/rootly_sdk/models/status_response_data.py @@ -30,6 +30,7 @@ class StatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/sub_status_list.py b/rootly_sdk/models/sub_status_list.py index 850597d9..4ee3da17 100644 --- a/rootly_sdk/models/sub_status_list.py +++ b/rootly_sdk/models/sub_status_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.sub_status_list_data_item import SubStatusListDataItem @@ -22,14 +25,17 @@ class SubStatusList: data (list[SubStatusListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[SubStatusListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.sub_status_list_data_item import SubStatusListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + sub_status_list = cls( data=data, links=links, meta=meta, + included=included, ) sub_status_list.additional_properties = d diff --git a/rootly_sdk/models/sub_status_list_data_item.py b/rootly_sdk/models/sub_status_list_data_item.py index 2fa6ad7e..0c2ad36a 100644 --- a/rootly_sdk/models/sub_status_list_data_item.py +++ b/rootly_sdk/models/sub_status_list_data_item.py @@ -30,6 +30,7 @@ class SubStatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/sub_status_response.py b/rootly_sdk/models/sub_status_response.py index d990432b..b6929ea4 100644 --- a/rootly_sdk/models/sub_status_response.py +++ b/rootly_sdk/models/sub_status_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sub_status_response_data import SubStatusResponseData @@ -18,14 +21,24 @@ class SubStatusResponse: """ Attributes: data (SubStatusResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: SubStatusResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sub_status_response_data import SubStatusResponseData d = dict(src_dict) data = SubStatusResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + sub_status_response = cls( data=data, + included=included, ) sub_status_response.additional_properties = d diff --git a/rootly_sdk/models/sub_status_response_data.py b/rootly_sdk/models/sub_status_response_data.py index 065a8226..fabf203f 100644 --- a/rootly_sdk/models/sub_status_response_data.py +++ b/rootly_sdk/models/sub_status_response_data.py @@ -30,6 +30,7 @@ class SubStatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/team.py b/rootly_sdk/models/team.py index a8c10f4f..e8403ea1 100644 --- a/rootly_sdk/models/team.py +++ b/rootly_sdk/models/team.py @@ -6,6 +6,8 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.team_auto_add_members_scope import TeamAutoAddMembersScope, check_team_auto_add_members_scope +from ..models.team_managed_by import TeamManagedBy, check_team_managed_by from ..types import UNSET, Unset if TYPE_CHECKING: @@ -27,6 +29,7 @@ class Team: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): + managed_by (TeamManagedBy | Unset): How this team is managed (provenance): web, api, terraform, etc. Read-only. description (None | str | Unset): The description of the team notify_emails (list[str] | None | Unset): Emails to attach to the team color (None | str | Unset): The hex color of the team @@ -55,6 +58,9 @@ class Team: incident_broadcast_channel (None | TeamIncidentBroadcastChannelType0 | Unset): Slack channel to broadcast incidents to auto_add_members_when_attached (bool | None | Unset): Auto add members to incident channel when team is attached + auto_add_members_scope (TeamAutoAddMembersScope | Unset): Visibility-scoped auto-add behavior. Only present when + the `enable_scoped_incident_channel_auto_add` feature flag is on for the organization. When set, it overrides + `auto_add_members_when_attached`. properties (list[TeamPropertiesType0Item] | None | Unset): Array of property values for this team. """ @@ -62,6 +68,7 @@ class Team: created_at: str updated_at: str slug: str | Unset = UNSET + managed_by: TeamManagedBy | Unset = UNSET description: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET color: None | str | Unset = UNSET @@ -87,6 +94,7 @@ class Team: incident_broadcast_enabled: bool | None | Unset = UNSET incident_broadcast_channel: None | TeamIncidentBroadcastChannelType0 | Unset = UNSET auto_add_members_when_attached: bool | None | Unset = UNSET + auto_add_members_scope: TeamAutoAddMembersScope | Unset = UNSET properties: list[TeamPropertiesType0Item] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -102,6 +110,10 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET @@ -277,6 +289,10 @@ def to_dict(self) -> dict[str, Any]: else: auto_add_members_when_attached = self.auto_add_members_when_attached + auto_add_members_scope: str | Unset = UNSET + if not isinstance(self.auto_add_members_scope, Unset): + auto_add_members_scope = self.auto_add_members_scope + properties: list[dict[str, Any]] | None | Unset if isinstance(self.properties, Unset): properties = UNSET @@ -300,6 +316,8 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by if description is not UNSET: field_dict["description"] = description if notify_emails is not UNSET: @@ -350,6 +368,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_channel"] = incident_broadcast_channel if auto_add_members_when_attached is not UNSET: field_dict["auto_add_members_when_attached"] = auto_add_members_when_attached + if auto_add_members_scope is not UNSET: + field_dict["auto_add_members_scope"] = auto_add_members_scope if properties is not UNSET: field_dict["properties"] = properties @@ -372,6 +392,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _managed_by = d.pop("managed_by", UNSET) + managed_by: TeamManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_team_managed_by(_managed_by) + def _parse_description(data: object) -> None | str | Unset: if data is None: return data @@ -665,6 +692,13 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: d.pop("auto_add_members_when_attached", UNSET) ) + _auto_add_members_scope = d.pop("auto_add_members_scope", UNSET) + auto_add_members_scope: TeamAutoAddMembersScope | Unset + if isinstance(_auto_add_members_scope, Unset): + auto_add_members_scope = UNSET + else: + auto_add_members_scope = check_team_auto_add_members_scope(_auto_add_members_scope) + def _parse_properties(data: object) -> list[TeamPropertiesType0Item] | None | Unset: if data is None: return data @@ -692,6 +726,7 @@ def _parse_properties(data: object) -> list[TeamPropertiesType0Item] | None | Un created_at=created_at, updated_at=updated_at, slug=slug, + managed_by=managed_by, description=description, notify_emails=notify_emails, color=color, @@ -717,6 +752,7 @@ def _parse_properties(data: object) -> list[TeamPropertiesType0Item] | None | Un incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, + auto_add_members_scope=auto_add_members_scope, properties=properties, ) diff --git a/rootly_sdk/models/team_auto_add_members_scope.py b/rootly_sdk/models/team_auto_add_members_scope.py new file mode 100644 index 00000000..d81dad07 --- /dev/null +++ b/rootly_sdk/models/team_auto_add_members_scope.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +TeamAutoAddMembersScope = Literal["all", "off", "public_and_test", "public_only"] + +TEAM_AUTO_ADD_MEMBERS_SCOPE_VALUES: set[TeamAutoAddMembersScope] = { + "all", + "off", + "public_and_test", + "public_only", +} + + +def check_team_auto_add_members_scope(value: str | None) -> TeamAutoAddMembersScope | None: + if value is None: + return None + if value in TEAM_AUTO_ADD_MEMBERS_SCOPE_VALUES: + return cast(TeamAutoAddMembersScope, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {TEAM_AUTO_ADD_MEMBERS_SCOPE_VALUES!r}") diff --git a/rootly_sdk/models/team_list.py b/rootly_sdk/models/team_list.py index 88a51540..7980ecc0 100644 --- a/rootly_sdk/models/team_list.py +++ b/rootly_sdk/models/team_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.team_list_data_item import TeamListDataItem @@ -22,14 +25,17 @@ class TeamList: data (list[TeamListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[TeamListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.team_list_data_item import TeamListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + team_list = cls( data=data, links=links, meta=meta, + included=included, ) team_list.additional_properties = d diff --git a/rootly_sdk/models/team_list_data_item.py b/rootly_sdk/models/team_list_data_item.py index f1419dae..b96b9d0e 100644 --- a/rootly_sdk/models/team_list_data_item.py +++ b/rootly_sdk/models/team_list_data_item.py @@ -30,6 +30,7 @@ class TeamListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/team_managed_by.py b/rootly_sdk/models/team_managed_by.py new file mode 100644 index 00000000..40cf2930 --- /dev/null +++ b/rootly_sdk/models/team_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +TeamManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +TEAM_MANAGED_BY_VALUES: set[TeamManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_team_managed_by(value: str | None) -> TeamManagedBy | None: + if value is None: + return None + if value in TEAM_MANAGED_BY_VALUES: + return cast(TeamManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {TEAM_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/team_response.py b/rootly_sdk/models/team_response.py index 8a02c104..4055376a 100644 --- a/rootly_sdk/models/team_response.py +++ b/rootly_sdk/models/team_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.team_response_data import TeamResponseData @@ -18,14 +21,24 @@ class TeamResponse: """ Attributes: data (TeamResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: TeamResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.team_response_data import TeamResponseData d = dict(src_dict) data = TeamResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + team_response = cls( data=data, + included=included, ) team_response.additional_properties = d diff --git a/rootly_sdk/models/team_response_data.py b/rootly_sdk/models/team_response_data.py index a9adb9e2..16ecf771 100644 --- a/rootly_sdk/models/team_response_data.py +++ b/rootly_sdk/models/team_response_data.py @@ -30,6 +30,7 @@ class TeamResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/tiptap_block_schema.py b/rootly_sdk/models/tiptap_block_schema.py index dc2ea2cc..4b4f48e3 100644 --- a/rootly_sdk/models/tiptap_block_schema.py +++ b/rootly_sdk/models/tiptap_block_schema.py @@ -30,6 +30,7 @@ class TiptapBlockSchema: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + followup_component: dict[str, Any] | Unset = UNSET if not isinstance(self.followup_component, Unset): followup_component = self.followup_component.to_dict() diff --git a/rootly_sdk/models/trigger_workflow_task_params.py b/rootly_sdk/models/trigger_workflow_task_params.py index efd310af..e80d9bed 100644 --- a/rootly_sdk/models/trigger_workflow_task_params.py +++ b/rootly_sdk/models/trigger_workflow_task_params.py @@ -57,6 +57,7 @@ class TriggerWorkflowTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + kind: str = self.kind attribute_to_query_by: str = self.attribute_to_query_by diff --git a/rootly_sdk/models/unassign_role_from_user.py b/rootly_sdk/models/unassign_role_from_user.py index 3a117134..a24c2f9a 100644 --- a/rootly_sdk/models/unassign_role_from_user.py +++ b/rootly_sdk/models/unassign_role_from_user.py @@ -24,6 +24,7 @@ class UnassignRoleFromUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/unassign_role_from_user_data.py b/rootly_sdk/models/unassign_role_from_user_data.py index ea929298..5b70d1d0 100644 --- a/rootly_sdk/models/unassign_role_from_user_data.py +++ b/rootly_sdk/models/unassign_role_from_user_data.py @@ -31,6 +31,7 @@ class UnassignRoleFromUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_action_item_task_params.py b/rootly_sdk/models/update_action_item_task_params.py index fa6a1f0b..11036577 100644 --- a/rootly_sdk/models/update_action_item_task_params.py +++ b/rootly_sdk/models/update_action_item_task_params.py @@ -67,6 +67,7 @@ class UpdateActionItemTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + query_value = self.query_value attribute_to_query_by: str = self.attribute_to_query_by diff --git a/rootly_sdk/models/update_alert.py b/rootly_sdk/models/update_alert.py index e7b43c0e..323f3c5c 100644 --- a/rootly_sdk/models/update_alert.py +++ b/rootly_sdk/models/update_alert.py @@ -24,6 +24,7 @@ class UpdateAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_data.py b/rootly_sdk/models/update_alert_data.py index ab38085f..730a1655 100644 --- a/rootly_sdk/models/update_alert_data.py +++ b/rootly_sdk/models/update_alert_data.py @@ -7,7 +7,6 @@ from attrs import field as _attrs_field from ..models.update_alert_data_type import UpdateAlertDataType, check_update_alert_data_type -from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.update_alert_data_attributes import UpdateAlertDataAttributes @@ -20,30 +19,28 @@ class UpdateAlertData: """ Attributes: + type_ (UpdateAlertDataType): attributes (UpdateAlertDataAttributes): - type_ (UpdateAlertDataType | Unset): """ + type_: UpdateAlertDataType attributes: UpdateAlertDataAttributes - type_: UpdateAlertDataType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - attributes = self.attributes.to_dict() - type_: str | Unset = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_ + type_: str = self.type_ + + attributes = self.attributes.to_dict() field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { + "type": type_, "attributes": attributes, } ) - if type_ is not UNSET: - field_dict["type"] = type_ return field_dict @@ -52,18 +49,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_alert_data_attributes import UpdateAlertDataAttributes d = dict(src_dict) - attributes = UpdateAlertDataAttributes.from_dict(d.pop("attributes")) + type_ = check_update_alert_data_type(d.pop("type")) - _type_ = d.pop("type", UNSET) - type_: UpdateAlertDataType | Unset - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = check_update_alert_data_type(_type_) + attributes = UpdateAlertDataAttributes.from_dict(d.pop("attributes")) update_alert_data = cls( - attributes=attributes, type_=type_, + attributes=attributes, ) update_alert_data.additional_properties = d diff --git a/rootly_sdk/models/update_alert_data_attributes.py b/rootly_sdk/models/update_alert_data_attributes.py index 08578eac..0822a489 100644 --- a/rootly_sdk/models/update_alert_data_attributes.py +++ b/rootly_sdk/models/update_alert_data_attributes.py @@ -11,10 +11,6 @@ UpdateAlertDataAttributesNoise, check_update_alert_data_attributes_noise, ) -from ..models.update_alert_data_attributes_source import ( - UpdateAlertDataAttributesSource, - check_update_alert_data_attributes_source, -) from ..types import UNSET, Unset if TYPE_CHECKING: @@ -33,11 +29,13 @@ class UpdateAlertDataAttributes: """ Attributes: noise (UpdateAlertDataAttributesNoise | Unset): Whether the alert is marked as noise - source (UpdateAlertDataAttributesSource | Unset): The source of the alert + source (str | Unset): Deprecated. Accepted for backwards compatibility; new clients should omit. Defaults to + `api`. summary (str | Unset): The summary of the alert description (None | str | Unset): The description of the alert service_ids (list[str] | None | Unset): The Service IDs to attach to the alert group_ids (list[str] | None | Unset): The Group IDs to attach to the alert + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the alert environment_ids (list[str] | None | Unset): The Environment IDs to attach to the alert started_at (datetime.datetime | None | Unset): Alert start datetime ended_at (datetime.datetime | None | Unset): Alert end datetime @@ -52,11 +50,12 @@ class UpdateAlertDataAttributes: """ noise: UpdateAlertDataAttributesNoise | Unset = UNSET - source: UpdateAlertDataAttributesSource | Unset = UNSET + source: str | Unset = UNSET summary: str | Unset = UNSET description: None | str | Unset = UNSET service_ids: list[str] | None | Unset = UNSET group_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET environment_ids: list[str] | None | Unset = UNSET started_at: datetime.datetime | None | Unset = UNSET ended_at: datetime.datetime | None | Unset = UNSET @@ -81,9 +80,7 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.noise, Unset): noise = self.noise - source: str | Unset = UNSET - if not isinstance(self.source, Unset): - source = self.source + source = self.source summary = self.summary @@ -111,6 +108,15 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids + functionality_ids: list[str] | None | Unset + if isinstance(self.functionality_ids, Unset): + functionality_ids = UNSET + elif isinstance(self.functionality_ids, list): + functionality_ids = self.functionality_ids + + else: + functionality_ids = self.functionality_ids + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET @@ -208,6 +214,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["service_ids"] = service_ids if group_ids is not UNSET: field_dict["group_ids"] = group_ids + if functionality_ids is not UNSET: + field_dict["functionality_ids"] = functionality_ids if environment_ids is not UNSET: field_dict["environment_ids"] = environment_ids if started_at is not UNSET: @@ -247,12 +255,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: noise = check_update_alert_data_attributes_noise(_noise) - _source = d.pop("source", UNSET) - source: UpdateAlertDataAttributesSource | Unset - if isinstance(_source, Unset): - source = UNSET - else: - source = check_update_alert_data_attributes_source(_source) + source = d.pop("source", UNSET) summary = d.pop("summary", UNSET) @@ -299,6 +302,23 @@ def _parse_group_ids(data: object) -> list[str] | None | Unset: group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + functionality_ids_type_0 = cast(list[str], data) + + return functionality_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data @@ -464,6 +484,7 @@ def _parse_alert_field_values_attributes_item( description=description, service_ids=service_ids, group_ids=group_ids, + functionality_ids=functionality_ids, environment_ids=environment_ids, started_at=started_at, ended_at=ended_at, diff --git a/rootly_sdk/models/update_alert_data_attributes_source.py b/rootly_sdk/models/update_alert_data_attributes_source.py deleted file mode 100644 index 15477ee7..00000000 --- a/rootly_sdk/models/update_alert_data_attributes_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -UpdateAlertDataAttributesSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -UPDATE_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES: set[UpdateAlertDataAttributesSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_update_alert_data_attributes_source(value: str | None) -> UpdateAlertDataAttributesSource | None: - if value is None: - return None - if value in UPDATE_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES: - return cast(UpdateAlertDataAttributesSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {UPDATE_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/update_alert_event.py b/rootly_sdk/models/update_alert_event.py index be423dc3..6e00bcc1 100644 --- a/rootly_sdk/models/update_alert_event.py +++ b/rootly_sdk/models/update_alert_event.py @@ -25,6 +25,7 @@ class UpdateAlertEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_event_data.py b/rootly_sdk/models/update_alert_event_data.py index 24317292..dde651dc 100644 --- a/rootly_sdk/models/update_alert_event_data.py +++ b/rootly_sdk/models/update_alert_event_data.py @@ -28,6 +28,7 @@ class UpdateAlertEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_field.py b/rootly_sdk/models/update_alert_field.py index 6639f945..06649e62 100644 --- a/rootly_sdk/models/update_alert_field.py +++ b/rootly_sdk/models/update_alert_field.py @@ -24,6 +24,7 @@ class UpdateAlertField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_field_data.py b/rootly_sdk/models/update_alert_field_data.py index 49eb5c01..e2ed53d9 100644 --- a/rootly_sdk/models/update_alert_field_data.py +++ b/rootly_sdk/models/update_alert_field_data.py @@ -28,6 +28,7 @@ class UpdateAlertFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_group.py b/rootly_sdk/models/update_alert_group.py index 19968c62..d37bfcee 100644 --- a/rootly_sdk/models/update_alert_group.py +++ b/rootly_sdk/models/update_alert_group.py @@ -24,6 +24,7 @@ class UpdateAlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_group_data.py b/rootly_sdk/models/update_alert_group_data.py index 22fb4f53..3e166626 100644 --- a/rootly_sdk/models/update_alert_group_data.py +++ b/rootly_sdk/models/update_alert_group_data.py @@ -28,6 +28,7 @@ class UpdateAlertGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_group_data_attributes.py b/rootly_sdk/models/update_alert_group_data_attributes.py index 6e777d38..65cd73df 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes.py +++ b/rootly_sdk/models/update_alert_group_data_attributes.py @@ -60,6 +60,7 @@ class UpdateAlertGroupDataAttributes: conditions: list[UpdateAlertGroupDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_alert_group_data_attributes_targets_item.py b/rootly_sdk/models/update_alert_group_data_attributes_targets_item.py index 5df79c75..19e5bad6 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes_targets_item.py +++ b/rootly_sdk/models/update_alert_group_data_attributes_targets_item.py @@ -19,8 +19,9 @@ class UpdateAlertGroupDataAttributesTargetsItem: """ Attributes: - target_type (UpdateAlertGroupDataAttributesTargetsItemTargetType): The type of the target. - target_id (UUID): id for the Group, Service or EscalationPolicy + target_type (UpdateAlertGroupDataAttributesTargetsItemTargetType): The type of the target. Please contact + support if you encounter issues using `Functionality` as a target type. + target_id (UUID): id for the Group, Service, EscalationPolicy or Functionality """ target_type: UpdateAlertGroupDataAttributesTargetsItemTargetType diff --git a/rootly_sdk/models/update_alert_group_data_attributes_targets_item_target_type.py b/rootly_sdk/models/update_alert_group_data_attributes_targets_item_target_type.py index 20ba9f13..0571f833 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes_targets_item_target_type.py +++ b/rootly_sdk/models/update_alert_group_data_attributes_targets_item_target_type.py @@ -1,11 +1,12 @@ from typing import Literal, cast -UpdateAlertGroupDataAttributesTargetsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +UpdateAlertGroupDataAttributesTargetsItemTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] UPDATE_ALERT_GROUP_DATA_ATTRIBUTES_TARGETS_ITEM_TARGET_TYPE_VALUES: set[ UpdateAlertGroupDataAttributesTargetsItemTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/update_alert_route.py b/rootly_sdk/models/update_alert_route.py index 0065ca5e..61ae04b2 100644 --- a/rootly_sdk/models/update_alert_route.py +++ b/rootly_sdk/models/update_alert_route.py @@ -24,6 +24,7 @@ class UpdateAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_route_data.py b/rootly_sdk/models/update_alert_route_data.py index 977eaa55..562adaa1 100644 --- a/rootly_sdk/models/update_alert_route_data.py +++ b/rootly_sdk/models/update_alert_route_data.py @@ -28,6 +28,7 @@ class UpdateAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_route_data_attributes.py b/rootly_sdk/models/update_alert_route_data_attributes.py index 4a5c76eb..21b85825 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes.py +++ b/rootly_sdk/models/update_alert_route_data_attributes.py @@ -33,6 +33,7 @@ class UpdateAlertRouteDataAttributes: rules: list[UpdateAlertRouteDataAttributesRulesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name enabled = self.enabled diff --git a/rootly_sdk/models/update_alert_route_data_attributes_rules_item.py b/rootly_sdk/models/update_alert_route_data_attributes_rules_item.py index bdfdc8ee..ec7a1935 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes_rules_item.py +++ b/rootly_sdk/models/update_alert_route_data_attributes_rules_item.py @@ -39,6 +39,7 @@ class UpdateAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name destinations = [] diff --git a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item.py b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item.py index 7b75e980..5128c9ce 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item.py +++ b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item.py @@ -30,6 +30,7 @@ class UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + conditions = [] for conditions_item_data in self.conditions: conditions_item = conditions_item_data.to_dict() diff --git a/rootly_sdk/models/update_alert_routing_rule.py b/rootly_sdk/models/update_alert_routing_rule.py index 1756885e..9025c22f 100644 --- a/rootly_sdk/models/update_alert_routing_rule.py +++ b/rootly_sdk/models/update_alert_routing_rule.py @@ -24,6 +24,7 @@ class UpdateAlertRoutingRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_routing_rule_data.py b/rootly_sdk/models/update_alert_routing_rule_data.py index adbe7136..8b939ad3 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data.py +++ b/rootly_sdk/models/update_alert_routing_rule_data.py @@ -31,6 +31,7 @@ class UpdateAlertRoutingRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_routing_rule_data_attributes.py b/rootly_sdk/models/update_alert_routing_rule_data_attributes.py index 21b53c98..f055cba6 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data_attributes.py +++ b/rootly_sdk/models/update_alert_routing_rule_data_attributes.py @@ -49,6 +49,7 @@ class UpdateAlertRoutingRuleDataAttributes: destination: UpdateAlertRoutingRuleDataAttributesDestination | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name enabled = self.enabled diff --git a/rootly_sdk/models/update_alert_urgency.py b/rootly_sdk/models/update_alert_urgency.py index 1f915593..61a7770d 100644 --- a/rootly_sdk/models/update_alert_urgency.py +++ b/rootly_sdk/models/update_alert_urgency.py @@ -24,6 +24,7 @@ class UpdateAlertUrgency: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_urgency_data.py b/rootly_sdk/models/update_alert_urgency_data.py index f1222acf..73a3352e 100644 --- a/rootly_sdk/models/update_alert_urgency_data.py +++ b/rootly_sdk/models/update_alert_urgency_data.py @@ -28,6 +28,7 @@ class UpdateAlertUrgencyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alerts_source.py b/rootly_sdk/models/update_alerts_source.py index 21792cff..92d0852d 100644 --- a/rootly_sdk/models/update_alerts_source.py +++ b/rootly_sdk/models/update_alerts_source.py @@ -24,6 +24,7 @@ class UpdateAlertsSource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alerts_source_data.py b/rootly_sdk/models/update_alerts_source_data.py index 3ae5eb33..cdc6c508 100644 --- a/rootly_sdk/models/update_alerts_source_data.py +++ b/rootly_sdk/models/update_alerts_source_data.py @@ -28,6 +28,7 @@ class UpdateAlertsSourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alerts_source_data_attributes.py b/rootly_sdk/models/update_alerts_source_data_attributes.py index 91a3c487..9d4512ab 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes.py @@ -41,6 +41,8 @@ class UpdateAlertsSourceDataAttributes: """ Attributes: name (str | Unset): The name of the alert source + enabled (bool | Unset): Whether the alert source is enabled. Disabled sources do not create alerts from incoming + events. source_type (UpdateAlertsSourceDataAttributesSourceType | Unset): The alert source type alert_urgency_id (str | Unset): ID for the default alert urgency assigned to this alert source deduplicate_alerts_by_key (bool | Unset): Toggle alert deduplication using deduplication key. If enabled, @@ -65,6 +67,7 @@ class UpdateAlertsSourceDataAttributes: """ name: str | Unset = UNSET + enabled: bool | Unset = UNSET source_type: UpdateAlertsSourceDataAttributesSourceType | Unset = UNSET alert_urgency_id: str | Unset = UNSET deduplicate_alerts_by_key: bool | Unset = UNSET @@ -95,6 +98,8 @@ def to_dict(self) -> dict[str, Any]: name = self.name + enabled = self.enabled + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -166,6 +171,8 @@ def to_dict(self) -> dict[str, Any]: field_dict.update({}) if name is not UNSET: field_dict["name"] = name + if enabled is not UNSET: + field_dict["enabled"] = enabled if source_type is not UNSET: field_dict["source_type"] = source_type if alert_urgency_id is not UNSET: @@ -214,6 +221,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) + enabled = d.pop("enabled", UNSET) + _source_type = d.pop("source_type", UNSET) source_type: UpdateAlertsSourceDataAttributesSourceType | Unset if isinstance(_source_type, Unset): @@ -347,6 +356,7 @@ def _parse_resolution_rule_attributes( update_alerts_source_data_attributes = cls( name=name, + enabled=enabled, source_type=source_type, alert_urgency_id=alert_urgency_id, deduplicate_alerts_by_key=deduplicate_alerts_by_key, diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0.py b/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0.py index 0fb21b48..4a1700e5 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0.py @@ -69,6 +69,7 @@ class UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + enabled = self.enabled condition_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_source_type.py b/rootly_sdk/models/update_alerts_source_data_attributes_source_type.py index 547587cb..2c2b3e9c 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_source_type.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_source_type.py @@ -11,6 +11,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", @@ -37,6 +38,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0.py b/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0.py index d1bd75ba..29ebe687 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0.py @@ -41,6 +41,7 @@ class UpdateAlertsSourceDataAttributesSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + auto_resolve = self.auto_resolve resolve_state: None | str | Unset diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py b/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py index b89f8b85..f0794e79 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py @@ -22,7 +22,8 @@ class UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttr field (UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset): Select the field on which the condition to be evaluated json_path (str | Unset): JSON path expression to extract a specific value from the alert's payload for - evaluation + evaluation. For `notification_target_id` only: if your account has opted in to Dynamic Notification Targets, + this may also be a Liquid template that resolves to a notification target id at routing time. """ field: UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET diff --git a/rootly_sdk/models/update_api_key.py b/rootly_sdk/models/update_api_key.py index 3bb6e234..316cd68b 100644 --- a/rootly_sdk/models/update_api_key.py +++ b/rootly_sdk/models/update_api_key.py @@ -24,6 +24,7 @@ class UpdateApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_api_key_data.py b/rootly_sdk/models/update_api_key_data.py index 2577a981..984040f9 100644 --- a/rootly_sdk/models/update_api_key_data.py +++ b/rootly_sdk/models/update_api_key_data.py @@ -28,6 +28,7 @@ class UpdateApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_asana_task_task_params.py b/rootly_sdk/models/update_asana_task_task_params.py index 5bc3f70a..8d8ed46c 100644 --- a/rootly_sdk/models/update_asana_task_task_params.py +++ b/rootly_sdk/models/update_asana_task_task_params.py @@ -53,6 +53,7 @@ class UpdateAsanaTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + task_id = self.task_id completion = self.completion.to_dict() diff --git a/rootly_sdk/models/update_authorization.py b/rootly_sdk/models/update_authorization.py index ec2243f6..111de878 100644 --- a/rootly_sdk/models/update_authorization.py +++ b/rootly_sdk/models/update_authorization.py @@ -24,6 +24,7 @@ class UpdateAuthorization: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_authorization_data.py b/rootly_sdk/models/update_authorization_data.py index 08aaa3c1..b69c00db 100644 --- a/rootly_sdk/models/update_authorization_data.py +++ b/rootly_sdk/models/update_authorization_data.py @@ -28,6 +28,7 @@ class UpdateAuthorizationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog.py b/rootly_sdk/models/update_catalog.py index d016121c..ce690f10 100644 --- a/rootly_sdk/models/update_catalog.py +++ b/rootly_sdk/models/update_catalog.py @@ -24,6 +24,7 @@ class UpdateCatalog: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_checklist_template.py b/rootly_sdk/models/update_catalog_checklist_template.py index d6289434..5867865e 100644 --- a/rootly_sdk/models/update_catalog_checklist_template.py +++ b/rootly_sdk/models/update_catalog_checklist_template.py @@ -24,6 +24,7 @@ class UpdateCatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_checklist_template_data.py b/rootly_sdk/models/update_catalog_checklist_template_data.py index 405fd1e1..a7ee5fc8 100644 --- a/rootly_sdk/models/update_catalog_checklist_template_data.py +++ b/rootly_sdk/models/update_catalog_checklist_template_data.py @@ -31,6 +31,7 @@ class UpdateCatalogChecklistTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_data.py b/rootly_sdk/models/update_catalog_data.py index 38041394..4cb95a7c 100644 --- a/rootly_sdk/models/update_catalog_data.py +++ b/rootly_sdk/models/update_catalog_data.py @@ -28,6 +28,7 @@ class UpdateCatalogData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_data_attributes.py b/rootly_sdk/models/update_catalog_data_attributes.py index 63e8cf2b..c8e6bdc2 100644 --- a/rootly_sdk/models/update_catalog_data_attributes.py +++ b/rootly_sdk/models/update_catalog_data_attributes.py @@ -22,12 +22,14 @@ class UpdateCatalogDataAttributes: description (None | str | Unset): icon (UpdateCatalogDataAttributesIcon | Unset): position (int | None | Unset): Default position of the catalog when displayed in a list. + external_id (None | str | Unset): An external identifier for this catalog. Must be unique within the team. """ name: str | Unset = UNSET description: None | str | Unset = UNSET icon: UpdateCatalogDataAttributesIcon | Unset = UNSET position: int | None | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -48,6 +50,12 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -59,6 +67,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["icon"] = icon if position is not UNSET: field_dict["position"] = position + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -92,11 +102,21 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + update_catalog_data_attributes = cls( name=name, description=description, icon=icon, position=position, + external_id=external_id, ) return update_catalog_data_attributes diff --git a/rootly_sdk/models/update_catalog_entity.py b/rootly_sdk/models/update_catalog_entity.py index c4e20cc9..192874f3 100644 --- a/rootly_sdk/models/update_catalog_entity.py +++ b/rootly_sdk/models/update_catalog_entity.py @@ -24,6 +24,7 @@ class UpdateCatalogEntity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_entity_data.py b/rootly_sdk/models/update_catalog_entity_data.py index 380a9efd..1e0c6e1d 100644 --- a/rootly_sdk/models/update_catalog_entity_data.py +++ b/rootly_sdk/models/update_catalog_entity_data.py @@ -28,6 +28,7 @@ class UpdateCatalogEntityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_entity_data_attributes.py b/rootly_sdk/models/update_catalog_entity_data_attributes.py index 3b6fc8cf..d04a6a4c 100644 --- a/rootly_sdk/models/update_catalog_entity_data_attributes.py +++ b/rootly_sdk/models/update_catalog_entity_data_attributes.py @@ -23,6 +23,9 @@ class UpdateCatalogEntityDataAttributes: name (str | Unset): description (None | str | Unset): position (int | None | Unset): Default position of the item when displayed in a list. + backstage_id (None | str | Unset): The Backstage entity ID this catalog entity is linked to. + external_id (None | str | Unset): An external identifier for this catalog entity. Must be unique within the + catalog. properties (list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset): Array of property values for this catalog entity """ @@ -30,9 +33,12 @@ class UpdateCatalogEntityDataAttributes: name: str | Unset = UNSET description: None | str | Unset = UNSET position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET properties: list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset @@ -47,6 +53,18 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -63,6 +81,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if external_id is not UNSET: + field_dict["external_id"] = external_id if properties is not UNSET: field_dict["properties"] = properties @@ -95,6 +117,24 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + _properties = d.pop("properties", UNSET) properties: list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -108,6 +148,8 @@ def _parse_position(data: object) -> int | None | Unset: name=name, description=description, position=position, + backstage_id=backstage_id, + external_id=external_id, properties=properties, ) diff --git a/rootly_sdk/models/update_catalog_entity_property.py b/rootly_sdk/models/update_catalog_entity_property.py index b8210f42..9e9215a5 100644 --- a/rootly_sdk/models/update_catalog_entity_property.py +++ b/rootly_sdk/models/update_catalog_entity_property.py @@ -26,6 +26,7 @@ class UpdateCatalogEntityProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_entity_property_data.py b/rootly_sdk/models/update_catalog_entity_property_data.py index a6145a4c..d5d8a95a 100644 --- a/rootly_sdk/models/update_catalog_entity_property_data.py +++ b/rootly_sdk/models/update_catalog_entity_property_data.py @@ -31,6 +31,7 @@ class UpdateCatalogEntityPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_field.py b/rootly_sdk/models/update_catalog_field.py index d44c367a..1c18e6d3 100644 --- a/rootly_sdk/models/update_catalog_field.py +++ b/rootly_sdk/models/update_catalog_field.py @@ -24,6 +24,7 @@ class UpdateCatalogField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_field_data.py b/rootly_sdk/models/update_catalog_field_data.py index a5eed9b6..aead4648 100644 --- a/rootly_sdk/models/update_catalog_field_data.py +++ b/rootly_sdk/models/update_catalog_field_data.py @@ -28,6 +28,7 @@ class UpdateCatalogFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_field_data_attributes.py b/rootly_sdk/models/update_catalog_field_data_attributes.py index b5cfb3a6..743f9aaf 100644 --- a/rootly_sdk/models/update_catalog_field_data_attributes.py +++ b/rootly_sdk/models/update_catalog_field_data_attributes.py @@ -28,6 +28,8 @@ class UpdateCatalogFieldDataAttributes: position (int | None | Unset): Default position of the item when displayed in a list. required (bool | Unset): Whether the field is required. catalog_type (UpdateCatalogFieldDataAttributesCatalogType | Unset): The type of catalog the field belongs to. + external_id (None | str | Unset): An external identifier for this catalog field. Must be unique within the + scope. """ name: str | Unset = UNSET @@ -36,6 +38,7 @@ class UpdateCatalogFieldDataAttributes: position: int | None | Unset = UNSET required: bool | Unset = UNSET catalog_type: UpdateCatalogFieldDataAttributesCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -62,6 +65,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -77,6 +86,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -119,6 +130,15 @@ def _parse_position(data: object) -> int | None | Unset: else: catalog_type = check_update_catalog_field_data_attributes_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + update_catalog_field_data_attributes = cls( name=name, kind=kind, @@ -126,6 +146,7 @@ def _parse_position(data: object) -> int | None | Unset: position=position, required=required, catalog_type=catalog_type, + external_id=external_id, ) return update_catalog_field_data_attributes diff --git a/rootly_sdk/models/update_catalog_property.py b/rootly_sdk/models/update_catalog_property.py index cb0695ed..8b15c596 100644 --- a/rootly_sdk/models/update_catalog_property.py +++ b/rootly_sdk/models/update_catalog_property.py @@ -24,6 +24,7 @@ class UpdateCatalogProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_property_data.py b/rootly_sdk/models/update_catalog_property_data.py index 91f2cfcd..2d7bf203 100644 --- a/rootly_sdk/models/update_catalog_property_data.py +++ b/rootly_sdk/models/update_catalog_property_data.py @@ -31,6 +31,7 @@ class UpdateCatalogPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_property_data_attributes.py b/rootly_sdk/models/update_catalog_property_data_attributes.py index 40c72abb..a5327c9d 100644 --- a/rootly_sdk/models/update_catalog_property_data_attributes.py +++ b/rootly_sdk/models/update_catalog_property_data_attributes.py @@ -29,6 +29,8 @@ class UpdateCatalogPropertyDataAttributes: required (bool | Unset): Whether the property is required. catalog_type (UpdateCatalogPropertyDataAttributesCatalogType | Unset): The type of catalog the property belongs to. + external_id (None | str | Unset): An external identifier for this catalog property. Must be unique within the + scope. """ name: str | Unset = UNSET @@ -37,6 +39,7 @@ class UpdateCatalogPropertyDataAttributes: position: int | None | Unset = UNSET required: bool | Unset = UNSET catalog_type: UpdateCatalogPropertyDataAttributesCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -63,6 +66,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -78,6 +87,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -120,6 +131,15 @@ def _parse_position(data: object) -> int | None | Unset: else: catalog_type = check_update_catalog_property_data_attributes_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + update_catalog_property_data_attributes = cls( name=name, kind=kind, @@ -127,6 +147,7 @@ def _parse_position(data: object) -> int | None | Unset: position=position, required=required, catalog_type=catalog_type, + external_id=external_id, ) return update_catalog_property_data_attributes diff --git a/rootly_sdk/models/update_cause.py b/rootly_sdk/models/update_cause.py index b507866d..bcbc6c76 100644 --- a/rootly_sdk/models/update_cause.py +++ b/rootly_sdk/models/update_cause.py @@ -24,6 +24,7 @@ class UpdateCause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_cause_data.py b/rootly_sdk/models/update_cause_data.py index 4149b62b..4ee88f52 100644 --- a/rootly_sdk/models/update_cause_data.py +++ b/rootly_sdk/models/update_cause_data.py @@ -28,6 +28,7 @@ class UpdateCauseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_cause_data_attributes.py b/rootly_sdk/models/update_cause_data_attributes.py index 98cdb545..b3bd138c 100644 --- a/rootly_sdk/models/update_cause_data_attributes.py +++ b/rootly_sdk/models/update_cause_data_attributes.py @@ -30,6 +30,7 @@ class UpdateCauseDataAttributes: properties: list[UpdateCauseDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_clickup_task_task_params.py b/rootly_sdk/models/update_clickup_task_task_params.py index d9bdbccb..7be46a3a 100644 --- a/rootly_sdk/models/update_clickup_task_task_params.py +++ b/rootly_sdk/models/update_clickup_task_task_params.py @@ -48,6 +48,7 @@ class UpdateClickupTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + task_id = self.task_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_coda_page_task_params.py b/rootly_sdk/models/update_coda_page_task_params.py index 9791bb83..cc57f6dc 100644 --- a/rootly_sdk/models/update_coda_page_task_params.py +++ b/rootly_sdk/models/update_coda_page_task_params.py @@ -42,6 +42,7 @@ class UpdateCodaPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + page_id = self.page_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_communications_group.py b/rootly_sdk/models/update_communications_group.py index 1bd58dc8..f9a17ecf 100644 --- a/rootly_sdk/models/update_communications_group.py +++ b/rootly_sdk/models/update_communications_group.py @@ -24,6 +24,7 @@ class UpdateCommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_communications_group_data.py b/rootly_sdk/models/update_communications_group_data.py index 7a07bbfb..bc38f326 100644 --- a/rootly_sdk/models/update_communications_group_data.py +++ b/rootly_sdk/models/update_communications_group_data.py @@ -31,6 +31,7 @@ class UpdateCommunicationsGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_communications_group_data_attributes.py b/rootly_sdk/models/update_communications_group_data_attributes.py index 0599fcdb..a89a63de 100644 --- a/rootly_sdk/models/update_communications_group_data_attributes.py +++ b/rootly_sdk/models/update_communications_group_data_attributes.py @@ -61,6 +61,7 @@ class UpdateCommunicationsGroupDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_communications_stage.py b/rootly_sdk/models/update_communications_stage.py index 2f890ab9..1a54ae26 100644 --- a/rootly_sdk/models/update_communications_stage.py +++ b/rootly_sdk/models/update_communications_stage.py @@ -24,6 +24,7 @@ class UpdateCommunicationsStage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_communications_stage_data.py b/rootly_sdk/models/update_communications_stage_data.py index 8e6b1961..119b57fb 100644 --- a/rootly_sdk/models/update_communications_stage_data.py +++ b/rootly_sdk/models/update_communications_stage_data.py @@ -31,6 +31,7 @@ class UpdateCommunicationsStageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_communications_template.py b/rootly_sdk/models/update_communications_template.py index 6e7cebd5..6b584d62 100644 --- a/rootly_sdk/models/update_communications_template.py +++ b/rootly_sdk/models/update_communications_template.py @@ -24,6 +24,7 @@ class UpdateCommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_communications_template_data.py b/rootly_sdk/models/update_communications_template_data.py index 75e50cb1..98c2b295 100644 --- a/rootly_sdk/models/update_communications_template_data.py +++ b/rootly_sdk/models/update_communications_template_data.py @@ -31,6 +31,7 @@ class UpdateCommunicationsTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_communications_template_data_attributes.py b/rootly_sdk/models/update_communications_template_data_attributes.py index 66fe1ee0..51b6c959 100644 --- a/rootly_sdk/models/update_communications_template_data_attributes.py +++ b/rootly_sdk/models/update_communications_template_data_attributes.py @@ -38,6 +38,7 @@ class UpdateCommunicationsTemplateDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_communications_type.py b/rootly_sdk/models/update_communications_type.py index a788de66..4417e08f 100644 --- a/rootly_sdk/models/update_communications_type.py +++ b/rootly_sdk/models/update_communications_type.py @@ -24,6 +24,7 @@ class UpdateCommunicationsType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_communications_type_data.py b/rootly_sdk/models/update_communications_type_data.py index 470e7f66..8550fb92 100644 --- a/rootly_sdk/models/update_communications_type_data.py +++ b/rootly_sdk/models/update_communications_type_data.py @@ -31,6 +31,7 @@ class UpdateCommunicationsTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_confluence_page_task_params.py b/rootly_sdk/models/update_confluence_page_task_params.py index 5cb8c995..fe6ce985 100644 --- a/rootly_sdk/models/update_confluence_page_task_params.py +++ b/rootly_sdk/models/update_confluence_page_task_params.py @@ -13,6 +13,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration from ..models.update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate @@ -25,27 +26,39 @@ class UpdateConfluencePageTaskParams: Attributes: file_id (str): The Confluence page ID task_type (UpdateConfluencePageTaskParamsTaskType | Unset): + integration (UpdateConfluencePageTaskParamsIntegration | Unset): Specify integration id if you have more than + one Confluence instance title (str | Unset): The Confluence page title content (str | Unset): The Confluence page content post_mortem_template_id (str | Unset): Retrospective template to use when updating page, if desired template (UpdateConfluencePageTaskParamsTemplate | Unset): The Confluence template to use + include_overview (bool | Unset): Default: True. + include_timeline (bool | Unset): Default: True. """ file_id: str task_type: UpdateConfluencePageTaskParamsTaskType | Unset = UNSET + integration: UpdateConfluencePageTaskParamsIntegration | Unset = UNSET title: str | Unset = UNSET content: str | Unset = UNSET post_mortem_template_id: str | Unset = UNSET template: UpdateConfluencePageTaskParamsTemplate | Unset = UNSET + include_overview: bool | Unset = True + include_timeline: bool | Unset = True additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + file_id = self.file_id task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type + integration: dict[str, Any] | Unset = UNSET + if not isinstance(self.integration, Unset): + integration = self.integration.to_dict() + title = self.title content = self.content @@ -56,6 +69,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.template, Unset): template = self.template.to_dict() + include_overview = self.include_overview + + include_timeline = self.include_timeline + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -65,6 +82,8 @@ def to_dict(self) -> dict[str, Any]: ) if task_type is not UNSET: field_dict["task_type"] = task_type + if integration is not UNSET: + field_dict["integration"] = integration if title is not UNSET: field_dict["title"] = title if content is not UNSET: @@ -73,11 +92,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["post_mortem_template_id"] = post_mortem_template_id if template is not UNSET: field_dict["template"] = template + if include_overview is not UNSET: + field_dict["include_overview"] = include_overview + if include_timeline is not UNSET: + field_dict["include_timeline"] = include_timeline return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration from ..models.update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate d = dict(src_dict) @@ -90,6 +114,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: task_type = check_update_confluence_page_task_params_task_type(_task_type) + _integration = d.pop("integration", UNSET) + integration: UpdateConfluencePageTaskParamsIntegration | Unset + if isinstance(_integration, Unset): + integration = UNSET + else: + integration = UpdateConfluencePageTaskParamsIntegration.from_dict(_integration) + title = d.pop("title", UNSET) content = d.pop("content", UNSET) @@ -103,13 +134,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: template = UpdateConfluencePageTaskParamsTemplate.from_dict(_template) + include_overview = d.pop("include_overview", UNSET) + + include_timeline = d.pop("include_timeline", UNSET) + update_confluence_page_task_params = cls( file_id=file_id, task_type=task_type, + integration=integration, title=title, content=content, post_mortem_template_id=post_mortem_template_id, template=template, + include_overview=include_overview, + include_timeline=include_timeline, ) update_confluence_page_task_params.additional_properties = d diff --git a/rootly_sdk/models/update_confluence_page_task_params_integration.py b/rootly_sdk/models/update_confluence_page_task_params_integration.py new file mode 100644 index 00000000..a1f464df --- /dev/null +++ b/rootly_sdk/models/update_confluence_page_task_params_integration.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateConfluencePageTaskParamsIntegration") + + +@_attrs_define +class UpdateConfluencePageTaskParamsIntegration: + """Specify integration id if you have more than one Confluence instance + + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + update_confluence_page_task_params_integration = cls( + id=id, + name=name, + ) + + update_confluence_page_task_params_integration.additional_properties = d + return update_confluence_page_task_params_integration + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_custom_field.py b/rootly_sdk/models/update_custom_field.py index 9a9e7898..5ed37956 100644 --- a/rootly_sdk/models/update_custom_field.py +++ b/rootly_sdk/models/update_custom_field.py @@ -24,6 +24,7 @@ class UpdateCustomField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_custom_field_data.py b/rootly_sdk/models/update_custom_field_data.py index 0baca8c1..414bc949 100644 --- a/rootly_sdk/models/update_custom_field_data.py +++ b/rootly_sdk/models/update_custom_field_data.py @@ -28,6 +28,7 @@ class UpdateCustomFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_custom_field_option.py b/rootly_sdk/models/update_custom_field_option.py index 0ee9467b..52ad39dc 100644 --- a/rootly_sdk/models/update_custom_field_option.py +++ b/rootly_sdk/models/update_custom_field_option.py @@ -24,6 +24,7 @@ class UpdateCustomFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_custom_field_option_data.py b/rootly_sdk/models/update_custom_field_option_data.py index 599ea2d3..7320f4a8 100644 --- a/rootly_sdk/models/update_custom_field_option_data.py +++ b/rootly_sdk/models/update_custom_field_option_data.py @@ -31,6 +31,7 @@ class UpdateCustomFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_custom_form.py b/rootly_sdk/models/update_custom_form.py index 74d00fd4..406ac1e0 100644 --- a/rootly_sdk/models/update_custom_form.py +++ b/rootly_sdk/models/update_custom_form.py @@ -24,6 +24,7 @@ class UpdateCustomForm: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_custom_form_data.py b/rootly_sdk/models/update_custom_form_data.py index 7345cab6..73da6a83 100644 --- a/rootly_sdk/models/update_custom_form_data.py +++ b/rootly_sdk/models/update_custom_form_data.py @@ -28,6 +28,7 @@ class UpdateCustomFormData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_dashboard.py b/rootly_sdk/models/update_dashboard.py index f54113b0..1a115d37 100644 --- a/rootly_sdk/models/update_dashboard.py +++ b/rootly_sdk/models/update_dashboard.py @@ -24,6 +24,7 @@ class UpdateDashboard: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_dashboard_data.py b/rootly_sdk/models/update_dashboard_data.py index a01aeaf6..31bbc70c 100644 --- a/rootly_sdk/models/update_dashboard_data.py +++ b/rootly_sdk/models/update_dashboard_data.py @@ -29,6 +29,7 @@ class UpdateDashboardData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/update_dashboard_panel.py b/rootly_sdk/models/update_dashboard_panel.py index ceacfca3..b02e34b4 100644 --- a/rootly_sdk/models/update_dashboard_panel.py +++ b/rootly_sdk/models/update_dashboard_panel.py @@ -24,6 +24,7 @@ class UpdateDashboardPanel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_dashboard_panel_data.py b/rootly_sdk/models/update_dashboard_panel_data.py index 22d0e1fa..340bba12 100644 --- a/rootly_sdk/models/update_dashboard_panel_data.py +++ b/rootly_sdk/models/update_dashboard_panel_data.py @@ -32,6 +32,7 @@ class UpdateDashboardPanelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py index 7d2dc52d..d67d451b 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py @@ -48,6 +48,7 @@ class UpdateDashboardPanelDataAttributesParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.display diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item.py index 16b2ed1d..bb4b5355 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item.py @@ -34,6 +34,7 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation diff --git a/rootly_sdk/models/update_datadog_notebook_task_params.py b/rootly_sdk/models/update_datadog_notebook_task_params.py index afd34de5..267ccdbc 100644 --- a/rootly_sdk/models/update_datadog_notebook_task_params.py +++ b/rootly_sdk/models/update_datadog_notebook_task_params.py @@ -46,6 +46,7 @@ class UpdateDatadogNotebookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + file_id = self.file_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_edge_connector.py b/rootly_sdk/models/update_edge_connector.py index 1a0943b0..34021a42 100644 --- a/rootly_sdk/models/update_edge_connector.py +++ b/rootly_sdk/models/update_edge_connector.py @@ -24,6 +24,7 @@ class UpdateEdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + edge_connector = self.edge_connector.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_edge_connector_action.py b/rootly_sdk/models/update_edge_connector_action.py index 8f66a7e3..d616265c 100644 --- a/rootly_sdk/models/update_edge_connector_action.py +++ b/rootly_sdk/models/update_edge_connector_action.py @@ -24,6 +24,7 @@ class UpdateEdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + action = self.action.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_edge_connector_action_action.py b/rootly_sdk/models/update_edge_connector_action_action.py index c15966c0..43276057 100644 --- a/rootly_sdk/models/update_edge_connector_action_action.py +++ b/rootly_sdk/models/update_edge_connector_action_action.py @@ -34,6 +34,7 @@ class UpdateEdgeConnectorActionAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name action_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_edge_connector_action_body.py b/rootly_sdk/models/update_edge_connector_action_body.py index 0e199f8e..e6fff5ab 100644 --- a/rootly_sdk/models/update_edge_connector_action_body.py +++ b/rootly_sdk/models/update_edge_connector_action_body.py @@ -26,6 +26,7 @@ class UpdateEdgeConnectorActionBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + action: dict[str, Any] | Unset = UNSET if not isinstance(self.action, Unset): action = self.action.to_dict() diff --git a/rootly_sdk/models/update_edge_connector_action_body_action.py b/rootly_sdk/models/update_edge_connector_action_body_action.py index d70768dd..e33acde0 100644 --- a/rootly_sdk/models/update_edge_connector_action_body_action.py +++ b/rootly_sdk/models/update_edge_connector_action_body_action.py @@ -34,6 +34,7 @@ class UpdateEdgeConnectorActionBodyAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name action_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_edge_connector_body.py b/rootly_sdk/models/update_edge_connector_body.py index a10ff487..43596b1b 100644 --- a/rootly_sdk/models/update_edge_connector_body.py +++ b/rootly_sdk/models/update_edge_connector_body.py @@ -26,6 +26,7 @@ class UpdateEdgeConnectorBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/update_edge_connector_body_data.py b/rootly_sdk/models/update_edge_connector_body_data.py index 445e7799..22b5eb6c 100644 --- a/rootly_sdk/models/update_edge_connector_body_data.py +++ b/rootly_sdk/models/update_edge_connector_body_data.py @@ -34,6 +34,7 @@ class UpdateEdgeConnectorBodyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/update_edge_connector_body_data_attributes.py b/rootly_sdk/models/update_edge_connector_body_data_attributes.py index c076f696..6324907b 100644 --- a/rootly_sdk/models/update_edge_connector_body_data_attributes.py +++ b/rootly_sdk/models/update_edge_connector_body_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,6 +12,10 @@ ) from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.update_edge_connector_body_data_attributes_filters import UpdateEdgeConnectorBodyDataAttributesFilters + + T = TypeVar("T", bound="UpdateEdgeConnectorBodyDataAttributes") @@ -23,15 +27,18 @@ class UpdateEdgeConnectorBodyDataAttributes: description (str | Unset): status (UpdateEdgeConnectorBodyDataAttributesStatus | Unset): subscriptions (list[str] | Unset): + filters (UpdateEdgeConnectorBodyDataAttributesFilters | Unset): Event filters """ name: str | Unset = UNSET description: str | Unset = UNSET status: UpdateEdgeConnectorBodyDataAttributesStatus | Unset = UNSET subscriptions: list[str] | Unset = UNSET + filters: UpdateEdgeConnectorBodyDataAttributesFilters | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name description = self.description @@ -44,6 +51,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions + filters: dict[str, Any] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = self.filters.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -55,11 +66,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["status"] = status if subscriptions is not UNSET: field_dict["subscriptions"] = subscriptions + if filters is not UNSET: + field_dict["filters"] = filters return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_edge_connector_body_data_attributes_filters import ( + UpdateEdgeConnectorBodyDataAttributesFilters, + ) + d = dict(src_dict) name = d.pop("name", UNSET) @@ -74,11 +91,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subscriptions = cast(list[str], d.pop("subscriptions", UNSET)) + _filters = d.pop("filters", UNSET) + filters: UpdateEdgeConnectorBodyDataAttributesFilters | Unset + if isinstance(_filters, Unset): + filters = UNSET + else: + filters = UpdateEdgeConnectorBodyDataAttributesFilters.from_dict(_filters) + update_edge_connector_body_data_attributes = cls( name=name, description=description, status=status, subscriptions=subscriptions, + filters=filters, ) update_edge_connector_body_data_attributes.additional_properties = d diff --git a/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py b/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py new file mode 100644 index 00000000..c6da5ea2 --- /dev/null +++ b/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateEdgeConnectorBodyDataAttributesFilters") + + +@_attrs_define +class UpdateEdgeConnectorBodyDataAttributesFilters: + """Event filters""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + update_edge_connector_body_data_attributes_filters = cls() + + update_edge_connector_body_data_attributes_filters.additional_properties = d + return update_edge_connector_body_data_attributes_filters + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_environment.py b/rootly_sdk/models/update_environment.py index 3220c2cd..4983b3f5 100644 --- a/rootly_sdk/models/update_environment.py +++ b/rootly_sdk/models/update_environment.py @@ -24,6 +24,7 @@ class UpdateEnvironment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_environment_data.py b/rootly_sdk/models/update_environment_data.py index 5eeba4d0..340dd50b 100644 --- a/rootly_sdk/models/update_environment_data.py +++ b/rootly_sdk/models/update_environment_data.py @@ -28,6 +28,7 @@ class UpdateEnvironmentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_environment_data_attributes.py b/rootly_sdk/models/update_environment_data_attributes.py index 8145cc3a..f7e478fd 100644 --- a/rootly_sdk/models/update_environment_data_attributes.py +++ b/rootly_sdk/models/update_environment_data_attributes.py @@ -30,6 +30,7 @@ class UpdateEnvironmentDataAttributes: description (None | str | Unset): The description of the environment color (None | str | Unset): The hex color of the environment position (int | None | Unset): Position of the environment + external_id (None | str | Unset): The external id associated to this environment notify_emails (list[str] | None | Unset): Emails to attach to the environment slack_channels (list[UpdateEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this environment @@ -43,12 +44,14 @@ class UpdateEnvironmentDataAttributes: description: None | str | Unset = UNSET color: None | str | Unset = UNSET position: int | None | Unset = UNSET + external_id: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET slack_channels: list[UpdateEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset = UNSET slack_aliases: list[UpdateEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset = UNSET properties: list[UpdateEnvironmentDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset @@ -69,6 +72,12 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET @@ -120,6 +129,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["color"] = color if position is not UNSET: field_dict["position"] = position + if external_id is not UNSET: + field_dict["external_id"] = external_id if notify_emails is not UNSET: field_dict["notify_emails"] = notify_emails if slack_channels is not UNSET: @@ -173,6 +184,15 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data @@ -256,6 +276,7 @@ def _parse_slack_aliases( description=description, color=color, position=position, + external_id=external_id, notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, diff --git a/rootly_sdk/models/update_escalation_policy.py b/rootly_sdk/models/update_escalation_policy.py index 3290a36d..9dc8393d 100644 --- a/rootly_sdk/models/update_escalation_policy.py +++ b/rootly_sdk/models/update_escalation_policy.py @@ -24,6 +24,7 @@ class UpdateEscalationPolicy: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_escalation_policy_data.py b/rootly_sdk/models/update_escalation_policy_data.py index 1e9bb59c..68a98a8b 100644 --- a/rootly_sdk/models/update_escalation_policy_data.py +++ b/rootly_sdk/models/update_escalation_policy_data.py @@ -31,6 +31,7 @@ class UpdateEscalationPolicyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0_time_zone.py b/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0_time_zone.py index 46bc9d02..0381dd71 100644 --- a/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0_time_zone.py +++ b/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0_time_zone.py @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -306,8 +322,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -323,6 +341,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -334,6 +353,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -388,7 +408,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -409,6 +432,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -418,6 +442,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -524,15 +549,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -572,6 +603,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/update_escalation_policy_level.py b/rootly_sdk/models/update_escalation_policy_level.py index 9cfac065..dc0a48ed 100644 --- a/rootly_sdk/models/update_escalation_policy_level.py +++ b/rootly_sdk/models/update_escalation_policy_level.py @@ -24,6 +24,7 @@ class UpdateEscalationPolicyLevel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_escalation_policy_level_data.py b/rootly_sdk/models/update_escalation_policy_level_data.py index 1e4a47bc..f6369f8e 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data.py +++ b/rootly_sdk/models/update_escalation_policy_level_data.py @@ -31,6 +31,7 @@ class UpdateEscalationPolicyLevelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py b/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py index b9da8839..f99027ed 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py +++ b/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py @@ -1,12 +1,13 @@ from typing import Literal, cast UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type = Literal[ - "schedule", "service", "slack_channel", "team", "user" + "microsoft_teams_channel", "schedule", "service", "slack_channel", "team", "user" ] UPDATE_ESCALATION_POLICY_LEVEL_DATA_ATTRIBUTES_NOTIFICATION_TARGET_PARAMS_ITEM_TYPE_0_TYPE_VALUES: set[ UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type ] = { + "microsoft_teams_channel", "schedule", "service", "slack_channel", diff --git a/rootly_sdk/models/update_escalation_policy_path.py b/rootly_sdk/models/update_escalation_policy_path.py index c5332abc..b489235a 100644 --- a/rootly_sdk/models/update_escalation_policy_path.py +++ b/rootly_sdk/models/update_escalation_policy_path.py @@ -24,6 +24,7 @@ class UpdateEscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_escalation_policy_path_data.py b/rootly_sdk/models/update_escalation_policy_path_data.py index 438db618..99b43f08 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data.py +++ b/rootly_sdk/models/update_escalation_policy_path_data.py @@ -31,6 +31,7 @@ class UpdateEscalationPolicyPathData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes.py index 41421828..a88712c9 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes.py @@ -28,12 +28,78 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7, + ) from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item import ( UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, ) @@ -63,9 +129,28 @@ class UpdateEscalationPolicyPathDataAttributes: repeat_count (int | None | Unset): The number of times this path will be executed until someone acknowledges the alert initial_delay (int | Unset): Initial delay for escalation path in minutes. Maximum 1 week (10080). - rules (list[EscalationPathRuleAlertUrgency | EscalationPathRuleDeferralWindow | EscalationPathRuleField | - EscalationPathRuleJsonPath | EscalationPathRuleService | EscalationPathRuleWorkingHour | None] | Unset): - Escalation path conditions + rules (list[UpdateEscalationPolicyPathDataAttributesRulesItemType0 | + UpdateEscalationPolicyPathDataAttributesRulesItemType1 | UpdateEscalationPolicyPathDataAttributesRulesItemType2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType3 | + UpdateEscalationPolicyPathDataAttributesRulesItemType4 | UpdateEscalationPolicyPathDataAttributesRulesItemType5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType6 | + UpdateEscalationPolicyPathDataAttributesRulesItemType7 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7] | Unset): Escalation path conditions time_restriction_time_zone (UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset): Time zone used for time restrictions. time_restrictions (list[UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset): If time @@ -86,13 +171,30 @@ class UpdateEscalationPolicyPathDataAttributes: initial_delay: int | Unset = UNSET rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + UpdateEscalationPolicyPathDataAttributesRulesItemType0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7 ] | Unset ) = UNSET @@ -100,12 +202,75 @@ class UpdateEscalationPolicyPathDataAttributes: time_restrictions: list[UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, + ) name = self.name @@ -153,25 +318,60 @@ def to_dict(self) -> dict[str, Any]: initial_delay = self.initial_delay - rules: list[dict[str, Any] | None] | Unset = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: - rules_item: dict[str, Any] | None - if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): + rules_item: dict[str, Any] + if isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType2): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType3): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleJsonPath): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType4): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleField): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType5): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleService): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType6): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleDeferralWindow): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType7): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6): rules_item = rules_item_data.to_dict() else: - rules_item = rules_item_data + rules_item = rules_item_data.to_dict() + rules.append(rules_item) time_restriction_time_zone: str | Unset = UNSET @@ -221,12 +421,78 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency - from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow - from ..models.escalation_path_rule_field import EscalationPathRuleField - from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath - from ..models.escalation_path_rule_service import EscalationPathRuleService - from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7, + ) from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item import ( UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, ) @@ -309,13 +575,30 @@ def _parse_repeat_count(data: object) -> int | None | Unset: _rules = d.pop("rules", UNSET) rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + UpdateEscalationPolicyPathDataAttributesRulesItemType0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7 ] | Unset ) = UNSET @@ -326,20 +609,35 @@ def _parse_repeat_count(data: object) -> int | None | Unset: def _parse_rules_item( data: object, ) -> ( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + UpdateEscalationPolicyPathDataAttributesRulesItemType0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7 ): - if data is None: - return data try: if not isinstance(data, dict): raise TypeError() - rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) + rules_item_type_0 = UpdateEscalationPolicyPathDataAttributesRulesItemType0.from_dict(data) return rules_item_type_0 except (TypeError, ValueError, AttributeError, KeyError): @@ -347,7 +645,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) + rules_item_type_1 = UpdateEscalationPolicyPathDataAttributesRulesItemType1.from_dict(data) return rules_item_type_1 except (TypeError, ValueError, AttributeError, KeyError): @@ -355,7 +653,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) + rules_item_type_2 = UpdateEscalationPolicyPathDataAttributesRulesItemType2.from_dict(data) return rules_item_type_2 except (TypeError, ValueError, AttributeError, KeyError): @@ -363,7 +661,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_3 = EscalationPathRuleField.from_dict(data) + rules_item_type_3 = UpdateEscalationPolicyPathDataAttributesRulesItemType3.from_dict(data) return rules_item_type_3 except (TypeError, ValueError, AttributeError, KeyError): @@ -371,7 +669,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_4 = EscalationPathRuleService.from_dict(data) + rules_item_type_4 = UpdateEscalationPolicyPathDataAttributesRulesItemType4.from_dict(data) return rules_item_type_4 except (TypeError, ValueError, AttributeError, KeyError): @@ -379,22 +677,185 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) + rules_item_type_5 = UpdateEscalationPolicyPathDataAttributesRulesItemType5.from_dict(data) return rules_item_type_5 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None, - data, + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6 = UpdateEscalationPolicyPathDataAttributesRulesItemType6.from_dict(data) + + return rules_item_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7 = UpdateEscalationPolicyPathDataAttributesRulesItemType7.from_dict(data) + + return rules_item_type_7 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_0 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0.from_dict(data) + ) + + return rules_item_type_8_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_1 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1.from_dict(data) + ) + + return rules_item_type_8_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_2 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2.from_dict(data) + ) + + return rules_item_type_8_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_3 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3.from_dict(data) + ) + + return rules_item_type_8_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_4 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4.from_dict(data) + ) + + return rules_item_type_8_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_5 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5.from_dict(data) + ) + + return rules_item_type_8_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_6 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6.from_dict(data) + ) + + return rules_item_type_8_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_7 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7.from_dict(data) + ) + + return rules_item_type_8_type_7 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_0 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0.from_dict(data) + ) + + return rules_item_type_9_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_1 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1.from_dict(data) + ) + + return rules_item_type_9_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_2 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2.from_dict(data) + ) + + return rules_item_type_9_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_3 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3.from_dict(data) + ) + + return rules_item_type_9_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_4 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4.from_dict(data) + ) + + return rules_item_type_9_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_5 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5.from_dict(data) + ) + + return rules_item_type_9_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_6 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6.from_dict(data) + ) + + return rules_item_type_9_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_7 = UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7.from_dict( + data ) + return rules_item_type_9_type_7 + rules_item = _parse_rules_item(rules_item_data) rules.append(rules_item) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py new file mode 100644 index 00000000..43536fa1 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType0") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType0: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType): The type of the escalation path rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType + urgency_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + urgency_ids = self.urgency_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "urgency_ids": urgency_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type(d.pop("rule_type")) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_0.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py new file mode 100644 index 00000000..18fa4ac9 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType = Literal["alert_urgency"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType +] = { + "alert_urgency", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py new file mode 100644 index 00000000..67efc6ac --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType1") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType1: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType): The type of the escalation path rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType + within_working_hour: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + within_working_hour = self.within_working_hour + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "within_working_hour": within_working_hour, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type(d.pop("rule_type")) + + within_working_hour = d.pop("within_working_hour") + + update_escalation_policy_path_data_attributes_rules_item_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_1.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py new file mode 100644 index 00000000..2a5324d2 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType = Literal["working_hour"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType +] = { + "working_hour", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py new file mode 100644 index 00000000..a3f2a0e2 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_2_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType2") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType2: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator): How JSON path value should be matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType + json_path: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + json_path = self.json_path + + operator: str = self.operator + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "json_path": json_path, + "operator": operator, + } + ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_2_operator(d.pop("operator")) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_2.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_operator.py new file mode 100644 index 00000000..10f4f284 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_2_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py new file mode 100644 index 00000000..8e3e688d --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType = Literal["json_path"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType +] = { + "json_path", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py new file mode 100644 index 00000000..d654ba4a --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_3_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType3") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType3: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType): The type of the escalation path rule + fieldable_type (str): The type of the fieldable (e.g., AlertField) + fieldable_id (str): The ID of the alert field + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator): How the alert field value should be + matched + values (list[str] | Unset): Values to match against + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType + fieldable_type: str + fieldable_id: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + fieldable_type = self.fieldable_type + + fieldable_id = self.fieldable_id + + operator: str = self.operator + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "fieldable_type": fieldable_type, + "fieldable_id": fieldable_id, + "operator": operator, + } + ) + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type(d.pop("rule_type")) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_3_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_3.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_3 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_operator.py new file mode 100644 index 00000000..3d098863 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_3_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py new file mode 100644 index 00000000..0b2e52e1 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType = Literal["field"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType +] = { + "field", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py new file mode 100644 index 00000000..8e47f315 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType4") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType4: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_4.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py new file mode 100644 index 00000000..b893e3d8 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType = Literal["service"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType +] = { + "service", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py new file mode 100644 index 00000000..34bfdabe --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone, + check_update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType5") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType5: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType): The type of the escalation path rule + time_zone (UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone): Time zone for the deferral window + time_blocks (list[UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem]): Time windows during + which alerts are deferred + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType + time_zone: UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone + time_blocks: list[UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone(d.pop("time_zone")) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem.from_dict( + time_blocks_item_data + ) + + time_blocks.append(time_blocks_item) + + update_escalation_policy_path_data_attributes_rules_item_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_5.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py new file mode 100644 index 00000000..0415d0cf --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType = Literal["deferral_window"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType +] = { + "deferral_window", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py new file mode 100644 index 00000000..d79f3ac7 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py @@ -0,0 +1,162 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + all_day = d.pop("all_day", UNSET) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py new file mode 100644 index 00000000..b30f976b --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py new file mode 100644 index 00000000..d543a1ff --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_6_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType6") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType6: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType): The type of the escalation path rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator): How the alert source should be + matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator + values: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "values": values, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type(d.pop("rule_type")) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + update_escalation_policy_path_data_attributes_rules_item_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_6.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_6 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_operator.py new file mode 100644 index 00000000..10f5c4d1 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_operator.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_6_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py new file mode 100644 index 00000000..23f8cc8f --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType = Literal["source"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType +] = { + "source", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py new file mode 100644 index 00000000..67122596 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_7_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType7") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType7: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType): The type of the escalation path rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator): Whether the alert must (or must not) + have related incidents + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type(d.pop("rule_type")) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_7_operator(d.pop("operator")) + + update_escalation_policy_path_data_attributes_rules_item_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_7.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_7 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_operator.py new file mode 100644 index 00000000..b84a4019 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator = Literal["is_not_set", "is_set"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_7_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py new file mode 100644 index 00000000..c1a6fff4 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType = Literal["related_incidents"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType +] = { + "related_incidents", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py new file mode 100644 index 00000000..4e875168 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType): The type of the escalation path + rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType + urgency_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + urgency_ids = self.urgency_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "urgency_ids": urgency_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type( + d.pop("rule_type") + ) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type.py new file mode 100644 index 00000000..e203a644 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType = Literal["alert_urgency"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType +] = { + "alert_urgency", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py new file mode 100644 index 00000000..fefcf0cb --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType): The type of the escalation path + rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType + within_working_hour: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + within_working_hour = self.within_working_hour + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "within_working_hour": within_working_hour, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type( + d.pop("rule_type") + ) + + within_working_hour = d.pop("within_working_hour") + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type.py new file mode 100644 index 00000000..b161a7bc --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType = Literal["working_hour"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType +] = { + "working_hour", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py new file mode 100644 index 00000000..5548d7ad --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType): The type of the escalation path + rule + json_path (str): JSON path to extract value from payload + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator): How JSON path value should be + matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType + json_path: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + json_path = self.json_path + + operator: str = self.operator + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "json_path": json_path, + "operator": operator, + } + ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type( + d.pop("rule_type") + ) + + json_path = d.pop("json_path") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator( + d.pop("operator") + ) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator.py new file mode 100644 index 00000000..567782af --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type.py new file mode 100644 index 00000000..9a352a36 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType = Literal["json_path"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType +] = { + "json_path", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py new file mode 100644 index 00000000..7c490b36 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py @@ -0,0 +1,112 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType): The type of the escalation path + rule + fieldable_type (str): The type of the fieldable (e.g., AlertField) + fieldable_id (str): The ID of the alert field + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator): How the alert field value should + be matched + values (list[str] | Unset): Values to match against + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType + fieldable_type: str + fieldable_id: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + fieldable_type = self.fieldable_type + + fieldable_id = self.fieldable_id + + operator: str = self.operator + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "fieldable_type": fieldable_type, + "fieldable_id": fieldable_id, + "operator": operator, + } + ) + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type( + d.pop("rule_type") + ) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator( + d.pop("operator") + ) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator.py new file mode 100644 index 00000000..883a9cd9 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type.py new file mode 100644 index 00000000..78a62ee9 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType = Literal["field"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType +] = { + "field", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py new file mode 100644 index 00000000..9ea1d8cf --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType): The type of the escalation path + rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type( + d.pop("rule_type") + ) + + service_ids = cast(list[str], d.pop("service_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type.py new file mode 100644 index 00000000..395ab7c6 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType = Literal["service"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType +] = { + "service", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py new file mode 100644 index 00000000..e8d1eb48 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType): The type of the escalation path + rule + time_zone (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone): Time zone for the deferral + window + time_blocks (list[UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem]): Time windows + during which alerts are deferred + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType + time_zone: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone + time_blocks: list[UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type( + d.pop("rule_type") + ) + + time_zone = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone( + d.pop("time_zone") + ) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem.from_dict( + time_blocks_item_data + ) + + time_blocks.append(time_blocks_item) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type.py new file mode 100644 index 00000000..2ea2d52c --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType = Literal["deferral_window"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType +] = { + "deferral_window", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py new file mode 100644 index 00000000..b90ababd --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py @@ -0,0 +1,162 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + all_day = d.pop("all_day", UNSET) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone.py new file mode 100644 index 00000000..c0d3f443 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py new file mode 100644 index 00000000..5c3b2c9a --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType): The type of the escalation path + rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator): How the alert source should be + matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator + values: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "values": values, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type( + d.pop("rule_type") + ) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator( + d.pop("operator") + ) + + values = cast(list[str], d.pop("values")) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator.py new file mode 100644 index 00000000..4e4b0282 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator.py @@ -0,0 +1,26 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator = Literal[ + "is", "is_not", "is_not_one_of", "is_one_of" +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type.py new file mode 100644 index 00000000..404f4bbe --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType = Literal["source"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType +] = { + "source", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py new file mode 100644 index 00000000..b5143c9d --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType): The type of the escalation path + rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator): Whether the alert must (or must + not) have related incidents + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type( + d.pop("rule_type") + ) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator( + d.pop("operator") + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator.py new file mode 100644 index 00000000..01c28e7c --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator = Literal["is_not_set", "is_set"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type.py new file mode 100644 index 00000000..84e3acde --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType = Literal["related_incidents"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType +] = { + "related_incidents", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py new file mode 100644 index 00000000..3d985253 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType): The type of the escalation path + rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType + urgency_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + urgency_ids = self.urgency_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "urgency_ids": urgency_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type( + d.pop("rule_type") + ) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type.py new file mode 100644 index 00000000..08916373 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType = Literal["alert_urgency"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType +] = { + "alert_urgency", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py new file mode 100644 index 00000000..a54b05f8 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType): The type of the escalation path + rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType + within_working_hour: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + within_working_hour = self.within_working_hour + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "within_working_hour": within_working_hour, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type( + d.pop("rule_type") + ) + + within_working_hour = d.pop("within_working_hour") + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type.py new file mode 100644 index 00000000..ce787dbe --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType = Literal["working_hour"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType +] = { + "working_hour", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py new file mode 100644 index 00000000..e630006f --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType): The type of the escalation path + rule + json_path (str): JSON path to extract value from payload + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator): How JSON path value should be + matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType + json_path: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + json_path = self.json_path + + operator: str = self.operator + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "json_path": json_path, + "operator": operator, + } + ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type( + d.pop("rule_type") + ) + + json_path = d.pop("json_path") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator( + d.pop("operator") + ) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator.py new file mode 100644 index 00000000..0421cf9b --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type.py new file mode 100644 index 00000000..0764370d --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType = Literal["json_path"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType +] = { + "json_path", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py new file mode 100644 index 00000000..74fc9476 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py @@ -0,0 +1,112 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType): The type of the escalation path + rule + fieldable_type (str): The type of the fieldable (e.g., AlertField) + fieldable_id (str): The ID of the alert field + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator): How the alert field value should + be matched + values (list[str] | Unset): Values to match against + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType + fieldable_type: str + fieldable_id: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + fieldable_type = self.fieldable_type + + fieldable_id = self.fieldable_id + + operator: str = self.operator + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "fieldable_type": fieldable_type, + "fieldable_id": fieldable_id, + "operator": operator, + } + ) + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type( + d.pop("rule_type") + ) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator( + d.pop("operator") + ) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator.py new file mode 100644 index 00000000..b5cb0f97 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_empty", + "is_not", + "is_not_empty", + "is_not_one_of", + "is_one_of", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type.py new file mode 100644 index 00000000..89acf824 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType = Literal["field"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType +] = { + "field", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py new file mode 100644 index 00000000..d9250bc1 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType): The type of the escalation path + rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type( + d.pop("rule_type") + ) + + service_ids = cast(list[str], d.pop("service_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type.py new file mode 100644 index 00000000..56647954 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType = Literal["service"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType +] = { + "service", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py new file mode 100644 index 00000000..6d07b9a8 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType): The type of the escalation path + rule + time_zone (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone): Time zone for the deferral + window + time_blocks (list[UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem]): Time windows + during which alerts are deferred + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType + time_zone: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone + time_blocks: list[UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type( + d.pop("rule_type") + ) + + time_zone = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone( + d.pop("time_zone") + ) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem.from_dict( + time_blocks_item_data + ) + + time_blocks.append(time_blocks_item) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type.py new file mode 100644 index 00000000..fda6f2e2 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType = Literal["deferral_window"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType +] = { + "deferral_window", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py new file mode 100644 index 00000000..31a4c90f --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py @@ -0,0 +1,162 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + all_day = d.pop("all_day", UNSET) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone.py new file mode 100644 index 00000000..df6b5c1c --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Miquelon", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "America/Vancouver", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py new file mode 100644 index 00000000..068ee32b --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType): The type of the escalation path + rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator): How the alert source should be + matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator + values: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "values": values, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type( + d.pop("rule_type") + ) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator( + d.pop("operator") + ) + + values = cast(list[str], d.pop("values")) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator.py new file mode 100644 index 00000000..ea7e5971 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator.py @@ -0,0 +1,26 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator = Literal[ + "is", "is_not", "is_not_one_of", "is_one_of" +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type.py new file mode 100644 index 00000000..fcf6bdc3 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType = Literal["source"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType +] = { + "source", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py new file mode 100644 index 00000000..006cb474 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type, +) + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType): The type of the escalation path + rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator): Whether the alert must (or must + not) have related incidents + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type( + d.pop("rule_type") + ) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator( + d.pop("operator") + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator.py new file mode 100644 index 00000000..285dd52f --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator = Literal["is_not_set", "is_set"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type.py new file mode 100644 index 00000000..042dcc4b --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType = Literal["related_incidents"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType +] = { + "related_incidents", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py index 4641bcfe..c33abf02 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -306,8 +322,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -323,6 +341,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -334,6 +353,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -388,7 +408,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -409,6 +432,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -418,6 +442,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -524,15 +549,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -572,6 +603,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/update_form_field.py b/rootly_sdk/models/update_form_field.py index c25d3344..b525084e 100644 --- a/rootly_sdk/models/update_form_field.py +++ b/rootly_sdk/models/update_form_field.py @@ -24,6 +24,7 @@ class UpdateFormField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_field_data.py b/rootly_sdk/models/update_form_field_data.py index f512b069..2a189305 100644 --- a/rootly_sdk/models/update_form_field_data.py +++ b/rootly_sdk/models/update_form_field_data.py @@ -28,6 +28,7 @@ class UpdateFormFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_field_data_attributes_kind.py b/rootly_sdk/models/update_form_field_data_attributes_kind.py index dc922bde..ba40572f 100644 --- a/rootly_sdk/models/update_form_field_data_attributes_kind.py +++ b/rootly_sdk/models/update_form_field_data_attributes_kind.py @@ -25,6 +25,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", @@ -58,6 +59,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", diff --git a/rootly_sdk/models/update_form_field_option.py b/rootly_sdk/models/update_form_field_option.py index 0ad11b4f..7fa663da 100644 --- a/rootly_sdk/models/update_form_field_option.py +++ b/rootly_sdk/models/update_form_field_option.py @@ -24,6 +24,7 @@ class UpdateFormFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_field_option_data.py b/rootly_sdk/models/update_form_field_option_data.py index cc5bfce6..234bfe54 100644 --- a/rootly_sdk/models/update_form_field_option_data.py +++ b/rootly_sdk/models/update_form_field_option_data.py @@ -31,6 +31,7 @@ class UpdateFormFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_field_placement.py b/rootly_sdk/models/update_form_field_placement.py index 43a5f88e..8d8e18d4 100644 --- a/rootly_sdk/models/update_form_field_placement.py +++ b/rootly_sdk/models/update_form_field_placement.py @@ -24,6 +24,7 @@ class UpdateFormFieldPlacement: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_field_placement_condition.py b/rootly_sdk/models/update_form_field_placement_condition.py index 2f9a4da3..60e1c0a5 100644 --- a/rootly_sdk/models/update_form_field_placement_condition.py +++ b/rootly_sdk/models/update_form_field_placement_condition.py @@ -24,6 +24,7 @@ class UpdateFormFieldPlacementCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_field_placement_condition_data.py b/rootly_sdk/models/update_form_field_placement_condition_data.py index 8ecd9eca..28363a0c 100644 --- a/rootly_sdk/models/update_form_field_placement_condition_data.py +++ b/rootly_sdk/models/update_form_field_placement_condition_data.py @@ -33,6 +33,7 @@ class UpdateFormFieldPlacementConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_field_placement_data.py b/rootly_sdk/models/update_form_field_placement_data.py index fa6336fc..35393803 100644 --- a/rootly_sdk/models/update_form_field_placement_data.py +++ b/rootly_sdk/models/update_form_field_placement_data.py @@ -31,6 +31,7 @@ class UpdateFormFieldPlacementData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_field_position.py b/rootly_sdk/models/update_form_field_position.py index 08767e29..b7f234f1 100644 --- a/rootly_sdk/models/update_form_field_position.py +++ b/rootly_sdk/models/update_form_field_position.py @@ -24,6 +24,7 @@ class UpdateFormFieldPosition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_field_position_data.py b/rootly_sdk/models/update_form_field_position_data.py index 6d2e5dc3..3b9cc75c 100644 --- a/rootly_sdk/models/update_form_field_position_data.py +++ b/rootly_sdk/models/update_form_field_position_data.py @@ -31,6 +31,7 @@ class UpdateFormFieldPositionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_field_position_data_attributes_form.py b/rootly_sdk/models/update_form_field_position_data_attributes_form.py index 4355ad0e..15a3f66a 100644 --- a/rootly_sdk/models/update_form_field_position_data_attributes_form.py +++ b/rootly_sdk/models/update_form_field_position_data_attributes_form.py @@ -2,6 +2,7 @@ UpdateFormFieldPositionDataAttributesForm = Literal[ "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -10,6 +11,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", @@ -22,6 +24,7 @@ UPDATE_FORM_FIELD_POSITION_DATA_ATTRIBUTES_FORM_VALUES: set[UpdateFormFieldPositionDataAttributesForm] = { "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -30,6 +33,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", diff --git a/rootly_sdk/models/update_form_set.py b/rootly_sdk/models/update_form_set.py index 693fa518..5122ef01 100644 --- a/rootly_sdk/models/update_form_set.py +++ b/rootly_sdk/models/update_form_set.py @@ -24,6 +24,7 @@ class UpdateFormSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_set_condition.py b/rootly_sdk/models/update_form_set_condition.py index 6dfd73a1..ccd4d7ee 100644 --- a/rootly_sdk/models/update_form_set_condition.py +++ b/rootly_sdk/models/update_form_set_condition.py @@ -24,6 +24,7 @@ class UpdateFormSetCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_set_condition_data.py b/rootly_sdk/models/update_form_set_condition_data.py index b3db3ad4..83b587c0 100644 --- a/rootly_sdk/models/update_form_set_condition_data.py +++ b/rootly_sdk/models/update_form_set_condition_data.py @@ -31,6 +31,7 @@ class UpdateFormSetConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_set_data.py b/rootly_sdk/models/update_form_set_data.py index ae1032ab..582152a4 100644 --- a/rootly_sdk/models/update_form_set_data.py +++ b/rootly_sdk/models/update_form_set_data.py @@ -28,6 +28,7 @@ class UpdateFormSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_set_data_attributes.py b/rootly_sdk/models/update_form_set_data_attributes.py index 4aa62632..4b67156e 100644 --- a/rootly_sdk/models/update_form_set_data_attributes.py +++ b/rootly_sdk/models/update_form_set_data_attributes.py @@ -21,7 +21,8 @@ class UpdateFormSetDataAttributes: `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, - `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form` + `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`, `google_chat_new_incident_form`, + `google_chat_update_incident_form` """ name: str | Unset = UNSET diff --git a/rootly_sdk/models/update_functionality.py b/rootly_sdk/models/update_functionality.py index edce75cd..556789c0 100644 --- a/rootly_sdk/models/update_functionality.py +++ b/rootly_sdk/models/update_functionality.py @@ -24,6 +24,7 @@ class UpdateFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_functionality_data.py b/rootly_sdk/models/update_functionality_data.py index fb3d4038..53e62f85 100644 --- a/rootly_sdk/models/update_functionality_data.py +++ b/rootly_sdk/models/update_functionality_data.py @@ -28,6 +28,7 @@ class UpdateFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_functionality_data_attributes.py b/rootly_sdk/models/update_functionality_data_attributes.py index 1711ef2d..067bd483 100644 --- a/rootly_sdk/models/update_functionality_data_attributes.py +++ b/rootly_sdk/models/update_functionality_data_attributes.py @@ -44,6 +44,7 @@ class UpdateFunctionalityDataAttributes: service_ids (list[str] | None | Unset): Services associated with this functionality owner_group_ids (list[str] | None | Unset): Owner Teams associated with this functionality owner_user_ids (list[int] | None | Unset): Owner Users associated with this functionality + escalation_policy_id (None | str | Unset): The escalation policy id of the functionality slack_channels (list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this functionality slack_aliases (list[UpdateFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases @@ -69,11 +70,13 @@ class UpdateFunctionalityDataAttributes: service_ids: list[str] | None | Unset = UNSET owner_group_ids: list[str] | None | Unset = UNSET owner_user_ids: list[int] | None | Unset = UNSET + escalation_policy_id: None | str | Unset = UNSET slack_channels: list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset = UNSET slack_aliases: list[UpdateFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET properties: list[UpdateFunctionalityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset @@ -187,6 +190,12 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids + escalation_policy_id: None | str | Unset + if isinstance(self.escalation_policy_id, Unset): + escalation_policy_id = UNSET + else: + escalation_policy_id = self.escalation_policy_id + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET @@ -255,6 +264,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["owner_group_ids"] = owner_group_ids if owner_user_ids is not UNSET: field_dict["owner_user_ids"] = owner_user_ids + if escalation_policy_id is not UNSET: + field_dict["escalation_policy_id"] = escalation_policy_id if slack_channels is not UNSET: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: @@ -463,6 +474,15 @@ def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) + def _parse_escalation_policy_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) + def _parse_slack_channels( data: object, ) -> list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset: @@ -542,6 +562,7 @@ def _parse_slack_aliases( service_ids=service_ids, owner_group_ids=owner_group_ids, owner_user_ids=owner_user_ids, + escalation_policy_id=escalation_policy_id, slack_channels=slack_channels, slack_aliases=slack_aliases, properties=properties, diff --git a/rootly_sdk/models/update_github_issue_task_params.py b/rootly_sdk/models/update_github_issue_task_params.py index ba939888..a6f28436 100644 --- a/rootly_sdk/models/update_github_issue_task_params.py +++ b/rootly_sdk/models/update_github_issue_task_params.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_github_issue_task_params_labels_mode import ( + UpdateGithubIssueTaskParamsLabelsMode, + check_update_github_issue_task_params_labels_mode, +) from ..models.update_github_issue_task_params_task_type import ( UpdateGithubIssueTaskParamsTaskType, check_update_github_issue_task_params_task_type, @@ -34,7 +38,11 @@ class UpdateGithubIssueTaskParams: title (str | Unset): The issue title body (str | Unset): The issue body labels (list[UpdateGithubIssueTaskParamsLabelsItem] | Unset): The issue labels + labels_mode (UpdateGithubIssueTaskParamsLabelsMode | Unset): How to apply labels. 'replace' (default) overwrites + all existing labels. 'append' adds to existing labels without removing them. Default: 'replace'. issue_type (UpdateGithubIssueTaskParamsIssueType | Unset): The issue type + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ issue_id: str @@ -44,10 +52,13 @@ class UpdateGithubIssueTaskParams: title: str | Unset = UNSET body: str | Unset = UNSET labels: list[UpdateGithubIssueTaskParamsLabelsItem] | Unset = UNSET + labels_mode: UpdateGithubIssueTaskParamsLabelsMode | Unset = "replace" issue_type: UpdateGithubIssueTaskParamsIssueType | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + issue_id = self.issue_id completion = self.completion.to_dict() @@ -71,10 +82,20 @@ def to_dict(self) -> dict[str, Any]: labels_item = labels_item_data.to_dict() labels.append(labels_item) + labels_mode: str | Unset = UNSET + if not isinstance(self.labels_mode, Unset): + labels_mode = self.labels_mode + issue_type: dict[str, Any] | Unset = UNSET if not isinstance(self.issue_type, Unset): issue_type = self.issue_type.to_dict() + custom_fields_mapping: None | str | Unset + if isinstance(self.custom_fields_mapping, Unset): + custom_fields_mapping = UNSET + else: + custom_fields_mapping = self.custom_fields_mapping + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -93,8 +114,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["body"] = body if labels is not UNSET: field_dict["labels"] = labels + if labels_mode is not UNSET: + field_dict["labels_mode"] = labels_mode if issue_type is not UNSET: field_dict["issue_type"] = issue_type + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -137,6 +162,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: labels.append(labels_item) + _labels_mode = d.pop("labels_mode", UNSET) + labels_mode: UpdateGithubIssueTaskParamsLabelsMode | Unset + if isinstance(_labels_mode, Unset): + labels_mode = UNSET + else: + labels_mode = check_update_github_issue_task_params_labels_mode(_labels_mode) + _issue_type = d.pop("issue_type", UNSET) issue_type: UpdateGithubIssueTaskParamsIssueType | Unset if isinstance(_issue_type, Unset): @@ -144,6 +176,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: issue_type = UpdateGithubIssueTaskParamsIssueType.from_dict(_issue_type) + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + update_github_issue_task_params = cls( issue_id=issue_id, completion=completion, @@ -152,7 +193,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title=title, body=body, labels=labels, + labels_mode=labels_mode, issue_type=issue_type, + custom_fields_mapping=custom_fields_mapping, ) update_github_issue_task_params.additional_properties = d diff --git a/rootly_sdk/models/update_github_issue_task_params_labels_mode.py b/rootly_sdk/models/update_github_issue_task_params_labels_mode.py new file mode 100644 index 00000000..f304aa5f --- /dev/null +++ b/rootly_sdk/models/update_github_issue_task_params_labels_mode.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +UpdateGithubIssueTaskParamsLabelsMode = Literal["append", "replace"] + +UPDATE_GITHUB_ISSUE_TASK_PARAMS_LABELS_MODE_VALUES: set[UpdateGithubIssueTaskParamsLabelsMode] = { + "append", + "replace", +} + + +def check_update_github_issue_task_params_labels_mode( + value: str | None, +) -> UpdateGithubIssueTaskParamsLabelsMode | None: + if value is None: + return None + if value in UPDATE_GITHUB_ISSUE_TASK_PARAMS_LABELS_MODE_VALUES: + return cast(UpdateGithubIssueTaskParamsLabelsMode, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_GITHUB_ISSUE_TASK_PARAMS_LABELS_MODE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_gitlab_issue_task_params.py b/rootly_sdk/models/update_gitlab_issue_task_params.py index 7261e458..c2fb8168 100644 --- a/rootly_sdk/models/update_gitlab_issue_task_params.py +++ b/rootly_sdk/models/update_gitlab_issue_task_params.py @@ -48,6 +48,7 @@ class UpdateGitlabIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + issue_id = self.issue_id completion = self.completion.to_dict() diff --git a/rootly_sdk/models/update_google_calendar_event_task_params.py b/rootly_sdk/models/update_google_calendar_event_task_params.py index d247ea44..8f019d13 100644 --- a/rootly_sdk/models/update_google_calendar_event_task_params.py +++ b/rootly_sdk/models/update_google_calendar_event_task_params.py @@ -69,6 +69,7 @@ class UpdateGoogleCalendarEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + event_id = self.event_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_google_chat_space_description_task_params.py b/rootly_sdk/models/update_google_chat_space_description_task_params.py new file mode 100644 index 00000000..bf018939 --- /dev/null +++ b/rootly_sdk/models/update_google_chat_space_description_task_params.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_google_chat_space_description_task_params_task_type import ( + UpdateGoogleChatSpaceDescriptionTaskParamsTaskType, + check_update_google_chat_space_description_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_google_chat_space_description_task_params_space import ( + UpdateGoogleChatSpaceDescriptionTaskParamsSpace, + ) + + +T = TypeVar("T", bound="UpdateGoogleChatSpaceDescriptionTaskParams") + + +@_attrs_define +class UpdateGoogleChatSpaceDescriptionTaskParams: + """ + Attributes: + space (UpdateGoogleChatSpaceDescriptionTaskParamsSpace): + description (str): The space description. Supports liquid markup + task_type (UpdateGoogleChatSpaceDescriptionTaskParamsTaskType | Unset): + """ + + space: UpdateGoogleChatSpaceDescriptionTaskParamsSpace + description: str + task_type: UpdateGoogleChatSpaceDescriptionTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + space = self.space.to_dict() + + description = self.description + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "space": space, + "description": description, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_google_chat_space_description_task_params_space import ( + UpdateGoogleChatSpaceDescriptionTaskParamsSpace, + ) + + d = dict(src_dict) + space = UpdateGoogleChatSpaceDescriptionTaskParamsSpace.from_dict(d.pop("space")) + + description = d.pop("description") + + _task_type = d.pop("task_type", UNSET) + task_type: UpdateGoogleChatSpaceDescriptionTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_update_google_chat_space_description_task_params_task_type(_task_type) + + update_google_chat_space_description_task_params = cls( + space=space, + description=description, + task_type=task_type, + ) + + update_google_chat_space_description_task_params.additional_properties = d + return update_google_chat_space_description_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_google_chat_space_description_task_params_space.py b/rootly_sdk/models/update_google_chat_space_description_task_params_space.py new file mode 100644 index 00000000..42c6ff4f --- /dev/null +++ b/rootly_sdk/models/update_google_chat_space_description_task_params_space.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateGoogleChatSpaceDescriptionTaskParamsSpace") + + +@_attrs_define +class UpdateGoogleChatSpaceDescriptionTaskParamsSpace: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + update_google_chat_space_description_task_params_space = cls( + id=id, + name=name, + ) + + update_google_chat_space_description_task_params_space.additional_properties = d + return update_google_chat_space_description_task_params_space + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_google_chat_space_description_task_params_task_type.py b/rootly_sdk/models/update_google_chat_space_description_task_params_task_type.py new file mode 100644 index 00000000..32b9b84a --- /dev/null +++ b/rootly_sdk/models/update_google_chat_space_description_task_params_task_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateGoogleChatSpaceDescriptionTaskParamsTaskType = Literal["update_google_chat_space_description"] + +UPDATE_GOOGLE_CHAT_SPACE_DESCRIPTION_TASK_PARAMS_TASK_TYPE_VALUES: set[ + UpdateGoogleChatSpaceDescriptionTaskParamsTaskType +] = { + "update_google_chat_space_description", +} + + +def check_update_google_chat_space_description_task_params_task_type( + value: str | None, +) -> UpdateGoogleChatSpaceDescriptionTaskParamsTaskType | None: + if value is None: + return None + if value in UPDATE_GOOGLE_CHAT_SPACE_DESCRIPTION_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(UpdateGoogleChatSpaceDescriptionTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_GOOGLE_CHAT_SPACE_DESCRIPTION_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_google_docs_page_task_params.py b/rootly_sdk/models/update_google_docs_page_task_params.py index dda8547d..80b0fe55 100644 --- a/rootly_sdk/models/update_google_docs_page_task_params.py +++ b/rootly_sdk/models/update_google_docs_page_task_params.py @@ -25,6 +25,8 @@ class UpdateGoogleDocsPageTaskParams: content (str | Unset): The Google Doc content post_mortem_template_id (str | Unset): Retrospective template to use when updating page, if desired template_id (str | Unset): The Google Doc file ID to use as a template. + include_overview (bool | Unset): Default: True. + include_timeline (bool | Unset): Default: True. """ file_id: str @@ -33,6 +35,8 @@ class UpdateGoogleDocsPageTaskParams: content: str | Unset = UNSET post_mortem_template_id: str | Unset = UNSET template_id: str | Unset = UNSET + include_overview: bool | Unset = True + include_timeline: bool | Unset = True additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,6 +54,10 @@ def to_dict(self) -> dict[str, Any]: template_id = self.template_id + include_overview = self.include_overview + + include_timeline = self.include_timeline + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -67,6 +75,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["post_mortem_template_id"] = post_mortem_template_id if template_id is not UNSET: field_dict["template_id"] = template_id + if include_overview is not UNSET: + field_dict["include_overview"] = include_overview + if include_timeline is not UNSET: + field_dict["include_timeline"] = include_timeline return field_dict @@ -90,6 +102,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: template_id = d.pop("template_id", UNSET) + include_overview = d.pop("include_overview", UNSET) + + include_timeline = d.pop("include_timeline", UNSET) + update_google_docs_page_task_params = cls( file_id=file_id, task_type=task_type, @@ -97,6 +113,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content=content, post_mortem_template_id=post_mortem_template_id, template_id=template_id, + include_overview=include_overview, + include_timeline=include_timeline, ) update_google_docs_page_task_params.additional_properties = d diff --git a/rootly_sdk/models/update_heartbeat.py b/rootly_sdk/models/update_heartbeat.py index 6dd22e4b..165a23ee 100644 --- a/rootly_sdk/models/update_heartbeat.py +++ b/rootly_sdk/models/update_heartbeat.py @@ -24,6 +24,7 @@ class UpdateHeartbeat: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_heartbeat_data.py b/rootly_sdk/models/update_heartbeat_data.py index 4d53bae8..f068e428 100644 --- a/rootly_sdk/models/update_heartbeat_data.py +++ b/rootly_sdk/models/update_heartbeat_data.py @@ -28,6 +28,7 @@ class UpdateHeartbeatData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_heartbeat_data_attributes.py b/rootly_sdk/models/update_heartbeat_data_attributes.py index e9d622cc..6b0b4180 100644 --- a/rootly_sdk/models/update_heartbeat_data_attributes.py +++ b/rootly_sdk/models/update_heartbeat_data_attributes.py @@ -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. """ @@ -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]: @@ -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] = {} @@ -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 @@ -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( @@ -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, ) diff --git a/rootly_sdk/models/update_incident.py b/rootly_sdk/models/update_incident.py index c828a305..7f3dc16e 100644 --- a/rootly_sdk/models/update_incident.py +++ b/rootly_sdk/models/update_incident.py @@ -24,6 +24,7 @@ class UpdateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_action_item.py b/rootly_sdk/models/update_incident_action_item.py index 6c08a393..b2746244 100644 --- a/rootly_sdk/models/update_incident_action_item.py +++ b/rootly_sdk/models/update_incident_action_item.py @@ -24,6 +24,7 @@ class UpdateIncidentActionItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_action_item_data.py b/rootly_sdk/models/update_incident_action_item_data.py index 3ba8f526..ca8096f5 100644 --- a/rootly_sdk/models/update_incident_action_item_data.py +++ b/rootly_sdk/models/update_incident_action_item_data.py @@ -31,6 +31,7 @@ class UpdateIncidentActionItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_action_item_data_attributes.py b/rootly_sdk/models/update_incident_action_item_data_attributes.py index e6ae6bd6..076174eb 100644 --- a/rootly_sdk/models/update_incident_action_item_data_attributes.py +++ b/rootly_sdk/models/update_incident_action_item_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -19,6 +19,12 @@ ) from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + + T = TypeVar("T", bound="UpdateIncidentActionItemDataAttributes") @@ -37,6 +43,9 @@ class UpdateIncidentActionItemDataAttributes: jira_issue_id (None | str | Unset): The Jira issue ID. jira_issue_key (None | str | Unset): The Jira issue key. jira_issue_url (None | str | Unset): The Jira issue URL. + form_field_selections (list[UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset): + Custom field values to set on the action item. Ignored unless custom fields for action items are enabled for the + organization. """ summary: str | Unset = UNSET @@ -50,8 +59,12 @@ class UpdateIncidentActionItemDataAttributes: jira_issue_id: None | str | Unset = UNSET jira_issue_key: None | str | Unset = UNSET jira_issue_url: None | str | Unset = UNSET + form_field_selections: list[UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset = ( + UNSET + ) def to_dict(self) -> dict[str, Any]: + summary = self.summary description: None | str | Unset @@ -111,6 +124,18 @@ def to_dict(self) -> dict[str, Any]: else: jira_issue_url = self.jira_issue_url + form_field_selections: list[dict[str, Any]] | None | Unset + if isinstance(self.form_field_selections, Unset): + form_field_selections = UNSET + elif isinstance(self.form_field_selections, list): + form_field_selections = [] + for form_field_selections_type_0_item_data in self.form_field_selections: + form_field_selections_type_0_item = form_field_selections_type_0_item_data.to_dict() + form_field_selections.append(form_field_selections_type_0_item) + + else: + form_field_selections = self.form_field_selections + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -136,11 +161,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["jira_issue_key"] = jira_issue_key if jira_issue_url is not UNSET: field_dict["jira_issue_url"] = jira_issue_url + if form_field_selections is not UNSET: + field_dict["form_field_selections"] = form_field_selections return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + d = dict(src_dict) summary = d.pop("summary", UNSET) @@ -236,6 +267,34 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) + def _parse_form_field_selections( + data: object, + ) -> list[UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + form_field_selections_type_0 = [] + _form_field_selections_type_0 = data + for form_field_selections_type_0_item_data in _form_field_selections_type_0: + form_field_selections_type_0_item = ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item.from_dict( + form_field_selections_type_0_item_data + ) + ) + + form_field_selections_type_0.append(form_field_selections_type_0_item) + + return form_field_selections_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset, data) + + form_field_selections = _parse_form_field_selections(d.pop("form_field_selections", UNSET)) + update_incident_action_item_data_attributes = cls( summary=summary, description=description, @@ -248,6 +307,7 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_id=jira_issue_id, jira_issue_key=jira_issue_key, jira_issue_url=jira_issue_url, + form_field_selections=form_field_selections, ) return update_incident_action_item_data_attributes diff --git a/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py b/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py new file mode 100644 index 00000000..95df1e5a --- /dev/null +++ b/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py @@ -0,0 +1,204 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item") + + +@_attrs_define +class UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item: + """ + Attributes: + form_field_id (str): ID of the custom field + id (str | Unset): ID of an existing selection. Required when updating or removing a field's existing value. + value (list[str] | None | str | Unset): Value for text, textarea, rich text, date, datetime, number, checkbox, + or tag fields + selected_option_ids (list[str] | Unset): IDs of the selected custom field options + selected_user_ids (list[int] | Unset): IDs of the selected users + selected_group_ids (list[str] | Unset): IDs of the selected teams + selected_service_ids (list[str] | Unset): IDs of the selected services + selected_functionality_ids (list[str] | Unset): IDs of the selected functionalities + selected_catalog_entity_ids (list[str] | Unset): IDs of the selected catalog entities + selected_environment_ids (list[str] | Unset): IDs of the selected environments + selected_cause_ids (list[str] | Unset): IDs of the selected causes + selected_incident_type_ids (list[str] | Unset): IDs of the selected incident types + field_destroy (bool | None | Unset): Set to true to remove the field's value from the action item + """ + + form_field_id: str + id: str | Unset = UNSET + value: list[str] | None | str | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET + field_destroy: bool | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + form_field_id = self.form_field_id + + id = self.id + + value: list[str] | None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + elif isinstance(self.value, list): + value = self.value + + else: + value = self.value + + selected_option_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_option_ids, Unset): + selected_option_ids = self.selected_option_ids + + selected_user_ids: list[int] | Unset = UNSET + if not isinstance(self.selected_user_ids, Unset): + selected_user_ids = self.selected_user_ids + + selected_group_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_group_ids, Unset): + selected_group_ids = self.selected_group_ids + + selected_service_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_service_ids, Unset): + selected_service_ids = self.selected_service_ids + + selected_functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + selected_catalog_entity_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_catalog_entity_ids, Unset): + selected_catalog_entity_ids = self.selected_catalog_entity_ids + + selected_environment_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + selected_cause_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_cause_ids, Unset): + selected_cause_ids = self.selected_cause_ids + + selected_incident_type_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_incident_type_ids, Unset): + selected_incident_type_ids = self.selected_incident_type_ids + + field_destroy: bool | None | Unset + if isinstance(self.field_destroy, Unset): + field_destroy = UNSET + else: + field_destroy = self.field_destroy + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "form_field_id": form_field_id, + } + ) + if id is not UNSET: + field_dict["id"] = id + if value is not UNSET: + field_dict["value"] = value + if selected_option_ids is not UNSET: + field_dict["selected_option_ids"] = selected_option_ids + if selected_user_ids is not UNSET: + field_dict["selected_user_ids"] = selected_user_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_catalog_entity_ids is not UNSET: + field_dict["selected_catalog_entity_ids"] = selected_catalog_entity_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + if field_destroy is not UNSET: + field_dict["_destroy"] = field_destroy + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + form_field_id = d.pop("form_field_id") + + id = d.pop("id", UNSET) + + def _parse_value(data: object) -> list[str] | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + value_type_1 = cast(list[str], data) + + return value_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids", UNSET)) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + def _parse_field_destroy(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + field_destroy = _parse_field_destroy(d.pop("_destroy", UNSET)) + + update_incident_action_item_data_attributes_form_field_selections_type_0_item = cls( + form_field_id=form_field_id, + id=id, + value=value, + selected_option_ids=selected_option_ids, + selected_user_ids=selected_user_ids, + selected_group_ids=selected_group_ids, + selected_service_ids=selected_service_ids, + selected_functionality_ids=selected_functionality_ids, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_environment_ids=selected_environment_ids, + selected_cause_ids=selected_cause_ids, + selected_incident_type_ids=selected_incident_type_ids, + field_destroy=field_destroy, + ) + + return update_incident_action_item_data_attributes_form_field_selections_type_0_item diff --git a/rootly_sdk/models/update_incident_custom_field_selection.py b/rootly_sdk/models/update_incident_custom_field_selection.py index ef1e2eb9..9aa40a6f 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection.py +++ b/rootly_sdk/models/update_incident_custom_field_selection.py @@ -24,6 +24,7 @@ class UpdateIncidentCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_custom_field_selection_data.py b/rootly_sdk/models/update_incident_custom_field_selection_data.py index 80553b9b..365c90ba 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection_data.py +++ b/rootly_sdk/models/update_incident_custom_field_selection_data.py @@ -33,6 +33,7 @@ class UpdateIncidentCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_data.py b/rootly_sdk/models/update_incident_data.py index 6281026a..79df36e1 100644 --- a/rootly_sdk/models/update_incident_data.py +++ b/rootly_sdk/models/update_incident_data.py @@ -28,6 +28,7 @@ class UpdateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_event.py b/rootly_sdk/models/update_incident_event.py index 10c6307f..4cb04a10 100644 --- a/rootly_sdk/models/update_incident_event.py +++ b/rootly_sdk/models/update_incident_event.py @@ -24,6 +24,7 @@ class UpdateIncidentEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_event_data.py b/rootly_sdk/models/update_incident_event_data.py index 0c2e4971..ee5cbb73 100644 --- a/rootly_sdk/models/update_incident_event_data.py +++ b/rootly_sdk/models/update_incident_event_data.py @@ -28,6 +28,7 @@ class UpdateIncidentEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_event_functionality.py b/rootly_sdk/models/update_incident_event_functionality.py index 4deb6dda..b7d3a6e7 100644 --- a/rootly_sdk/models/update_incident_event_functionality.py +++ b/rootly_sdk/models/update_incident_event_functionality.py @@ -24,6 +24,7 @@ class UpdateIncidentEventFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_event_functionality_data.py b/rootly_sdk/models/update_incident_event_functionality_data.py index cf85c901..db851cd6 100644 --- a/rootly_sdk/models/update_incident_event_functionality_data.py +++ b/rootly_sdk/models/update_incident_event_functionality_data.py @@ -33,6 +33,7 @@ class UpdateIncidentEventFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_event_service.py b/rootly_sdk/models/update_incident_event_service.py index 23c734b4..89e922a7 100644 --- a/rootly_sdk/models/update_incident_event_service.py +++ b/rootly_sdk/models/update_incident_event_service.py @@ -24,6 +24,7 @@ class UpdateIncidentEventService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_event_service_data.py b/rootly_sdk/models/update_incident_event_service_data.py index 1ea0d258..df92c39e 100644 --- a/rootly_sdk/models/update_incident_event_service_data.py +++ b/rootly_sdk/models/update_incident_event_service_data.py @@ -31,6 +31,7 @@ class UpdateIncidentEventServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_feedback.py b/rootly_sdk/models/update_incident_feedback.py index 14ffe711..ed194100 100644 --- a/rootly_sdk/models/update_incident_feedback.py +++ b/rootly_sdk/models/update_incident_feedback.py @@ -24,6 +24,7 @@ class UpdateIncidentFeedback: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_feedback_data.py b/rootly_sdk/models/update_incident_feedback_data.py index fcb15b1a..540185bc 100644 --- a/rootly_sdk/models/update_incident_feedback_data.py +++ b/rootly_sdk/models/update_incident_feedback_data.py @@ -31,6 +31,7 @@ class UpdateIncidentFeedbackData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_form_field_selection.py b/rootly_sdk/models/update_incident_form_field_selection.py index 618bdb8b..c6ad6546 100644 --- a/rootly_sdk/models/update_incident_form_field_selection.py +++ b/rootly_sdk/models/update_incident_form_field_selection.py @@ -24,6 +24,7 @@ class UpdateIncidentFormFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_form_field_selection_data.py b/rootly_sdk/models/update_incident_form_field_selection_data.py index 45e73e78..0c574ed7 100644 --- a/rootly_sdk/models/update_incident_form_field_selection_data.py +++ b/rootly_sdk/models/update_incident_form_field_selection_data.py @@ -33,6 +33,7 @@ class UpdateIncidentFormFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_permission_set.py b/rootly_sdk/models/update_incident_permission_set.py index 01646aa5..0e8ae576 100644 --- a/rootly_sdk/models/update_incident_permission_set.py +++ b/rootly_sdk/models/update_incident_permission_set.py @@ -24,6 +24,7 @@ class UpdateIncidentPermissionSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_permission_set_boolean.py b/rootly_sdk/models/update_incident_permission_set_boolean.py index 6ae0bfb3..8f25c582 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean.py @@ -24,6 +24,7 @@ class UpdateIncidentPermissionSetBoolean: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_permission_set_boolean_data.py b/rootly_sdk/models/update_incident_permission_set_boolean_data.py index 653d35ca..ea07346a 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean_data.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean_data.py @@ -33,6 +33,7 @@ class UpdateIncidentPermissionSetBooleanData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes.py b/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes.py index 51bc6a2a..56e4c01d 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes.py @@ -36,6 +36,7 @@ class UpdateIncidentPermissionSetBooleanDataAttributes: severity_params: UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind diff --git a/rootly_sdk/models/update_incident_permission_set_data.py b/rootly_sdk/models/update_incident_permission_set_data.py index 0b59cba4..df6b990a 100644 --- a/rootly_sdk/models/update_incident_permission_set_data.py +++ b/rootly_sdk/models/update_incident_permission_set_data.py @@ -31,6 +31,7 @@ class UpdateIncidentPermissionSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_permission_set_resource.py b/rootly_sdk/models/update_incident_permission_set_resource.py index 6d8dbb88..954a62ce 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource.py +++ b/rootly_sdk/models/update_incident_permission_set_resource.py @@ -24,6 +24,7 @@ class UpdateIncidentPermissionSetResource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_permission_set_resource_data.py b/rootly_sdk/models/update_incident_permission_set_resource_data.py index 23a5d8fc..083c9a1b 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource_data.py +++ b/rootly_sdk/models/update_incident_permission_set_resource_data.py @@ -33,6 +33,7 @@ class UpdateIncidentPermissionSetResourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_permission_set_resource_data_attributes.py b/rootly_sdk/models/update_incident_permission_set_resource_data_attributes.py index f47741a6..4a4b6196 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource_data_attributes.py +++ b/rootly_sdk/models/update_incident_permission_set_resource_data_attributes.py @@ -38,6 +38,7 @@ class UpdateIncidentPermissionSetResourceDataAttributes: severity_params: UpdateIncidentPermissionSetResourceDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind diff --git a/rootly_sdk/models/update_incident_post_mortem.py b/rootly_sdk/models/update_incident_post_mortem.py index 8e6878f2..e5b9b00c 100644 --- a/rootly_sdk/models/update_incident_post_mortem.py +++ b/rootly_sdk/models/update_incident_post_mortem.py @@ -24,6 +24,7 @@ class UpdateIncidentPostMortem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_post_mortem_data.py b/rootly_sdk/models/update_incident_post_mortem_data.py index 5db885c3..c37ff215 100644 --- a/rootly_sdk/models/update_incident_post_mortem_data.py +++ b/rootly_sdk/models/update_incident_post_mortem_data.py @@ -31,6 +31,7 @@ class UpdateIncidentPostMortemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_retrospective_step.py b/rootly_sdk/models/update_incident_retrospective_step.py index 995c4650..568fd4f2 100644 --- a/rootly_sdk/models/update_incident_retrospective_step.py +++ b/rootly_sdk/models/update_incident_retrospective_step.py @@ -24,6 +24,7 @@ class UpdateIncidentRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_retrospective_step_data.py b/rootly_sdk/models/update_incident_retrospective_step_data.py index 86de0c1f..8a5b5a0e 100644 --- a/rootly_sdk/models/update_incident_retrospective_step_data.py +++ b/rootly_sdk/models/update_incident_retrospective_step_data.py @@ -33,6 +33,7 @@ class UpdateIncidentRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_role.py b/rootly_sdk/models/update_incident_role.py index def8f62b..aa1178fc 100644 --- a/rootly_sdk/models/update_incident_role.py +++ b/rootly_sdk/models/update_incident_role.py @@ -24,6 +24,7 @@ class UpdateIncidentRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_role_data.py b/rootly_sdk/models/update_incident_role_data.py index ceacc331..f5dc593f 100644 --- a/rootly_sdk/models/update_incident_role_data.py +++ b/rootly_sdk/models/update_incident_role_data.py @@ -28,6 +28,7 @@ class UpdateIncidentRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_role_task.py b/rootly_sdk/models/update_incident_role_task.py index 74a9c2ef..75837e60 100644 --- a/rootly_sdk/models/update_incident_role_task.py +++ b/rootly_sdk/models/update_incident_role_task.py @@ -24,6 +24,7 @@ class UpdateIncidentRoleTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_role_task_data.py b/rootly_sdk/models/update_incident_role_task_data.py index 3ab56f62..8d6727b8 100644 --- a/rootly_sdk/models/update_incident_role_task_data.py +++ b/rootly_sdk/models/update_incident_role_task_data.py @@ -31,6 +31,7 @@ class UpdateIncidentRoleTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_status_page_event.py b/rootly_sdk/models/update_incident_status_page_event.py index 8a46a60d..e46300cd 100644 --- a/rootly_sdk/models/update_incident_status_page_event.py +++ b/rootly_sdk/models/update_incident_status_page_event.py @@ -24,6 +24,7 @@ class UpdateIncidentStatusPageEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_status_page_event_data.py b/rootly_sdk/models/update_incident_status_page_event_data.py index d0aaae07..20277191 100644 --- a/rootly_sdk/models/update_incident_status_page_event_data.py +++ b/rootly_sdk/models/update_incident_status_page_event_data.py @@ -31,6 +31,7 @@ class UpdateIncidentStatusPageEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_status_page_event_data_attributes.py b/rootly_sdk/models/update_incident_status_page_event_data_attributes.py index 9fd6247f..428524d0 100644 --- a/rootly_sdk/models/update_incident_status_page_event_data_attributes.py +++ b/rootly_sdk/models/update_incident_status_page_event_data_attributes.py @@ -1,9 +1,11 @@ from __future__ import annotations +import datetime from collections.abc import Mapping from typing import Any, TypeVar, cast from attrs import define as _attrs_define +from dateutil.parser import isoparse from ..models.update_incident_status_page_event_data_attributes_status import ( UpdateIncidentStatusPageEventDataAttributesStatus, @@ -24,6 +26,7 @@ class UpdateIncidentStatusPageEventDataAttributes: notify_subscribers (bool | None | Unset): Notify all status pages subscribers Default: False. should_tweet (bool | None | Unset): For Statuspage.io integrated pages auto publishes a tweet for your update Default: False. + started_at (datetime.datetime | None | Unset): When the event started. """ event: str | Unset = UNSET @@ -31,6 +34,7 @@ class UpdateIncidentStatusPageEventDataAttributes: status: UpdateIncidentStatusPageEventDataAttributesStatus | Unset = UNSET notify_subscribers: bool | None | Unset = False should_tweet: bool | None | Unset = False + started_at: datetime.datetime | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: event = self.event @@ -53,6 +57,14 @@ def to_dict(self) -> dict[str, Any]: else: should_tweet = self.should_tweet + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): + started_at = self.started_at.isoformat() + else: + started_at = self.started_at + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -66,6 +78,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["notify_subscribers"] = notify_subscribers if should_tweet is not UNSET: field_dict["should_tweet"] = should_tweet + if started_at is not UNSET: + field_dict["started_at"] = started_at return field_dict @@ -101,12 +115,30 @@ def _parse_should_tweet(data: object) -> bool | None | Unset: should_tweet = _parse_should_tweet(d.pop("should_tweet", UNSET)) + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + update_incident_status_page_event_data_attributes = cls( event=event, status_page_id=status_page_id, status=status, notify_subscribers=notify_subscribers, should_tweet=should_tweet, + started_at=started_at, ) return update_incident_status_page_event_data_attributes diff --git a/rootly_sdk/models/update_incident_sub_status.py b/rootly_sdk/models/update_incident_sub_status.py index c78415a3..edbfd091 100644 --- a/rootly_sdk/models/update_incident_sub_status.py +++ b/rootly_sdk/models/update_incident_sub_status.py @@ -24,6 +24,7 @@ class UpdateIncidentSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_sub_status_data.py b/rootly_sdk/models/update_incident_sub_status_data.py index 3ec4d4a2..cf6a906f 100644 --- a/rootly_sdk/models/update_incident_sub_status_data.py +++ b/rootly_sdk/models/update_incident_sub_status_data.py @@ -31,6 +31,7 @@ class UpdateIncidentSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_type.py b/rootly_sdk/models/update_incident_type.py index 0afb154c..8438b01e 100644 --- a/rootly_sdk/models/update_incident_type.py +++ b/rootly_sdk/models/update_incident_type.py @@ -24,6 +24,7 @@ class UpdateIncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_type_data.py b/rootly_sdk/models/update_incident_type_data.py index a5b901e9..5cde01d3 100644 --- a/rootly_sdk/models/update_incident_type_data.py +++ b/rootly_sdk/models/update_incident_type_data.py @@ -28,6 +28,7 @@ class UpdateIncidentTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_type_data_attributes.py b/rootly_sdk/models/update_incident_type_data_attributes.py index 1330e5e2..20fabf5e 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes.py +++ b/rootly_sdk/models/update_incident_type_data_attributes.py @@ -49,6 +49,7 @@ class UpdateIncidentTypeDataAttributes: properties: list[UpdateIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_jira_issue_task_params.py b/rootly_sdk/models/update_jira_issue_task_params.py index e31d15c1..e4ae6cf7 100644 --- a/rootly_sdk/models/update_jira_issue_task_params.py +++ b/rootly_sdk/models/update_jira_issue_task_params.py @@ -13,6 +13,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration from ..models.update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority from ..models.update_jira_issue_task_params_status import UpdateJiraIssueTaskParamsStatus @@ -27,6 +28,8 @@ class UpdateJiraIssueTaskParams: issue_id (str): The issue id project_key (str): The project key task_type (UpdateJiraIssueTaskParamsTaskType | Unset): + integration (UpdateJiraIssueTaskParamsIntegration | Unset): Specify integration id if you have more than one + Jira instance title (str | Unset): The issue title description (str | Unset): The issue description labels (str | Unset): The issue labels @@ -43,6 +46,7 @@ class UpdateJiraIssueTaskParams: issue_id: str project_key: str task_type: UpdateJiraIssueTaskParamsTaskType | Unset = UNSET + integration: UpdateJiraIssueTaskParamsIntegration | Unset = UNSET title: str | Unset = UNSET description: str | Unset = UNSET labels: str | Unset = UNSET @@ -56,6 +60,7 @@ class UpdateJiraIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + issue_id = self.issue_id project_key = self.project_key @@ -64,6 +69,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.task_type, Unset): task_type = self.task_type + integration: dict[str, Any] | Unset = UNSET + if not isinstance(self.integration, Unset): + integration = self.integration.to_dict() + title = self.title description = self.description @@ -106,6 +115,8 @@ def to_dict(self) -> dict[str, Any]: ) if task_type is not UNSET: field_dict["task_type"] = task_type + if integration is not UNSET: + field_dict["integration"] = integration if title is not UNSET: field_dict["title"] = title if description is not UNSET: @@ -131,6 +142,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration from ..models.update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority from ..models.update_jira_issue_task_params_status import UpdateJiraIssueTaskParamsStatus @@ -146,6 +158,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: task_type = check_update_jira_issue_task_params_task_type(_task_type) + _integration = d.pop("integration", UNSET) + integration: UpdateJiraIssueTaskParamsIntegration | Unset + if isinstance(_integration, Unset): + integration = UNSET + else: + integration = UpdateJiraIssueTaskParamsIntegration.from_dict(_integration) + title = d.pop("title", UNSET) description = d.pop("description", UNSET) @@ -194,6 +213,7 @@ def _parse_update_payload(data: object) -> None | str | Unset: issue_id=issue_id, project_key=project_key, task_type=task_type, + integration=integration, title=title, description=description, labels=labels, diff --git a/rootly_sdk/models/update_jira_issue_task_params_integration.py b/rootly_sdk/models/update_jira_issue_task_params_integration.py new file mode 100644 index 00000000..1e6f0b85 --- /dev/null +++ b/rootly_sdk/models/update_jira_issue_task_params_integration.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateJiraIssueTaskParamsIntegration") + + +@_attrs_define +class UpdateJiraIssueTaskParamsIntegration: + """Specify integration id if you have more than one Jira instance + + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + update_jira_issue_task_params_integration = cls( + id=id, + name=name, + ) + + update_jira_issue_task_params_integration.additional_properties = d + return update_jira_issue_task_params_integration + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_linear_issue_task_params.py b/rootly_sdk/models/update_linear_issue_task_params.py index 38885133..555aca6c 100644 --- a/rootly_sdk/models/update_linear_issue_task_params.py +++ b/rootly_sdk/models/update_linear_issue_task_params.py @@ -35,6 +35,8 @@ class UpdateLinearIssueTaskParams: labels (list[UpdateLinearIssueTaskParamsLabelsItem] | Unset): priority (UpdateLinearIssueTaskParamsPriority | Unset): The priority id and display name assign_user_email (str | Unset): The assigned user's email + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ issue_id: str @@ -46,6 +48,7 @@ class UpdateLinearIssueTaskParams: labels: list[UpdateLinearIssueTaskParamsLabelsItem] | Unset = UNSET priority: UpdateLinearIssueTaskParamsPriority | Unset = UNSET assign_user_email: str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -86,6 +89,12 @@ def to_dict(self) -> dict[str, Any]: assign_user_email = self.assign_user_email + custom_fields_mapping: None | str | Unset + if isinstance(self.custom_fields_mapping, Unset): + custom_fields_mapping = UNSET + else: + custom_fields_mapping = self.custom_fields_mapping + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -109,6 +118,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["priority"] = priority if assign_user_email is not UNSET: field_dict["assign_user_email"] = assign_user_email + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -175,6 +186,15 @@ def _parse_state(data: object) -> None | Unset | UpdateLinearIssueTaskParamsStat assign_user_email = d.pop("assign_user_email", UNSET) + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + update_linear_issue_task_params = cls( issue_id=issue_id, task_type=task_type, @@ -185,6 +205,7 @@ def _parse_state(data: object) -> None | Unset | UpdateLinearIssueTaskParamsStat labels=labels, priority=priority, assign_user_email=assign_user_email, + custom_fields_mapping=custom_fields_mapping, ) update_linear_issue_task_params.additional_properties = d diff --git a/rootly_sdk/models/update_live_call_router.py b/rootly_sdk/models/update_live_call_router.py index ec0c1cb7..d9316b3a 100644 --- a/rootly_sdk/models/update_live_call_router.py +++ b/rootly_sdk/models/update_live_call_router.py @@ -24,6 +24,7 @@ class UpdateLiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_live_call_router_data.py b/rootly_sdk/models/update_live_call_router_data.py index f0abf0c8..648e051f 100644 --- a/rootly_sdk/models/update_live_call_router_data.py +++ b/rootly_sdk/models/update_live_call_router_data.py @@ -31,6 +31,7 @@ class UpdateLiveCallRouterData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_live_call_router_data_attributes.py b/rootly_sdk/models/update_live_call_router_data_attributes.py index b2ad7f3c..c84e7ad7 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -46,6 +46,8 @@ class UpdateLiveCallRouterDataAttributes: phone_type (UpdateLiveCallRouterDataAttributesPhoneType | Unset): The phone type of the live_call_router voicemail_greeting (str | Unset): The voicemail greeting of the live_call_router caller_greeting (str | Unset): The caller greeting message of the live_call_router + unavailable_responder_message (None | str | Unset): The message played to the caller when a responder doesn't + answer and the call moves on to the next person in the escalation. Leave blank to use the default message. waiting_music_url (UpdateLiveCallRouterDataAttributesWaitingMusicUrl | Unset): The waiting music URL of the live_call_router sent_to_voicemail_delay (int | Unset): The delay (seconds) after which the caller in redirected to voicemail @@ -53,6 +55,11 @@ class UpdateLiveCallRouterDataAttributes: live escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels + notify_via_sms (bool | Unset): Whether responders are also notified via SMS when this router pages them + notify_via_push_notification (bool | Unset): Whether responders are also notified via push notification when + this router pages them + informational_notification_message (None | str | Unset): Optional message included in the SMS/push notification. + Supports variables such as {{ alert.url }}, {{ alert.data.* }}, and {{ alert.alert_urgency.name }}. alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page calling_tree_enabled (bool | Unset): Whether the live call router is configured as a phone tree, requiring callers to press a key before being connected @@ -70,11 +77,15 @@ class UpdateLiveCallRouterDataAttributes: phone_type: UpdateLiveCallRouterDataAttributesPhoneType | Unset = UNSET voicemail_greeting: str | Unset = UNSET caller_greeting: str | Unset = UNSET + unavailable_responder_message: None | str | Unset = UNSET waiting_music_url: UpdateLiveCallRouterDataAttributesWaitingMusicUrl | Unset = UNSET sent_to_voicemail_delay: int | Unset = UNSET should_redirect_to_voicemail_on_no_answer: bool | Unset = UNSET escalation_level_delay_in_seconds: int | Unset = UNSET should_auto_resolve_alert_on_call_end: bool | Unset = UNSET + notify_via_sms: bool | Unset = UNSET + notify_via_push_notification: bool | Unset = UNSET + informational_notification_message: None | str | Unset = UNSET alert_urgency_id: str | Unset = UNSET calling_tree_enabled: bool | Unset = UNSET calling_tree_prompt: str | Unset = UNSET @@ -82,6 +93,7 @@ class UpdateLiveCallRouterDataAttributes: escalation_policy_trigger_params: UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -102,6 +114,12 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting + unavailable_responder_message: None | str | Unset + if isinstance(self.unavailable_responder_message, Unset): + unavailable_responder_message = UNSET + else: + unavailable_responder_message = self.unavailable_responder_message + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -114,6 +132,16 @@ def to_dict(self) -> dict[str, Any]: should_auto_resolve_alert_on_call_end = self.should_auto_resolve_alert_on_call_end + notify_via_sms = self.notify_via_sms + + notify_via_push_notification = self.notify_via_push_notification + + informational_notification_message: None | str | Unset + if isinstance(self.informational_notification_message, Unset): + informational_notification_message = UNSET + else: + informational_notification_message = self.informational_notification_message + alert_urgency_id = self.alert_urgency_id calling_tree_enabled = self.calling_tree_enabled @@ -148,6 +176,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["voicemail_greeting"] = voicemail_greeting if caller_greeting is not UNSET: field_dict["caller_greeting"] = caller_greeting + if unavailable_responder_message is not UNSET: + field_dict["unavailable_responder_message"] = unavailable_responder_message if waiting_music_url is not UNSET: field_dict["waiting_music_url"] = waiting_music_url if sent_to_voicemail_delay is not UNSET: @@ -158,6 +188,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["escalation_level_delay_in_seconds"] = escalation_level_delay_in_seconds if should_auto_resolve_alert_on_call_end is not UNSET: field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end + if notify_via_sms is not UNSET: + field_dict["notify_via_sms"] = notify_via_sms + if notify_via_push_notification is not UNSET: + field_dict["notify_via_push_notification"] = notify_via_push_notification + if informational_notification_message is not UNSET: + field_dict["informational_notification_message"] = informational_notification_message if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id if calling_tree_enabled is not UNSET: @@ -210,6 +246,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) + def _parse_unavailable_responder_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + unavailable_responder_message = _parse_unavailable_responder_message( + d.pop("unavailable_responder_message", UNSET) + ) + _waiting_music_url = d.pop("waiting_music_url", UNSET) waiting_music_url: UpdateLiveCallRouterDataAttributesWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): @@ -225,6 +272,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: should_auto_resolve_alert_on_call_end = d.pop("should_auto_resolve_alert_on_call_end", UNSET) + notify_via_sms = d.pop("notify_via_sms", UNSET) + + notify_via_push_notification = d.pop("notify_via_push_notification", UNSET) + + def _parse_informational_notification_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + informational_notification_message = _parse_informational_notification_message( + d.pop("informational_notification_message", UNSET) + ) + alert_urgency_id = d.pop("alert_urgency_id", UNSET) calling_tree_enabled = d.pop("calling_tree_enabled", UNSET) @@ -261,11 +323,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: phone_type=phone_type, voicemail_greeting=voicemail_greeting, caller_greeting=caller_greeting, + unavailable_responder_message=unavailable_responder_message, waiting_music_url=waiting_music_url, sent_to_voicemail_delay=sent_to_voicemail_delay, should_redirect_to_voicemail_on_no_answer=should_redirect_to_voicemail_on_no_answer, escalation_level_delay_in_seconds=escalation_level_delay_in_seconds, should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end, + notify_via_sms=notify_via_sms, + notify_via_push_notification=notify_via_push_notification, + informational_notification_message=informational_notification_message, alert_urgency_id=alert_urgency_id, calling_tree_enabled=calling_tree_enabled, calling_tree_prompt=calling_tree_prompt, diff --git a/rootly_sdk/models/update_live_call_router_data_attributes_country_code.py b/rootly_sdk/models/update_live_call_router_data_attributes_country_code.py index b8093f2e..fc1faf8b 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes_country_code.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes_country_code.py @@ -1,10 +1,11 @@ from typing import Literal, cast -UpdateLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] +UpdateLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "CH", "DE", "GB", "NL", "NZ", "SE", "US"] UPDATE_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_COUNTRY_CODE_VALUES: set[UpdateLiveCallRouterDataAttributesCountryCode] = { "AU", "CA", + "CH", "DE", "GB", "NL", diff --git a/rootly_sdk/models/update_motion_task_task_params.py b/rootly_sdk/models/update_motion_task_task_params.py index 35906759..4ea29079 100644 --- a/rootly_sdk/models/update_motion_task_task_params.py +++ b/rootly_sdk/models/update_motion_task_task_params.py @@ -44,6 +44,7 @@ class UpdateMotionTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + task_id = self.task_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_on_call_pay_report.py b/rootly_sdk/models/update_on_call_pay_report.py index 9c488458..932f9471 100644 --- a/rootly_sdk/models/update_on_call_pay_report.py +++ b/rootly_sdk/models/update_on_call_pay_report.py @@ -24,6 +24,7 @@ class UpdateOnCallPayReport: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_on_call_pay_report_data.py b/rootly_sdk/models/update_on_call_pay_report_data.py index cb905403..c25845dc 100644 --- a/rootly_sdk/models/update_on_call_pay_report_data.py +++ b/rootly_sdk/models/update_on_call_pay_report_data.py @@ -31,6 +31,7 @@ class UpdateOnCallPayReportData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_on_call_pay_report_data_attributes.py b/rootly_sdk/models/update_on_call_pay_report_data_attributes.py index 24eb3009..513508f2 100644 --- a/rootly_sdk/models/update_on_call_pay_report_data_attributes.py +++ b/rootly_sdk/models/update_on_call_pay_report_data_attributes.py @@ -19,11 +19,16 @@ class UpdateOnCallPayReportDataAttributes: start_date (datetime.date | Unset): The start date for the report period. end_date (datetime.date | Unset): The end date for the report period. schedule_ids (list[str] | Unset): List of schedule UUIDs to scope the report. + time_zone (str | Unset): IANA timezone used to compute day and weekend boundaries. + use_responders_time_zone (bool | Unset): When true, day and weekend boundaries are computed in each responder's + personal timezone instead of the report-wide timezone. """ start_date: datetime.date | Unset = UNSET end_date: datetime.date | Unset = UNSET schedule_ids: list[str] | Unset = UNSET + time_zone: str | Unset = UNSET + use_responders_time_zone: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: start_date: str | Unset = UNSET @@ -38,6 +43,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.schedule_ids, Unset): schedule_ids = self.schedule_ids + time_zone = self.time_zone + + use_responders_time_zone = self.use_responders_time_zone + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -47,6 +56,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["end_date"] = end_date if schedule_ids is not UNSET: field_dict["schedule_ids"] = schedule_ids + if time_zone is not UNSET: + field_dict["time_zone"] = time_zone + if use_responders_time_zone is not UNSET: + field_dict["use_responders_time_zone"] = use_responders_time_zone return field_dict @@ -69,10 +82,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_ids = cast(list[str], d.pop("schedule_ids", UNSET)) + time_zone = d.pop("time_zone", UNSET) + + use_responders_time_zone = d.pop("use_responders_time_zone", UNSET) + update_on_call_pay_report_data_attributes = cls( start_date=start_date, end_date=end_date, schedule_ids=schedule_ids, + time_zone=time_zone, + use_responders_time_zone=use_responders_time_zone, ) return update_on_call_pay_report_data_attributes diff --git a/rootly_sdk/models/update_on_call_role.py b/rootly_sdk/models/update_on_call_role.py index 05af9836..273c5735 100644 --- a/rootly_sdk/models/update_on_call_role.py +++ b/rootly_sdk/models/update_on_call_role.py @@ -24,6 +24,7 @@ class UpdateOnCallRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_on_call_role_data.py b/rootly_sdk/models/update_on_call_role_data.py index 26aa8597..af8dd19a 100644 --- a/rootly_sdk/models/update_on_call_role_data.py +++ b/rootly_sdk/models/update_on_call_role_data.py @@ -28,6 +28,7 @@ class UpdateOnCallRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_on_call_role_data_attributes.py b/rootly_sdk/models/update_on_call_role_data_attributes.py index 83503f81..bbeb6c0d 100644 --- a/rootly_sdk/models/update_on_call_role_data_attributes.py +++ b/rootly_sdk/models/update_on_call_role_data_attributes.py @@ -37,6 +37,10 @@ UpdateOnCallRoleDataAttributesAuditsPermissionsItem, check_update_on_call_role_data_attributes_audits_permissions_item, ) +from ..models.update_on_call_role_data_attributes_catalogs_permissions_item import ( + UpdateOnCallRoleDataAttributesCatalogsPermissionsItem, + check_update_on_call_role_data_attributes_catalogs_permissions_item, +) from ..models.update_on_call_role_data_attributes_contacts_permissions_item import ( UpdateOnCallRoleDataAttributesContactsPermissionsItem, check_update_on_call_role_data_attributes_contacts_permissions_item, @@ -45,6 +49,10 @@ UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, check_update_on_call_role_data_attributes_escalation_policies_permissions_item, ) +from ..models.update_on_call_role_data_attributes_functionalities_permissions_item import ( + UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem, + check_update_on_call_role_data_attributes_functionalities_permissions_item, +) from ..models.update_on_call_role_data_attributes_groups_permissions_item import ( UpdateOnCallRoleDataAttributesGroupsPermissionsItem, check_update_on_call_role_data_attributes_groups_permissions_item, @@ -125,8 +133,10 @@ class UpdateOnCallRoleDataAttributes: schedule_override_permissions (list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset): schedules_permissions (list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset): services_permissions (list[UpdateOnCallRoleDataAttributesServicesPermissionsItem] | Unset): + functionalities_permissions (list[UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset): webhooks_permissions (list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset): workflows_permissions (list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[UpdateOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset): """ name: str | Unset = UNSET @@ -157,8 +167,10 @@ class UpdateOnCallRoleDataAttributes: schedule_override_permissions: list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset = UNSET schedules_permissions: list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset = UNSET services_permissions: list[UpdateOnCallRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + functionalities_permissions: list[UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET webhooks_permissions: list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET workflows_permissions: list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[UpdateOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -305,6 +317,13 @@ def to_dict(self) -> dict[str, Any]: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) + functionalities_permissions: list[str] | Unset = UNSET + if not isinstance(self.functionalities_permissions, Unset): + functionalities_permissions = [] + for functionalities_permissions_item_data in self.functionalities_permissions: + functionalities_permissions_item: str = functionalities_permissions_item_data + functionalities_permissions.append(functionalities_permissions_item) + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] @@ -319,6 +338,13 @@ def to_dict(self) -> dict[str, Any]: workflows_permissions_item: str = workflows_permissions_item_data workflows_permissions.append(workflows_permissions_item) + catalogs_permissions: list[str] | Unset = UNSET + if not isinstance(self.catalogs_permissions, Unset): + catalogs_permissions = [] + for catalogs_permissions_item_data in self.catalogs_permissions: + catalogs_permissions_item: str = catalogs_permissions_item_data + catalogs_permissions.append(catalogs_permissions_item) + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -366,10 +392,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["schedules_permissions"] = schedules_permissions if services_permissions is not UNSET: field_dict["services_permissions"] = services_permissions + if functionalities_permissions is not UNSET: + field_dict["functionalities_permissions"] = functionalities_permissions if webhooks_permissions is not UNSET: field_dict["webhooks_permissions"] = webhooks_permissions if workflows_permissions is not UNSET: field_dict["workflows_permissions"] = workflows_permissions + if catalogs_permissions is not UNSET: + field_dict["catalogs_permissions"] = catalogs_permissions return field_dict @@ -626,6 +656,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: services_permissions.append(services_permissions_item) + _functionalities_permissions = d.pop("functionalities_permissions", UNSET) + functionalities_permissions: list[UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = ( + check_update_on_call_role_data_attributes_functionalities_permissions_item( + functionalities_permissions_item_data + ) + ) + + functionalities_permissions.append(functionalities_permissions_item) + _webhooks_permissions = d.pop("webhooks_permissions", UNSET) webhooks_permissions: list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET if _webhooks_permissions is not UNSET: @@ -648,6 +691,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: workflows_permissions.append(workflows_permissions_item) + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[UpdateOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_update_on_call_role_data_attributes_catalogs_permissions_item( + catalogs_permissions_item_data + ) + + catalogs_permissions.append(catalogs_permissions_item) + update_on_call_role_data_attributes = cls( name=name, system_role=system_role, @@ -671,8 +725,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_override_permissions=schedule_override_permissions, schedules_permissions=schedules_permissions, services_permissions=services_permissions, + functionalities_permissions=functionalities_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, ) return update_on_call_role_data_attributes diff --git a/rootly_sdk/models/update_on_call_role_data_attributes_catalogs_permissions_item.py b/rootly_sdk/models/update_on_call_role_data_attributes_catalogs_permissions_item.py new file mode 100644 index 00000000..f6ee37ee --- /dev/null +++ b/rootly_sdk/models/update_on_call_role_data_attributes_catalogs_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateOnCallRoleDataAttributesCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: set[ + UpdateOnCallRoleDataAttributesCatalogsPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_on_call_role_data_attributes_catalogs_permissions_item( + value: str | None, +) -> UpdateOnCallRoleDataAttributesCatalogsPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(UpdateOnCallRoleDataAttributesCatalogsPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_on_call_role_data_attributes_functionalities_permissions_item.py b/rootly_sdk/models/update_on_call_role_data_attributes_functionalities_permissions_item.py new file mode 100644 index 00000000..45ebd261 --- /dev/null +++ b/rootly_sdk/models/update_on_call_role_data_attributes_functionalities_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: set[ + UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_on_call_role_data_attributes_functionalities_permissions_item( + value: str | None, +) -> UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: + return cast(UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_on_call_shadow.py b/rootly_sdk/models/update_on_call_shadow.py index 8a39a81e..1c41656b 100644 --- a/rootly_sdk/models/update_on_call_shadow.py +++ b/rootly_sdk/models/update_on_call_shadow.py @@ -24,6 +24,7 @@ class UpdateOnCallShadow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_on_call_shadow_data.py b/rootly_sdk/models/update_on_call_shadow_data.py index 3b15e40d..b7feab90 100644 --- a/rootly_sdk/models/update_on_call_shadow_data.py +++ b/rootly_sdk/models/update_on_call_shadow_data.py @@ -28,6 +28,7 @@ class UpdateOnCallShadowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_opsgenie_alert_task_params.py b/rootly_sdk/models/update_opsgenie_alert_task_params.py index 3c7dd2b8..729d24ad 100644 --- a/rootly_sdk/models/update_opsgenie_alert_task_params.py +++ b/rootly_sdk/models/update_opsgenie_alert_task_params.py @@ -45,6 +45,7 @@ class UpdateOpsgenieAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + alert_id = self.alert_id priority: str = self.priority diff --git a/rootly_sdk/models/update_override_shift.py b/rootly_sdk/models/update_override_shift.py index 766b15a4..236cf914 100644 --- a/rootly_sdk/models/update_override_shift.py +++ b/rootly_sdk/models/update_override_shift.py @@ -24,6 +24,7 @@ class UpdateOverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_override_shift_data.py b/rootly_sdk/models/update_override_shift_data.py index 295ece6a..e44a0bd4 100644 --- a/rootly_sdk/models/update_override_shift_data.py +++ b/rootly_sdk/models/update_override_shift_data.py @@ -28,6 +28,7 @@ class UpdateOverrideShiftData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_pagertree_alert_task_params.py b/rootly_sdk/models/update_pagertree_alert_task_params.py index 75b8f2ae..6b7cebfb 100644 --- a/rootly_sdk/models/update_pagertree_alert_task_params.py +++ b/rootly_sdk/models/update_pagertree_alert_task_params.py @@ -55,6 +55,7 @@ class UpdatePagertreeAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type diff --git a/rootly_sdk/models/update_playbook.py b/rootly_sdk/models/update_playbook.py index dacdebe3..acd968f6 100644 --- a/rootly_sdk/models/update_playbook.py +++ b/rootly_sdk/models/update_playbook.py @@ -24,6 +24,7 @@ class UpdatePlaybook: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_playbook_data.py b/rootly_sdk/models/update_playbook_data.py index dcd2a4b9..9bd1cc08 100644 --- a/rootly_sdk/models/update_playbook_data.py +++ b/rootly_sdk/models/update_playbook_data.py @@ -28,6 +28,7 @@ class UpdatePlaybookData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_playbook_task.py b/rootly_sdk/models/update_playbook_task.py index 33210449..d18a975b 100644 --- a/rootly_sdk/models/update_playbook_task.py +++ b/rootly_sdk/models/update_playbook_task.py @@ -24,6 +24,7 @@ class UpdatePlaybookTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_playbook_task_data.py b/rootly_sdk/models/update_playbook_task_data.py index 5fabc110..fc0209c0 100644 --- a/rootly_sdk/models/update_playbook_task_data.py +++ b/rootly_sdk/models/update_playbook_task_data.py @@ -28,6 +28,7 @@ class UpdatePlaybookTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_post_mortem_template.py b/rootly_sdk/models/update_post_mortem_template.py index f54f9f01..459111a4 100644 --- a/rootly_sdk/models/update_post_mortem_template.py +++ b/rootly_sdk/models/update_post_mortem_template.py @@ -24,6 +24,7 @@ class UpdatePostMortemTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_post_mortem_template_data.py b/rootly_sdk/models/update_post_mortem_template_data.py index 21b139e3..6c4f98ce 100644 --- a/rootly_sdk/models/update_post_mortem_template_data.py +++ b/rootly_sdk/models/update_post_mortem_template_data.py @@ -31,6 +31,7 @@ class UpdatePostMortemTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_pulse.py b/rootly_sdk/models/update_pulse.py index 611a581c..ce900954 100644 --- a/rootly_sdk/models/update_pulse.py +++ b/rootly_sdk/models/update_pulse.py @@ -24,6 +24,7 @@ class UpdatePulse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_pulse_data.py b/rootly_sdk/models/update_pulse_data.py index 3fd6a551..651fb0dc 100644 --- a/rootly_sdk/models/update_pulse_data.py +++ b/rootly_sdk/models/update_pulse_data.py @@ -7,7 +7,6 @@ from attrs import field as _attrs_field from ..models.update_pulse_data_type import UpdatePulseDataType, check_update_pulse_data_type -from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.update_pulse_data_attributes import UpdatePulseDataAttributes @@ -20,30 +19,28 @@ class UpdatePulseData: """ Attributes: + type_ (UpdatePulseDataType): attributes (UpdatePulseDataAttributes): - type_ (UpdatePulseDataType | Unset): """ + type_: UpdatePulseDataType attributes: UpdatePulseDataAttributes - type_: UpdatePulseDataType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - attributes = self.attributes.to_dict() - type_: str | Unset = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_ + type_: str = self.type_ + + attributes = self.attributes.to_dict() field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { + "type": type_, "attributes": attributes, } ) - if type_ is not UNSET: - field_dict["type"] = type_ return field_dict @@ -52,18 +49,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_pulse_data_attributes import UpdatePulseDataAttributes d = dict(src_dict) - attributes = UpdatePulseDataAttributes.from_dict(d.pop("attributes")) + type_ = check_update_pulse_data_type(d.pop("type")) - _type_ = d.pop("type", UNSET) - type_: UpdatePulseDataType | Unset - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = check_update_pulse_data_type(_type_) + attributes = UpdatePulseDataAttributes.from_dict(d.pop("attributes")) update_pulse_data = cls( - attributes=attributes, type_=type_, + attributes=attributes, ) update_pulse_data.additional_properties = d diff --git a/rootly_sdk/models/update_retrospective_configuration.py b/rootly_sdk/models/update_retrospective_configuration.py index f38dfde6..e4975c8a 100644 --- a/rootly_sdk/models/update_retrospective_configuration.py +++ b/rootly_sdk/models/update_retrospective_configuration.py @@ -24,6 +24,7 @@ class UpdateRetrospectiveConfiguration: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_retrospective_configuration_data.py b/rootly_sdk/models/update_retrospective_configuration_data.py index 78848b1a..1d1cf126 100644 --- a/rootly_sdk/models/update_retrospective_configuration_data.py +++ b/rootly_sdk/models/update_retrospective_configuration_data.py @@ -33,6 +33,7 @@ class UpdateRetrospectiveConfigurationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_retrospective_process.py b/rootly_sdk/models/update_retrospective_process.py index 20d10cf0..ca707e8e 100644 --- a/rootly_sdk/models/update_retrospective_process.py +++ b/rootly_sdk/models/update_retrospective_process.py @@ -24,6 +24,7 @@ class UpdateRetrospectiveProcess: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_retrospective_process_data.py b/rootly_sdk/models/update_retrospective_process_data.py index a221364c..e5a466bb 100644 --- a/rootly_sdk/models/update_retrospective_process_data.py +++ b/rootly_sdk/models/update_retrospective_process_data.py @@ -31,6 +31,7 @@ class UpdateRetrospectiveProcessData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_retrospective_process_group.py b/rootly_sdk/models/update_retrospective_process_group.py index 5f6e1847..feef5994 100644 --- a/rootly_sdk/models/update_retrospective_process_group.py +++ b/rootly_sdk/models/update_retrospective_process_group.py @@ -24,6 +24,7 @@ class UpdateRetrospectiveProcessGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_retrospective_process_group_data.py b/rootly_sdk/models/update_retrospective_process_group_data.py index f3f057ca..8230d21d 100644 --- a/rootly_sdk/models/update_retrospective_process_group_data.py +++ b/rootly_sdk/models/update_retrospective_process_group_data.py @@ -33,6 +33,7 @@ class UpdateRetrospectiveProcessGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_retrospective_process_group_step.py b/rootly_sdk/models/update_retrospective_process_group_step.py index 196c2b45..ef0b3d24 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step.py +++ b/rootly_sdk/models/update_retrospective_process_group_step.py @@ -24,6 +24,7 @@ class UpdateRetrospectiveProcessGroupStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_retrospective_process_group_step_data.py b/rootly_sdk/models/update_retrospective_process_group_step_data.py index 82f7502b..40bd1a00 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step_data.py +++ b/rootly_sdk/models/update_retrospective_process_group_step_data.py @@ -33,6 +33,7 @@ class UpdateRetrospectiveProcessGroupStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_retrospective_step.py b/rootly_sdk/models/update_retrospective_step.py index 611bb37a..e6088f73 100644 --- a/rootly_sdk/models/update_retrospective_step.py +++ b/rootly_sdk/models/update_retrospective_step.py @@ -24,6 +24,7 @@ class UpdateRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_retrospective_step_data.py b/rootly_sdk/models/update_retrospective_step_data.py index 6d5b1471..7d559d60 100644 --- a/rootly_sdk/models/update_retrospective_step_data.py +++ b/rootly_sdk/models/update_retrospective_step_data.py @@ -31,6 +31,7 @@ class UpdateRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_role.py b/rootly_sdk/models/update_role.py index 4e0f5815..fa829337 100644 --- a/rootly_sdk/models/update_role.py +++ b/rootly_sdk/models/update_role.py @@ -24,6 +24,7 @@ class UpdateRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_role_data.py b/rootly_sdk/models/update_role_data.py index 3252ed3f..0237e351 100644 --- a/rootly_sdk/models/update_role_data.py +++ b/rootly_sdk/models/update_role_data.py @@ -28,6 +28,7 @@ class UpdateRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_schedule.py b/rootly_sdk/models/update_schedule.py index 514b68b3..ad2083f3 100644 --- a/rootly_sdk/models/update_schedule.py +++ b/rootly_sdk/models/update_schedule.py @@ -24,6 +24,7 @@ class UpdateSchedule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_schedule_data.py b/rootly_sdk/models/update_schedule_data.py index 6c5069e5..4cbf9034 100644 --- a/rootly_sdk/models/update_schedule_data.py +++ b/rootly_sdk/models/update_schedule_data.py @@ -28,6 +28,7 @@ class UpdateScheduleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_schedule_data_attributes.py b/rootly_sdk/models/update_schedule_data_attributes.py index 6880b0a2..a8609097 100644 --- a/rootly_sdk/models/update_schedule_data_attributes.py +++ b/rootly_sdk/models/update_schedule_data_attributes.py @@ -5,6 +5,10 @@ from attrs import define as _attrs_define +from ..models.update_schedule_data_attributes_shift_report_day_of_week import ( + UpdateScheduleDataAttributesShiftReportDayOfWeek, + check_update_schedule_data_attributes_shift_report_day_of_week, +) from ..types import UNSET, Unset if TYPE_CHECKING: @@ -28,6 +32,21 @@ class UpdateScheduleDataAttributes: slack_channel (None | Unset | UpdateScheduleDataAttributesSlackChannelType0): owner_group_ids (list[str] | Unset): Owning teams. owner_user_id (int | None | Unset): ID of the owner of the schedule + sync_linear_enabled (bool | None | Unset): Whether the schedule is synced with Linear + include_shadows_in_slack_notifications (bool | None | Unset): Whether shadow users are included in Slack + notifications and user group syncing. Requires `slack_channel` to be set; otherwise this value is forced to + false on save. + shift_start_notifications_enabled (bool | None | Unset): Whether shift-start notifications are enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_update_notifications_enabled (bool | None | Unset): Whether shift-update notifications are enabled. + Requires `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_enabled (bool | None | Unset): Whether the weekly shift summary report is enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_day_of_week (UpdateScheduleDataAttributesShiftReportDayOfWeek | Unset): Day of week the weekly + shift summary is sent + shift_report_time_of_day (None | str | Unset): Time of day the weekly shift summary is sent, in HH:MM 24-hour + format + shift_report_time_zone (None | str | Unset): IANA time zone used for the weekly shift summary """ name: str | Unset = UNSET @@ -37,6 +56,14 @@ class UpdateScheduleDataAttributes: slack_channel: None | Unset | UpdateScheduleDataAttributesSlackChannelType0 = UNSET owner_group_ids: list[str] | Unset = UNSET owner_user_id: int | None | Unset = UNSET + sync_linear_enabled: bool | None | Unset = UNSET + include_shadows_in_slack_notifications: bool | None | Unset = UNSET + shift_start_notifications_enabled: bool | None | Unset = UNSET + shift_update_notifications_enabled: bool | None | Unset = UNSET + shift_report_enabled: bool | None | Unset = UNSET + shift_report_day_of_week: UpdateScheduleDataAttributesShiftReportDayOfWeek | Unset = UNSET + shift_report_time_of_day: None | str | Unset = UNSET + shift_report_time_zone: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_schedule_data_attributes_slack_channel_type_0 import ( @@ -79,6 +106,52 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_id = self.owner_user_id + sync_linear_enabled: bool | None | Unset + if isinstance(self.sync_linear_enabled, Unset): + sync_linear_enabled = UNSET + else: + sync_linear_enabled = self.sync_linear_enabled + + include_shadows_in_slack_notifications: bool | None | Unset + if isinstance(self.include_shadows_in_slack_notifications, Unset): + include_shadows_in_slack_notifications = UNSET + else: + include_shadows_in_slack_notifications = self.include_shadows_in_slack_notifications + + shift_start_notifications_enabled: bool | None | Unset + if isinstance(self.shift_start_notifications_enabled, Unset): + shift_start_notifications_enabled = UNSET + else: + shift_start_notifications_enabled = self.shift_start_notifications_enabled + + shift_update_notifications_enabled: bool | None | Unset + if isinstance(self.shift_update_notifications_enabled, Unset): + shift_update_notifications_enabled = UNSET + else: + shift_update_notifications_enabled = self.shift_update_notifications_enabled + + shift_report_enabled: bool | None | Unset + if isinstance(self.shift_report_enabled, Unset): + shift_report_enabled = UNSET + else: + shift_report_enabled = self.shift_report_enabled + + shift_report_day_of_week: str | Unset = UNSET + if not isinstance(self.shift_report_day_of_week, Unset): + shift_report_day_of_week = self.shift_report_day_of_week + + shift_report_time_of_day: None | str | Unset + if isinstance(self.shift_report_time_of_day, Unset): + shift_report_time_of_day = UNSET + else: + shift_report_time_of_day = self.shift_report_time_of_day + + shift_report_time_zone: None | str | Unset + if isinstance(self.shift_report_time_zone, Unset): + shift_report_time_zone = UNSET + else: + shift_report_time_zone = self.shift_report_time_zone + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -96,6 +169,22 @@ def to_dict(self) -> dict[str, Any]: field_dict["owner_group_ids"] = owner_group_ids if owner_user_id is not UNSET: field_dict["owner_user_id"] = owner_user_id + if sync_linear_enabled is not UNSET: + field_dict["sync_linear_enabled"] = sync_linear_enabled + if include_shadows_in_slack_notifications is not UNSET: + field_dict["include_shadows_in_slack_notifications"] = include_shadows_in_slack_notifications + if shift_start_notifications_enabled is not UNSET: + field_dict["shift_start_notifications_enabled"] = shift_start_notifications_enabled + if shift_update_notifications_enabled is not UNSET: + field_dict["shift_update_notifications_enabled"] = shift_update_notifications_enabled + if shift_report_enabled is not UNSET: + field_dict["shift_report_enabled"] = shift_report_enabled + if shift_report_day_of_week is not UNSET: + field_dict["shift_report_day_of_week"] = shift_report_day_of_week + if shift_report_time_of_day is not UNSET: + field_dict["shift_report_time_of_day"] = shift_report_time_of_day + if shift_report_time_zone is not UNSET: + field_dict["shift_report_time_zone"] = shift_report_time_zone return field_dict @@ -162,6 +251,84 @@ def _parse_owner_user_id(data: object) -> int | None | Unset: owner_user_id = _parse_owner_user_id(d.pop("owner_user_id", UNSET)) + def _parse_sync_linear_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + sync_linear_enabled = _parse_sync_linear_enabled(d.pop("sync_linear_enabled", UNSET)) + + def _parse_include_shadows_in_slack_notifications(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + include_shadows_in_slack_notifications = _parse_include_shadows_in_slack_notifications( + d.pop("include_shadows_in_slack_notifications", UNSET) + ) + + def _parse_shift_start_notifications_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_start_notifications_enabled = _parse_shift_start_notifications_enabled( + d.pop("shift_start_notifications_enabled", UNSET) + ) + + def _parse_shift_update_notifications_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_update_notifications_enabled = _parse_shift_update_notifications_enabled( + d.pop("shift_update_notifications_enabled", UNSET) + ) + + def _parse_shift_report_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_report_enabled = _parse_shift_report_enabled(d.pop("shift_report_enabled", UNSET)) + + _shift_report_day_of_week = d.pop("shift_report_day_of_week", UNSET) + shift_report_day_of_week: UpdateScheduleDataAttributesShiftReportDayOfWeek | Unset + if isinstance(_shift_report_day_of_week, Unset): + shift_report_day_of_week = UNSET + else: + shift_report_day_of_week = check_update_schedule_data_attributes_shift_report_day_of_week( + _shift_report_day_of_week + ) + + def _parse_shift_report_time_of_day(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shift_report_time_of_day = _parse_shift_report_time_of_day(d.pop("shift_report_time_of_day", UNSET)) + + def _parse_shift_report_time_zone(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shift_report_time_zone = _parse_shift_report_time_zone(d.pop("shift_report_time_zone", UNSET)) + update_schedule_data_attributes = cls( name=name, description=description, @@ -170,6 +337,14 @@ def _parse_owner_user_id(data: object) -> int | None | Unset: slack_channel=slack_channel, owner_group_ids=owner_group_ids, owner_user_id=owner_user_id, + sync_linear_enabled=sync_linear_enabled, + include_shadows_in_slack_notifications=include_shadows_in_slack_notifications, + shift_start_notifications_enabled=shift_start_notifications_enabled, + shift_update_notifications_enabled=shift_update_notifications_enabled, + shift_report_enabled=shift_report_enabled, + shift_report_day_of_week=shift_report_day_of_week, + shift_report_time_of_day=shift_report_time_of_day, + shift_report_time_zone=shift_report_time_zone, ) return update_schedule_data_attributes diff --git a/rootly_sdk/models/update_schedule_data_attributes_shift_report_day_of_week.py b/rootly_sdk/models/update_schedule_data_attributes_shift_report_day_of_week.py new file mode 100644 index 00000000..1444d350 --- /dev/null +++ b/rootly_sdk/models/update_schedule_data_attributes_shift_report_day_of_week.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +UpdateScheduleDataAttributesShiftReportDayOfWeek = Literal[ + "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" +] + +UPDATE_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES: set[ + UpdateScheduleDataAttributesShiftReportDayOfWeek +] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_update_schedule_data_attributes_shift_report_day_of_week( + value: str | None, +) -> UpdateScheduleDataAttributesShiftReportDayOfWeek | None: + if value is None: + return None + if value in UPDATE_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES: + return cast(UpdateScheduleDataAttributesShiftReportDayOfWeek, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_schedule_rotation.py b/rootly_sdk/models/update_schedule_rotation.py index e74ab544..70ac37af 100644 --- a/rootly_sdk/models/update_schedule_rotation.py +++ b/rootly_sdk/models/update_schedule_rotation.py @@ -24,6 +24,7 @@ class UpdateScheduleRotation: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_schedule_rotation_active_day.py b/rootly_sdk/models/update_schedule_rotation_active_day.py index c7878b81..397dded0 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day.py @@ -24,6 +24,7 @@ class UpdateScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_schedule_rotation_active_day_data.py b/rootly_sdk/models/update_schedule_rotation_active_day_data.py index 16f0083c..9ddf97ca 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day_data.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day_data.py @@ -33,6 +33,7 @@ class UpdateScheduleRotationActiveDayData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes.py b/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes.py index 668118fe..b25922b5 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes.py @@ -34,6 +34,7 @@ class UpdateScheduleRotationActiveDayDataAttributes: active_time_attributes: list[UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + day_name: str | Unset = UNSET if not isinstance(self.day_name, Unset): day_name = self.day_name diff --git a/rootly_sdk/models/update_schedule_rotation_data.py b/rootly_sdk/models/update_schedule_rotation_data.py index ac3edd76..4cfacf30 100644 --- a/rootly_sdk/models/update_schedule_rotation_data.py +++ b/rootly_sdk/models/update_schedule_rotation_data.py @@ -31,6 +31,7 @@ class UpdateScheduleRotationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes.py b/rootly_sdk/models/update_schedule_rotation_data_attributes.py index c1076835..dfa4b3af 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes.py @@ -1,9 +1,11 @@ from __future__ import annotations +import datetime from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define +from dateutil.parser import isoparse from ..models.update_schedule_rotation_data_attributes_active_days_item import ( UpdateScheduleRotationDataAttributesActiveDaysItem, @@ -58,10 +60,10 @@ class UpdateScheduleRotationDataAttributes: UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1 | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2 | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3): - start_time (None | str | Unset): ISO8601 date and time when rotation starts. Shifts will only be created after - this time. - end_time (None | str | Unset): ISO8601 date and time when rotation ends. Shifts will only be created before this - time. + start_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation starts. Shifts will only be + created after this time. + end_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation ends. Shifts will only be created + before this time. schedule_rotation_members (list[UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset): You can only update schedule rotation members if your account has schedule nesting feature enabled """ @@ -81,8 +83,8 @@ class UpdateScheduleRotationDataAttributes: | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2 | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3 ) = UNSET - start_time: None | str | Unset = UNSET - end_time: None | str | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET schedule_rotation_members: ( list[UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset ) = UNSET @@ -148,12 +150,16 @@ def to_dict(self) -> dict[str, Any]: start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() else: start_time = self.start_time end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() else: end_time = self.end_time @@ -312,21 +318,37 @@ def _parse_schedule_rotationable_attributes( d.pop("schedule_rotationable_attributes", UNSET) ) - def _parse_start_time(data: object) -> None | str | Unset: + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | str | Unset, data) + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = isoparse(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> None | str | Unset: + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | str | Unset, data) + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = isoparse(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) diff --git a/rootly_sdk/models/update_schedule_rotation_user.py b/rootly_sdk/models/update_schedule_rotation_user.py index 57accee1..0750bafd 100644 --- a/rootly_sdk/models/update_schedule_rotation_user.py +++ b/rootly_sdk/models/update_schedule_rotation_user.py @@ -24,6 +24,7 @@ class UpdateScheduleRotationUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_schedule_rotation_user_data.py b/rootly_sdk/models/update_schedule_rotation_user_data.py index 36fc2342..460b1e6e 100644 --- a/rootly_sdk/models/update_schedule_rotation_user_data.py +++ b/rootly_sdk/models/update_schedule_rotation_user_data.py @@ -31,6 +31,7 @@ class UpdateScheduleRotationUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_secret.py b/rootly_sdk/models/update_secret.py index 457fff7a..09fb2dc2 100644 --- a/rootly_sdk/models/update_secret.py +++ b/rootly_sdk/models/update_secret.py @@ -24,6 +24,7 @@ class UpdateSecret: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_secret_data.py b/rootly_sdk/models/update_secret_data.py index 4ecbf3dd..ed599fda 100644 --- a/rootly_sdk/models/update_secret_data.py +++ b/rootly_sdk/models/update_secret_data.py @@ -28,6 +28,7 @@ class UpdateSecretData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_service.py b/rootly_sdk/models/update_service.py index 9aac9b12..f5bf5217 100644 --- a/rootly_sdk/models/update_service.py +++ b/rootly_sdk/models/update_service.py @@ -24,6 +24,7 @@ class UpdateService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_service_data.py b/rootly_sdk/models/update_service_data.py index f879f9fa..f37ffa9f 100644 --- a/rootly_sdk/models/update_service_data.py +++ b/rootly_sdk/models/update_service_data.py @@ -28,6 +28,7 @@ class UpdateServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_service_now_incident_task_params.py b/rootly_sdk/models/update_service_now_incident_task_params.py index dfb6002f..ac5e8b1a 100644 --- a/rootly_sdk/models/update_service_now_incident_task_params.py +++ b/rootly_sdk/models/update_service_now_incident_task_params.py @@ -44,6 +44,7 @@ class UpdateServiceNowIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + incident_id = self.incident_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/update_severity.py b/rootly_sdk/models/update_severity.py index 3916bc02..c4018f33 100644 --- a/rootly_sdk/models/update_severity.py +++ b/rootly_sdk/models/update_severity.py @@ -24,6 +24,7 @@ class UpdateSeverity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_severity_data.py b/rootly_sdk/models/update_severity_data.py index f52d5a14..7e03bb83 100644 --- a/rootly_sdk/models/update_severity_data.py +++ b/rootly_sdk/models/update_severity_data.py @@ -28,6 +28,7 @@ class UpdateSeverityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_severity_data_attributes.py b/rootly_sdk/models/update_severity_data_attributes.py index 52735b8e..0cba8e42 100644 --- a/rootly_sdk/models/update_severity_data_attributes.py +++ b/rootly_sdk/models/update_severity_data_attributes.py @@ -49,6 +49,7 @@ class UpdateSeverityDataAttributes: slack_aliases: list[UpdateSeverityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_shortcut_story_task_params.py b/rootly_sdk/models/update_shortcut_story_task_params.py index e313e0ac..9064d34c 100644 --- a/rootly_sdk/models/update_shortcut_story_task_params.py +++ b/rootly_sdk/models/update_shortcut_story_task_params.py @@ -42,6 +42,7 @@ class UpdateShortcutStoryTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + story_id = self.story_id archivation = self.archivation.to_dict() diff --git a/rootly_sdk/models/update_shortcut_task_task_params.py b/rootly_sdk/models/update_shortcut_task_task_params.py index d0085575..4d0d99c3 100644 --- a/rootly_sdk/models/update_shortcut_task_task_params.py +++ b/rootly_sdk/models/update_shortcut_task_task_params.py @@ -38,6 +38,7 @@ class UpdateShortcutTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + task_id = self.task_id parent_story_id = self.parent_story_id diff --git a/rootly_sdk/models/update_sla.py b/rootly_sdk/models/update_sla.py index 6eb58431..37dabf11 100644 --- a/rootly_sdk/models/update_sla.py +++ b/rootly_sdk/models/update_sla.py @@ -24,6 +24,7 @@ class UpdateSla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_sla_data.py b/rootly_sdk/models/update_sla_data.py index b09170b1..d172f4f3 100644 --- a/rootly_sdk/models/update_sla_data.py +++ b/rootly_sdk/models/update_sla_data.py @@ -28,6 +28,7 @@ class UpdateSlaData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_sla_data_attributes.py b/rootly_sdk/models/update_sla_data_attributes.py index 7ea47c55..76ae5a32 100644 --- a/rootly_sdk/models/update_sla_data_attributes.py +++ b/rootly_sdk/models/update_sla_data_attributes.py @@ -89,6 +89,7 @@ class UpdateSlaDataAttributes: notification_configurations: list[UpdateSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_sla_data_attributes_conditions_item.py b/rootly_sdk/models/update_sla_data_attributes_conditions_item.py index be124497..2b02950b 100644 --- a/rootly_sdk/models/update_sla_data_attributes_conditions_item.py +++ b/rootly_sdk/models/update_sla_data_attributes_conditions_item.py @@ -27,7 +27,9 @@ class UpdateSlaDataAttributesConditionsItem: conditionable_type (UpdateSlaDataAttributesConditionsItemConditionableType): The type of condition operator (str): The comparison operator property_ (UpdateSlaDataAttributesConditionsItemProperty | Unset): The property to evaluate (for built-in field - conditions) + conditions). When the team has custom lifecycle statuses enabled, use 'sub_status' (with sub-status IDs as + values); otherwise use 'status' (with parent status names). Sending the wrong one will return a validation + error. values (list[str] | None | Unset): The values to compare against form_field_id (None | Unset | UUID): The ID of the form field (for custom field conditions) position (int | Unset): The position of the condition for ordering diff --git a/rootly_sdk/models/update_slack_channel_topic_task_params.py b/rootly_sdk/models/update_slack_channel_topic_task_params.py index 612712b5..bad81d39 100644 --- a/rootly_sdk/models/update_slack_channel_topic_task_params.py +++ b/rootly_sdk/models/update_slack_channel_topic_task_params.py @@ -34,6 +34,7 @@ class UpdateSlackChannelTopicTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + channel = self.channel.to_dict() topic = self.topic diff --git a/rootly_sdk/models/update_status_page.py b/rootly_sdk/models/update_status_page.py index ef000551..cd6792b0 100644 --- a/rootly_sdk/models/update_status_page.py +++ b/rootly_sdk/models/update_status_page.py @@ -24,6 +24,7 @@ class UpdateStatusPage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_status_page_data.py b/rootly_sdk/models/update_status_page_data.py index d20a5a83..ee8c76f2 100644 --- a/rootly_sdk/models/update_status_page_data.py +++ b/rootly_sdk/models/update_status_page_data.py @@ -28,6 +28,7 @@ class UpdateStatusPageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_status_page_template.py b/rootly_sdk/models/update_status_page_template.py index 6c781dbf..e02434c5 100644 --- a/rootly_sdk/models/update_status_page_template.py +++ b/rootly_sdk/models/update_status_page_template.py @@ -24,6 +24,7 @@ class UpdateStatusPageTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_status_page_template_data.py b/rootly_sdk/models/update_status_page_template_data.py index e75b138f..ac86327b 100644 --- a/rootly_sdk/models/update_status_page_template_data.py +++ b/rootly_sdk/models/update_status_page_template_data.py @@ -31,6 +31,7 @@ class UpdateStatusPageTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_sub_status.py b/rootly_sdk/models/update_sub_status.py index 5cd3a6ad..e5aa52fa 100644 --- a/rootly_sdk/models/update_sub_status.py +++ b/rootly_sdk/models/update_sub_status.py @@ -24,6 +24,7 @@ class UpdateSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_sub_status_data.py b/rootly_sdk/models/update_sub_status_data.py index bb16ef47..8216557b 100644 --- a/rootly_sdk/models/update_sub_status_data.py +++ b/rootly_sdk/models/update_sub_status_data.py @@ -28,6 +28,7 @@ class UpdateSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_team.py b/rootly_sdk/models/update_team.py index 3168adfb..77cd58e9 100644 --- a/rootly_sdk/models/update_team.py +++ b/rootly_sdk/models/update_team.py @@ -24,6 +24,7 @@ class UpdateTeam: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_team_data.py b/rootly_sdk/models/update_team_data.py index e632bc31..52c08654 100644 --- a/rootly_sdk/models/update_team_data.py +++ b/rootly_sdk/models/update_team_data.py @@ -28,6 +28,7 @@ class UpdateTeamData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_team_data_attributes.py b/rootly_sdk/models/update_team_data_attributes.py index f8393a51..46c7c643 100644 --- a/rootly_sdk/models/update_team_data_attributes.py +++ b/rootly_sdk/models/update_team_data_attributes.py @@ -5,6 +5,10 @@ from attrs import define as _attrs_define +from ..models.update_team_data_attributes_auto_add_members_scope import ( + UpdateTeamDataAttributesAutoAddMembersScope, + check_update_team_data_attributes_auto_add_members_scope, +) from ..types import UNSET, Unset if TYPE_CHECKING: @@ -61,6 +65,9 @@ class UpdateTeamDataAttributes: incident_broadcast_channel (None | Unset | UpdateTeamDataAttributesIncidentBroadcastChannelType0): Slack channel to broadcast incidents to auto_add_members_when_attached (bool | None | Unset): Auto add members to incident channel when team is attached + auto_add_members_scope (UpdateTeamDataAttributesAutoAddMembersScope | Unset): Visibility-scoped auto-add + behavior. Only present when the `enable_scoped_incident_channel_auto_add` feature flag is on for the + organization. When set, it overrides `auto_add_members_when_attached`. properties (list[UpdateTeamDataAttributesPropertiesItem] | Unset): Array of property values for this team. """ @@ -89,6 +96,7 @@ class UpdateTeamDataAttributes: incident_broadcast_enabled: bool | None | Unset = UNSET incident_broadcast_channel: None | Unset | UpdateTeamDataAttributesIncidentBroadcastChannelType0 = UNSET auto_add_members_when_attached: bool | None | Unset = UNSET + auto_add_members_scope: UpdateTeamDataAttributesAutoAddMembersScope | Unset = UNSET properties: list[UpdateTeamDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: @@ -270,6 +278,10 @@ def to_dict(self) -> dict[str, Any]: else: auto_add_members_when_attached = self.auto_add_members_when_attached + auto_add_members_scope: str | Unset = UNSET + if not isinstance(self.auto_add_members_scope, Unset): + auto_add_members_scope = self.auto_add_members_scope + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -330,6 +342,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_channel"] = incident_broadcast_channel if auto_add_members_when_attached is not UNSET: field_dict["auto_add_members_when_attached"] = auto_add_members_when_attached + if auto_add_members_scope is not UNSET: + field_dict["auto_add_members_scope"] = auto_add_members_scope if properties is not UNSET: field_dict["properties"] = properties @@ -648,6 +662,13 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: d.pop("auto_add_members_when_attached", UNSET) ) + _auto_add_members_scope = d.pop("auto_add_members_scope", UNSET) + auto_add_members_scope: UpdateTeamDataAttributesAutoAddMembersScope | Unset + if isinstance(_auto_add_members_scope, Unset): + auto_add_members_scope = UNSET + else: + auto_add_members_scope = check_update_team_data_attributes_auto_add_members_scope(_auto_add_members_scope) + _properties = d.pop("properties", UNSET) properties: list[UpdateTeamDataAttributesPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -683,6 +704,7 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, + auto_add_members_scope=auto_add_members_scope, properties=properties, ) diff --git a/rootly_sdk/models/update_team_data_attributes_auto_add_members_scope.py b/rootly_sdk/models/update_team_data_attributes_auto_add_members_scope.py new file mode 100644 index 00000000..3e0a926f --- /dev/null +++ b/rootly_sdk/models/update_team_data_attributes_auto_add_members_scope.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateTeamDataAttributesAutoAddMembersScope = Literal["all", "off", "public_and_test", "public_only"] + +UPDATE_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES: set[UpdateTeamDataAttributesAutoAddMembersScope] = { + "all", + "off", + "public_and_test", + "public_only", +} + + +def check_update_team_data_attributes_auto_add_members_scope( + value: str | None, +) -> UpdateTeamDataAttributesAutoAddMembersScope | None: + if value is None: + return None + if value in UPDATE_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES: + return cast(UpdateTeamDataAttributesAutoAddMembersScope, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_trello_card_task_params.py b/rootly_sdk/models/update_trello_card_task_params.py index b71d98a0..ebb78f45 100644 --- a/rootly_sdk/models/update_trello_card_task_params.py +++ b/rootly_sdk/models/update_trello_card_task_params.py @@ -49,6 +49,7 @@ class UpdateTrelloCardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + card_id = self.card_id archivation = self.archivation.to_dict() diff --git a/rootly_sdk/models/update_user.py b/rootly_sdk/models/update_user.py index d935db30..bfd07c3b 100644 --- a/rootly_sdk/models/update_user.py +++ b/rootly_sdk/models/update_user.py @@ -24,6 +24,7 @@ class UpdateUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_user_data.py b/rootly_sdk/models/update_user_data.py index 95e780bb..a24938b0 100644 --- a/rootly_sdk/models/update_user_data.py +++ b/rootly_sdk/models/update_user_data.py @@ -28,6 +28,7 @@ class UpdateUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_user_email_address.py b/rootly_sdk/models/update_user_email_address.py index b744ccab..68b98497 100644 --- a/rootly_sdk/models/update_user_email_address.py +++ b/rootly_sdk/models/update_user_email_address.py @@ -24,6 +24,7 @@ class UpdateUserEmailAddress: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_user_email_address_data.py b/rootly_sdk/models/update_user_email_address_data.py index 999aebf1..d94f4368 100644 --- a/rootly_sdk/models/update_user_email_address_data.py +++ b/rootly_sdk/models/update_user_email_address_data.py @@ -31,6 +31,7 @@ class UpdateUserEmailAddressData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_user_notification_rule.py b/rootly_sdk/models/update_user_notification_rule.py index 0c612570..8550ba96 100644 --- a/rootly_sdk/models/update_user_notification_rule.py +++ b/rootly_sdk/models/update_user_notification_rule.py @@ -24,6 +24,7 @@ class UpdateUserNotificationRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_user_notification_rule_data.py b/rootly_sdk/models/update_user_notification_rule_data.py index f9651ad1..0c45fc09 100644 --- a/rootly_sdk/models/update_user_notification_rule_data.py +++ b/rootly_sdk/models/update_user_notification_rule_data.py @@ -31,6 +31,7 @@ class UpdateUserNotificationRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_user_notification_rule_data_attributes_enabled_contact_types_item.py b/rootly_sdk/models/update_user_notification_rule_data_attributes_enabled_contact_types_item.py index 60dc41a6..481a0d9a 100644 --- a/rootly_sdk/models/update_user_notification_rule_data_attributes_enabled_contact_types_item.py +++ b/rootly_sdk/models/update_user_notification_rule_data_attributes_enabled_contact_types_item.py @@ -1,7 +1,7 @@ from typing import Literal, cast UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem = Literal[ - "call", "device", "email", "non_critical_device", "slack", "sms" + "call", "device", "email", "google_chat", "non_critical_device", "slack", "sms" ] UPDATE_USER_NOTIFICATION_RULE_DATA_ATTRIBUTES_ENABLED_CONTACT_TYPES_ITEM_VALUES: set[ @@ -10,6 +10,7 @@ "call", "device", "email", + "google_chat", "non_critical_device", "slack", "sms", diff --git a/rootly_sdk/models/update_user_phone_number.py b/rootly_sdk/models/update_user_phone_number.py index 32de0ee5..b6e60d61 100644 --- a/rootly_sdk/models/update_user_phone_number.py +++ b/rootly_sdk/models/update_user_phone_number.py @@ -24,6 +24,7 @@ class UpdateUserPhoneNumber: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_user_phone_number_data.py b/rootly_sdk/models/update_user_phone_number_data.py index 3e0d69d9..10339845 100644 --- a/rootly_sdk/models/update_user_phone_number_data.py +++ b/rootly_sdk/models/update_user_phone_number_data.py @@ -31,6 +31,7 @@ class UpdateUserPhoneNumberData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_webhooks_endpoint.py b/rootly_sdk/models/update_webhooks_endpoint.py index 8fae8e34..a6e4f061 100644 --- a/rootly_sdk/models/update_webhooks_endpoint.py +++ b/rootly_sdk/models/update_webhooks_endpoint.py @@ -24,6 +24,7 @@ class UpdateWebhooksEndpoint: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_webhooks_endpoint_data.py b/rootly_sdk/models/update_webhooks_endpoint_data.py index 1988848c..c206aef7 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data.py @@ -31,6 +31,7 @@ class UpdateWebhooksEndpointData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py index a0dd08ea..b69e2934 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -11,6 +11,12 @@ ) from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.update_webhooks_endpoint_data_attributes_custom_headers_item import ( + UpdateWebhooksEndpointDataAttributesCustomHeadersItem, + ) + + T = TypeVar("T", bound="UpdateWebhooksEndpointDataAttributes") @@ -21,13 +27,17 @@ class UpdateWebhooksEndpointDataAttributes: name (str | Unset): The name of the endpoint event_types (list[UpdateWebhooksEndpointDataAttributesEventTypesItem] | Unset): enabled (bool | Unset): + custom_headers (list[UpdateWebhooksEndpointDataAttributesCustomHeadersItem] | Unset): Custom HTTP headers sent + with each delivery. Max 10. Reserved names (Content-Type, X-Rootly-Signature, Host, etc.) are rejected. """ name: str | Unset = UNSET event_types: list[UpdateWebhooksEndpointDataAttributesEventTypesItem] | Unset = UNSET enabled: bool | Unset = UNSET + custom_headers: list[UpdateWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + name = self.name event_types: list[str] | Unset = UNSET @@ -39,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled + custom_headers: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.custom_headers, Unset): + custom_headers = [] + for custom_headers_item_data in self.custom_headers: + custom_headers_item = custom_headers_item_data.to_dict() + custom_headers.append(custom_headers_item) + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -48,11 +65,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["event_types"] = event_types if enabled is not UNSET: field_dict["enabled"] = enabled + if custom_headers is not UNSET: + field_dict["custom_headers"] = custom_headers return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_webhooks_endpoint_data_attributes_custom_headers_item import ( + UpdateWebhooksEndpointDataAttributesCustomHeadersItem, + ) + d = dict(src_dict) name = d.pop("name", UNSET) @@ -69,10 +92,22 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) + _custom_headers = d.pop("custom_headers", UNSET) + custom_headers: list[UpdateWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET + if _custom_headers is not UNSET: + custom_headers = [] + for custom_headers_item_data in _custom_headers: + custom_headers_item = UpdateWebhooksEndpointDataAttributesCustomHeadersItem.from_dict( + custom_headers_item_data + ) + + custom_headers.append(custom_headers_item) + update_webhooks_endpoint_data_attributes = cls( name=name, event_types=event_types, enabled=enabled, + custom_headers=custom_headers, ) return update_webhooks_endpoint_data_attributes diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py new file mode 100644 index 00000000..e08d3e1f --- /dev/null +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="UpdateWebhooksEndpointDataAttributesCustomHeadersItem") + + +@_attrs_define +class UpdateWebhooksEndpointDataAttributesCustomHeadersItem: + """ + Attributes: + name (str): + value (str): + """ + + name: str + value: str + + def to_dict(self) -> dict[str, Any]: + name = self.name + + value = self.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + value = d.pop("value") + + update_webhooks_endpoint_data_attributes_custom_headers_item = cls( + name=name, + value=value, + ) + + return update_webhooks_endpoint_data_attributes_custom_headers_item diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes_event_types_item.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_event_types_item.py index 83a29d11..9cdc03f1 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data_attributes_event_types_item.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_event_types_item.py @@ -2,6 +2,7 @@ UpdateWebhooksEndpointDataAttributesEventTypesItem = Literal[ "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -30,12 +31,14 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", ] UPDATE_WEBHOOKS_ENDPOINT_DATA_ATTRIBUTES_EVENT_TYPES_ITEM_VALUES: set[ UpdateWebhooksEndpointDataAttributesEventTypesItem ] = { "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -64,6 +67,7 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", } diff --git a/rootly_sdk/models/update_workflow.py b/rootly_sdk/models/update_workflow.py index 56054fff..5364c155 100644 --- a/rootly_sdk/models/update_workflow.py +++ b/rootly_sdk/models/update_workflow.py @@ -24,6 +24,7 @@ class UpdateWorkflow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..1433a89b --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.update_workflow_action_item_form_field_condition_data import ( + UpdateWorkflowActionItemFormFieldConditionData, + ) + + +T = TypeVar("T", bound="UpdateWorkflowActionItemFormFieldCondition") + + +@_attrs_define +class UpdateWorkflowActionItemFormFieldCondition: + """ + Attributes: + data (UpdateWorkflowActionItemFormFieldConditionData): + """ + + data: UpdateWorkflowActionItemFormFieldConditionData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_workflow_action_item_form_field_condition_data import ( + UpdateWorkflowActionItemFormFieldConditionData, + ) + + d = dict(src_dict) + data = UpdateWorkflowActionItemFormFieldConditionData.from_dict(d.pop("data")) + + update_workflow_action_item_form_field_condition = cls( + data=data, + ) + + update_workflow_action_item_form_field_condition.additional_properties = d + return update_workflow_action_item_form_field_condition + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py new file mode 100644 index 00000000..72950187 --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_workflow_action_item_form_field_condition_data_type import ( + UpdateWorkflowActionItemFormFieldConditionDataType, + check_update_workflow_action_item_form_field_condition_data_type, +) + +if TYPE_CHECKING: + from ..models.update_workflow_action_item_form_field_condition_data_attributes import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributes, + ) + + +T = TypeVar("T", bound="UpdateWorkflowActionItemFormFieldConditionData") + + +@_attrs_define +class UpdateWorkflowActionItemFormFieldConditionData: + """ + Attributes: + type_ (UpdateWorkflowActionItemFormFieldConditionDataType): + attributes (UpdateWorkflowActionItemFormFieldConditionDataAttributes): + """ + + type_: UpdateWorkflowActionItemFormFieldConditionDataType + attributes: UpdateWorkflowActionItemFormFieldConditionDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_workflow_action_item_form_field_condition_data_attributes import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributes, + ) + + d = dict(src_dict) + type_ = check_update_workflow_action_item_form_field_condition_data_type(d.pop("type")) + + attributes = UpdateWorkflowActionItemFormFieldConditionDataAttributes.from_dict(d.pop("attributes")) + + update_workflow_action_item_form_field_condition_data = cls( + type_=type_, + attributes=attributes, + ) + + update_workflow_action_item_form_field_condition_data.additional_properties = d + return update_workflow_action_item_form_field_condition_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py new file mode 100644 index 00000000..c44ebd68 --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py @@ -0,0 +1,168 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.update_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, + check_update_workflow_action_item_form_field_condition_data_attributes_action_item_condition, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateWorkflowActionItemFormFieldConditionDataAttributes") + + +@_attrs_define +class UpdateWorkflowActionItemFormFieldConditionDataAttributes: + """ + Attributes: + action_item_condition (UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | Unset): The + trigger condition Default: 'ANY'. + values (list[str] | Unset): + selected_catalog_entity_ids (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_option_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_user_ids (list[int] | Unset): + selected_cause_ids (list[str] | Unset): + selected_environment_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): + """ + + action_item_condition: UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | Unset = "ANY" + values: list[str] | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + action_item_condition: str | Unset = UNSET + if not isinstance(self.action_item_condition, Unset): + action_item_condition = self.action_item_condition + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + selected_catalog_entity_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_catalog_entity_ids, Unset): + selected_catalog_entity_ids = self.selected_catalog_entity_ids + + selected_functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + selected_group_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_group_ids, Unset): + selected_group_ids = self.selected_group_ids + + selected_option_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_option_ids, Unset): + selected_option_ids = self.selected_option_ids + + selected_service_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_service_ids, Unset): + selected_service_ids = self.selected_service_ids + + selected_user_ids: list[int] | Unset = UNSET + if not isinstance(self.selected_user_ids, Unset): + selected_user_ids = self.selected_user_ids + + selected_cause_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_cause_ids, Unset): + selected_cause_ids = self.selected_cause_ids + + selected_environment_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + selected_incident_type_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_incident_type_ids, Unset): + selected_incident_type_ids = self.selected_incident_type_ids + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if action_item_condition is not UNSET: + field_dict["action_item_condition"] = action_item_condition + if values is not UNSET: + field_dict["values"] = values + if selected_catalog_entity_ids is not UNSET: + field_dict["selected_catalog_entity_ids"] = selected_catalog_entity_ids + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_option_ids is not UNSET: + field_dict["selected_option_ids"] = selected_option_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_user_ids is not UNSET: + field_dict["selected_user_ids"] = selected_user_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _action_item_condition = d.pop("action_item_condition", UNSET) + action_item_condition: UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | Unset + if isinstance(_action_item_condition, Unset): + action_item_condition = UNSET + else: + action_item_condition = ( + check_update_workflow_action_item_form_field_condition_data_attributes_action_item_condition( + _action_item_condition + ) + ) + + values = cast(list[str], d.pop("values", UNSET)) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + update_workflow_action_item_form_field_condition_data_attributes = cls( + action_item_condition=action_item_condition, + values=values, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_functionality_ids=selected_functionality_ids, + selected_group_ids=selected_group_ids, + selected_option_ids=selected_option_ids, + selected_service_ids=selected_service_ids, + selected_user_ids=selected_user_ids, + selected_cause_ids=selected_cause_ids, + selected_environment_ids=selected_environment_ids, + selected_incident_type_ids=selected_incident_type_ids, + ) + + return update_workflow_action_item_form_field_condition_data_attributes diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py new file mode 100644 index 00000000..3066c1d2 --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py @@ -0,0 +1,31 @@ +from typing import Literal, cast + +UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES: set[ + UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition +] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_update_workflow_action_item_form_field_condition_data_attributes_action_item_condition( + value: str | None, +) -> UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | None: + if value is None: + return None + if value in UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES: + return cast(UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_type.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_type.py new file mode 100644 index 00000000..9583ae17 --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateWorkflowActionItemFormFieldConditionDataType = Literal["workflow_action_item_form_field_conditions"] + +UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES: set[ + UpdateWorkflowActionItemFormFieldConditionDataType +] = { + "workflow_action_item_form_field_conditions", +} + + +def check_update_workflow_action_item_form_field_condition_data_type( + value: str | None, +) -> UpdateWorkflowActionItemFormFieldConditionDataType | None: + if value is None: + return None + if value in UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES: + return cast(UpdateWorkflowActionItemFormFieldConditionDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_workflow_custom_field_selection.py b/rootly_sdk/models/update_workflow_custom_field_selection.py index 965431c3..638a1ec9 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection.py @@ -24,6 +24,7 @@ class UpdateWorkflowCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_workflow_custom_field_selection_data.py b/rootly_sdk/models/update_workflow_custom_field_selection_data.py index d11e0ae3..e1ba2a31 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection_data.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection_data.py @@ -33,6 +33,7 @@ class UpdateWorkflowCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_workflow_data.py b/rootly_sdk/models/update_workflow_data.py index 91f4f38e..2da420ed 100644 --- a/rootly_sdk/models/update_workflow_data.py +++ b/rootly_sdk/models/update_workflow_data.py @@ -28,6 +28,7 @@ class UpdateWorkflowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_workflow_form_field_condition.py b/rootly_sdk/models/update_workflow_form_field_condition.py index 4495825c..93eb741d 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition.py +++ b/rootly_sdk/models/update_workflow_form_field_condition.py @@ -24,6 +24,7 @@ class UpdateWorkflowFormFieldCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_workflow_form_field_condition_data.py b/rootly_sdk/models/update_workflow_form_field_condition_data.py index a4139688..e83fbb57 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition_data.py +++ b/rootly_sdk/models/update_workflow_form_field_condition_data.py @@ -33,6 +33,7 @@ class UpdateWorkflowFormFieldConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_workflow_group.py b/rootly_sdk/models/update_workflow_group.py index 0944145e..0f3e5d4f 100644 --- a/rootly_sdk/models/update_workflow_group.py +++ b/rootly_sdk/models/update_workflow_group.py @@ -24,6 +24,7 @@ class UpdateWorkflowGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_workflow_group_data.py b/rootly_sdk/models/update_workflow_group_data.py index be072563..e5eda1a8 100644 --- a/rootly_sdk/models/update_workflow_group_data.py +++ b/rootly_sdk/models/update_workflow_group_data.py @@ -28,6 +28,7 @@ class UpdateWorkflowGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_workflow_task.py b/rootly_sdk/models/update_workflow_task.py index 3fb3bb7b..93fe2216 100644 --- a/rootly_sdk/models/update_workflow_task.py +++ b/rootly_sdk/models/update_workflow_task.py @@ -24,6 +24,7 @@ class UpdateWorkflowTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_workflow_task_data.py b/rootly_sdk/models/update_workflow_task_data.py index 4f992383..d2f7760b 100644 --- a/rootly_sdk/models/update_workflow_task_data.py +++ b/rootly_sdk/models/update_workflow_task_data.py @@ -28,6 +28,7 @@ class UpdateWorkflowTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_workflow_task_data_attributes.py b/rootly_sdk/models/update_workflow_task_data_attributes.py index c6dcf4ea..c7a0cbe9 100644 --- a/rootly_sdk/models/update_workflow_task_data_attributes.py +++ b/rootly_sdk/models/update_workflow_task_data_attributes.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -10,16 +10,25 @@ if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import AttachRetrospectivePdfToJiraIssueTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -34,6 +43,7 @@ from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -60,6 +70,8 @@ from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -70,26 +82,60 @@ from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -110,6 +156,7 @@ from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -145,41 +192,56 @@ class UpdateWorkflowTaskDataAttributes: position (int | Unset): The position of the workflow task skip_on_failure (bool | Unset): Skip workflow task if any failures enabled (bool | Unset): Enable/disable workflow task Default: True. - task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddRoleTaskParams | - AddTeamTaskParams | AddToTimelineTaskParams | Any | ArchiveMicrosoftTeamsChannelsTaskParams | - ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams | AutoAssignRoleOpsgenieTaskParams | - AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams | - ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | - CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | CreateAsanaTaskTaskParams | - CreateClickupTaskTaskParams | CreateCodaPageTaskParams | CreateConfluencePageTaskParams | - CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | CreateGithubIssueTaskParams | - CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | CreateGoogleDocsPageTaskParams | - CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams | - CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | CreateIncidentPostmortemTaskParams | - CreateIncidentTaskParams | CreateJiraIssueTaskParams | CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams - | CreateLinearIssueCommentTaskParams | CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | - CreateMicrosoftTeamsChannelTaskParams | CreateMicrosoftTeamsChatTaskParams | - CreateMicrosoftTeamsMeetingTaskParams | CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | - CreateNotionPageTaskParams | CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | - CreateOutlookEventTaskParams | CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | - CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | - CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams | - CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | CreateWebexMeetingTaskParams | - CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | - GetAlertsTaskParams | GetPulsesTaskParams | HttpClientTaskParams | InviteToMicrosoftTeamsChannelTaskParams | - InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelRootlyTaskParams | - InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams | AddSlackBookmarkTaskParamsType0 | + AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams | + ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | + AttachDatadogDashboardsTaskParams | AttachRetrospectivePdfToJiraIssueTaskParams | + AutoAssignRoleOpsgenieTaskParams | AutoAssignRolePagerdutyTaskParamsType0 | + AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | + CallPeopleTaskParams | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | + CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | + CreateAsanaTaskTaskParams | CreateClickupTaskTaskParams | CreateCodaPageTaskParams | + CreateConfluencePageTaskParams | CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | + CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | + CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | + CreateGoogleGeminiChatCompletionTaskParams | CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | + CreateIncidentPostmortemTaskParams | CreateIncidentTaskParams | CreateJiraIssueTaskParams | + CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams | CreateLinearIssueCommentTaskParams | + CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | CreateMicrosoftTeamsChannelTaskParams | + CreateMicrosoftTeamsChatTaskParams | CreateMicrosoftTeamsMeetingTaskParams | + CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | CreateNotionPageTaskParams | + CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | CreateOutlookEventTaskParams | + CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | CreateQuipPageTaskParams | + CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | CreateShortcutStoryTaskParamsType0 | + CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | + CreateSubIncidentTaskParams | CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | + CreateWebexMeetingTaskParams | CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | + CreateZoomMeetingTaskParams | GetAlertsTaskParams | GetGithubCommitsTaskParamsType0 | + GetGithubCommitsTaskParamsType1 | GetGitlabCommitsTaskParamsType0 | GetGitlabCommitsTaskParamsType1 | + GetPulsesTaskParams | HttpClientTaskParams | InviteToGoogleChatSpaceTaskParams | + InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelPagerdutyTaskParamsType0 | + InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelTaskParamsType0 | InviteToSlackChannelTaskParamsType1 | InviteToSlackChannelTaskParamsType2 + | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | - PageRootlyOnCallRespondersTaskParams | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | - RemoveGoogleDocsPermissionsTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | - RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams | - SendMicrosoftTeamsChatMessageTaskParams | SendSmsTaskParams | SendWhatsappMessageTaskParams | - SnapshotDatadogGraphTaskParams | SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | - SnapshotNewRelicGraphTaskParams | TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | Unset | - UpdateActionItemTaskParams | UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | - UpdateAttachedAlertsTaskParams | UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | - UpdateConfluencePageTaskParams | UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | - UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | + PageRootlyOnCallRespondersTaskParams | PageVictorOpsOnCallRespondersTaskParamsType0 | + PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | + RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams | RenameGoogleChatSpaceTaskParams | + RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | + SendDashboardReportTaskParams | SendEmailTaskParams | SendGoogleChatAttachmentsTaskParams | + SendGoogleChatMessageTaskParams | SendMicrosoftTeamsBlocksTaskParamsType0 | + SendMicrosoftTeamsChatMessageTaskParams | SendMicrosoftTeamsMessageTaskParamsType0 | + SendSlackBlocksTaskParamsType0 | SendSlackBlocksTaskParamsType1 | SendSlackBlocksTaskParamsType2 | + SendSlackMessageTaskParamsType0 | SendSlackMessageTaskParamsType1 | SendSlackMessageTaskParamsType2 | + SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams | + SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | SnapshotNewRelicGraphTaskParams | + TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | Unset | UpdateActionItemTaskParams | + UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | UpdateAttachedAlertsTaskParams | + UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | UpdateConfluencePageTaskParams | + UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | UpdateGithubIssueTaskParams | + UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | @@ -196,17 +258,25 @@ class UpdateWorkflowTaskDataAttributes: task_params: ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -220,6 +290,7 @@ class UpdateWorkflowTaskDataAttributes: | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -247,6 +318,8 @@ class UpdateWorkflowTaskDataAttributes: | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -257,26 +330,50 @@ class UpdateWorkflowTaskDataAttributes: | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -298,6 +395,7 @@ class UpdateWorkflowTaskDataAttributes: | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -325,19 +423,29 @@ class UpdateWorkflowTaskDataAttributes: def to_dict(self) -> dict[str, Any]: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams @@ -349,6 +457,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -375,6 +484,8 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -385,26 +496,60 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -425,6 +570,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -456,7 +602,7 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - task_params: Any | dict[str, Any] | Unset + task_params: dict[str, Any] | Unset if isinstance(self.task_params, Unset): task_params = UNSET elif isinstance(self.task_params, AddActionItemTaskParams): @@ -465,6 +611,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddRoleTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddTeamTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddToTimelineTaskParams): @@ -477,6 +627,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, AutoAssignRoleRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdatePagerdutyIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreatePagerdutyStatusUpdateTaskParams): @@ -541,6 +695,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateJiraSubtaskTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AttachRetrospectivePdfToJiraIssueTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearIssueTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearSubtaskIssueTaskParams): @@ -553,8 +709,28 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMicrosoftTeamsChatTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddMicrosoftTeamsChatTabTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatMessageTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatAttachmentsTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ArchiveGoogleChatSpacesTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, RenameGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, UpdateGoogleChatSpaceDescriptionTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ChangeGoogleChatSpacePrivacyTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, ArchiveMicrosoftTeamsChannelsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, RenameMicrosoftTeamsChannelTaskParams): @@ -563,8 +739,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateNotionPageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsMessageTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendMicrosoftTeamsChatMessageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsBlocksTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateNotionPageTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateQuipPageTaskParams): @@ -579,6 +759,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateServiceNowIncidentTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateShortcutTaskTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateTrelloCardTaskParams): @@ -595,6 +779,14 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateZoomMeetingTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetPulsesTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetAlertsTaskParams): @@ -605,6 +797,18 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToMicrosoftTeamsChannelRootlyTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelVictorOpsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PageOpsgenieOnCallRespondersTaskParams): @@ -623,6 +827,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, PagePagerdutyOnCallRespondersTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateVictorOpsIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PrintTaskParams): @@ -643,6 +851,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateSlackChannelTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendSmsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendWhatsappMessageTaskParams): @@ -697,6 +911,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, TriggerWorkflowTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpenaiChatCompletionTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateWatsonxChatCompletionTaskParams): @@ -705,10 +925,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMistralChatCompletionTaskParams): task_params = self.task_params.to_dict() - elif isinstance(self.task_params, CreateAnthropicChatCompletionTaskParams): - task_params = self.task_params.to_dict() else: - task_params = self.task_params + task_params = self.task_params.to_dict() field_dict: dict[str, Any] = {} @@ -730,16 +948,27 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -754,6 +983,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -780,6 +1010,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -790,26 +1022,60 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -830,6 +1096,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -867,17 +1134,25 @@ def _parse_task_params( ) -> ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -891,6 +1166,7 @@ def _parse_task_params( | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -918,6 +1194,8 @@ def _parse_task_params( | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -928,26 +1206,50 @@ def _parse_task_params( | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -969,6 +1271,7 @@ def _parse_task_params( | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -1018,6 +1321,22 @@ def _parse_task_params( return task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_0 = AddSlackBookmarkTaskParamsType0.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_1 = AddSlackBookmarkTaskParamsType1.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1066,6 +1385,26 @@ def _parse_task_params( return task_params_type_9 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_0 = ( + AutoAssignRolePagerdutyTaskParamsType0.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_1 = ( + AutoAssignRolePagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1325,7 +1664,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) + task_params_type_43 = AttachRetrospectivePdfToJiraIssueTaskParams.from_dict(data) return task_params_type_43 except (TypeError, ValueError, AttributeError, KeyError): @@ -1333,7 +1672,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) + task_params_type_44 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_44 except (TypeError, ValueError, AttributeError, KeyError): @@ -1341,7 +1680,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) + task_params_type_45 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_45 except (TypeError, ValueError, AttributeError, KeyError): @@ -1349,7 +1688,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) + task_params_type_46 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_46 except (TypeError, ValueError, AttributeError, KeyError): @@ -1357,7 +1696,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_47 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_47 except (TypeError, ValueError, AttributeError, KeyError): @@ -1365,7 +1704,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + task_params_type_48 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_48 except (TypeError, ValueError, AttributeError, KeyError): @@ -1373,15 +1712,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) + task_params_type_49 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + + return task_params_type_49 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_microsoft_teams_tab_task_params_type_0 = ( + AddMicrosoftTeamsTabTaskParamsType0.from_dict(data) + ) + + return componentsschemasadd_microsoft_teams_tab_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_microsoft_teams_tab_task_params_type_1 = ( + AddMicrosoftTeamsTabTaskParamsType1.from_dict(data) + ) - return task_params_type_50 + return componentsschemasadd_microsoft_teams_tab_task_params_type_1 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) + task_params_type_51 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_51 except (TypeError, ValueError, AttributeError, KeyError): @@ -1389,7 +1748,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_52 = CreateGoogleChatSpaceTaskParams.from_dict(data) return task_params_type_52 except (TypeError, ValueError, AttributeError, KeyError): @@ -1397,7 +1756,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_53 = SendGoogleChatMessageTaskParams.from_dict(data) return task_params_type_53 except (TypeError, ValueError, AttributeError, KeyError): @@ -1405,7 +1764,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) + task_params_type_54 = SendGoogleChatAttachmentsTaskParams.from_dict(data) return task_params_type_54 except (TypeError, ValueError, AttributeError, KeyError): @@ -1413,7 +1772,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) + task_params_type_55 = InviteToGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_55 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_56 = ArchiveGoogleChatSpacesTaskParams.from_dict(data) return task_params_type_56 except (TypeError, ValueError, AttributeError, KeyError): @@ -1421,7 +1788,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) + task_params_type_57 = RenameGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_57 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_58 = UpdateGoogleChatSpaceDescriptionTaskParams.from_dict(data) return task_params_type_58 except (TypeError, ValueError, AttributeError, KeyError): @@ -1429,7 +1804,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) + task_params_type_59 = ChangeGoogleChatSpacePrivacyTaskParams.from_dict(data) return task_params_type_59 except (TypeError, ValueError, AttributeError, KeyError): @@ -1437,7 +1812,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) + task_params_type_60 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_60 except (TypeError, ValueError, AttributeError, KeyError): @@ -1445,7 +1820,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) + task_params_type_61 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_61 except (TypeError, ValueError, AttributeError, KeyError): @@ -1453,7 +1828,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) + task_params_type_62 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_62 except (TypeError, ValueError, AttributeError, KeyError): @@ -1461,7 +1836,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) + task_params_type_63 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_63 except (TypeError, ValueError, AttributeError, KeyError): @@ -1469,23 +1844,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_message_task_params_type_0 = ( + SendMicrosoftTeamsMessageTaskParamsType0.from_dict(data) + ) - return task_params_type_64 + return componentsschemassend_microsoft_teams_message_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) + task_params_type_65 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) - return task_params_type_66 + return task_params_type_65 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_blocks_task_params_type_0 = ( + SendMicrosoftTeamsBlocksTaskParamsType0.from_dict(data) + ) + + return componentsschemassend_microsoft_teams_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_67 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_67 except (TypeError, ValueError, AttributeError, KeyError): @@ -1493,7 +1880,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) + task_params_type_68 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_68 except (TypeError, ValueError, AttributeError, KeyError): @@ -1501,7 +1888,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) + task_params_type_69 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_69 except (TypeError, ValueError, AttributeError, KeyError): @@ -1509,7 +1896,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) + task_params_type_70 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_70 except (TypeError, ValueError, AttributeError, KeyError): @@ -1517,7 +1904,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) + task_params_type_71 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_71 except (TypeError, ValueError, AttributeError, KeyError): @@ -1525,7 +1912,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) + task_params_type_72 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_72 except (TypeError, ValueError, AttributeError, KeyError): @@ -1533,7 +1920,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) + task_params_type_73 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_73 except (TypeError, ValueError, AttributeError, KeyError): @@ -1541,7 +1928,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_76 = GetPulsesTaskParams.from_dict(data) + componentsschemascreate_shortcut_story_task_params_type_0 = ( + CreateShortcutStoryTaskParamsType0.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemascreate_shortcut_story_task_params_type_1 = ( + CreateShortcutStoryTaskParamsType1.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_75 = CreateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_75 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_76 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_76 except (TypeError, ValueError, AttributeError, KeyError): @@ -1549,7 +1964,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_77 = GetAlertsTaskParams.from_dict(data) + task_params_type_77 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_77 except (TypeError, ValueError, AttributeError, KeyError): @@ -1557,7 +1972,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_78 = HttpClientTaskParams.from_dict(data) + task_params_type_78 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_78 except (TypeError, ValueError, AttributeError, KeyError): @@ -1565,7 +1980,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) + task_params_type_79 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_79 except (TypeError, ValueError, AttributeError, KeyError): @@ -1573,7 +1988,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) + task_params_type_80 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_80 except (TypeError, ValueError, AttributeError, KeyError): @@ -1581,23 +1996,55 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) + task_params_type_81 = CreateMotionTaskTaskParams.from_dict(data) + + return task_params_type_81 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_82 = CreateZoomMeetingTaskParams.from_dict(data) - return task_params_type_83 + return task_params_type_82 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) + componentsschemasget_github_commits_task_params_type_0 = GetGithubCommitsTaskParamsType0.from_dict(data) - return task_params_type_84 + return componentsschemasget_github_commits_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) + componentsschemasget_github_commits_task_params_type_1 = GetGithubCommitsTaskParamsType1.from_dict(data) + + return componentsschemasget_github_commits_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_gitlab_commits_task_params_type_0 = GetGitlabCommitsTaskParamsType0.from_dict(data) + + return componentsschemasget_gitlab_commits_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_gitlab_commits_task_params_type_1 = GetGitlabCommitsTaskParamsType1.from_dict(data) + + return componentsschemasget_gitlab_commits_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_85 = GetPulsesTaskParams.from_dict(data) return task_params_type_85 except (TypeError, ValueError, AttributeError, KeyError): @@ -1605,7 +2052,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) + task_params_type_86 = GetAlertsTaskParams.from_dict(data) return task_params_type_86 except (TypeError, ValueError, AttributeError, KeyError): @@ -1613,7 +2060,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) + task_params_type_87 = HttpClientTaskParams.from_dict(data) return task_params_type_87 except (TypeError, ValueError, AttributeError, KeyError): @@ -1621,7 +2068,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_88 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_88 except (TypeError, ValueError, AttributeError, KeyError): @@ -1629,7 +2076,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_89 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_89 except (TypeError, ValueError, AttributeError, KeyError): @@ -1637,7 +2084,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_90 = InviteToMicrosoftTeamsChannelRootlyTaskParams.from_dict(data) return task_params_type_90 except (TypeError, ValueError, AttributeError, KeyError): @@ -1645,15 +2092,57 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 = ( + InviteToSlackChannelPagerdutyTaskParamsType0.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 = ( + InviteToSlackChannelPagerdutyTaskParamsType1.from_dict(data) + ) - return task_params_type_91 + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_task_params_type_0 = ( + InviteToSlackChannelTaskParamsType0.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_1 = ( + InviteToSlackChannelTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_2 = ( + InviteToSlackChannelTaskParamsType2.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_93 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_93 except (TypeError, ValueError, AttributeError, KeyError): @@ -1661,7 +2150,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = PrintTaskParams.from_dict(data) + task_params_type_94 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_94 except (TypeError, ValueError, AttributeError, KeyError): @@ -1669,7 +2158,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = PublishIncidentTaskParams.from_dict(data) + task_params_type_95 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_95 except (TypeError, ValueError, AttributeError, KeyError): @@ -1677,7 +2166,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = RedisClientTaskParams.from_dict(data) + task_params_type_96 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_96 except (TypeError, ValueError, AttributeError, KeyError): @@ -1685,7 +2174,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_97 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_97 except (TypeError, ValueError, AttributeError, KeyError): @@ -1693,7 +2182,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_98 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_98 except (TypeError, ValueError, AttributeError, KeyError): @@ -1701,7 +2190,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_99 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_99 except (TypeError, ValueError, AttributeError, KeyError): @@ -1709,7 +2198,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = SendEmailTaskParams.from_dict(data) + task_params_type_100 = PageRootlyOnCallRespondersTaskParams.from_dict(data) return task_params_type_100 except (TypeError, ValueError, AttributeError, KeyError): @@ -1717,7 +2206,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_101 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) return task_params_type_101 except (TypeError, ValueError, AttributeError, KeyError): @@ -1725,15 +2214,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) + componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 = ( + PageVictorOpsOnCallRespondersTaskParamsType0.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 = ( + PageVictorOpsOnCallRespondersTaskParamsType1.from_dict(data) + ) - return task_params_type_102 + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SendSmsTaskParams.from_dict(data) + task_params_type_103 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + + return task_params_type_103 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_104 = PrintTaskParams.from_dict(data) return task_params_type_104 except (TypeError, ValueError, AttributeError, KeyError): @@ -1741,7 +2250,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_105 = PublishIncidentTaskParams.from_dict(data) return task_params_type_105 except (TypeError, ValueError, AttributeError, KeyError): @@ -1749,7 +2258,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_106 = RedisClientTaskParams.from_dict(data) return task_params_type_106 except (TypeError, ValueError, AttributeError, KeyError): @@ -1757,7 +2266,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_107 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_107 except (TypeError, ValueError, AttributeError, KeyError): @@ -1765,7 +2274,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_108 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_108 except (TypeError, ValueError, AttributeError, KeyError): @@ -1773,7 +2282,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_109 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_109 except (TypeError, ValueError, AttributeError, KeyError): @@ -1781,7 +2290,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_110 = SendEmailTaskParams.from_dict(data) return task_params_type_110 except (TypeError, ValueError, AttributeError, KeyError): @@ -1789,7 +2298,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_111 = SendDashboardReportTaskParams.from_dict(data) return task_params_type_111 except (TypeError, ValueError, AttributeError, KeyError): @@ -1797,7 +2306,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_112 = CreateSlackChannelTaskParams.from_dict(data) return task_params_type_112 except (TypeError, ValueError, AttributeError, KeyError): @@ -1805,15 +2314,31 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_0 = SendSlackMessageTaskParamsType0.from_dict(data) - return task_params_type_113 + return componentsschemassend_slack_message_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_1 = SendSlackMessageTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_2 = SendSlackMessageTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_114 = SendSmsTaskParams.from_dict(data) return task_params_type_114 except (TypeError, ValueError, AttributeError, KeyError): @@ -1821,7 +2346,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_115 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_115 except (TypeError, ValueError, AttributeError, KeyError): @@ -1829,7 +2354,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_116 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_116 except (TypeError, ValueError, AttributeError, KeyError): @@ -1837,7 +2362,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_117 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_117 except (TypeError, ValueError, AttributeError, KeyError): @@ -1845,7 +2370,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_118 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_118 except (TypeError, ValueError, AttributeError, KeyError): @@ -1853,7 +2378,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_119 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_119 except (TypeError, ValueError, AttributeError, KeyError): @@ -1861,7 +2386,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_120 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_120 except (TypeError, ValueError, AttributeError, KeyError): @@ -1869,7 +2394,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_121 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_121 except (TypeError, ValueError, AttributeError, KeyError): @@ -1877,7 +2402,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_122 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_122 except (TypeError, ValueError, AttributeError, KeyError): @@ -1885,7 +2410,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateStatusTaskParams.from_dict(data) + task_params_type_123 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_123 except (TypeError, ValueError, AttributeError, KeyError): @@ -1893,7 +2418,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_124 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_124 except (TypeError, ValueError, AttributeError, KeyError): @@ -1901,7 +2426,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_125 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_125 except (TypeError, ValueError, AttributeError, KeyError): @@ -1909,7 +2434,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_126 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_126 except (TypeError, ValueError, AttributeError, KeyError): @@ -1917,7 +2442,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_127 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_127 except (TypeError, ValueError, AttributeError, KeyError): @@ -1925,7 +2450,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_128 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_128 except (TypeError, ValueError, AttributeError, KeyError): @@ -1933,7 +2458,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_129 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_129 except (TypeError, ValueError, AttributeError, KeyError): @@ -1941,7 +2466,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_130 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_130 except (TypeError, ValueError, AttributeError, KeyError): @@ -1949,7 +2474,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_131 = UpdateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_131 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_132 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_132 except (TypeError, ValueError, AttributeError, KeyError): @@ -1957,7 +2490,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_133 = UpdateStatusTaskParams.from_dict(data) return task_params_type_133 except (TypeError, ValueError, AttributeError, KeyError): @@ -1965,7 +2498,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_134 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_134 except (TypeError, ValueError, AttributeError, KeyError): @@ -1973,7 +2506,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_135 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_135 except (TypeError, ValueError, AttributeError, KeyError): @@ -1981,140 +2514,104 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_136 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_136 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - AddActionItemTaskParams - | AddMicrosoftTeamsChatTabTaskParams - | AddRoleTaskParams - | AddTeamTaskParams - | AddToTimelineTaskParams - | Any - | ArchiveMicrosoftTeamsChannelsTaskParams - | ArchiveSlackChannelsTaskParams - | AttachDatadogDashboardsTaskParams - | AutoAssignRoleOpsgenieTaskParams - | AutoAssignRoleRootlyTaskParams - | AutoAssignRoleVictorOpsTaskParams - | CallPeopleTaskParams - | ChangeSlackChannelPrivacyTaskParams - | CreateAirtableTableRecordTaskParams - | CreateAnthropicChatCompletionTaskParams - | CreateAsanaSubtaskTaskParams - | CreateAsanaTaskTaskParams - | CreateClickupTaskTaskParams - | CreateCodaPageTaskParams - | CreateConfluencePageTaskParams - | CreateDatadogNotebookTaskParams - | CreateDropboxPaperPageTaskParams - | CreateGithubIssueTaskParams - | CreateGitlabIssueTaskParams - | CreateGoogleCalendarEventTaskParams - | CreateGoogleDocsPageTaskParams - | CreateGoogleDocsPermissionsTaskParams - | CreateGoogleGeminiChatCompletionTaskParams - | CreateGoogleMeetingTaskParams - | CreateGoToMeetingTaskParams - | CreateIncidentPostmortemTaskParams - | CreateIncidentTaskParams - | CreateJiraIssueTaskParams - | CreateJiraSubtaskTaskParams - | CreateJsmopsAlertTaskParams - | CreateLinearIssueCommentTaskParams - | CreateLinearIssueTaskParams - | CreateLinearSubtaskIssueTaskParams - | CreateMicrosoftTeamsChannelTaskParams - | CreateMicrosoftTeamsChatTaskParams - | CreateMicrosoftTeamsMeetingTaskParams - | CreateMistralChatCompletionTaskParams - | CreateMotionTaskTaskParams - | CreateNotionPageTaskParams - | CreateOpenaiChatCompletionTaskParams - | CreateOpsgenieAlertTaskParams - | CreateOutlookEventTaskParams - | CreatePagerdutyStatusUpdateTaskParams - | CreatePagertreeAlertTaskParams - | CreateQuipPageTaskParams - | CreateServiceNowIncidentTaskParams - | CreateSharepointPageTaskParams - | CreateShortcutTaskTaskParams - | CreateSlackChannelTaskParams - | CreateSubIncidentTaskParams - | CreateTrelloCardTaskParams - | CreateWatsonxChatCompletionTaskParams - | CreateWebexMeetingTaskParams - | CreateZendeskJiraLinkTaskParams - | CreateZendeskTicketTaskParams - | CreateZoomMeetingTaskParams - | GetAlertsTaskParams - | GetPulsesTaskParams - | HttpClientTaskParams - | InviteToMicrosoftTeamsChannelTaskParams - | InviteToSlackChannelOpsgenieTaskParams - | InviteToSlackChannelRootlyTaskParams - | InviteToSlackChannelVictorOpsTaskParams - | PageJsmopsOnCallRespondersTaskParams - | PageOpsgenieOnCallRespondersTaskParams - | PagePagerdutyOnCallRespondersTaskParams - | PageRootlyOnCallRespondersTaskParams - | PrintTaskParams - | PublishIncidentTaskParams - | RedisClientTaskParams - | RemoveGoogleDocsPermissionsTaskParams - | RenameMicrosoftTeamsChannelTaskParams - | RenameSlackChannelTaskParams - | RunCommandHerokuTaskParams - | SendDashboardReportTaskParams - | SendEmailTaskParams - | SendMicrosoftTeamsChatMessageTaskParams - | SendSmsTaskParams - | SendWhatsappMessageTaskParams - | SnapshotDatadogGraphTaskParams - | SnapshotGrafanaDashboardTaskParams - | SnapshotLookerLookTaskParams - | SnapshotNewRelicGraphTaskParams - | TriggerWorkflowTaskParams - | TweetTwitterMessageTaskParams - | Unset - | UpdateActionItemTaskParams - | UpdateAirtableTableRecordTaskParams - | UpdateAsanaTaskTaskParams - | UpdateAttachedAlertsTaskParams - | UpdateClickupTaskTaskParams - | UpdateCodaPageTaskParams - | UpdateConfluencePageTaskParams - | UpdateDatadogNotebookTaskParams - | UpdateDropboxPaperPageTaskParams - | UpdateGithubIssueTaskParams - | UpdateGitlabIssueTaskParams - | UpdateGoogleCalendarEventTaskParams - | UpdateGoogleDocsPageTaskParams - | UpdateIncidentPostmortemTaskParams - | UpdateIncidentStatusTimestampTaskParams - | UpdateIncidentTaskParams - | UpdateJiraIssueTaskParams - | UpdateLinearIssueTaskParams - | UpdateMotionTaskTaskParams - | UpdateNotionPageTaskParams - | UpdateOpsgenieAlertTaskParams - | UpdateOpsgenieIncidentTaskParams - | UpdatePagerdutyIncidentTaskParams - | UpdatePagertreeAlertTaskParams - | UpdateQuipPageTaskParams - | UpdateServiceNowIncidentTaskParams - | UpdateSharepointPageTaskParams - | UpdateShortcutStoryTaskParams - | UpdateShortcutTaskTaskParams - | UpdateSlackChannelTopicTaskParams - | UpdateStatusTaskParams - | UpdateTrelloCardTaskParams - | UpdateVictorOpsIncidentTaskParams - | UpdateZendeskTicketTaskParams, - data, - ) + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_137 = UpdateMotionTaskTaskParams.from_dict(data) + + return task_params_type_137 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_138 = UpdateZendeskTicketTaskParams.from_dict(data) + + return task_params_type_138 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_139 = UpdateAttachedAlertsTaskParams.from_dict(data) + + return task_params_type_139 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_140 = TriggerWorkflowTaskParams.from_dict(data) + + return task_params_type_140 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_0 = SendSlackBlocksTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_1 = SendSlackBlocksTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_2 = SendSlackBlocksTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_142 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + + return task_params_type_142 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_143 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + + return task_params_type_143 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_144 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + + return task_params_type_144 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_145 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_145 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + task_params_type_146 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_146 task_params = _parse_task_params(d.pop("task_params", UNSET)) diff --git a/rootly_sdk/models/update_zendesk_ticket_task_params.py b/rootly_sdk/models/update_zendesk_ticket_task_params.py index fbc11737..1791e774 100644 --- a/rootly_sdk/models/update_zendesk_ticket_task_params.py +++ b/rootly_sdk/models/update_zendesk_ticket_task_params.py @@ -47,6 +47,7 @@ class UpdateZendeskTicketTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + ticket_id = self.ticket_id task_type: str | Unset = UNSET diff --git a/rootly_sdk/models/uptime_chart_response.py b/rootly_sdk/models/uptime_chart_response.py index 66c79963..0662c7d6 100644 --- a/rootly_sdk/models/uptime_chart_response.py +++ b/rootly_sdk/models/uptime_chart_response.py @@ -1,31 +1,52 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +if TYPE_CHECKING: + from ..models.uptime_chart_response_data import UptimeChartResponseData + + T = TypeVar("T", bound="UptimeChartResponse") @_attrs_define class UptimeChartResponse: - """ """ + """ + Attributes: + data (UptimeChartResponseData): + """ + data: UptimeChartResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.uptime_chart_response_data import UptimeChartResponseData + d = dict(src_dict) - uptime_chart_response = cls() + data = UptimeChartResponseData.from_dict(d.pop("data")) + + uptime_chart_response = cls( + data=data, + ) uptime_chart_response.additional_properties = d return uptime_chart_response diff --git a/rootly_sdk/models/uptime_chart_response_data.py b/rootly_sdk/models/uptime_chart_response_data.py new file mode 100644 index 00000000..72ef2ae1 --- /dev/null +++ b/rootly_sdk/models/uptime_chart_response_data.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UptimeChartResponseData") + + +@_attrs_define +class UptimeChartResponseData: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + uptime_chart_response_data = cls() + + uptime_chart_response_data.additional_properties = d + return uptime_chart_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/user_email_address_list.py b/rootly_sdk/models/user_email_address_list.py index 5ac02e51..c66109e3 100644 --- a/rootly_sdk/models/user_email_address_list.py +++ b/rootly_sdk/models/user_email_address_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_email_address_list_data_item import UserEmailAddressListDataItem @@ -22,14 +25,17 @@ class UserEmailAddressList: data (list[UserEmailAddressListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[UserEmailAddressListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_email_address_list_data_item import UserEmailAddressListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_email_address_list = cls( data=data, links=links, meta=meta, + included=included, ) user_email_address_list.additional_properties = d diff --git a/rootly_sdk/models/user_email_address_list_data_item.py b/rootly_sdk/models/user_email_address_list_data_item.py index b5979d41..2e958798 100644 --- a/rootly_sdk/models/user_email_address_list_data_item.py +++ b/rootly_sdk/models/user_email_address_list_data_item.py @@ -33,6 +33,7 @@ class UserEmailAddressListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_email_address_response.py b/rootly_sdk/models/user_email_address_response.py index 271c4b0b..78fed502 100644 --- a/rootly_sdk/models/user_email_address_response.py +++ b/rootly_sdk/models/user_email_address_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_email_address_response_data import UserEmailAddressResponseData @@ -18,14 +21,24 @@ class UserEmailAddressResponse: """ Attributes: data (UserEmailAddressResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: UserEmailAddressResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_email_address_response_data import UserEmailAddressResponseData d = dict(src_dict) data = UserEmailAddressResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_email_address_response = cls( data=data, + included=included, ) user_email_address_response.additional_properties = d diff --git a/rootly_sdk/models/user_email_address_response_data.py b/rootly_sdk/models/user_email_address_response_data.py index e6e23d8c..8d79cd83 100644 --- a/rootly_sdk/models/user_email_address_response_data.py +++ b/rootly_sdk/models/user_email_address_response_data.py @@ -33,6 +33,7 @@ class UserEmailAddressResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_flat_response.py b/rootly_sdk/models/user_flat_response.py index 72654e6b..ed5c61d3 100644 --- a/rootly_sdk/models/user_flat_response.py +++ b/rootly_sdk/models/user_flat_response.py @@ -13,28 +13,38 @@ @_attrs_define class UserFlatResponse: - """Flat user object as returned by serializer + """Flat user attributes as returned by UserFlatSerializer (no nested associations) Attributes: id (int): User ID - email (str): User email - created_at (str): User creation timestamp - updated_at (str): User last update timestamp - first_name (None | str | Unset): User first name - last_name (None | str | Unset): User last name - full_name (None | str | Unset): User full name - full_name_with_team (None | str | Unset): User full name with team - time_zone (None | str | Unset): User time zone + email (str): Email address + created_at (str): Date of creation + updated_at (str): Date of last update + name (str | Unset): Display name + phone (None | str | Unset): Primary phone number + phone_2 (None | str | Unset): Secondary phone number + first_name (None | str | Unset): First name + last_name (None | str | Unset): Last name + preferred_name (None | str | Unset): Preferred name + full_name (None | str | Unset): Full name + full_name_with_team (None | str | Unset): Full name with team context + slack_id (None | str | Unset): Slack user ID + time_zone (None | str | Unset): IANA time zone """ id: int email: str created_at: str updated_at: str + name: str | Unset = UNSET + phone: None | str | Unset = UNSET + phone_2: None | str | Unset = UNSET first_name: None | str | Unset = UNSET last_name: None | str | Unset = UNSET + preferred_name: None | str | Unset = UNSET full_name: None | str | Unset = UNSET full_name_with_team: None | str | Unset = UNSET + slack_id: None | str | Unset = UNSET time_zone: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -47,6 +57,20 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at + name = self.name + + phone: None | str | Unset + if isinstance(self.phone, Unset): + phone = UNSET + else: + phone = self.phone + + phone_2: None | str | Unset + if isinstance(self.phone_2, Unset): + phone_2 = UNSET + else: + phone_2 = self.phone_2 + first_name: None | str | Unset if isinstance(self.first_name, Unset): first_name = UNSET @@ -59,6 +83,12 @@ def to_dict(self) -> dict[str, Any]: else: last_name = self.last_name + preferred_name: None | str | Unset + if isinstance(self.preferred_name, Unset): + preferred_name = UNSET + else: + preferred_name = self.preferred_name + full_name: None | str | Unset if isinstance(self.full_name, Unset): full_name = UNSET @@ -71,6 +101,12 @@ def to_dict(self) -> dict[str, Any]: else: full_name_with_team = self.full_name_with_team + slack_id: None | str | Unset + if isinstance(self.slack_id, Unset): + slack_id = UNSET + else: + slack_id = self.slack_id + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET @@ -87,14 +123,24 @@ def to_dict(self) -> dict[str, Any]: "updated_at": updated_at, } ) + if name is not UNSET: + field_dict["name"] = name + if phone is not UNSET: + field_dict["phone"] = phone + if phone_2 is not UNSET: + field_dict["phone_2"] = phone_2 if first_name is not UNSET: field_dict["first_name"] = first_name if last_name is not UNSET: field_dict["last_name"] = last_name + if preferred_name is not UNSET: + field_dict["preferred_name"] = preferred_name if full_name is not UNSET: field_dict["full_name"] = full_name if full_name_with_team is not UNSET: field_dict["full_name_with_team"] = full_name_with_team + if slack_id is not UNSET: + field_dict["slack_id"] = slack_id if time_zone is not UNSET: field_dict["time_zone"] = time_zone @@ -111,6 +157,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") + name = d.pop("name", UNSET) + + def _parse_phone(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone = _parse_phone(d.pop("phone", UNSET)) + + def _parse_phone_2(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_2 = _parse_phone_2(d.pop("phone_2", UNSET)) + def _parse_first_name(data: object) -> None | str | Unset: if data is None: return data @@ -129,6 +195,15 @@ def _parse_last_name(data: object) -> None | str | Unset: last_name = _parse_last_name(d.pop("last_name", UNSET)) + def _parse_preferred_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + preferred_name = _parse_preferred_name(d.pop("preferred_name", UNSET)) + def _parse_full_name(data: object) -> None | str | Unset: if data is None: return data @@ -147,6 +222,15 @@ def _parse_full_name_with_team(data: object) -> None | str | Unset: full_name_with_team = _parse_full_name_with_team(d.pop("full_name_with_team", UNSET)) + def _parse_slack_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + slack_id = _parse_slack_id(d.pop("slack_id", UNSET)) + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data @@ -161,10 +245,15 @@ def _parse_time_zone(data: object) -> None | str | Unset: email=email, created_at=created_at, updated_at=updated_at, + name=name, + phone=phone, + phone_2=phone_2, first_name=first_name, last_name=last_name, + preferred_name=preferred_name, full_name=full_name, full_name_with_team=full_name_with_team, + slack_id=slack_id, time_zone=time_zone, ) diff --git a/rootly_sdk/models/user_list.py b/rootly_sdk/models/user_list.py index b03a1139..45656060 100644 --- a/rootly_sdk/models/user_list.py +++ b/rootly_sdk/models/user_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_list_data_item import UserListDataItem @@ -22,14 +25,17 @@ class UserList: data (list[UserListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[UserListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_list_data_item import UserListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_list = cls( data=data, links=links, meta=meta, + included=included, ) user_list.additional_properties = d diff --git a/rootly_sdk/models/user_list_data_item.py b/rootly_sdk/models/user_list_data_item.py index c9692dbd..96f8c048 100644 --- a/rootly_sdk/models/user_list_data_item.py +++ b/rootly_sdk/models/user_list_data_item.py @@ -34,6 +34,7 @@ class UserListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_notification_rule_enabled_contact_types_item.py b/rootly_sdk/models/user_notification_rule_enabled_contact_types_item.py index b2e67651..4858502c 100644 --- a/rootly_sdk/models/user_notification_rule_enabled_contact_types_item.py +++ b/rootly_sdk/models/user_notification_rule_enabled_contact_types_item.py @@ -1,11 +1,14 @@ from typing import Literal, cast -UserNotificationRuleEnabledContactTypesItem = Literal["call", "device", "email", "non_critical_device", "slack", "sms"] +UserNotificationRuleEnabledContactTypesItem = Literal[ + "call", "device", "email", "google_chat", "non_critical_device", "slack", "sms" +] USER_NOTIFICATION_RULE_ENABLED_CONTACT_TYPES_ITEM_VALUES: set[UserNotificationRuleEnabledContactTypesItem] = { "call", "device", "email", + "google_chat", "non_critical_device", "slack", "sms", diff --git a/rootly_sdk/models/user_notification_rule_list.py b/rootly_sdk/models/user_notification_rule_list.py index 348f64aa..5d45a1b1 100644 --- a/rootly_sdk/models/user_notification_rule_list.py +++ b/rootly_sdk/models/user_notification_rule_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_notification_rule_list_data_item import UserNotificationRuleListDataItem @@ -22,14 +25,17 @@ class UserNotificationRuleList: data (list[UserNotificationRuleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[UserNotificationRuleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_notification_rule_list_data_item import UserNotificationRuleListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_notification_rule_list = cls( data=data, links=links, meta=meta, + included=included, ) user_notification_rule_list.additional_properties = d diff --git a/rootly_sdk/models/user_notification_rule_list_data_item.py b/rootly_sdk/models/user_notification_rule_list_data_item.py index 52215b0c..a31d183a 100644 --- a/rootly_sdk/models/user_notification_rule_list_data_item.py +++ b/rootly_sdk/models/user_notification_rule_list_data_item.py @@ -33,6 +33,7 @@ class UserNotificationRuleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_notification_rule_response.py b/rootly_sdk/models/user_notification_rule_response.py index 94079f59..d84b742e 100644 --- a/rootly_sdk/models/user_notification_rule_response.py +++ b/rootly_sdk/models/user_notification_rule_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_notification_rule_response_data import UserNotificationRuleResponseData @@ -18,14 +21,24 @@ class UserNotificationRuleResponse: """ Attributes: data (UserNotificationRuleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: UserNotificationRuleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_notification_rule_response_data import UserNotificationRuleResponseData d = dict(src_dict) data = UserNotificationRuleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_notification_rule_response = cls( data=data, + included=included, ) user_notification_rule_response.additional_properties = d diff --git a/rootly_sdk/models/user_notification_rule_response_data.py b/rootly_sdk/models/user_notification_rule_response_data.py index ed717983..76739bf0 100644 --- a/rootly_sdk/models/user_notification_rule_response_data.py +++ b/rootly_sdk/models/user_notification_rule_response_data.py @@ -33,6 +33,7 @@ class UserNotificationRuleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_phone_number_list.py b/rootly_sdk/models/user_phone_number_list.py index e9a7b3a8..862069a5 100644 --- a/rootly_sdk/models/user_phone_number_list.py +++ b/rootly_sdk/models/user_phone_number_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_phone_number_list_data_item import UserPhoneNumberListDataItem @@ -22,14 +25,17 @@ class UserPhoneNumberList: data (list[UserPhoneNumberListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[UserPhoneNumberListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_phone_number_list_data_item import UserPhoneNumberListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_phone_number_list = cls( data=data, links=links, meta=meta, + included=included, ) user_phone_number_list.additional_properties = d diff --git a/rootly_sdk/models/user_phone_number_list_data_item.py b/rootly_sdk/models/user_phone_number_list_data_item.py index afe5c8cb..5fec150d 100644 --- a/rootly_sdk/models/user_phone_number_list_data_item.py +++ b/rootly_sdk/models/user_phone_number_list_data_item.py @@ -33,6 +33,7 @@ class UserPhoneNumberListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_phone_number_response.py b/rootly_sdk/models/user_phone_number_response.py index f800a3e8..e4451cf2 100644 --- a/rootly_sdk/models/user_phone_number_response.py +++ b/rootly_sdk/models/user_phone_number_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_phone_number_response_data import UserPhoneNumberResponseData @@ -18,14 +21,24 @@ class UserPhoneNumberResponse: """ Attributes: data (UserPhoneNumberResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: UserPhoneNumberResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_phone_number_response_data import UserPhoneNumberResponseData d = dict(src_dict) data = UserPhoneNumberResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_phone_number_response = cls( data=data, + included=included, ) user_phone_number_response.additional_properties = d diff --git a/rootly_sdk/models/user_phone_number_response_data.py b/rootly_sdk/models/user_phone_number_response_data.py index faa7c9ef..e8a248ba 100644 --- a/rootly_sdk/models/user_phone_number_response_data.py +++ b/rootly_sdk/models/user_phone_number_response_data.py @@ -33,6 +33,7 @@ class UserPhoneNumberResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_relationships.py b/rootly_sdk/models/user_relationships.py index ccf31d0d..1b6cfd67 100644 --- a/rootly_sdk/models/user_relationships.py +++ b/rootly_sdk/models/user_relationships.py @@ -29,6 +29,7 @@ class UserRelationships: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + role: dict[str, Any] | Unset = UNSET if not isinstance(self.role, Unset): role = self.role.to_dict() diff --git a/rootly_sdk/models/user_response.py b/rootly_sdk/models/user_response.py index 4f3139ab..e0c5a147 100644 --- a/rootly_sdk/models/user_response.py +++ b/rootly_sdk/models/user_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_response_data import UserResponseData @@ -18,14 +21,24 @@ class UserResponse: """ Attributes: data (UserResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: UserResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_response_data import UserResponseData d = dict(src_dict) data = UserResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_response = cls( data=data, + included=included, ) user_response.additional_properties = d diff --git a/rootly_sdk/models/user_response_data.py b/rootly_sdk/models/user_response_data.py index adf3b1f1..483c1d26 100644 --- a/rootly_sdk/models/user_response_data.py +++ b/rootly_sdk/models/user_response_data.py @@ -34,6 +34,7 @@ class UserResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/webhooks_delivery_list.py b/rootly_sdk/models/webhooks_delivery_list.py index d717e142..a059491e 100644 --- a/rootly_sdk/models/webhooks_delivery_list.py +++ b/rootly_sdk/models/webhooks_delivery_list.py @@ -9,6 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.webhooks_delivery_list_data_item import WebhooksDeliveryListDataItem @@ -24,14 +25,17 @@ class WebhooksDeliveryList: data (list[WebhooksDeliveryListDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WebhooksDeliveryListDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,11 +67,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.webhooks_delivery_list_data_item import WebhooksDeliveryListDataItem @@ -87,10 +101,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + webhooks_delivery_list = cls( data=data, links=links, meta=meta, + included=included, ) webhooks_delivery_list.additional_properties = d diff --git a/rootly_sdk/models/webhooks_delivery_list_data_item.py b/rootly_sdk/models/webhooks_delivery_list_data_item.py index 5fa5e915..0cbb26a3 100644 --- a/rootly_sdk/models/webhooks_delivery_list_data_item.py +++ b/rootly_sdk/models/webhooks_delivery_list_data_item.py @@ -33,6 +33,7 @@ class WebhooksDeliveryListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/webhooks_delivery_response.py b/rootly_sdk/models/webhooks_delivery_response.py index 65f5c806..f75bc185 100644 --- a/rootly_sdk/models/webhooks_delivery_response.py +++ b/rootly_sdk/models/webhooks_delivery_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_delivery_response_data import WebhooksDeliveryResponseData @@ -18,14 +21,24 @@ class WebhooksDeliveryResponse: """ Attributes: data (WebhooksDeliveryResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WebhooksDeliveryResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_delivery_response_data import WebhooksDeliveryResponseData d = dict(src_dict) data = WebhooksDeliveryResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + webhooks_delivery_response = cls( data=data, + included=included, ) webhooks_delivery_response.additional_properties = d diff --git a/rootly_sdk/models/webhooks_delivery_response_data.py b/rootly_sdk/models/webhooks_delivery_response_data.py index 034eb5c6..d4c4ca28 100644 --- a/rootly_sdk/models/webhooks_delivery_response_data.py +++ b/rootly_sdk/models/webhooks_delivery_response_data.py @@ -33,6 +33,7 @@ class WebhooksDeliveryResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/webhooks_endpoint.py b/rootly_sdk/models/webhooks_endpoint.py index a8e405b2..54589ce4 100644 --- a/rootly_sdk/models/webhooks_endpoint.py +++ b/rootly_sdk/models/webhooks_endpoint.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,6 +12,10 @@ ) from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem + + T = TypeVar("T", bound="WebhooksEndpoint") @@ -27,6 +31,8 @@ class WebhooksEndpoint: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the endpoint + custom_headers (list[WebhooksEndpointCustomHeadersItem] | Unset): Custom HTTP headers sent with each delivery. + Max 10. Reserved names (Content-Type, X-Rootly-Signature, Host, etc.) are rejected. """ name: str @@ -37,9 +43,11 @@ class WebhooksEndpoint: created_at: str updated_at: str slug: str | Unset = UNSET + custom_headers: list[WebhooksEndpointCustomHeadersItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + name = self.name url = self.url @@ -59,6 +67,13 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + custom_headers: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.custom_headers, Unset): + custom_headers = [] + for custom_headers_item_data in self.custom_headers: + custom_headers_item = custom_headers_item_data.to_dict() + custom_headers.append(custom_headers_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -74,11 +89,15 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if custom_headers is not UNSET: + field_dict["custom_headers"] = custom_headers return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem + d = dict(src_dict) name = d.pop("name") @@ -101,6 +120,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _custom_headers = d.pop("custom_headers", UNSET) + custom_headers: list[WebhooksEndpointCustomHeadersItem] | Unset = UNSET + if _custom_headers is not UNSET: + custom_headers = [] + for custom_headers_item_data in _custom_headers: + custom_headers_item = WebhooksEndpointCustomHeadersItem.from_dict(custom_headers_item_data) + + custom_headers.append(custom_headers_item) + webhooks_endpoint = cls( name=name, url=url, @@ -110,6 +138,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at=created_at, updated_at=updated_at, slug=slug, + custom_headers=custom_headers, ) webhooks_endpoint.additional_properties = d diff --git a/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py b/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py new file mode 100644 index 00000000..4dc7a532 --- /dev/null +++ b/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="WebhooksEndpointCustomHeadersItem") + + +@_attrs_define +class WebhooksEndpointCustomHeadersItem: + """ + Attributes: + name (str): + value (str): + """ + + name: str + value: str + + def to_dict(self) -> dict[str, Any]: + name = self.name + + value = self.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + value = d.pop("value") + + webhooks_endpoint_custom_headers_item = cls( + name=name, + value=value, + ) + + return webhooks_endpoint_custom_headers_item diff --git a/rootly_sdk/models/webhooks_endpoint_event_types_item.py b/rootly_sdk/models/webhooks_endpoint_event_types_item.py index d592d2cf..8c8f32c8 100644 --- a/rootly_sdk/models/webhooks_endpoint_event_types_item.py +++ b/rootly_sdk/models/webhooks_endpoint_event_types_item.py @@ -2,6 +2,7 @@ WebhooksEndpointEventTypesItem = Literal[ "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -30,10 +31,12 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", ] WEBHOOKS_ENDPOINT_EVENT_TYPES_ITEM_VALUES: set[WebhooksEndpointEventTypesItem] = { "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -62,6 +65,7 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", } diff --git a/rootly_sdk/models/webhooks_endpoint_list.py b/rootly_sdk/models/webhooks_endpoint_list.py index 8555d0b7..7948809d 100644 --- a/rootly_sdk/models/webhooks_endpoint_list.py +++ b/rootly_sdk/models/webhooks_endpoint_list.py @@ -9,6 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.webhooks_endpoint_list_data_item import WebhooksEndpointListDataItem @@ -24,14 +25,17 @@ class WebhooksEndpointList: data (list[WebhooksEndpointListDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WebhooksEndpointListDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +49,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,11 +67,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.webhooks_endpoint_list_data_item import WebhooksEndpointListDataItem @@ -87,10 +101,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + webhooks_endpoint_list = cls( data=data, links=links, meta=meta, + included=included, ) webhooks_endpoint_list.additional_properties = d diff --git a/rootly_sdk/models/webhooks_endpoint_list_data_item.py b/rootly_sdk/models/webhooks_endpoint_list_data_item.py index a19f4014..c3c181eb 100644 --- a/rootly_sdk/models/webhooks_endpoint_list_data_item.py +++ b/rootly_sdk/models/webhooks_endpoint_list_data_item.py @@ -33,6 +33,7 @@ class WebhooksEndpointListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/webhooks_endpoint_response.py b/rootly_sdk/models/webhooks_endpoint_response.py index 62aa441b..0b880393 100644 --- a/rootly_sdk/models/webhooks_endpoint_response.py +++ b/rootly_sdk/models/webhooks_endpoint_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_endpoint_response_data import WebhooksEndpointResponseData @@ -18,14 +21,24 @@ class WebhooksEndpointResponse: """ Attributes: data (WebhooksEndpointResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WebhooksEndpointResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_endpoint_response_data import WebhooksEndpointResponseData d = dict(src_dict) data = WebhooksEndpointResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + webhooks_endpoint_response = cls( data=data, + included=included, ) webhooks_endpoint_response.additional_properties = d diff --git a/rootly_sdk/models/webhooks_endpoint_response_data.py b/rootly_sdk/models/webhooks_endpoint_response_data.py index b4a2d8ed..d3e2828f 100644 --- a/rootly_sdk/models/webhooks_endpoint_response_data.py +++ b/rootly_sdk/models/webhooks_endpoint_response_data.py @@ -33,6 +33,7 @@ class WebhooksEndpointResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition.py b/rootly_sdk/models/workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..511e7fa5 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition.py @@ -0,0 +1,187 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workflow_action_item_form_field_condition_action_item_condition import ( + WorkflowActionItemFormFieldConditionActionItemCondition, + check_workflow_action_item_form_field_condition_action_item_condition, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="WorkflowActionItemFormFieldCondition") + + +@_attrs_define +class WorkflowActionItemFormFieldCondition: + """ + Attributes: + workflow_id (str): The workflow for this condition + form_field_id (str): The custom field for this condition + action_item_condition (WorkflowActionItemFormFieldConditionActionItemCondition): The trigger condition Default: + 'ANY'. + selected_catalog_entity_ids (list[str]): + selected_option_ids (list[str]): + selected_user_ids (list[int]): + values (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_cause_ids (list[str] | Unset): + selected_environment_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): + """ + + workflow_id: str + form_field_id: str + selected_catalog_entity_ids: list[str] + selected_option_ids: list[str] + selected_user_ids: list[int] + action_item_condition: WorkflowActionItemFormFieldConditionActionItemCondition = "ANY" + values: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + workflow_id = self.workflow_id + + form_field_id = self.form_field_id + + action_item_condition: str = self.action_item_condition + + selected_catalog_entity_ids = self.selected_catalog_entity_ids + + selected_option_ids = self.selected_option_ids + + selected_user_ids = self.selected_user_ids + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + selected_functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + selected_group_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_group_ids, Unset): + selected_group_ids = self.selected_group_ids + + selected_service_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_service_ids, Unset): + selected_service_ids = self.selected_service_ids + + selected_cause_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_cause_ids, Unset): + selected_cause_ids = self.selected_cause_ids + + selected_environment_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + selected_incident_type_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_incident_type_ids, Unset): + selected_incident_type_ids = self.selected_incident_type_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workflow_id": workflow_id, + "form_field_id": form_field_id, + "action_item_condition": action_item_condition, + "selected_catalog_entity_ids": selected_catalog_entity_ids, + "selected_option_ids": selected_option_ids, + "selected_user_ids": selected_user_ids, + } + ) + if values is not UNSET: + field_dict["values"] = values + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workflow_id = d.pop("workflow_id") + + form_field_id = d.pop("form_field_id") + + action_item_condition = check_workflow_action_item_form_field_condition_action_item_condition( + d.pop("action_item_condition") + ) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids")) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids")) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids")) + + values = cast(list[str], d.pop("values", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + workflow_action_item_form_field_condition = cls( + workflow_id=workflow_id, + form_field_id=form_field_id, + action_item_condition=action_item_condition, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_option_ids=selected_option_ids, + selected_user_ids=selected_user_ids, + values=values, + selected_functionality_ids=selected_functionality_ids, + selected_group_ids=selected_group_ids, + selected_service_ids=selected_service_ids, + selected_cause_ids=selected_cause_ids, + selected_environment_ids=selected_environment_ids, + selected_incident_type_ids=selected_incident_type_ids, + ) + + workflow_action_item_form_field_condition.additional_properties = d + return workflow_action_item_form_field_condition + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_action_item_condition.py b/rootly_sdk/models/workflow_action_item_form_field_condition_action_item_condition.py new file mode 100644 index 00000000..a42f286b --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_action_item_condition.py @@ -0,0 +1,31 @@ +from typing import Literal, cast + +WorkflowActionItemFormFieldConditionActionItemCondition = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_ACTION_ITEM_CONDITION_VALUES: set[ + WorkflowActionItemFormFieldConditionActionItemCondition +] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_workflow_action_item_form_field_condition_action_item_condition( + value: str | None, +) -> WorkflowActionItemFormFieldConditionActionItemCondition | None: + if value is None: + return None + if value in WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_ACTION_ITEM_CONDITION_VALUES: + return cast(WorkflowActionItemFormFieldConditionActionItemCondition, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_ACTION_ITEM_CONDITION_VALUES!r}" + ) diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_list.py b/rootly_sdk/models/workflow_action_item_form_field_condition_list.py new file mode 100644 index 00000000..b855ca58 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_list.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.meta import Meta + from ..models.workflow_action_item_form_field_condition_list_data_item import ( + WorkflowActionItemFormFieldConditionListDataItem, + ) + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldConditionList") + + +@_attrs_define +class WorkflowActionItemFormFieldConditionList: + """ + Attributes: + data (list[WorkflowActionItemFormFieldConditionListDataItem]): + links (Links): + meta (Meta): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: list[WorkflowActionItemFormFieldConditionListDataItem] + links: Links + meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links = self.links.to_dict() + + meta = self.meta.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "links": links, + "meta": meta, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.meta import Meta + from ..models.workflow_action_item_form_field_condition_list_data_item import ( + WorkflowActionItemFormFieldConditionListDataItem, + ) + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = WorkflowActionItemFormFieldConditionListDataItem.from_dict(data_item_data) + + data.append(data_item) + + links = Links.from_dict(d.pop("links")) + + meta = Meta.from_dict(d.pop("meta")) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + workflow_action_item_form_field_condition_list = cls( + data=data, + links=links, + meta=meta, + included=included, + ) + + workflow_action_item_form_field_condition_list.additional_properties = d + return workflow_action_item_form_field_condition_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py new file mode 100644 index 00000000..0196c392 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workflow_action_item_form_field_condition_list_data_item_type import ( + WorkflowActionItemFormFieldConditionListDataItemType, + check_workflow_action_item_form_field_condition_list_data_item_type, +) + +if TYPE_CHECKING: + from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldConditionListDataItem") + + +@_attrs_define +class WorkflowActionItemFormFieldConditionListDataItem: + """ + Attributes: + id (str): Unique ID of the workflow_action_item_form_field_condition + type_ (WorkflowActionItemFormFieldConditionListDataItemType): + attributes (WorkflowActionItemFormFieldCondition): + """ + + id: str + type_: WorkflowActionItemFormFieldConditionListDataItemType + attributes: WorkflowActionItemFormFieldCondition + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_workflow_action_item_form_field_condition_list_data_item_type(d.pop("type")) + + attributes = WorkflowActionItemFormFieldCondition.from_dict(d.pop("attributes")) + + workflow_action_item_form_field_condition_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + workflow_action_item_form_field_condition_list_data_item.additional_properties = d + return workflow_action_item_form_field_condition_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item_type.py b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item_type.py new file mode 100644 index 00000000..e154aa36 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +WorkflowActionItemFormFieldConditionListDataItemType = Literal["workflow_action_item_form_field_conditions"] + +WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_LIST_DATA_ITEM_TYPE_VALUES: set[ + WorkflowActionItemFormFieldConditionListDataItemType +] = { + "workflow_action_item_form_field_conditions", +} + + +def check_workflow_action_item_form_field_condition_list_data_item_type( + value: str | None, +) -> WorkflowActionItemFormFieldConditionListDataItemType | None: + if value is None: + return None + if value in WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_LIST_DATA_ITEM_TYPE_VALUES: + return cast(WorkflowActionItemFormFieldConditionListDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_LIST_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_response.py b/rootly_sdk/models/workflow_action_item_form_field_condition_response.py new file mode 100644 index 00000000..d5a6bc3c --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_response.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.workflow_action_item_form_field_condition_response_data import ( + WorkflowActionItemFormFieldConditionResponseData, + ) + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldConditionResponse") + + +@_attrs_define +class WorkflowActionItemFormFieldConditionResponse: + """ + Attributes: + data (WorkflowActionItemFormFieldConditionResponseData): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: WorkflowActionItemFormFieldConditionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + data = self.data.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.workflow_action_item_form_field_condition_response_data import ( + WorkflowActionItemFormFieldConditionResponseData, + ) + + d = dict(src_dict) + data = WorkflowActionItemFormFieldConditionResponseData.from_dict(d.pop("data")) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + workflow_action_item_form_field_condition_response = cls( + data=data, + included=included, + ) + + workflow_action_item_form_field_condition_response.additional_properties = d + return workflow_action_item_form_field_condition_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py new file mode 100644 index 00000000..ba8b9202 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.workflow_action_item_form_field_condition_response_data_type import ( + WorkflowActionItemFormFieldConditionResponseDataType, + check_workflow_action_item_form_field_condition_response_data_type, +) + +if TYPE_CHECKING: + from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldConditionResponseData") + + +@_attrs_define +class WorkflowActionItemFormFieldConditionResponseData: + """ + Attributes: + id (str): Unique ID of the workflow_action_item_form_field_condition + type_ (WorkflowActionItemFormFieldConditionResponseDataType): + attributes (WorkflowActionItemFormFieldCondition): + """ + + id: str + type_: WorkflowActionItemFormFieldConditionResponseDataType + attributes: WorkflowActionItemFormFieldCondition + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_workflow_action_item_form_field_condition_response_data_type(d.pop("type")) + + attributes = WorkflowActionItemFormFieldCondition.from_dict(d.pop("attributes")) + + workflow_action_item_form_field_condition_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + workflow_action_item_form_field_condition_response_data.additional_properties = d + return workflow_action_item_form_field_condition_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_response_data_type.py b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data_type.py new file mode 100644 index 00000000..c91f2c5e --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +WorkflowActionItemFormFieldConditionResponseDataType = Literal["workflow_action_item_form_field_conditions"] + +WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_RESPONSE_DATA_TYPE_VALUES: set[ + WorkflowActionItemFormFieldConditionResponseDataType +] = { + "workflow_action_item_form_field_conditions", +} + + +def check_workflow_action_item_form_field_condition_response_data_type( + value: str | None, +) -> WorkflowActionItemFormFieldConditionResponseDataType | None: + if value is None: + return None + if value in WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_RESPONSE_DATA_TYPE_VALUES: + return cast(WorkflowActionItemFormFieldConditionResponseDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_RESPONSE_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/workflow_custom_field_selection_list.py b/rootly_sdk/models/workflow_custom_field_selection_list.py index 22d392a7..c4c1b992 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_list.py +++ b/rootly_sdk/models/workflow_custom_field_selection_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_custom_field_selection_list_data_item import WorkflowCustomFieldSelectionListDataItem @@ -22,14 +25,17 @@ class WorkflowCustomFieldSelectionList: data (list[WorkflowCustomFieldSelectionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowCustomFieldSelectionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_custom_field_selection_list_data_item import WorkflowCustomFieldSelectionListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_custom_field_selection_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_custom_field_selection_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_custom_field_selection_list_data_item.py b/rootly_sdk/models/workflow_custom_field_selection_list_data_item.py index efbc03c1..3c0c25c7 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_list_data_item.py +++ b/rootly_sdk/models/workflow_custom_field_selection_list_data_item.py @@ -33,6 +33,7 @@ class WorkflowCustomFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_custom_field_selection_response.py b/rootly_sdk/models/workflow_custom_field_selection_response.py index 04fffc61..359a6902 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_response.py +++ b/rootly_sdk/models/workflow_custom_field_selection_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_custom_field_selection_response_data import WorkflowCustomFieldSelectionResponseData @@ -18,14 +21,24 @@ class WorkflowCustomFieldSelectionResponse: """ Attributes: data (WorkflowCustomFieldSelectionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowCustomFieldSelectionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_custom_field_selection_response_data import WorkflowCustomFieldSelectionResponseData d = dict(src_dict) data = WorkflowCustomFieldSelectionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_custom_field_selection_response = cls( data=data, + included=included, ) workflow_custom_field_selection_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_custom_field_selection_response_data.py b/rootly_sdk/models/workflow_custom_field_selection_response_data.py index 48636735..a6358569 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_response_data.py +++ b/rootly_sdk/models/workflow_custom_field_selection_response_data.py @@ -33,6 +33,7 @@ class WorkflowCustomFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_form_field_condition_list.py b/rootly_sdk/models/workflow_form_field_condition_list.py index 8292e787..dfbfcc0d 100644 --- a/rootly_sdk/models/workflow_form_field_condition_list.py +++ b/rootly_sdk/models/workflow_form_field_condition_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_form_field_condition_list_data_item import WorkflowFormFieldConditionListDataItem @@ -22,14 +25,17 @@ class WorkflowFormFieldConditionList: data (list[WorkflowFormFieldConditionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowFormFieldConditionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_form_field_condition_list_data_item import WorkflowFormFieldConditionListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_form_field_condition_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_form_field_condition_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_form_field_condition_list_data_item.py b/rootly_sdk/models/workflow_form_field_condition_list_data_item.py index 9c98bfa0..3faa4ee9 100644 --- a/rootly_sdk/models/workflow_form_field_condition_list_data_item.py +++ b/rootly_sdk/models/workflow_form_field_condition_list_data_item.py @@ -33,6 +33,7 @@ class WorkflowFormFieldConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_form_field_condition_response.py b/rootly_sdk/models/workflow_form_field_condition_response.py index 51a5c101..a9ea7141 100644 --- a/rootly_sdk/models/workflow_form_field_condition_response.py +++ b/rootly_sdk/models/workflow_form_field_condition_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_form_field_condition_response_data import WorkflowFormFieldConditionResponseData @@ -18,14 +21,24 @@ class WorkflowFormFieldConditionResponse: """ Attributes: data (WorkflowFormFieldConditionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowFormFieldConditionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_form_field_condition_response_data import WorkflowFormFieldConditionResponseData d = dict(src_dict) data = WorkflowFormFieldConditionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_form_field_condition_response = cls( data=data, + included=included, ) workflow_form_field_condition_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_form_field_condition_response_data.py b/rootly_sdk/models/workflow_form_field_condition_response_data.py index a4b46959..e38e325b 100644 --- a/rootly_sdk/models/workflow_form_field_condition_response_data.py +++ b/rootly_sdk/models/workflow_form_field_condition_response_data.py @@ -33,6 +33,7 @@ class WorkflowFormFieldConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_group_list.py b/rootly_sdk/models/workflow_group_list.py index 88fd2044..31743ee5 100644 --- a/rootly_sdk/models/workflow_group_list.py +++ b/rootly_sdk/models/workflow_group_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_group_list_data_item import WorkflowGroupListDataItem @@ -22,14 +25,17 @@ class WorkflowGroupList: data (list[WorkflowGroupListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowGroupListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_group_list_data_item import WorkflowGroupListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_group_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_group_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_group_list_data_item.py b/rootly_sdk/models/workflow_group_list_data_item.py index f6ba32cb..039a54f5 100644 --- a/rootly_sdk/models/workflow_group_list_data_item.py +++ b/rootly_sdk/models/workflow_group_list_data_item.py @@ -33,6 +33,7 @@ class WorkflowGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_group_response.py b/rootly_sdk/models/workflow_group_response.py index 686ea693..d2bd3bec 100644 --- a/rootly_sdk/models/workflow_group_response.py +++ b/rootly_sdk/models/workflow_group_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_group_response_data import WorkflowGroupResponseData @@ -18,14 +21,24 @@ class WorkflowGroupResponse: """ Attributes: data (WorkflowGroupResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowGroupResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_group_response_data import WorkflowGroupResponseData d = dict(src_dict) data = WorkflowGroupResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_group_response = cls( data=data, + included=included, ) workflow_group_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_group_response_data.py b/rootly_sdk/models/workflow_group_response_data.py index dfe198b8..f637b6cd 100644 --- a/rootly_sdk/models/workflow_group_response_data.py +++ b/rootly_sdk/models/workflow_group_response_data.py @@ -33,6 +33,7 @@ class WorkflowGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_list.py b/rootly_sdk/models/workflow_list.py index abf5662d..b74bb15d 100644 --- a/rootly_sdk/models/workflow_list.py +++ b/rootly_sdk/models/workflow_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_list_data_item import WorkflowListDataItem @@ -22,14 +25,17 @@ class WorkflowList: data (list[WorkflowListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_list_data_item import WorkflowListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_list_data_item.py b/rootly_sdk/models/workflow_list_data_item.py index 1dc431c1..713a974e 100644 --- a/rootly_sdk/models/workflow_list_data_item.py +++ b/rootly_sdk/models/workflow_list_data_item.py @@ -30,6 +30,7 @@ class WorkflowListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_response.py b/rootly_sdk/models/workflow_response.py index 0dafd7f8..48ad6d5a 100644 --- a/rootly_sdk/models/workflow_response.py +++ b/rootly_sdk/models/workflow_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_response_data import WorkflowResponseData @@ -18,14 +21,24 @@ class WorkflowResponse: """ Attributes: data (WorkflowResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_response_data import WorkflowResponseData d = dict(src_dict) data = WorkflowResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_response = cls( data=data, + included=included, ) workflow_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_response_data.py b/rootly_sdk/models/workflow_response_data.py index 0a58c477..708d02d4 100644 --- a/rootly_sdk/models/workflow_response_data.py +++ b/rootly_sdk/models/workflow_response_data.py @@ -30,6 +30,7 @@ class WorkflowResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_run.py b/rootly_sdk/models/workflow_run.py index c94f5585..1953ec09 100644 --- a/rootly_sdk/models/workflow_run.py +++ b/rootly_sdk/models/workflow_run.py @@ -54,6 +54,7 @@ class WorkflowRun: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + workflow_id = self.workflow_id status: str = self.status diff --git a/rootly_sdk/models/workflow_run_response.py b/rootly_sdk/models/workflow_run_response.py index ab93fbee..54aa6066 100644 --- a/rootly_sdk/models/workflow_run_response.py +++ b/rootly_sdk/models/workflow_run_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_run_response_data import WorkflowRunResponseData @@ -18,14 +21,24 @@ class WorkflowRunResponse: """ Attributes: data (WorkflowRunResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowRunResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_run_response_data import WorkflowRunResponseData d = dict(src_dict) data = WorkflowRunResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_run_response = cls( data=data, + included=included, ) workflow_run_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_run_response_data.py b/rootly_sdk/models/workflow_run_response_data.py index a2b091e9..a40ae7da 100644 --- a/rootly_sdk/models/workflow_run_response_data.py +++ b/rootly_sdk/models/workflow_run_response_data.py @@ -30,6 +30,7 @@ class WorkflowRunResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_runs_list.py b/rootly_sdk/models/workflow_runs_list.py index f0b180d0..578c499e 100644 --- a/rootly_sdk/models/workflow_runs_list.py +++ b/rootly_sdk/models/workflow_runs_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_runs_list_data_item import WorkflowRunsListDataItem @@ -22,14 +25,17 @@ class WorkflowRunsList: data (list[WorkflowRunsListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowRunsListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_runs_list_data_item import WorkflowRunsListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_runs_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_runs_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_runs_list_data_item.py b/rootly_sdk/models/workflow_runs_list_data_item.py index a501592c..503f7ea4 100644 --- a/rootly_sdk/models/workflow_runs_list_data_item.py +++ b/rootly_sdk/models/workflow_runs_list_data_item.py @@ -33,6 +33,7 @@ class WorkflowRunsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_task.py b/rootly_sdk/models/workflow_task.py index 3c71e8a1..09603629 100644 --- a/rootly_sdk/models/workflow_task.py +++ b/rootly_sdk/models/workflow_task.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -11,16 +11,25 @@ if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import AttachRetrospectivePdfToJiraIssueTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -35,6 +44,7 @@ from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -61,6 +71,8 @@ from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -71,26 +83,60 @@ from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -111,6 +157,7 @@ from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -143,41 +190,56 @@ class WorkflowTask: """ Attributes: workflow_id (str): The ID of the parent workflow - task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddRoleTaskParams | - AddTeamTaskParams | AddToTimelineTaskParams | Any | ArchiveMicrosoftTeamsChannelsTaskParams | - ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams | AutoAssignRoleOpsgenieTaskParams | - AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams | - ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | - CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | CreateAsanaTaskTaskParams | - CreateClickupTaskTaskParams | CreateCodaPageTaskParams | CreateConfluencePageTaskParams | - CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | CreateGithubIssueTaskParams | - CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | CreateGoogleDocsPageTaskParams | - CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams | - CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | CreateIncidentPostmortemTaskParams | - CreateIncidentTaskParams | CreateJiraIssueTaskParams | CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams - | CreateLinearIssueCommentTaskParams | CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | - CreateMicrosoftTeamsChannelTaskParams | CreateMicrosoftTeamsChatTaskParams | - CreateMicrosoftTeamsMeetingTaskParams | CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | - CreateNotionPageTaskParams | CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | - CreateOutlookEventTaskParams | CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | - CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | - CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams | - CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | CreateWebexMeetingTaskParams | - CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | - GetAlertsTaskParams | GetPulsesTaskParams | HttpClientTaskParams | InviteToMicrosoftTeamsChannelTaskParams | - InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelRootlyTaskParams | - InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams | AddSlackBookmarkTaskParamsType0 | + AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams | + ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | + AttachDatadogDashboardsTaskParams | AttachRetrospectivePdfToJiraIssueTaskParams | + AutoAssignRoleOpsgenieTaskParams | AutoAssignRolePagerdutyTaskParamsType0 | + AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | + CallPeopleTaskParams | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | + CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | + CreateAsanaTaskTaskParams | CreateClickupTaskTaskParams | CreateCodaPageTaskParams | + CreateConfluencePageTaskParams | CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | + CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | + CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | + CreateGoogleGeminiChatCompletionTaskParams | CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | + CreateIncidentPostmortemTaskParams | CreateIncidentTaskParams | CreateJiraIssueTaskParams | + CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams | CreateLinearIssueCommentTaskParams | + CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | CreateMicrosoftTeamsChannelTaskParams | + CreateMicrosoftTeamsChatTaskParams | CreateMicrosoftTeamsMeetingTaskParams | + CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | CreateNotionPageTaskParams | + CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | CreateOutlookEventTaskParams | + CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | CreateQuipPageTaskParams | + CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | CreateShortcutStoryTaskParamsType0 | + CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | + CreateSubIncidentTaskParams | CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | + CreateWebexMeetingTaskParams | CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | + CreateZoomMeetingTaskParams | GetAlertsTaskParams | GetGithubCommitsTaskParamsType0 | + GetGithubCommitsTaskParamsType1 | GetGitlabCommitsTaskParamsType0 | GetGitlabCommitsTaskParamsType1 | + GetPulsesTaskParams | HttpClientTaskParams | InviteToGoogleChatSpaceTaskParams | + InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelPagerdutyTaskParamsType0 | + InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelTaskParamsType0 | InviteToSlackChannelTaskParamsType1 | InviteToSlackChannelTaskParamsType2 + | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | - PageRootlyOnCallRespondersTaskParams | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | - RemoveGoogleDocsPermissionsTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | - RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams | - SendMicrosoftTeamsChatMessageTaskParams | SendSmsTaskParams | SendWhatsappMessageTaskParams | - SnapshotDatadogGraphTaskParams | SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | - SnapshotNewRelicGraphTaskParams | TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | - UpdateActionItemTaskParams | UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | - UpdateAttachedAlertsTaskParams | UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | - UpdateConfluencePageTaskParams | UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | - UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | + PageRootlyOnCallRespondersTaskParams | PageVictorOpsOnCallRespondersTaskParamsType0 | + PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | + RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams | RenameGoogleChatSpaceTaskParams | + RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | + SendDashboardReportTaskParams | SendEmailTaskParams | SendGoogleChatAttachmentsTaskParams | + SendGoogleChatMessageTaskParams | SendMicrosoftTeamsBlocksTaskParamsType0 | + SendMicrosoftTeamsChatMessageTaskParams | SendMicrosoftTeamsMessageTaskParamsType0 | + SendSlackBlocksTaskParamsType0 | SendSlackBlocksTaskParamsType1 | SendSlackBlocksTaskParamsType2 | + SendSlackMessageTaskParamsType0 | SendSlackMessageTaskParamsType1 | SendSlackMessageTaskParamsType2 | + SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams | + SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | SnapshotNewRelicGraphTaskParams | + TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | UpdateActionItemTaskParams | + UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | UpdateAttachedAlertsTaskParams | + UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | UpdateConfluencePageTaskParams | + UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | UpdateGithubIssueTaskParams | + UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | @@ -197,17 +259,25 @@ class WorkflowTask: task_params: ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -221,6 +291,7 @@ class WorkflowTask: | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -248,6 +319,8 @@ class WorkflowTask: | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -258,26 +331,50 @@ class WorkflowTask: | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -298,6 +395,7 @@ class WorkflowTask: | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -332,19 +430,29 @@ class WorkflowTask: def to_dict(self) -> dict[str, Any]: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams @@ -356,6 +464,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -382,6 +491,8 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -392,26 +503,60 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -432,6 +577,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -457,13 +603,17 @@ def to_dict(self) -> dict[str, Any]: workflow_id = self.workflow_id - task_params: Any | dict[str, Any] + task_params: dict[str, Any] if isinstance(self.task_params, AddActionItemTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateActionItemTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddRoleTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddTeamTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddToTimelineTaskParams): @@ -476,6 +626,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, AutoAssignRoleRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdatePagerdutyIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreatePagerdutyStatusUpdateTaskParams): @@ -540,6 +694,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateJiraSubtaskTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AttachRetrospectivePdfToJiraIssueTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearIssueTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearSubtaskIssueTaskParams): @@ -552,8 +708,28 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMicrosoftTeamsChatTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddMicrosoftTeamsChatTabTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatMessageTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatAttachmentsTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ArchiveGoogleChatSpacesTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, RenameGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, UpdateGoogleChatSpaceDescriptionTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ChangeGoogleChatSpacePrivacyTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, ArchiveMicrosoftTeamsChannelsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, RenameMicrosoftTeamsChannelTaskParams): @@ -562,8 +738,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateNotionPageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsMessageTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendMicrosoftTeamsChatMessageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsBlocksTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateNotionPageTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateQuipPageTaskParams): @@ -578,6 +758,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateServiceNowIncidentTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateShortcutTaskTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateTrelloCardTaskParams): @@ -594,6 +778,14 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateZoomMeetingTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetPulsesTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetAlertsTaskParams): @@ -604,6 +796,18 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToMicrosoftTeamsChannelRootlyTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelVictorOpsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PageOpsgenieOnCallRespondersTaskParams): @@ -622,6 +826,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, PagePagerdutyOnCallRespondersTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateVictorOpsIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PrintTaskParams): @@ -642,6 +850,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateSlackChannelTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendSmsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendWhatsappMessageTaskParams): @@ -696,6 +910,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, TriggerWorkflowTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpenaiChatCompletionTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateWatsonxChatCompletionTaskParams): @@ -704,10 +924,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMistralChatCompletionTaskParams): task_params = self.task_params.to_dict() - elif isinstance(self.task_params, CreateAnthropicChatCompletionTaskParams): - task_params = self.task_params.to_dict() else: - task_params = self.task_params + task_params = self.task_params.to_dict() position = self.position @@ -743,16 +961,27 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -767,6 +996,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -793,6 +1023,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -803,26 +1035,60 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -843,6 +1109,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -874,17 +1141,25 @@ def _parse_task_params( ) -> ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -898,6 +1173,7 @@ def _parse_task_params( | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -925,6 +1201,8 @@ def _parse_task_params( | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -935,26 +1213,50 @@ def _parse_task_params( | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -975,6 +1277,7 @@ def _parse_task_params( | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -1022,6 +1325,22 @@ def _parse_task_params( return task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_0 = AddSlackBookmarkTaskParamsType0.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_1 = AddSlackBookmarkTaskParamsType1.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1070,6 +1389,26 @@ def _parse_task_params( return task_params_type_9 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_0 = ( + AutoAssignRolePagerdutyTaskParamsType0.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_1 = ( + AutoAssignRolePagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1329,7 +1668,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) + task_params_type_43 = AttachRetrospectivePdfToJiraIssueTaskParams.from_dict(data) return task_params_type_43 except (TypeError, ValueError, AttributeError, KeyError): @@ -1337,7 +1676,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) + task_params_type_44 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_44 except (TypeError, ValueError, AttributeError, KeyError): @@ -1345,7 +1684,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) + task_params_type_45 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_45 except (TypeError, ValueError, AttributeError, KeyError): @@ -1353,7 +1692,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) + task_params_type_46 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_46 except (TypeError, ValueError, AttributeError, KeyError): @@ -1361,7 +1700,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_47 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_47 except (TypeError, ValueError, AttributeError, KeyError): @@ -1369,7 +1708,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + task_params_type_48 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_48 except (TypeError, ValueError, AttributeError, KeyError): @@ -1377,15 +1716,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) + task_params_type_49 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + + return task_params_type_49 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_microsoft_teams_tab_task_params_type_0 = ( + AddMicrosoftTeamsTabTaskParamsType0.from_dict(data) + ) - return task_params_type_50 + return componentsschemasadd_microsoft_teams_tab_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) + componentsschemasadd_microsoft_teams_tab_task_params_type_1 = ( + AddMicrosoftTeamsTabTaskParamsType1.from_dict(data) + ) + + return componentsschemasadd_microsoft_teams_tab_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_51 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_51 except (TypeError, ValueError, AttributeError, KeyError): @@ -1393,7 +1752,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_52 = CreateGoogleChatSpaceTaskParams.from_dict(data) return task_params_type_52 except (TypeError, ValueError, AttributeError, KeyError): @@ -1401,7 +1760,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_53 = SendGoogleChatMessageTaskParams.from_dict(data) return task_params_type_53 except (TypeError, ValueError, AttributeError, KeyError): @@ -1409,7 +1768,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) + task_params_type_54 = SendGoogleChatAttachmentsTaskParams.from_dict(data) return task_params_type_54 except (TypeError, ValueError, AttributeError, KeyError): @@ -1417,7 +1776,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) + task_params_type_55 = InviteToGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_55 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_56 = ArchiveGoogleChatSpacesTaskParams.from_dict(data) return task_params_type_56 except (TypeError, ValueError, AttributeError, KeyError): @@ -1425,7 +1792,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) + task_params_type_57 = RenameGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_57 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_58 = UpdateGoogleChatSpaceDescriptionTaskParams.from_dict(data) return task_params_type_58 except (TypeError, ValueError, AttributeError, KeyError): @@ -1433,7 +1808,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) + task_params_type_59 = ChangeGoogleChatSpacePrivacyTaskParams.from_dict(data) return task_params_type_59 except (TypeError, ValueError, AttributeError, KeyError): @@ -1441,7 +1816,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) + task_params_type_60 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_60 except (TypeError, ValueError, AttributeError, KeyError): @@ -1449,7 +1824,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) + task_params_type_61 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_61 except (TypeError, ValueError, AttributeError, KeyError): @@ -1457,7 +1832,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) + task_params_type_62 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_62 except (TypeError, ValueError, AttributeError, KeyError): @@ -1465,7 +1840,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) + task_params_type_63 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_63 except (TypeError, ValueError, AttributeError, KeyError): @@ -1473,23 +1848,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_message_task_params_type_0 = ( + SendMicrosoftTeamsMessageTaskParamsType0.from_dict(data) + ) - return task_params_type_64 + return componentsschemassend_microsoft_teams_message_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) + task_params_type_65 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) - return task_params_type_66 + return task_params_type_65 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_blocks_task_params_type_0 = ( + SendMicrosoftTeamsBlocksTaskParamsType0.from_dict(data) + ) + + return componentsschemassend_microsoft_teams_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_67 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_67 except (TypeError, ValueError, AttributeError, KeyError): @@ -1497,7 +1884,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) + task_params_type_68 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_68 except (TypeError, ValueError, AttributeError, KeyError): @@ -1505,7 +1892,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) + task_params_type_69 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_69 except (TypeError, ValueError, AttributeError, KeyError): @@ -1513,7 +1900,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) + task_params_type_70 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_70 except (TypeError, ValueError, AttributeError, KeyError): @@ -1521,7 +1908,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) + task_params_type_71 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_71 except (TypeError, ValueError, AttributeError, KeyError): @@ -1529,7 +1916,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) + task_params_type_72 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_72 except (TypeError, ValueError, AttributeError, KeyError): @@ -1537,7 +1924,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) + task_params_type_73 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_73 except (TypeError, ValueError, AttributeError, KeyError): @@ -1545,7 +1932,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_76 = GetPulsesTaskParams.from_dict(data) + componentsschemascreate_shortcut_story_task_params_type_0 = ( + CreateShortcutStoryTaskParamsType0.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemascreate_shortcut_story_task_params_type_1 = ( + CreateShortcutStoryTaskParamsType1.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_75 = CreateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_75 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_76 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_76 except (TypeError, ValueError, AttributeError, KeyError): @@ -1553,7 +1968,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_77 = GetAlertsTaskParams.from_dict(data) + task_params_type_77 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_77 except (TypeError, ValueError, AttributeError, KeyError): @@ -1561,7 +1976,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_78 = HttpClientTaskParams.from_dict(data) + task_params_type_78 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_78 except (TypeError, ValueError, AttributeError, KeyError): @@ -1569,7 +1984,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) + task_params_type_79 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_79 except (TypeError, ValueError, AttributeError, KeyError): @@ -1577,7 +1992,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) + task_params_type_80 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_80 except (TypeError, ValueError, AttributeError, KeyError): @@ -1585,23 +2000,55 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) + task_params_type_81 = CreateMotionTaskTaskParams.from_dict(data) + + return task_params_type_81 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_82 = CreateZoomMeetingTaskParams.from_dict(data) + + return task_params_type_82 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_0 = GetGithubCommitsTaskParamsType0.from_dict(data) + + return componentsschemasget_github_commits_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_1 = GetGithubCommitsTaskParamsType1.from_dict(data) - return task_params_type_83 + return componentsschemasget_github_commits_task_params_type_1 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_0 = GetGitlabCommitsTaskParamsType0.from_dict(data) - return task_params_type_84 + return componentsschemasget_gitlab_commits_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_1 = GetGitlabCommitsTaskParamsType1.from_dict(data) + + return componentsschemasget_gitlab_commits_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_85 = GetPulsesTaskParams.from_dict(data) return task_params_type_85 except (TypeError, ValueError, AttributeError, KeyError): @@ -1609,7 +2056,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) + task_params_type_86 = GetAlertsTaskParams.from_dict(data) return task_params_type_86 except (TypeError, ValueError, AttributeError, KeyError): @@ -1617,7 +2064,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) + task_params_type_87 = HttpClientTaskParams.from_dict(data) return task_params_type_87 except (TypeError, ValueError, AttributeError, KeyError): @@ -1625,7 +2072,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_88 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_88 except (TypeError, ValueError, AttributeError, KeyError): @@ -1633,7 +2080,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_89 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_89 except (TypeError, ValueError, AttributeError, KeyError): @@ -1641,7 +2088,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_90 = InviteToMicrosoftTeamsChannelRootlyTaskParams.from_dict(data) return task_params_type_90 except (TypeError, ValueError, AttributeError, KeyError): @@ -1649,15 +2096,57 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 = ( + InviteToSlackChannelPagerdutyTaskParamsType0.from_dict(data) + ) - return task_params_type_91 + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 = ( + InviteToSlackChannelPagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_0 = ( + InviteToSlackChannelTaskParamsType0.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_1 = ( + InviteToSlackChannelTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_2 = ( + InviteToSlackChannelTaskParamsType2.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_93 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_93 except (TypeError, ValueError, AttributeError, KeyError): @@ -1665,7 +2154,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = PrintTaskParams.from_dict(data) + task_params_type_94 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_94 except (TypeError, ValueError, AttributeError, KeyError): @@ -1673,7 +2162,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = PublishIncidentTaskParams.from_dict(data) + task_params_type_95 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_95 except (TypeError, ValueError, AttributeError, KeyError): @@ -1681,7 +2170,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = RedisClientTaskParams.from_dict(data) + task_params_type_96 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_96 except (TypeError, ValueError, AttributeError, KeyError): @@ -1689,7 +2178,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_97 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_97 except (TypeError, ValueError, AttributeError, KeyError): @@ -1697,7 +2186,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_98 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_98 except (TypeError, ValueError, AttributeError, KeyError): @@ -1705,7 +2194,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_99 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_99 except (TypeError, ValueError, AttributeError, KeyError): @@ -1713,7 +2202,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = SendEmailTaskParams.from_dict(data) + task_params_type_100 = PageRootlyOnCallRespondersTaskParams.from_dict(data) return task_params_type_100 except (TypeError, ValueError, AttributeError, KeyError): @@ -1721,7 +2210,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_101 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) return task_params_type_101 except (TypeError, ValueError, AttributeError, KeyError): @@ -1729,15 +2218,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) + componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 = ( + PageVictorOpsOnCallRespondersTaskParamsType0.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 = ( + PageVictorOpsOnCallRespondersTaskParamsType1.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_103 = UpdateVictorOpsIncidentTaskParams.from_dict(data) - return task_params_type_102 + return task_params_type_103 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SendSmsTaskParams.from_dict(data) + task_params_type_104 = PrintTaskParams.from_dict(data) return task_params_type_104 except (TypeError, ValueError, AttributeError, KeyError): @@ -1745,7 +2254,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_105 = PublishIncidentTaskParams.from_dict(data) return task_params_type_105 except (TypeError, ValueError, AttributeError, KeyError): @@ -1753,7 +2262,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_106 = RedisClientTaskParams.from_dict(data) return task_params_type_106 except (TypeError, ValueError, AttributeError, KeyError): @@ -1761,7 +2270,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_107 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_107 except (TypeError, ValueError, AttributeError, KeyError): @@ -1769,7 +2278,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_108 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_108 except (TypeError, ValueError, AttributeError, KeyError): @@ -1777,7 +2286,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_109 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_109 except (TypeError, ValueError, AttributeError, KeyError): @@ -1785,7 +2294,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_110 = SendEmailTaskParams.from_dict(data) return task_params_type_110 except (TypeError, ValueError, AttributeError, KeyError): @@ -1793,7 +2302,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_111 = SendDashboardReportTaskParams.from_dict(data) return task_params_type_111 except (TypeError, ValueError, AttributeError, KeyError): @@ -1801,7 +2310,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_112 = CreateSlackChannelTaskParams.from_dict(data) return task_params_type_112 except (TypeError, ValueError, AttributeError, KeyError): @@ -1809,15 +2318,31 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_0 = SendSlackMessageTaskParamsType0.from_dict(data) - return task_params_type_113 + return componentsschemassend_slack_message_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_1 = SendSlackMessageTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_2 = SendSlackMessageTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_114 = SendSmsTaskParams.from_dict(data) return task_params_type_114 except (TypeError, ValueError, AttributeError, KeyError): @@ -1825,7 +2350,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_115 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_115 except (TypeError, ValueError, AttributeError, KeyError): @@ -1833,7 +2358,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_116 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_116 except (TypeError, ValueError, AttributeError, KeyError): @@ -1841,7 +2366,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_117 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_117 except (TypeError, ValueError, AttributeError, KeyError): @@ -1849,7 +2374,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_118 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_118 except (TypeError, ValueError, AttributeError, KeyError): @@ -1857,7 +2382,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_119 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_119 except (TypeError, ValueError, AttributeError, KeyError): @@ -1865,7 +2390,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_120 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_120 except (TypeError, ValueError, AttributeError, KeyError): @@ -1873,7 +2398,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_121 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_121 except (TypeError, ValueError, AttributeError, KeyError): @@ -1881,7 +2406,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_122 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_122 except (TypeError, ValueError, AttributeError, KeyError): @@ -1889,7 +2414,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateStatusTaskParams.from_dict(data) + task_params_type_123 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_123 except (TypeError, ValueError, AttributeError, KeyError): @@ -1897,7 +2422,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_124 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_124 except (TypeError, ValueError, AttributeError, KeyError): @@ -1905,7 +2430,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_125 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_125 except (TypeError, ValueError, AttributeError, KeyError): @@ -1913,7 +2438,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_126 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_126 except (TypeError, ValueError, AttributeError, KeyError): @@ -1921,7 +2446,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_127 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_127 except (TypeError, ValueError, AttributeError, KeyError): @@ -1929,7 +2454,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_128 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_128 except (TypeError, ValueError, AttributeError, KeyError): @@ -1937,7 +2462,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_129 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_129 except (TypeError, ValueError, AttributeError, KeyError): @@ -1945,7 +2470,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_130 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_130 except (TypeError, ValueError, AttributeError, KeyError): @@ -1953,7 +2478,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_131 = UpdateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_131 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_132 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_132 except (TypeError, ValueError, AttributeError, KeyError): @@ -1961,7 +2494,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_133 = UpdateStatusTaskParams.from_dict(data) return task_params_type_133 except (TypeError, ValueError, AttributeError, KeyError): @@ -1969,7 +2502,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_134 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_134 except (TypeError, ValueError, AttributeError, KeyError): @@ -1977,7 +2510,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_135 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_135 except (TypeError, ValueError, AttributeError, KeyError): @@ -1985,139 +2518,104 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_136 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_136 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - AddActionItemTaskParams - | AddMicrosoftTeamsChatTabTaskParams - | AddRoleTaskParams - | AddTeamTaskParams - | AddToTimelineTaskParams - | Any - | ArchiveMicrosoftTeamsChannelsTaskParams - | ArchiveSlackChannelsTaskParams - | AttachDatadogDashboardsTaskParams - | AutoAssignRoleOpsgenieTaskParams - | AutoAssignRoleRootlyTaskParams - | AutoAssignRoleVictorOpsTaskParams - | CallPeopleTaskParams - | ChangeSlackChannelPrivacyTaskParams - | CreateAirtableTableRecordTaskParams - | CreateAnthropicChatCompletionTaskParams - | CreateAsanaSubtaskTaskParams - | CreateAsanaTaskTaskParams - | CreateClickupTaskTaskParams - | CreateCodaPageTaskParams - | CreateConfluencePageTaskParams - | CreateDatadogNotebookTaskParams - | CreateDropboxPaperPageTaskParams - | CreateGithubIssueTaskParams - | CreateGitlabIssueTaskParams - | CreateGoogleCalendarEventTaskParams - | CreateGoogleDocsPageTaskParams - | CreateGoogleDocsPermissionsTaskParams - | CreateGoogleGeminiChatCompletionTaskParams - | CreateGoogleMeetingTaskParams - | CreateGoToMeetingTaskParams - | CreateIncidentPostmortemTaskParams - | CreateIncidentTaskParams - | CreateJiraIssueTaskParams - | CreateJiraSubtaskTaskParams - | CreateJsmopsAlertTaskParams - | CreateLinearIssueCommentTaskParams - | CreateLinearIssueTaskParams - | CreateLinearSubtaskIssueTaskParams - | CreateMicrosoftTeamsChannelTaskParams - | CreateMicrosoftTeamsChatTaskParams - | CreateMicrosoftTeamsMeetingTaskParams - | CreateMistralChatCompletionTaskParams - | CreateMotionTaskTaskParams - | CreateNotionPageTaskParams - | CreateOpenaiChatCompletionTaskParams - | CreateOpsgenieAlertTaskParams - | CreateOutlookEventTaskParams - | CreatePagerdutyStatusUpdateTaskParams - | CreatePagertreeAlertTaskParams - | CreateQuipPageTaskParams - | CreateServiceNowIncidentTaskParams - | CreateSharepointPageTaskParams - | CreateShortcutTaskTaskParams - | CreateSlackChannelTaskParams - | CreateSubIncidentTaskParams - | CreateTrelloCardTaskParams - | CreateWatsonxChatCompletionTaskParams - | CreateWebexMeetingTaskParams - | CreateZendeskJiraLinkTaskParams - | CreateZendeskTicketTaskParams - | CreateZoomMeetingTaskParams - | GetAlertsTaskParams - | GetPulsesTaskParams - | HttpClientTaskParams - | InviteToMicrosoftTeamsChannelTaskParams - | InviteToSlackChannelOpsgenieTaskParams - | InviteToSlackChannelRootlyTaskParams - | InviteToSlackChannelVictorOpsTaskParams - | PageJsmopsOnCallRespondersTaskParams - | PageOpsgenieOnCallRespondersTaskParams - | PagePagerdutyOnCallRespondersTaskParams - | PageRootlyOnCallRespondersTaskParams - | PrintTaskParams - | PublishIncidentTaskParams - | RedisClientTaskParams - | RemoveGoogleDocsPermissionsTaskParams - | RenameMicrosoftTeamsChannelTaskParams - | RenameSlackChannelTaskParams - | RunCommandHerokuTaskParams - | SendDashboardReportTaskParams - | SendEmailTaskParams - | SendMicrosoftTeamsChatMessageTaskParams - | SendSmsTaskParams - | SendWhatsappMessageTaskParams - | SnapshotDatadogGraphTaskParams - | SnapshotGrafanaDashboardTaskParams - | SnapshotLookerLookTaskParams - | SnapshotNewRelicGraphTaskParams - | TriggerWorkflowTaskParams - | TweetTwitterMessageTaskParams - | UpdateActionItemTaskParams - | UpdateAirtableTableRecordTaskParams - | UpdateAsanaTaskTaskParams - | UpdateAttachedAlertsTaskParams - | UpdateClickupTaskTaskParams - | UpdateCodaPageTaskParams - | UpdateConfluencePageTaskParams - | UpdateDatadogNotebookTaskParams - | UpdateDropboxPaperPageTaskParams - | UpdateGithubIssueTaskParams - | UpdateGitlabIssueTaskParams - | UpdateGoogleCalendarEventTaskParams - | UpdateGoogleDocsPageTaskParams - | UpdateIncidentPostmortemTaskParams - | UpdateIncidentStatusTimestampTaskParams - | UpdateIncidentTaskParams - | UpdateJiraIssueTaskParams - | UpdateLinearIssueTaskParams - | UpdateMotionTaskTaskParams - | UpdateNotionPageTaskParams - | UpdateOpsgenieAlertTaskParams - | UpdateOpsgenieIncidentTaskParams - | UpdatePagerdutyIncidentTaskParams - | UpdatePagertreeAlertTaskParams - | UpdateQuipPageTaskParams - | UpdateServiceNowIncidentTaskParams - | UpdateSharepointPageTaskParams - | UpdateShortcutStoryTaskParams - | UpdateShortcutTaskTaskParams - | UpdateSlackChannelTopicTaskParams - | UpdateStatusTaskParams - | UpdateTrelloCardTaskParams - | UpdateVictorOpsIncidentTaskParams - | UpdateZendeskTicketTaskParams, - data, - ) + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_137 = UpdateMotionTaskTaskParams.from_dict(data) + + return task_params_type_137 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_138 = UpdateZendeskTicketTaskParams.from_dict(data) + + return task_params_type_138 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_139 = UpdateAttachedAlertsTaskParams.from_dict(data) + + return task_params_type_139 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_140 = TriggerWorkflowTaskParams.from_dict(data) + + return task_params_type_140 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_0 = SendSlackBlocksTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_1 = SendSlackBlocksTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_2 = SendSlackBlocksTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_142 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + + return task_params_type_142 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_143 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + + return task_params_type_143 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_144 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + + return task_params_type_144 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_145 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_145 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + task_params_type_146 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_146 task_params = _parse_task_params(d.pop("task_params")) diff --git a/rootly_sdk/models/workflow_task_list.py b/rootly_sdk/models/workflow_task_list.py index a42b27fd..147ac020 100644 --- a/rootly_sdk/models/workflow_task_list.py +++ b/rootly_sdk/models/workflow_task_list.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_task_list_data_item import WorkflowTaskListDataItem @@ -22,14 +25,17 @@ class WorkflowTaskList: data (list[WorkflowTaskListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowTaskListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +45,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +61,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_task_list_data_item import WorkflowTaskListDataItem @@ -69,10 +85,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_task_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_task_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_task_list_data_item.py b/rootly_sdk/models/workflow_task_list_data_item.py index eb0f4179..9e144806 100644 --- a/rootly_sdk/models/workflow_task_list_data_item.py +++ b/rootly_sdk/models/workflow_task_list_data_item.py @@ -33,6 +33,7 @@ class WorkflowTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_task_response.py b/rootly_sdk/models/workflow_task_response.py index d23213d3..26b15a77 100644 --- a/rootly_sdk/models/workflow_task_response.py +++ b/rootly_sdk/models/workflow_task_response.py @@ -6,7 +6,10 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_task_response_data import WorkflowTaskResponseData @@ -18,14 +21,24 @@ class WorkflowTaskResponse: """ Attributes: data (WorkflowTaskResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowTaskResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +46,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_task_response_data import WorkflowTaskResponseData d = dict(src_dict) data = WorkflowTaskResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_task_response = cls( data=data, + included=included, ) workflow_task_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_task_response_data.py b/rootly_sdk/models/workflow_task_response_data.py index a042e828..eb7f6834 100644 --- a/rootly_sdk/models/workflow_task_response_data.py +++ b/rootly_sdk/models/workflow_task_response_data.py @@ -33,6 +33,7 @@ class WorkflowTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + id = self.id type_: str = self.type_