diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e0e9db98e4..f993e36c75 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -868,6 +868,40 @@ components: schema: format: uuid type: string + IncidentResponderIncludeQueryParameter: + description: Comma-separated related resource types to include. Supported values are `users` and `role_assignments`. + explode: false + in: query + name: include + required: false + schema: + example: + - users + - role_assignments + items: + $ref: "#/components/schemas/IncidentResponderRelatedObject" + type: array + style: form + IncidentResponderPageLimitParameter: + description: Maximum number of responders to return per page. + in: query + name: page[limit] + required: false + schema: + default: 25 + example: 25 + format: int64 + maximum: 1000 + type: integer + IncidentResponderPageOffsetParameter: + description: The offset of the first responder to return. + in: query + name: page[offset] + required: false + schema: + example: 0 + format: int64 + type: integer IncidentRuleIDPathParameter: description: The UUID of the incident rule. in: path @@ -63016,6 +63050,20 @@ components: - type - attributes type: object + IncidentResponderIncludedItem: + description: A user or role assignment related to an incident responder. + oneOf: + - $ref: "#/components/schemas/IncidentUserData" + - $ref: "#/components/schemas/IncidentRoleAssignmentDataResponse" + IncidentResponderRelatedObject: + description: Object related to an incident responder. + enum: + - users + - role_assignments + type: string + x-enum-varnames: + - USERS + - ROLE_ASSIGNMENTS IncidentResponderRelationships: description: Relationships for an incident responder. properties: @@ -63115,6 +63163,53 @@ components: - id - type type: object + IncidentRespondersPagination: + description: Offset-based pagination for incident responders. + properties: + first_offset: + description: The offset of the first page. + example: 0 + format: int64 + type: integer + last_offset: + description: The offset of the last page, if available. + example: 25 + format: int64 + nullable: true + type: integer + limit: + description: The maximum number of elements returned per page. + example: 25 + format: int64 + type: integer + next_offset: + description: The offset of the next page, if available. + example: 25 + format: int64 + nullable: true + type: integer + offset: + description: The index of the first element in the current page. + example: 0 + format: int64 + type: integer + prev_offset: + description: The offset of the previous page, if available. + example: 0 + format: int64 + nullable: true + type: integer + total: + description: The total number of elements, when available. + example: 1 + format: int64 + nullable: true + type: integer + type: + description: The pagination type. + example: offset_limit + type: string + type: object IncidentRespondersResponse: description: Response with a list of incident responders. properties: @@ -63126,12 +63221,38 @@ components: included: description: Included related resources. items: - $ref: "#/components/schemas/IncidentUserData" + $ref: "#/components/schemas/IncidentResponderIncludedItem" readOnly: true type: array + links: + additionalProperties: + type: string + description: Links to pages of incident responders. + type: object + meta: + $ref: "#/components/schemas/IncidentRespondersResponseMeta" required: - data type: object + IncidentRespondersResponseMeta: + description: Pagination metadata for the responder list. + properties: + page: + $ref: "#/components/schemas/IncidentRespondersResponseMetaPage" + pagination: + $ref: "#/components/schemas/IncidentRespondersPagination" + type: object + IncidentRespondersResponseMetaPage: + description: Total count for the responder list. + properties: + total_filtered_count: + description: Total number of responders matching the query, before pagination. + example: 1 + format: int64 + type: integer + required: + - total_filtered_count + type: object IncidentRespondersType: description: The incident responders type. enum: @@ -63358,6 +63479,8 @@ components: $ref: "#/components/schemas/RelationshipToUser" impacts: $ref: "#/components/schemas/RelationshipToIncidentImpacts" + incident_type: + $ref: "#/components/schemas/RelationshipToIncidentType" integrations: $ref: "#/components/schemas/RelationshipToIncidentIntegrationMetadatas" last_modified_by_user: @@ -63367,6 +63490,128 @@ components: user_defined_fields: $ref: "#/components/schemas/RelationshipToIncidentUserDefinedFields" type: object + IncidentRoleAssignmentDataAttributesResponse: + description: Attributes of an incident role assignment. + properties: + created: + description: Timestamp when the role assignment was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + deleted: + description: Timestamp when the role assignment was deleted, or the zero timestamp if it has not been deleted. + example: "0001-01-01T00:00:00Z" + format: date-time + type: string + modified: + description: Timestamp when the role assignment was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + responder_type: + description: The type of the responder. + example: user + type: string + role: + description: The name of the assigned role. + example: commander + type: string + required: + - role + - responder_type + - created + - modified + type: object + IncidentRoleAssignmentDataResponse: + description: Role assignment data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentRoleAssignmentDataAttributesResponse" + id: + description: The role assignment identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentRoleAssignmentRelationshipsResponse" + type: + $ref: "#/components/schemas/IncidentRoleAssignmentType" + required: + - id + - type + - attributes + type: object + IncidentRoleAssignmentRelationshipsResponse: + description: Relationships of a role assignment. + properties: + created_by_user: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + last_modified_by_user: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + reserved_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + responder: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + user_defined_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + required: + - responder + type: object + IncidentRoleAssignmentResponderRelationship: + description: Relationship to a responder. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationshipData" + required: + - data + type: object + IncidentRoleAssignmentResponderRelationshipData: + description: Responder relationship data. + properties: + id: + description: The responder identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The responder resource type. + example: users + type: string + required: + - id + - type + type: object + IncidentRoleAssignmentRoleRelationship: + description: Relationship to a role. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationshipData" + type: object + IncidentRoleAssignmentRoleRelationshipData: + description: Role relationship data. + nullable: true + properties: + id: + description: The role identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The role resource type. + example: incident_reserved_roles + type: string + required: + - id + - type + type: object + IncidentRoleAssignmentType: + description: Incident role assignment resource type. + enum: + - incident_role_assignments + example: incident_role_assignments + type: string + x-enum-varnames: + - INCIDENT_ROLE_ASSIGNMENTS IncidentRuleCondition: description: A condition for an incident rule. properties: @@ -186122,6 +186367,9 @@ paths: operationId: ListIncidentResponders parameters: - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentResponderIncludeQueryParameter" + - $ref: "#/components/parameters/IncidentResponderPageLimitParameter" + - $ref: "#/components/parameters/IncidentResponderPageOffsetParameter" responses: "200": content: diff --git a/examples/v2/incidents/CreateIncidentResponder.py b/examples/v2/incidents/CreateIncidentResponder.py new file mode 100644 index 0000000000..bc4a570876 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentResponder.py @@ -0,0 +1,37 @@ +""" +Create an incident responder returns "Created" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.incidents_api import IncidentsApi +from datadog_api_client.v2.model.incident_responder_data_request import IncidentResponderDataRequest +from datadog_api_client.v2.model.incident_responder_relationships_request import IncidentResponderRelationshipsRequest +from datadog_api_client.v2.model.incident_responder_request import IncidentResponderRequest +from datadog_api_client.v2.model.incident_responder_type import IncidentResponderType +from datadog_api_client.v2.model.incident_responder_user_relationship import IncidentResponderUserRelationship +from datadog_api_client.v2.model.incident_responder_user_relationship_data import IncidentResponderUserRelationshipData +from uuid import UUID + +body = IncidentResponderRequest( + data=IncidentResponderDataRequest( + relationships=IncidentResponderRelationshipsRequest( + user=IncidentResponderUserRelationship( + data=IncidentResponderUserRelationshipData( + id=UUID("00000000-0000-0000-0000-000000000000"), + type="users", + ), + ), + ), + type=IncidentResponderType.INCIDENT_RESPONDERS, + ), +) + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["create_incident_responder"] = True +with ApiClient(configuration) as api_client: + api_instance = IncidentsApi(api_client) + response = api_instance.create_incident_responder(incident_id="incident_id", body=body) + + print(response) diff --git a/examples/v2/incidents/DeleteIncidentResponder.py b/examples/v2/incidents/DeleteIncidentResponder.py new file mode 100644 index 0000000000..e388fefc6d --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentResponder.py @@ -0,0 +1,18 @@ +""" +Delete an incident responder returns "No Content" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.incidents_api import IncidentsApi +from uuid import UUID + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["delete_incident_responder"] = True +with ApiClient(configuration) as api_client: + api_instance = IncidentsApi(api_client) + api_instance.delete_incident_responder( + incident_id="incident_id", + responder_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), + ) diff --git a/examples/v2/incidents/GetIncidentResponder.py b/examples/v2/incidents/GetIncidentResponder.py new file mode 100644 index 0000000000..232260d572 --- /dev/null +++ b/examples/v2/incidents/GetIncidentResponder.py @@ -0,0 +1,20 @@ +""" +Get an incident responder returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.incidents_api import IncidentsApi +from uuid import UUID + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["get_incident_responder"] = True +with ApiClient(configuration) as api_client: + api_instance = IncidentsApi(api_client) + response = api_instance.get_incident_responder( + incident_id="incident_id", + responder_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), + ) + + print(response) diff --git a/examples/v2/incidents/ListIncidentResponders.py b/examples/v2/incidents/ListIncidentResponders.py new file mode 100644 index 0000000000..8a2167ae25 --- /dev/null +++ b/examples/v2/incidents/ListIncidentResponders.py @@ -0,0 +1,18 @@ +""" +List incident responders returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.incidents_api import IncidentsApi + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_incident_responders"] = True +with ApiClient(configuration) as api_client: + api_instance = IncidentsApi(api_client) + response = api_instance.list_incident_responders( + incident_id="incident_id", + ) + + print(response) diff --git a/examples/v2/incidents/ListIncidentResponders_3179157290.py b/examples/v2/incidents/ListIncidentResponders_3179157290.py new file mode 100644 index 0000000000..7c3672a2be --- /dev/null +++ b/examples/v2/incidents/ListIncidentResponders_3179157290.py @@ -0,0 +1,27 @@ +""" +List incident responders includes users and role assignments +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.incidents_api import IncidentsApi +from datadog_api_client.v2.model.incident_responder_related_object import IncidentResponderRelatedObject + +# there is a valid "incident_with_commander" in the system +INCIDENT_WITH_COMMANDER_DATA_ID = environ["INCIDENT_WITH_COMMANDER_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["create_incident"] = True +configuration.unstable_operations["list_incident_responders"] = True +with ApiClient(configuration) as api_client: + api_instance = IncidentsApi(api_client) + response = api_instance.list_incident_responders( + incident_id=INCIDENT_WITH_COMMANDER_DATA_ID, + include=[ + IncidentResponderRelatedObject.USERS, + IncidentResponderRelatedObject.ROLE_ASSIGNMENTS, + ], + ) + + print(response) diff --git a/src/datadog_api_client/v2/api/incidents_api.py b/src/datadog_api_client/v2/api/incidents_api.py index 173fe5a9b8..353b2c2b69 100644 --- a/src/datadog_api_client/v2/api/incidents_api.py +++ b/src/datadog_api_client/v2/api/incidents_api.py @@ -120,6 +120,7 @@ from datadog_api_client.v2.model.incident_todo_create_request import IncidentTodoCreateRequest from datadog_api_client.v2.model.incident_todo_patch_request import IncidentTodoPatchRequest from datadog_api_client.v2.model.incident_responders_response import IncidentRespondersResponse +from datadog_api_client.v2.model.incident_responder_related_object import IncidentResponderRelatedObject from datadog_api_client.v2.model.incident_responder_response import IncidentResponderResponse from datadog_api_client.v2.model.incident_responder_request import IncidentResponderRequest from datadog_api_client.v2.model.incident_service_now_record_request import IncidentServiceNowRecordRequest @@ -1729,6 +1730,25 @@ def __init__(self, api_client=None): "attribute": "incident_id", "location": "path", }, + "include": { + "openapi_types": ([IncidentResponderRelatedObject],), + "attribute": "include", + "location": "query", + "collection_format": "csv", + }, + "page_limit": { + "validation": { + "inclusive_maximum": 1000, + }, + "openapi_types": (int,), + "attribute": "page[limit]", + "location": "query", + }, + "page_offset": { + "openapi_types": (int,), + "attribute": "page[offset]", + "location": "query", + }, }, headers_map={ "accept": ["application/json"], @@ -3882,6 +3902,10 @@ def list_incident_postmortem_templates( def list_incident_responders( self, incident_id: str, + *, + include: Union[List[IncidentResponderRelatedObject], UnsetType] = unset, + page_limit: Union[int, UnsetType] = unset, + page_offset: Union[int, UnsetType] = unset, ) -> IncidentRespondersResponse: """List incident responders. @@ -3889,11 +3913,26 @@ def list_incident_responders( :param incident_id: The UUID of the incident. :type incident_id: str + :param include: Comma-separated related resource types to include. Supported values are ``users`` and ``role_assignments``. + :type include: [IncidentResponderRelatedObject], optional + :param page_limit: Maximum number of responders to return per page. + :type page_limit: int, optional + :param page_offset: The offset of the first responder to return. + :type page_offset: int, optional :rtype: IncidentRespondersResponse """ kwargs: Dict[str, Any] = {} kwargs["incident_id"] = incident_id + if include is not unset: + kwargs["include"] = include + + if page_limit is not unset: + kwargs["page_limit"] = page_limit + + if page_offset is not unset: + kwargs["page_offset"] = page_offset + return self._list_incident_responders_endpoint.call_with_http_info(**kwargs) def list_incident_rules( diff --git a/src/datadog_api_client/v2/model/incident_responder_included_item.py b/src/datadog_api_client/v2/model/incident_responder_included_item.py new file mode 100644 index 0000000000..c0d1ac4e36 --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_responder_included_item.py @@ -0,0 +1,51 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class IncidentResponderIncludedItem(ModelComposed): + def __init__(self, **kwargs): + """ + A user or role assignment related to an incident responder. + + :param attributes: Attributes of user object returned by the API. + :type attributes: IncidentUserAttributes, optional + + :param id: ID of the user. + :type id: str, optional + + :param type: Users resource type. + :type type: UsersType, optional + + :param relationships: Relationships of a role assignment. + :type relationships: IncidentRoleAssignmentRelationshipsResponse, optional + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.incident_user_data import IncidentUserData + from datadog_api_client.v2.model.incident_role_assignment_data_response import ( + IncidentRoleAssignmentDataResponse, + ) + + return { + "oneOf": [ + IncidentUserData, + IncidentRoleAssignmentDataResponse, + ], + } diff --git a/src/datadog_api_client/v2/model/incident_responder_related_object.py b/src/datadog_api_client/v2/model/incident_responder_related_object.py new file mode 100644 index 0000000000..2f1785c6cd --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_responder_related_object.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IncidentResponderRelatedObject(ModelSimple): + """ + Object related to an incident responder. + + :param value: Must be one of ["users", "role_assignments"]. + :type value: str + """ + + allowed_values = { + "users", + "role_assignments", + } + USERS: ClassVar["IncidentResponderRelatedObject"] + ROLE_ASSIGNMENTS: ClassVar["IncidentResponderRelatedObject"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IncidentResponderRelatedObject.USERS = IncidentResponderRelatedObject("users") +IncidentResponderRelatedObject.ROLE_ASSIGNMENTS = IncidentResponderRelatedObject("role_assignments") diff --git a/src/datadog_api_client/v2/model/incident_responders_pagination.py b/src/datadog_api_client/v2/model/incident_responders_pagination.py new file mode 100644 index 0000000000..399cd110bd --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_responders_pagination.py @@ -0,0 +1,97 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +class IncidentRespondersPagination(ModelNormal): + @cached_property + def openapi_types(_): + return { + "first_offset": (int,), + "last_offset": (int, none_type), + "limit": (int,), + "next_offset": (int, none_type), + "offset": (int,), + "prev_offset": (int, none_type), + "total": (int, none_type), + "type": (str,), + } + + attribute_map = { + "first_offset": "first_offset", + "last_offset": "last_offset", + "limit": "limit", + "next_offset": "next_offset", + "offset": "offset", + "prev_offset": "prev_offset", + "total": "total", + "type": "type", + } + + def __init__( + self_, + first_offset: Union[int, UnsetType] = unset, + last_offset: Union[int, none_type, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + next_offset: Union[int, none_type, UnsetType] = unset, + offset: Union[int, UnsetType] = unset, + prev_offset: Union[int, none_type, UnsetType] = unset, + total: Union[int, none_type, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Offset-based pagination for incident responders. + + :param first_offset: The offset of the first page. + :type first_offset: int, optional + + :param last_offset: The offset of the last page, if available. + :type last_offset: int, none_type, optional + + :param limit: The maximum number of elements returned per page. + :type limit: int, optional + + :param next_offset: The offset of the next page, if available. + :type next_offset: int, none_type, optional + + :param offset: The index of the first element in the current page. + :type offset: int, optional + + :param prev_offset: The offset of the previous page, if available. + :type prev_offset: int, none_type, optional + + :param total: The total number of elements, when available. + :type total: int, none_type, optional + + :param type: The pagination type. + :type type: str, optional + """ + if first_offset is not unset: + kwargs["first_offset"] = first_offset + if last_offset is not unset: + kwargs["last_offset"] = last_offset + if limit is not unset: + kwargs["limit"] = limit + if next_offset is not unset: + kwargs["next_offset"] = next_offset + if offset is not unset: + kwargs["offset"] = offset + if prev_offset is not unset: + kwargs["prev_offset"] = prev_offset + if total is not unset: + kwargs["total"] = total + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/incident_responders_response.py b/src/datadog_api_client/v2/model/incident_responders_response.py index 7591243fe8..61d7ff6c05 100644 --- a/src/datadog_api_client/v2/model/incident_responders_response.py +++ b/src/datadog_api_client/v2/model/incident_responders_response.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union, TYPE_CHECKING +from typing import Dict, List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -15,23 +15,31 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.incident_responder_data_response import IncidentResponderDataResponse + from datadog_api_client.v2.model.incident_responder_included_item import IncidentResponderIncludedItem + from datadog_api_client.v2.model.incident_responders_response_meta import IncidentRespondersResponseMeta from datadog_api_client.v2.model.incident_user_data import IncidentUserData + from datadog_api_client.v2.model.incident_role_assignment_data_response import IncidentRoleAssignmentDataResponse class IncidentRespondersResponse(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.incident_responder_data_response import IncidentResponderDataResponse - from datadog_api_client.v2.model.incident_user_data import IncidentUserData + from datadog_api_client.v2.model.incident_responder_included_item import IncidentResponderIncludedItem + from datadog_api_client.v2.model.incident_responders_response_meta import IncidentRespondersResponseMeta return { "data": ([IncidentResponderDataResponse],), - "included": ([IncidentUserData],), + "included": ([IncidentResponderIncludedItem],), + "links": ({str: (str,)},), + "meta": (IncidentRespondersResponseMeta,), } attribute_map = { "data": "data", "included": "included", + "links": "links", + "meta": "meta", } read_only_vars = { "included", @@ -40,7 +48,11 @@ def openapi_types(_): def __init__( self_, data: List[IncidentResponderDataResponse], - included: Union[List[IncidentUserData], UnsetType] = unset, + included: Union[ + List[Union[IncidentResponderIncludedItem, IncidentUserData, IncidentRoleAssignmentDataResponse]], UnsetType + ] = unset, + links: Union[Dict[str, str], UnsetType] = unset, + meta: Union[IncidentRespondersResponseMeta, UnsetType] = unset, **kwargs, ): """ @@ -50,10 +62,20 @@ def __init__( :type data: [IncidentResponderDataResponse] :param included: Included related resources. - :type included: [IncidentUserData], optional + :type included: [IncidentResponderIncludedItem], optional + + :param links: Links to pages of incident responders. + :type links: {str: (str,)}, optional + + :param meta: Pagination metadata for the responder list. + :type meta: IncidentRespondersResponseMeta, optional """ if included is not unset: kwargs["included"] = included + if links is not unset: + kwargs["links"] = links + if meta is not unset: + kwargs["meta"] = meta super().__init__(kwargs) self_.data = data diff --git a/src/datadog_api_client/v2/model/incident_responders_response_meta.py b/src/datadog_api_client/v2/model/incident_responders_response_meta.py new file mode 100644 index 0000000000..e11c8a082a --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_responders_response_meta.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.incident_responders_response_meta_page import IncidentRespondersResponseMetaPage + from datadog_api_client.v2.model.incident_responders_pagination import IncidentRespondersPagination + + +class IncidentRespondersResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.incident_responders_response_meta_page import ( + IncidentRespondersResponseMetaPage, + ) + from datadog_api_client.v2.model.incident_responders_pagination import IncidentRespondersPagination + + return { + "page": (IncidentRespondersResponseMetaPage,), + "pagination": (IncidentRespondersPagination,), + } + + attribute_map = { + "page": "page", + "pagination": "pagination", + } + + def __init__( + self_, + page: Union[IncidentRespondersResponseMetaPage, UnsetType] = unset, + pagination: Union[IncidentRespondersPagination, UnsetType] = unset, + **kwargs, + ): + """ + Pagination metadata for the responder list. + + :param page: Total count for the responder list. + :type page: IncidentRespondersResponseMetaPage, optional + + :param pagination: Offset-based pagination for incident responders. + :type pagination: IncidentRespondersPagination, optional + """ + if page is not unset: + kwargs["page"] = page + if pagination is not unset: + kwargs["pagination"] = pagination + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/incident_responders_response_meta_page.py b/src/datadog_api_client/v2/model/incident_responders_response_meta_page.py new file mode 100644 index 0000000000..a873bf39f2 --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_responders_response_meta_page.py @@ -0,0 +1,33 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class IncidentRespondersResponseMetaPage(ModelNormal): + @cached_property + def openapi_types(_): + return { + "total_filtered_count": (int,), + } + + attribute_map = { + "total_filtered_count": "total_filtered_count", + } + + def __init__(self_, total_filtered_count: int, **kwargs): + """ + Total count for the responder list. + + :param total_filtered_count: Total number of responders matching the query, before pagination. + :type total_filtered_count: int + """ + super().__init__(kwargs) + + self_.total_filtered_count = total_filtered_count diff --git a/src/datadog_api_client/v2/model/incident_response_relationships.py b/src/datadog_api_client/v2/model/incident_response_relationships.py index 2769e1bc83..74c46b5b95 100644 --- a/src/datadog_api_client/v2/model/incident_response_relationships.py +++ b/src/datadog_api_client/v2/model/incident_response_relationships.py @@ -19,6 +19,7 @@ from datadog_api_client.v2.model.nullable_relationship_to_user import NullableRelationshipToUser from datadog_api_client.v2.model.relationship_to_user import RelationshipToUser from datadog_api_client.v2.model.relationship_to_incident_impacts import RelationshipToIncidentImpacts + from datadog_api_client.v2.model.relationship_to_incident_type import RelationshipToIncidentType from datadog_api_client.v2.model.relationship_to_incident_integration_metadatas import ( RelationshipToIncidentIntegrationMetadatas, ) @@ -35,6 +36,7 @@ def openapi_types(_): from datadog_api_client.v2.model.nullable_relationship_to_user import NullableRelationshipToUser from datadog_api_client.v2.model.relationship_to_user import RelationshipToUser from datadog_api_client.v2.model.relationship_to_incident_impacts import RelationshipToIncidentImpacts + from datadog_api_client.v2.model.relationship_to_incident_type import RelationshipToIncidentType from datadog_api_client.v2.model.relationship_to_incident_integration_metadatas import ( RelationshipToIncidentIntegrationMetadatas, ) @@ -49,6 +51,7 @@ def openapi_types(_): "created_by_user": (RelationshipToUser,), "declared_by_user": (RelationshipToUser,), "impacts": (RelationshipToIncidentImpacts,), + "incident_type": (RelationshipToIncidentType,), "integrations": (RelationshipToIncidentIntegrationMetadatas,), "last_modified_by_user": (RelationshipToUser,), "responders": (RelationshipToIncidentResponders,), @@ -61,6 +64,7 @@ def openapi_types(_): "created_by_user": "created_by_user", "declared_by_user": "declared_by_user", "impacts": "impacts", + "incident_type": "incident_type", "integrations": "integrations", "last_modified_by_user": "last_modified_by_user", "responders": "responders", @@ -74,6 +78,7 @@ def __init__( created_by_user: Union[RelationshipToUser, UnsetType] = unset, declared_by_user: Union[RelationshipToUser, UnsetType] = unset, impacts: Union[RelationshipToIncidentImpacts, UnsetType] = unset, + incident_type: Union[RelationshipToIncidentType, UnsetType] = unset, integrations: Union[RelationshipToIncidentIntegrationMetadatas, UnsetType] = unset, last_modified_by_user: Union[RelationshipToUser, UnsetType] = unset, responders: Union[RelationshipToIncidentResponders, UnsetType] = unset, @@ -98,6 +103,9 @@ def __init__( :param impacts: Relationship to impacts. :type impacts: RelationshipToIncidentImpacts, optional + :param incident_type: Relationship to an incident type. + :type incident_type: RelationshipToIncidentType, optional + :param integrations: A relationship reference for multiple integration metadata objects. :type integrations: RelationshipToIncidentIntegrationMetadatas, optional @@ -120,6 +128,8 @@ def __init__( kwargs["declared_by_user"] = declared_by_user if impacts is not unset: kwargs["impacts"] = impacts + if incident_type is not unset: + kwargs["incident_type"] = incident_type if integrations is not unset: kwargs["integrations"] = integrations if last_modified_by_user is not unset: diff --git a/src/datadog_api_client/v2/model/incident_role_assignment_data_attributes_response.py b/src/datadog_api_client/v2/model/incident_role_assignment_data_attributes_response.py new file mode 100644 index 0000000000..d9aae37dbc --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_role_assignment_data_attributes_response.py @@ -0,0 +1,70 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +class IncidentRoleAssignmentDataAttributesResponse(ModelNormal): + @cached_property + def openapi_types(_): + return { + "created": (datetime,), + "deleted": (datetime,), + "modified": (datetime,), + "responder_type": (str,), + "role": (str,), + } + + attribute_map = { + "created": "created", + "deleted": "deleted", + "modified": "modified", + "responder_type": "responder_type", + "role": "role", + } + + def __init__( + self_, + created: datetime, + modified: datetime, + responder_type: str, + role: str, + deleted: Union[datetime, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of an incident role assignment. + + :param created: Timestamp when the role assignment was created. + :type created: datetime + + :param deleted: Timestamp when the role assignment was deleted, or the zero timestamp if it has not been deleted. + :type deleted: datetime, optional + + :param modified: Timestamp when the role assignment was last modified. + :type modified: datetime + + :param responder_type: The type of the responder. + :type responder_type: str + + :param role: The name of the assigned role. + :type role: str + """ + if deleted is not unset: + kwargs["deleted"] = deleted + super().__init__(kwargs) + + self_.created = created + self_.modified = modified + self_.responder_type = responder_type + self_.role = role diff --git a/src/datadog_api_client/v2/model/incident_role_assignment_data_response.py b/src/datadog_api_client/v2/model/incident_role_assignment_data_response.py new file mode 100644 index 0000000000..455201c32d --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_role_assignment_data_response.py @@ -0,0 +1,81 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.incident_role_assignment_data_attributes_response import ( + IncidentRoleAssignmentDataAttributesResponse, + ) + from datadog_api_client.v2.model.incident_role_assignment_relationships_response import ( + IncidentRoleAssignmentRelationshipsResponse, + ) + from datadog_api_client.v2.model.incident_role_assignment_type import IncidentRoleAssignmentType + + +class IncidentRoleAssignmentDataResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.incident_role_assignment_data_attributes_response import ( + IncidentRoleAssignmentDataAttributesResponse, + ) + from datadog_api_client.v2.model.incident_role_assignment_relationships_response import ( + IncidentRoleAssignmentRelationshipsResponse, + ) + from datadog_api_client.v2.model.incident_role_assignment_type import IncidentRoleAssignmentType + + return { + "attributes": (IncidentRoleAssignmentDataAttributesResponse,), + "id": (UUID,), + "relationships": (IncidentRoleAssignmentRelationshipsResponse,), + "type": (IncidentRoleAssignmentType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: IncidentRoleAssignmentDataAttributesResponse, + id: UUID, + type: IncidentRoleAssignmentType, + relationships: Union[IncidentRoleAssignmentRelationshipsResponse, UnsetType] = unset, + **kwargs, + ): + """ + Role assignment data in a response. + + :param attributes: Attributes of an incident role assignment. + :type attributes: IncidentRoleAssignmentDataAttributesResponse + + :param id: The role assignment identifier. + :type id: UUID + + :param relationships: Relationships of a role assignment. + :type relationships: IncidentRoleAssignmentRelationshipsResponse, optional + + :param type: Incident role assignment resource type. + :type type: IncidentRoleAssignmentType + """ + if relationships is not unset: + kwargs["relationships"] = relationships + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/incident_role_assignment_relationships_response.py b/src/datadog_api_client/v2/model/incident_role_assignment_relationships_response.py new file mode 100644 index 0000000000..04154b5e5e --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_role_assignment_relationships_response.py @@ -0,0 +1,88 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.incident_role_assignment_responder_relationship import ( + IncidentRoleAssignmentResponderRelationship, + ) + from datadog_api_client.v2.model.incident_role_assignment_role_relationship import ( + IncidentRoleAssignmentRoleRelationship, + ) + + +class IncidentRoleAssignmentRelationshipsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.incident_role_assignment_responder_relationship import ( + IncidentRoleAssignmentResponderRelationship, + ) + from datadog_api_client.v2.model.incident_role_assignment_role_relationship import ( + IncidentRoleAssignmentRoleRelationship, + ) + + return { + "created_by_user": (IncidentRoleAssignmentResponderRelationship,), + "last_modified_by_user": (IncidentRoleAssignmentResponderRelationship,), + "reserved_role": (IncidentRoleAssignmentRoleRelationship,), + "responder": (IncidentRoleAssignmentResponderRelationship,), + "user_defined_role": (IncidentRoleAssignmentRoleRelationship,), + } + + attribute_map = { + "created_by_user": "created_by_user", + "last_modified_by_user": "last_modified_by_user", + "reserved_role": "reserved_role", + "responder": "responder", + "user_defined_role": "user_defined_role", + } + + def __init__( + self_, + responder: IncidentRoleAssignmentResponderRelationship, + created_by_user: Union[IncidentRoleAssignmentResponderRelationship, UnsetType] = unset, + last_modified_by_user: Union[IncidentRoleAssignmentResponderRelationship, UnsetType] = unset, + reserved_role: Union[IncidentRoleAssignmentRoleRelationship, UnsetType] = unset, + user_defined_role: Union[IncidentRoleAssignmentRoleRelationship, UnsetType] = unset, + **kwargs, + ): + """ + Relationships of a role assignment. + + :param created_by_user: Relationship to a responder. + :type created_by_user: IncidentRoleAssignmentResponderRelationship, optional + + :param last_modified_by_user: Relationship to a responder. + :type last_modified_by_user: IncidentRoleAssignmentResponderRelationship, optional + + :param reserved_role: Relationship to a role. + :type reserved_role: IncidentRoleAssignmentRoleRelationship, optional + + :param responder: Relationship to a responder. + :type responder: IncidentRoleAssignmentResponderRelationship + + :param user_defined_role: Relationship to a role. + :type user_defined_role: IncidentRoleAssignmentRoleRelationship, optional + """ + if created_by_user is not unset: + kwargs["created_by_user"] = created_by_user + if last_modified_by_user is not unset: + kwargs["last_modified_by_user"] = last_modified_by_user + if reserved_role is not unset: + kwargs["reserved_role"] = reserved_role + if user_defined_role is not unset: + kwargs["user_defined_role"] = user_defined_role + super().__init__(kwargs) + + self_.responder = responder diff --git a/src/datadog_api_client/v2/model/incident_role_assignment_responder_relationship.py b/src/datadog_api_client/v2/model/incident_role_assignment_responder_relationship.py new file mode 100644 index 0000000000..7513a09394 --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_role_assignment_responder_relationship.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.incident_role_assignment_responder_relationship_data import ( + IncidentRoleAssignmentResponderRelationshipData, + ) + + +class IncidentRoleAssignmentResponderRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.incident_role_assignment_responder_relationship_data import ( + IncidentRoleAssignmentResponderRelationshipData, + ) + + return { + "data": (IncidentRoleAssignmentResponderRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: IncidentRoleAssignmentResponderRelationshipData, **kwargs): + """ + Relationship to a responder. + + :param data: Responder relationship data. + :type data: IncidentRoleAssignmentResponderRelationshipData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/incident_role_assignment_responder_relationship_data.py b/src/datadog_api_client/v2/model/incident_role_assignment_responder_relationship_data.py new file mode 100644 index 0000000000..b9632cd64b --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_role_assignment_responder_relationship_data.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +class IncidentRoleAssignmentResponderRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (UUID,), + "type": (str,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: UUID, type: str, **kwargs): + """ + Responder relationship data. + + :param id: The responder identifier. + :type id: UUID + + :param type: The responder resource type. + :type type: str + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/incident_role_assignment_role_relationship.py b/src/datadog_api_client/v2/model/incident_role_assignment_role_relationship.py new file mode 100644 index 0000000000..492642860b --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_role_assignment_role_relationship.py @@ -0,0 +1,49 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.incident_role_assignment_role_relationship_data import ( + IncidentRoleAssignmentRoleRelationshipData, + ) + + +class IncidentRoleAssignmentRoleRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.incident_role_assignment_role_relationship_data import ( + IncidentRoleAssignmentRoleRelationshipData, + ) + + return { + "data": (IncidentRoleAssignmentRoleRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__( + self_, data: Union[IncidentRoleAssignmentRoleRelationshipData, none_type, UnsetType] = unset, **kwargs + ): + """ + Relationship to a role. + + :param data: Role relationship data. + :type data: IncidentRoleAssignmentRoleRelationshipData, none_type, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/incident_role_assignment_role_relationship_data.py b/src/datadog_api_client/v2/model/incident_role_assignment_role_relationship_data.py new file mode 100644 index 0000000000..b531c5f3d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_role_assignment_role_relationship_data.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +class IncidentRoleAssignmentRoleRelationshipData(ModelNormal): + _nullable = True + + @cached_property + def openapi_types(_): + return { + "id": (UUID,), + "type": (str,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: UUID, type: str, **kwargs): + """ + Role relationship data. + + :param id: The role identifier. + :type id: UUID + + :param type: The role resource type. + :type type: str + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/incident_role_assignment_type.py b/src/datadog_api_client/v2/model/incident_role_assignment_type.py new file mode 100644 index 0000000000..a6d71c8e06 --- /dev/null +++ b/src/datadog_api_client/v2/model/incident_role_assignment_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IncidentRoleAssignmentType(ModelSimple): + """ + Incident role assignment resource type. + + :param value: If omitted defaults to "incident_role_assignments". Must be one of ["incident_role_assignments"]. + :type value: str + """ + + allowed_values = { + "incident_role_assignments", + } + INCIDENT_ROLE_ASSIGNMENTS: ClassVar["IncidentRoleAssignmentType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IncidentRoleAssignmentType.INCIDENT_ROLE_ASSIGNMENTS = IncidentRoleAssignmentType("incident_role_assignments") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 7283ce9f45..5ab9014f0b 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -5045,6 +5045,8 @@ ) from datadog_api_client.v2.model.incident_responder_data_request import IncidentResponderDataRequest from datadog_api_client.v2.model.incident_responder_data_response import IncidentResponderDataResponse +from datadog_api_client.v2.model.incident_responder_included_item import IncidentResponderIncludedItem +from datadog_api_client.v2.model.incident_responder_related_object import IncidentResponderRelatedObject from datadog_api_client.v2.model.incident_responder_relationships import IncidentResponderRelationships from datadog_api_client.v2.model.incident_responder_relationships_request import IncidentResponderRelationshipsRequest from datadog_api_client.v2.model.incident_responder_request import IncidentResponderRequest @@ -5058,7 +5060,10 @@ from datadog_api_client.v2.model.incident_responder_type import IncidentResponderType from datadog_api_client.v2.model.incident_responder_user_relationship import IncidentResponderUserRelationship from datadog_api_client.v2.model.incident_responder_user_relationship_data import IncidentResponderUserRelationshipData +from datadog_api_client.v2.model.incident_responders_pagination import IncidentRespondersPagination from datadog_api_client.v2.model.incident_responders_response import IncidentRespondersResponse +from datadog_api_client.v2.model.incident_responders_response_meta import IncidentRespondersResponseMeta +from datadog_api_client.v2.model.incident_responders_response_meta_page import IncidentRespondersResponseMetaPage from datadog_api_client.v2.model.incident_responders_type import IncidentRespondersType from datadog_api_client.v2.model.incident_response import IncidentResponse from datadog_api_client.v2.model.incident_response_attributes import IncidentResponseAttributes @@ -5067,6 +5072,26 @@ from datadog_api_client.v2.model.incident_response_meta import IncidentResponseMeta from datadog_api_client.v2.model.incident_response_meta_pagination import IncidentResponseMetaPagination from datadog_api_client.v2.model.incident_response_relationships import IncidentResponseRelationships +from datadog_api_client.v2.model.incident_role_assignment_data_attributes_response import ( + IncidentRoleAssignmentDataAttributesResponse, +) +from datadog_api_client.v2.model.incident_role_assignment_data_response import IncidentRoleAssignmentDataResponse +from datadog_api_client.v2.model.incident_role_assignment_relationships_response import ( + IncidentRoleAssignmentRelationshipsResponse, +) +from datadog_api_client.v2.model.incident_role_assignment_responder_relationship import ( + IncidentRoleAssignmentResponderRelationship, +) +from datadog_api_client.v2.model.incident_role_assignment_responder_relationship_data import ( + IncidentRoleAssignmentResponderRelationshipData, +) +from datadog_api_client.v2.model.incident_role_assignment_role_relationship import ( + IncidentRoleAssignmentRoleRelationship, +) +from datadog_api_client.v2.model.incident_role_assignment_role_relationship_data import ( + IncidentRoleAssignmentRoleRelationshipData, +) +from datadog_api_client.v2.model.incident_role_assignment_type import IncidentRoleAssignmentType from datadog_api_client.v2.model.incident_rule_condition import IncidentRuleCondition from datadog_api_client.v2.model.incident_rule_data_attributes_request import IncidentRuleDataAttributesRequest from datadog_api_client.v2.model.incident_rule_data_attributes_response import IncidentRuleDataAttributesResponse @@ -16514,6 +16539,8 @@ "IncidentResponderDataAttributesResponse", "IncidentResponderDataRequest", "IncidentResponderDataResponse", + "IncidentResponderIncludedItem", + "IncidentResponderRelatedObject", "IncidentResponderRelationships", "IncidentResponderRelationshipsRequest", "IncidentResponderRequest", @@ -16523,7 +16550,10 @@ "IncidentResponderType", "IncidentResponderUserRelationship", "IncidentResponderUserRelationshipData", + "IncidentRespondersPagination", "IncidentRespondersResponse", + "IncidentRespondersResponseMeta", + "IncidentRespondersResponseMetaPage", "IncidentRespondersType", "IncidentResponse", "IncidentResponseAttributes", @@ -16532,6 +16562,14 @@ "IncidentResponseMeta", "IncidentResponseMetaPagination", "IncidentResponseRelationships", + "IncidentRoleAssignmentDataAttributesResponse", + "IncidentRoleAssignmentDataResponse", + "IncidentRoleAssignmentRelationshipsResponse", + "IncidentRoleAssignmentResponderRelationship", + "IncidentRoleAssignmentResponderRelationshipData", + "IncidentRoleAssignmentRoleRelationship", + "IncidentRoleAssignmentRoleRelationshipData", + "IncidentRoleAssignmentType", "IncidentRuleCondition", "IncidentRuleDataAttributesRequest", "IncidentRuleDataAttributesResponse", diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index 2f7369d973..ce115e1632 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/generated-test/test-runner-data/manifest.json @@ -6755,6 +6755,13 @@ "scenario": "List incident notification templates returns \"OK\" response", "version": "v2" }, + { + "feature": "Incidents", + "feature_file": "../../v2/features/incidents.feature", + "file": "v2/incidents/list-incident-responders-includes-users-and-role-assignments.json", + "scenario": "List incident responders includes users and role assignments", + "version": "v2" + }, { "feature": "Incidents", "feature_file": "../../v2/features/incidents.feature", diff --git a/tests/generated-test/test-runner-data/v2/incidents/list-incident-responders-includes-users-and-role-assignments.json b/tests/generated-test/test-runner-data/v2/incidents/list-incident-responders-includes-users-and-role-assignments.json new file mode 100644 index 0000000000..244d03105a --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/incidents/list-incident-responders-includes-users-and-role-assignments.json @@ -0,0 +1,59 @@ +{ + "api": "Incidents", + "expected_status": 200, + "feature": "Incidents", + "id": "v2/Incidents/List incident responders includes users and role assignments", + "operation_id": "ListIncidentResponders", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "incident_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "incident_with_commander.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": false, + "in": "query", + "name": "include", + "required": false, + "schema": { + "format": null, + "items": { + "format": null, + "ref": "IncidentResponderRelatedObject", + "type": "string" + }, + "ref": null, + "type": "array" + }, + "source": { + "type": "literal", + "value": [ + "users", + "role_assignments" + ] + }, + "style": "form" + } + ], + "path": "/api/v2/incidents/{incident_id}/responders" + }, + "scenario": "List incident responders includes users and role assignments", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-server-data/v2/incidents.json b/tests/generated-test/test-server-data/v2/incidents.json index dfd1ebe453..8d80c054ca 100644 --- a/tests/generated-test/test-server-data/v2/incidents.json +++ b/tests/generated-test/test-server-data/v2/incidents.json @@ -4116,6 +4116,154 @@ "scenario": "List incident notification templates returns \"OK\" response", "version": "v2" }, + { + "feature": "Incidents", + "frozen_at": "2026-10-26T18:25:38.922Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-List_incident_responders_includes_users_and_role_assignments-1793039138@datadoghq.com", + "title": "user title" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"59b0865d-569a-4e8c-bf20-082d6b9d04b5\",\"attributes\":{\"uuid\":\"59b0865d-569a-4e8c-bf20-082d6b9d04b5\",\"name\":null,\"handle\":\"test-list_incident_responders_includes_users_and_role_assignments-1793039138@datadoghq.com\",\"created_at\":\"2026-10-26T18:25:40.973286+00:00\",\"modified_at\":\"2026-10-26T18:25:40.973286+00:00\",\"email\":\"test-list_incident_responders_includes_users_and_role_assignments-1793039138@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/363c5a1b731e4c8877fb5b13df6819f1?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "customer_impacted": false, + "title": "Test-List_incident_responders_includes_users_and_role_assignments-1793039138" + }, + "relationships": { + "commander_user": { + "data": { + "id": "59b0865d-569a-4e8c-bf20-082d6b9d04b5", + "type": "users" + } + } + }, + "type": "incidents" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/incidents", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"7f2dae66-cde0-4662-b36e-4d33505dc14e\",\"type\":\"incidents\",\"attributes\":{\"case_id\":null,\"created\":\"2026-10-26T18:25:41.068723Z\",\"created_by_uuid\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impacted\":false,\"declared\":\"2026-10-26T18:25:41.068723Z\",\"declared_by_uuid\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"detected\":\"2026-10-26T18:25:41.068723Z\",\"field_analytics\":null,\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"slug\":{\"type\":\"textbox\",\"value\":\"IR-384168\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"state_category\":{\"type\":\"dropdown\",\"value\":\"live\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"incident_type_uuid\":\"41d2e10b-4108-4736-92d7-791d00ea0702\",\"is_test\":false,\"last_modified_by_uuid\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"modified\":\"2026-10-26T18:25:41.068723Z\",\"non_datadog_creator\":null,\"notification_handles\":null,\"public_id\":384168,\"resolved\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"time_from_detect_to_resolve\":0,\"time_to_detect\":0,\"time_to_internal_response\":0,\"time_to_repair\":0,\"time_to_resolve\":0,\"title\":\"Test-List_incident_responders_includes_users_and_role_assignments-1793039138\",\"visibility\":\"organization\"},\"relationships\":{\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":{\"id\":\"59b0865d-569a-4e8c-bf20-082d6b9d04b5\",\"type\":\"users\"}},\"created_by_user\":{\"data\":{\"id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"type\":\"users\"}},\"declared_by_user\":{\"data\":{\"id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"type\":\"users\"}},\"impacts\":{\"data\":[]},\"incident_type\":{\"data\":{\"id\":\"41d2e10b-4108-4736-92d7-791d00ea0702\",\"type\":\"incident_types\"}},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"type\":\"users\"}},\"responders\":{\"data\":[{\"id\":\"3fe10d30-0416-475b-8c4d-d4b11de61b38\",\"type\":\"incident_responders\"}]},\"user_defined_fields\":{\"data\":[{\"id\":\"706cbbab-4951-4b12-8ab1-8de176b0b8ad\",\"type\":\"user_defined_field\"},{\"id\":\"33457d2a-570c-5567-b4af-979a2a8f1164\",\"type\":\"user_defined_field\"},{\"id\":\"1ddff6f6-cb1f-51a0-9d81-dc18ef52cc9d\",\"type\":\"user_defined_field\"},{\"id\":\"39044b03-cee4-555f-b1e0-3eb3aa759a86\",\"type\":\"user_defined_field\"},{\"id\":\"2b9f1063-b915-4c7a-8bbd-fc3940245529\",\"type\":\"user_defined_field\"},{\"id\":\"d003693c-bee9-5420-8d46-859269c20914\",\"type\":\"user_defined_field\"},{\"id\":\"6bc9d32b-c2cd-591e-9b7a-74c886a5ddcf\",\"type\":\"user_defined_field\"},{\"id\":\"95c53547-2ba3-5d8a-9c3b-cf245bc0c629\",\"type\":\"user_defined_field\"},{\"id\":\"3cbe9e60-d794-532c-acc0-73641f782813\",\"type\":\"user_defined_field\"}]}}}}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/incidents/7f2dae66-cde0-4662-b36e-4d33505dc14e/responders", + "query": [ + [ + "include", + "users,role_assignments" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"3fe10d30-0416-475b-8c4d-d4b11de61b38\",\"type\":\"incident_responders\",\"attributes\":{\"created\":\"2026-10-26T18:25:41.068723Z\",\"external_id\":null,\"external_source\":null,\"is_billable\":false,\"last_active\":null,\"meta\":null,\"modified\":\"2026-10-26T18:25:41.068723Z\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"type\":\"users\"}},\"last_modified_by\":{\"data\":{\"id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"type\":\"users\"}},\"role_assignments\":{\"data\":[{\"id\":\"a7fcc9d3-2702-474f-9f8a-8c5e70cb5400\",\"type\":\"incident_role_assignments\"}]},\"user\":{\"data\":{\"id\":\"59b0865d-569a-4e8c-bf20-082d6b9d04b5\",\"type\":\"users\"}}}}],\"meta\":{\"pagination\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":25,\"total\":null,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":25,\"last_offset\":null}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/incidents/7f2dae66-cde0-4662-b36e-4d33505dc14e/responders?include=users%2Crole_assignments\",\"first\":\"https://api.datadoghq.com/api/v2/incidents/7f2dae66-cde0-4662-b36e-4d33505dc14e/responders?include=users,role_assignments&page[limit]=25&page[offset]=0\",\"next\":\"https://api.datadoghq.com/api/v2/incidents/7f2dae66-cde0-4662-b36e-4d33505dc14e/responders?include=users,role_assignments&page[limit]=25&page[offset]=25\"},\"included\":[{\"id\":\"a7fcc9d3-2702-474f-9f8a-8c5e70cb5400\",\"type\":\"incident_role_assignments\",\"attributes\":{\"created\":\"2026-10-26T18:25:41.068723Z\",\"deleted\":\"0001-01-01T00:00:00Z\",\"modified\":\"2026-10-26T18:25:41.068723Z\",\"responder_type\":\"Incident Commander\",\"role\":\"Incident Commander\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"type\":\"users\"}},\"reserved_role\":{\"data\":{\"id\":\"14fd9cd1-5c99-4d94-9d78-d017810d9d80\",\"type\":\"incident_reserved_roles\"}},\"responder\":{\"data\":{\"id\":\"3fe10d30-0416-475b-8c4d-d4b11de61b38\",\"type\":\"incident_responders\"}},\"user_defined_role\":{\"data\":null}}},{\"id\":\"59b0865d-569a-4e8c-bf20-082d6b9d04b5\",\"type\":\"users\",\"attributes\":{\"email\":\"test-list_incident_responders_includes_users_and_role_assignments-1793039138@datadoghq.com\",\"handle\":\"test-list_incident_responders_includes_users_and_role_assignments-1793039138@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/363c5a1b731e4c8877fb5b13df6819f1?d=retro&s=48\",\"name\":\"\",\"uuid\":\"59b0865d-569a-4e8c-bf20-082d6b9d04b5\"}},{\"id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"type\":\"users\",\"attributes\":{\"email\":\"recorded-user@example.com\",\"handle\":\"recorded-user@example.com\",\"icon\":\"https://example.com/avatar.png\",\"name\":\"Example User\",\"uuid\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/incidents/7f2dae66-cde0-4662-b36e-4d33505dc14e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/59b0865d-569a-4e8c-bf20-082d6b9d04b5", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "List incident responders includes users and role assignments", + "version": "v2" + }, { "feature": "Incidents", "frozen_at": "2026-02-23T14:06:50.098Z", diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 9400f1fd23..84ca5af22e 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -738,6 +738,18 @@ "tag": "Incidents", "operationId": "CreateIncident" }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\":{\"type\":\"incidents\",\"attributes\":{\"title\":\"{{ unique }}\",\"customer_impacted\":false},\"relationships\":{\"commander_user\":{\"data\":{\"id\":\"{{ user.data.id }}\",\"type\":\"users\"}}}}}" + } + ], + "step": "there is a valid \"incident_with_commander\" in the system", + "key": "incident_with_commander", + "tag": "Incidents", + "operationId": "CreateIncident" + }, { "operationId": "CreateIncidentNotificationRule", "parameters": [ diff --git a/tests/v2/features/incidents.feature b/tests/v2/features/incidents.feature index 95b84ab7a3..e51464f5d2 100644 --- a/tests/v2/features/incidents.feature +++ b/tests/v2/features/incidents.feature @@ -106,6 +106,33 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:ddoghq/incident-app + Scenario: Create an incident responder returns "Bad Request" response + Given operation "CreateIncidentResponder" enabled + And new "CreateIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"relationships": {"user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incident_responders"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: Create an incident responder returns "Created" response + Given operation "CreateIncidentResponder" enabled + And new "CreateIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"relationships": {"user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incident_responders"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/incident-app + Scenario: Create an incident responder returns "Not Found" response + Given operation "CreateIncidentResponder" enabled + And new "CreateIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"relationships": {"user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incident_responders"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:ddoghq/incident-app Scenario: Create an incident returns "Bad Request" response Given operation "CreateIncident" enabled @@ -468,6 +495,33 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:ddoghq/incident-app + Scenario: Delete an incident responder returns "Bad Request" response + Given operation "DeleteIncidentResponder" enabled + And new "DeleteIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "responder_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: Delete an incident responder returns "No Content" response + Given operation "DeleteIncidentResponder" enabled + And new "DeleteIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "responder_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/incident-app + Scenario: Delete an incident responder returns "Not Found" response + Given operation "DeleteIncidentResponder" enabled + And new "DeleteIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "responder_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:ddoghq/incident-app Scenario: Delete an incident todo returns "Bad Request" response Given operation "DeleteIncidentTodo" enabled @@ -805,6 +859,33 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/incident-app + Scenario: Get an incident responder returns "Bad Request" response + Given operation "GetIncidentResponder" enabled + And new "GetIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "responder_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: Get an incident responder returns "Not Found" response + Given operation "GetIncidentResponder" enabled + And new "GetIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "responder_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/incident-app + Scenario: Get an incident responder returns "OK" response + Given operation "GetIncidentResponder" enabled + And new "GetIncidentResponder" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "responder_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/incident-app Scenario: Get an incident user-defined field returns "Not Found" response Given operation "GetIncidentUserDefinedField" enabled @@ -1172,6 +1253,45 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 0 + @team:ddoghq/incident-app + Scenario: List incident responders includes users and role assignments + Given operation "CreateIncident" enabled + And operation "ListIncidentResponders" enabled + And there is a valid "user" in the system + And there is a valid "incident_with_commander" in the system + And new "ListIncidentResponders" request + And request contains "incident_id" parameter from "incident_with_commander.data.id" + And request contains "include" parameter with value ["users", "role_assignments"] + When the request is sent + Then the response status is 200 OK + And the response "included" has item with field "type" with value "users" + And the response "included" has item with field "type" with value "incident_role_assignments" + And the response "included" has item with field "id" with value "{{ user.data.id }}" + + @generated @skip @team:ddoghq/incident-app + Scenario: List incident responders returns "Bad Request" response + Given operation "ListIncidentResponders" enabled + And new "ListIncidentResponders" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: List incident responders returns "Not Found" response + Given operation "ListIncidentResponders" enabled + And new "ListIncidentResponders" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/incident-app + Scenario: List incident responders returns "OK" response + Given operation "ListIncidentResponders" enabled + And new "ListIncidentResponders" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/incident-app Scenario: List incident user-defined roles returns "Bad Request" response Given operation "ListIncidentUserDefinedRoles" enabled diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 8ce55668e7..2b20834efc 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -4215,6 +4215,41 @@ "type": "idempotent" } }, + "ListIncidentResponders": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentResponder": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentResponder", + "parameters": [ + { + "name": "incident_id", + "source": "data.relationships.incident.data.id" + }, + { + "name": "responder_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteIncidentResponder": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentResponder": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "ListDatabricksIntegrationAccounts": { "tag": "Databricks Integration", "undo": {