From 11a3e94da9c16399435c20493a8c7c35afa416a9 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 24 Oct 2025 14:06:03 +0000 Subject: [PATCH] Regenerate client from commit 1ec8354 of spec repo --- .generator/schemas/v2/openapi.yaml | 270 ++++++++++++++++++ docs/datadog_api_client.v2.model.rst | 98 +++++++ examples/v2/events/CreateEventEmailAddress.py | 35 +++ .../events/CreateOnCallEventEmailAddress.py | 34 +++ .../v2/events/GetOnCallEventEmailAddress.py | 14 + examples/v2/events/ListEventEmailAddresses.py | 14 + src/datadog_api_client/configuration.py | 4 + src/datadog_api_client/v2/api/events_api.py | 124 ++++++++ .../create_event_email_address_request.py | 44 +++ ...create_event_email_address_request_data.py | 60 ++++ ...t_email_address_request_data_attributes.py | 70 +++++ ...ate_on_call_event_email_address_request.py | 46 +++ ...n_call_event_email_address_request_data.py | 60 ++++ ...t_email_address_request_data_attributes.py | 71 +++++ .../v2/model/event_email_address_response.py | 42 +++ .../event_email_address_response_array.py | 40 +++ .../event_email_address_response_data.py | 81 ++++++ ..._email_address_response_data_attributes.py | 101 +++++++ ...ail_address_response_data_relationships.py | 58 ++++ ...ddress_response_data_relationships_user.py | 44 +++ ...s_response_data_relationships_user_data.py | 46 +++ .../v2/model/event_emails_type.py | 35 +++ src/datadog_api_client/v2/models/__init__.py | 42 +++ tests/v2/features/events.feature | 30 ++ tests/v2/features/undo.json | 28 ++ 25 files changed, 1491 insertions(+) create mode 100644 examples/v2/events/CreateEventEmailAddress.py create mode 100644 examples/v2/events/CreateOnCallEventEmailAddress.py create mode 100644 examples/v2/events/GetOnCallEventEmailAddress.py create mode 100644 examples/v2/events/ListEventEmailAddresses.py create mode 100644 src/datadog_api_client/v2/model/create_event_email_address_request.py create mode 100644 src/datadog_api_client/v2/model/create_event_email_address_request_data.py create mode 100644 src/datadog_api_client/v2/model/create_event_email_address_request_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/create_on_call_event_email_address_request.py create mode 100644 src/datadog_api_client/v2/model/create_on_call_event_email_address_request_data.py create mode 100644 src/datadog_api_client/v2/model/create_on_call_event_email_address_request_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/event_email_address_response.py create mode 100644 src/datadog_api_client/v2/model/event_email_address_response_array.py create mode 100644 src/datadog_api_client/v2/model/event_email_address_response_data.py create mode 100644 src/datadog_api_client/v2/model/event_email_address_response_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/event_email_address_response_data_relationships.py create mode 100644 src/datadog_api_client/v2/model/event_email_address_response_data_relationships_user.py create mode 100644 src/datadog_api_client/v2/model/event_email_address_response_data_relationships_user_data.py create mode 100644 src/datadog_api_client/v2/model/event_emails_type.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2c64bbd7a3..5d5c5b1803 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -12289,6 +12289,46 @@ components: meta: $ref: '#/components/schemas/DataDeletionResponseMeta' type: object + CreateEventEmailAddressRequest: + properties: + data: + $ref: '#/components/schemas/CreateEventEmailAddressRequestData' + type: object + CreateEventEmailAddressRequestData: + properties: + attributes: + $ref: '#/components/schemas/CreateEventEmailAddressRequestDataAttributes' + type: + $ref: '#/components/schemas/EventEmailsType' + required: + - type + type: object + CreateEventEmailAddressRequestDataAttributes: + properties: + alert_type: + type: string + description: + type: string + format: + example: '' + type: string + notify_handles: + example: + - '' + items: + type: string + type: array + tags: + example: + - '' + items: + type: string + type: array + required: + - format + - notify_handles + - tags + type: object CreateIncidentNotificationRuleRequest: description: Create request for a notification rule. properties: @@ -12341,6 +12381,41 @@ components: - name - targets type: object + CreateOnCallEventEmailAddressRequest: + properties: + data: + $ref: '#/components/schemas/CreateOnCallEventEmailAddressRequestData' + type: object + CreateOnCallEventEmailAddressRequestData: + properties: + attributes: + $ref: '#/components/schemas/CreateOnCallEventEmailAddressRequestDataAttributes' + type: + $ref: '#/components/schemas/EventEmailsType' + required: + - type + type: object + CreateOnCallEventEmailAddressRequestDataAttributes: + properties: + alert_type: + type: string + description: + type: string + format: + example: '' + type: string + tags: + example: + - '' + items: + type: string + type: array + team_handle: + type: string + required: + - format + - tags + type: object CreateOpenAPIResponse: description: Response for `CreateOpenAPI` operation. properties: @@ -18701,6 +18776,112 @@ components: the default subdomain. type: string type: object + EventEmailAddressResponse: + properties: + data: + $ref: '#/components/schemas/EventEmailAddressResponseData' + type: object + EventEmailAddressResponseArray: + properties: + data: + items: + $ref: '#/components/schemas/EventEmailAddressResponseData' + type: array + required: + - data + type: object + EventEmailAddressResponseData: + properties: + attributes: + $ref: '#/components/schemas/EventEmailAddressResponseDataAttributes' + id: + example: '' + type: string + relationships: + $ref: '#/components/schemas/EventEmailAddressResponseDataRelationships' + type: + $ref: '#/components/schemas/EventEmailsType' + required: + - type + - id + type: object + EventEmailAddressResponseDataAttributes: + properties: + alert_type: + type: string + created_at: + example: '' + format: date-time + type: string + description: + type: string + email: + example: '' + type: string + format: + example: '' + type: string + last_used_at: + format: date-time + type: string + notify_handles: + example: + - '' + items: + type: string + type: array + revoked_at: + format: date-time + type: string + tags: + example: + - '' + items: + type: string + type: array + required: + - created_at + - email + - format + - notify_handles + - tags + type: object + EventEmailAddressResponseDataRelationships: + properties: + created_by: + $ref: '#/components/schemas/EventEmailAddressResponseDataRelationshipsUser' + revoked_by: + $ref: '#/components/schemas/EventEmailAddressResponseDataRelationshipsUser' + required: + - created_by + type: object + EventEmailAddressResponseDataRelationshipsUser: + properties: + data: + $ref: '#/components/schemas/EventEmailAddressResponseDataRelationshipsUserData' + required: + - data + type: object + EventEmailAddressResponseDataRelationshipsUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/UsersType' + required: + - type + - id + type: object + EventEmailsType: + default: event_emails + description: Event emails resource type. + enum: + - event_emails + example: event_emails + type: string + x-enum-varnames: + - EVENT_EMAILS EventPayload: additionalProperties: false description: Event attributes. @@ -61743,6 +61924,92 @@ paths: tags: - Events x-codegen-request-body-name: body + /api/v2/events/mail: + get: + operationId: ListEventEmailAddresses + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressResponseArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List event email addresses + tags: + - Events + x-unstable: '**Note**: This endpoint may be subject to changes.' + post: + operationId: CreateEventEmailAddress + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateEventEmailAddressRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressResponse' + description: Created + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create event email address + tags: + - Events + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/events/mail/on-call: + get: + operationId: GetOnCallEventEmailAddress + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressResponseArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get on-call event email address + tags: + - Events + x-unstable: '**Note**: This endpoint may be subject to changes.' + post: + operationId: CreateOnCallEventEmailAddress + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOnCallEventEmailAddressRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/EventEmailAddressResponse' + description: Created + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create on-call event email address + tags: + - Events + x-unstable: '**Note**: This endpoint may be subject to changes.' /api/v2/events/search: post: description: 'List endpoint returns events that match an events search query. @@ -61771,6 +62038,9 @@ paths: $ref: '#/components/responses/NotAuthorizedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] summary: Search events tags: - Events diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index ba4cfe3ed7..c39b452a1b 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -4827,6 +4827,27 @@ datadog\_api\_client.v2.model.create\_data\_deletion\_response\_body module :members: :show-inheritance: +datadog\_api\_client.v2.model.create\_event\_email\_address\_request module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_event_email_address_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_event\_email\_address\_request\_data module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_event_email_address_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_event\_email\_address\_request\_data\_attributes module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_event_email_address_request_data_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.create\_incident\_notification\_rule\_request module ---------------------------------------------------------------------------------- @@ -4862,6 +4883,27 @@ datadog\_api\_client.v2.model.create\_notification\_rule\_parameters\_data\_attr :members: :show-inheritance: +datadog\_api\_client.v2.model.create\_on\_call\_event\_email\_address\_request module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_on_call_event_email_address_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_on\_call\_event\_email\_address\_request\_data module +------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_on_call_event_email_address_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_on\_call\_event\_email\_address\_request\_data\_attributes module +------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_on_call_event_email_address_request_data_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.create\_open\_api\_response module ---------------------------------------------------------------- @@ -7690,6 +7732,62 @@ datadog\_api\_client.v2.model.event\_create\_response\_payload\_links module :members: :show-inheritance: +datadog\_api\_client.v2.model.event\_email\_address\_response module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_response\_array module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_response_array + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_response\_data module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_response\_data\_attributes module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_response_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_response\_data\_relationships module +----------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_response_data_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_response\_data\_relationships\_user module +----------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_response_data_relationships_user + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_email\_address\_response\_data\_relationships\_user\_data module +----------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_email_address_response_data_relationships_user_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.event\_emails\_type module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.event_emails_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.event\_payload module --------------------------------------------------- diff --git a/examples/v2/events/CreateEventEmailAddress.py b/examples/v2/events/CreateEventEmailAddress.py new file mode 100644 index 0000000000..09af6d61b9 --- /dev/null +++ b/examples/v2/events/CreateEventEmailAddress.py @@ -0,0 +1,35 @@ +""" +Create event email address returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi +from datadog_api_client.v2.model.create_event_email_address_request import CreateEventEmailAddressRequest +from datadog_api_client.v2.model.create_event_email_address_request_data import CreateEventEmailAddressRequestData +from datadog_api_client.v2.model.create_event_email_address_request_data_attributes import ( + CreateEventEmailAddressRequestDataAttributes, +) +from datadog_api_client.v2.model.event_emails_type import EventEmailsType + +body = CreateEventEmailAddressRequest( + data=CreateEventEmailAddressRequestData( + attributes=CreateEventEmailAddressRequestDataAttributes( + format="", + notify_handles=[ + "", + ], + tags=[ + "", + ], + ), + type=EventEmailsType.EVENT_EMAILS, + ), +) + +configuration = Configuration() +configuration.unstable_operations["create_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.create_event_email_address(body=body) + + print(response) diff --git a/examples/v2/events/CreateOnCallEventEmailAddress.py b/examples/v2/events/CreateOnCallEventEmailAddress.py new file mode 100644 index 0000000000..1252fa2c5f --- /dev/null +++ b/examples/v2/events/CreateOnCallEventEmailAddress.py @@ -0,0 +1,34 @@ +""" +Create on-call event email address returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi +from datadog_api_client.v2.model.create_on_call_event_email_address_request import CreateOnCallEventEmailAddressRequest +from datadog_api_client.v2.model.create_on_call_event_email_address_request_data import ( + CreateOnCallEventEmailAddressRequestData, +) +from datadog_api_client.v2.model.create_on_call_event_email_address_request_data_attributes import ( + CreateOnCallEventEmailAddressRequestDataAttributes, +) +from datadog_api_client.v2.model.event_emails_type import EventEmailsType + +body = CreateOnCallEventEmailAddressRequest( + data=CreateOnCallEventEmailAddressRequestData( + attributes=CreateOnCallEventEmailAddressRequestDataAttributes( + format="", + tags=[ + "", + ], + ), + type=EventEmailsType.EVENT_EMAILS, + ), +) + +configuration = Configuration() +configuration.unstable_operations["create_on_call_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.create_on_call_event_email_address(body=body) + + print(response) diff --git a/examples/v2/events/GetOnCallEventEmailAddress.py b/examples/v2/events/GetOnCallEventEmailAddress.py new file mode 100644 index 0000000000..e25d0771fd --- /dev/null +++ b/examples/v2/events/GetOnCallEventEmailAddress.py @@ -0,0 +1,14 @@ +""" +Get on-call event email address returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi + +configuration = Configuration() +configuration.unstable_operations["get_on_call_event_email_address"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.get_on_call_event_email_address() + + print(response) diff --git a/examples/v2/events/ListEventEmailAddresses.py b/examples/v2/events/ListEventEmailAddresses.py new file mode 100644 index 0000000000..09260299ef --- /dev/null +++ b/examples/v2/events/ListEventEmailAddresses.py @@ -0,0 +1,14 @@ +""" +List event email addresses returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.events_api import EventsApi + +configuration = Configuration() +configuration.unstable_operations["list_event_email_addresses"] = True +with ApiClient(configuration) as api_client: + api_instance = EventsApi(api_client) + response = api_instance.list_event_email_addresses() + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 2456a9db20..7243e9fd0c 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -272,6 +272,10 @@ def __init__( "v2.cancel_data_deletion_request": False, "v2.create_data_deletion_request": False, "v2.get_data_deletion_requests": False, + "v2.create_event_email_address": False, + "v2.create_on_call_event_email_address": False, + "v2.get_on_call_event_email_address": False, + "v2.list_event_email_addresses": False, "v2.create_incident": False, "v2.create_incident_impact": False, "v2.create_incident_integration": False, diff --git a/src/datadog_api_client/v2/api/events_api.py b/src/datadog_api_client/v2/api/events_api.py index 6492e13d30..7d294eee9c 100644 --- a/src/datadog_api_client/v2/api/events_api.py +++ b/src/datadog_api_client/v2/api/events_api.py @@ -19,6 +19,10 @@ from datadog_api_client.v2.model.event_response import EventResponse from datadog_api_client.v2.model.event_create_response_payload import EventCreateResponsePayload from datadog_api_client.v2.model.event_create_request_payload import EventCreateRequestPayload +from datadog_api_client.v2.model.event_email_address_response_array import EventEmailAddressResponseArray +from datadog_api_client.v2.model.event_email_address_response import EventEmailAddressResponse +from datadog_api_client.v2.model.create_event_email_address_request import CreateEventEmailAddressRequest +from datadog_api_client.v2.model.create_on_call_event_email_address_request import CreateOnCallEventEmailAddressRequest from datadog_api_client.v2.model.events_list_request import EventsListRequest from datadog_api_client.v2.model.v2_event_response import V2EventResponse @@ -104,6 +108,46 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._create_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail", + "operation_id": "create_event_email_address", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (CreateEventEmailAddressRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_on_call_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail/on-call", + "operation_id": "create_on_call_event_email_address", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (CreateOnCallEventEmailAddressRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._get_event_endpoint = _Endpoint( settings={ "response_type": (V2EventResponse,), @@ -127,6 +171,38 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_on_call_event_email_address_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressResponseArray,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail/on-call", + "operation_id": "get_on_call_event_email_address", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_event_email_addresses_endpoint = _Endpoint( + settings={ + "response_type": (EventEmailAddressResponseArray,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/events/mail", + "operation_id": "list_event_email_addresses", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_events_endpoint = _Endpoint( settings={ "response_type": (EventsListResponse,), @@ -221,6 +297,34 @@ def create_event( return self._create_event_endpoint.call_with_http_info(**kwargs) + def create_event_email_address( + self, + body: CreateEventEmailAddressRequest, + ) -> EventEmailAddressResponse: + """Create event email address. + + :type body: CreateEventEmailAddressRequest + :rtype: EventEmailAddressResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_event_email_address_endpoint.call_with_http_info(**kwargs) + + def create_on_call_event_email_address( + self, + body: CreateOnCallEventEmailAddressRequest, + ) -> EventEmailAddressResponse: + """Create on-call event email address. + + :type body: CreateOnCallEventEmailAddressRequest + :rtype: EventEmailAddressResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_on_call_event_email_address_endpoint.call_with_http_info(**kwargs) + def get_event( self, event_id: str, @@ -238,6 +342,26 @@ def get_event( return self._get_event_endpoint.call_with_http_info(**kwargs) + def get_on_call_event_email_address( + self, + ) -> EventEmailAddressResponseArray: + """Get on-call event email address. + + :rtype: EventEmailAddressResponseArray + """ + kwargs: Dict[str, Any] = {} + return self._get_on_call_event_email_address_endpoint.call_with_http_info(**kwargs) + + def list_event_email_addresses( + self, + ) -> EventEmailAddressResponseArray: + """List event email addresses. + + :rtype: EventEmailAddressResponseArray + """ + kwargs: Dict[str, Any] = {} + return self._list_event_email_addresses_endpoint.call_with_http_info(**kwargs) + def list_events( self, *, diff --git a/src/datadog_api_client/v2/model/create_event_email_address_request.py b/src/datadog_api_client/v2/model/create_event_email_address_request.py new file mode 100644 index 0000000000..a2683f759d --- /dev/null +++ b/src/datadog_api_client/v2/model/create_event_email_address_request.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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_event_email_address_request_data import CreateEventEmailAddressRequestData + + +class CreateEventEmailAddressRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_event_email_address_request_data import ( + CreateEventEmailAddressRequestData, + ) + + return { + "data": (CreateEventEmailAddressRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[CreateEventEmailAddressRequestData, UnsetType] = unset, **kwargs): + """ + + + :param data: + :type data: CreateEventEmailAddressRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_event_email_address_request_data.py b/src/datadog_api_client/v2/model/create_event_email_address_request_data.py new file mode 100644 index 0000000000..d1b490738c --- /dev/null +++ b/src/datadog_api_client/v2/model/create_event_email_address_request_data.py @@ -0,0 +1,60 @@ +# 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.create_event_email_address_request_data_attributes import ( + CreateEventEmailAddressRequestDataAttributes, + ) + from datadog_api_client.v2.model.event_emails_type import EventEmailsType + + +class CreateEventEmailAddressRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_event_email_address_request_data_attributes import ( + CreateEventEmailAddressRequestDataAttributes, + ) + from datadog_api_client.v2.model.event_emails_type import EventEmailsType + + return { + "attributes": (CreateEventEmailAddressRequestDataAttributes,), + "type": (EventEmailsType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + type: EventEmailsType, + attributes: Union[CreateEventEmailAddressRequestDataAttributes, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: CreateEventEmailAddressRequestDataAttributes, optional + + :param type: Event emails resource type. + :type type: EventEmailsType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/create_event_email_address_request_data_attributes.py b/src/datadog_api_client/v2/model/create_event_email_address_request_data_attributes.py new file mode 100644 index 0000000000..a3b7ffbe11 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_event_email_address_request_data_attributes.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 List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class CreateEventEmailAddressRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "alert_type": (str,), + "description": (str,), + "format": (str,), + "notify_handles": ([str],), + "tags": ([str],), + } + + attribute_map = { + "alert_type": "alert_type", + "description": "description", + "format": "format", + "notify_handles": "notify_handles", + "tags": "tags", + } + + def __init__( + self_, + format: str, + notify_handles: List[str], + tags: List[str], + alert_type: Union[str, UnsetType] = unset, + description: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param alert_type: + :type alert_type: str, optional + + :param description: + :type description: str, optional + + :param format: + :type format: str + + :param notify_handles: + :type notify_handles: [str] + + :param tags: + :type tags: [str] + """ + if alert_type is not unset: + kwargs["alert_type"] = alert_type + if description is not unset: + kwargs["description"] = description + super().__init__(kwargs) + + self_.format = format + self_.notify_handles = notify_handles + self_.tags = tags diff --git a/src/datadog_api_client/v2/model/create_on_call_event_email_address_request.py b/src/datadog_api_client/v2/model/create_on_call_event_email_address_request.py new file mode 100644 index 0000000000..20e1895586 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_on_call_event_email_address_request.py @@ -0,0 +1,46 @@ +# 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.create_on_call_event_email_address_request_data import ( + CreateOnCallEventEmailAddressRequestData, + ) + + +class CreateOnCallEventEmailAddressRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_on_call_event_email_address_request_data import ( + CreateOnCallEventEmailAddressRequestData, + ) + + return { + "data": (CreateOnCallEventEmailAddressRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[CreateOnCallEventEmailAddressRequestData, UnsetType] = unset, **kwargs): + """ + + + :param data: + :type data: CreateOnCallEventEmailAddressRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_on_call_event_email_address_request_data.py b/src/datadog_api_client/v2/model/create_on_call_event_email_address_request_data.py new file mode 100644 index 0000000000..8d84305df9 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_on_call_event_email_address_request_data.py @@ -0,0 +1,60 @@ +# 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.create_on_call_event_email_address_request_data_attributes import ( + CreateOnCallEventEmailAddressRequestDataAttributes, + ) + from datadog_api_client.v2.model.event_emails_type import EventEmailsType + + +class CreateOnCallEventEmailAddressRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_on_call_event_email_address_request_data_attributes import ( + CreateOnCallEventEmailAddressRequestDataAttributes, + ) + from datadog_api_client.v2.model.event_emails_type import EventEmailsType + + return { + "attributes": (CreateOnCallEventEmailAddressRequestDataAttributes,), + "type": (EventEmailsType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + type: EventEmailsType, + attributes: Union[CreateOnCallEventEmailAddressRequestDataAttributes, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: CreateOnCallEventEmailAddressRequestDataAttributes, optional + + :param type: Event emails resource type. + :type type: EventEmailsType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/create_on_call_event_email_address_request_data_attributes.py b/src/datadog_api_client/v2/model/create_on_call_event_email_address_request_data_attributes.py new file mode 100644 index 0000000000..b5ef857273 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_on_call_event_email_address_request_data_attributes.py @@ -0,0 +1,71 @@ +# 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 List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class CreateOnCallEventEmailAddressRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "alert_type": (str,), + "description": (str,), + "format": (str,), + "tags": ([str],), + "team_handle": (str,), + } + + attribute_map = { + "alert_type": "alert_type", + "description": "description", + "format": "format", + "tags": "tags", + "team_handle": "team_handle", + } + + def __init__( + self_, + format: str, + tags: List[str], + alert_type: Union[str, UnsetType] = unset, + description: Union[str, UnsetType] = unset, + team_handle: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param alert_type: + :type alert_type: str, optional + + :param description: + :type description: str, optional + + :param format: + :type format: str + + :param tags: + :type tags: [str] + + :param team_handle: + :type team_handle: str, optional + """ + if alert_type is not unset: + kwargs["alert_type"] = alert_type + if description is not unset: + kwargs["description"] = description + if team_handle is not unset: + kwargs["team_handle"] = team_handle + super().__init__(kwargs) + + self_.format = format + self_.tags = tags diff --git a/src/datadog_api_client/v2/model/event_email_address_response.py b/src/datadog_api_client/v2/model/event_email_address_response.py new file mode 100644 index 0000000000..d290a2e3f5 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_response.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 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.event_email_address_response_data import EventEmailAddressResponseData + + +class EventEmailAddressResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_response_data import EventEmailAddressResponseData + + return { + "data": (EventEmailAddressResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[EventEmailAddressResponseData, UnsetType] = unset, **kwargs): + """ + + + :param data: + :type data: EventEmailAddressResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/event_email_address_response_array.py b/src/datadog_api_client/v2/model/event_email_address_response_array.py new file mode 100644 index 0000000000..d14eb8e475 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_response_array.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 typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.event_email_address_response_data import EventEmailAddressResponseData + + +class EventEmailAddressResponseArray(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_response_data import EventEmailAddressResponseData + + return { + "data": ([EventEmailAddressResponseData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[EventEmailAddressResponseData], **kwargs): + """ + + + :param data: + :type data: [EventEmailAddressResponseData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/event_email_address_response_data.py b/src/datadog_api_client/v2/model/event_email_address_response_data.py new file mode 100644 index 0000000000..86469e060f --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_response_data.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, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.event_email_address_response_data_attributes import ( + EventEmailAddressResponseDataAttributes, + ) + from datadog_api_client.v2.model.event_email_address_response_data_relationships import ( + EventEmailAddressResponseDataRelationships, + ) + from datadog_api_client.v2.model.event_emails_type import EventEmailsType + + +class EventEmailAddressResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_response_data_attributes import ( + EventEmailAddressResponseDataAttributes, + ) + from datadog_api_client.v2.model.event_email_address_response_data_relationships import ( + EventEmailAddressResponseDataRelationships, + ) + from datadog_api_client.v2.model.event_emails_type import EventEmailsType + + return { + "attributes": (EventEmailAddressResponseDataAttributes,), + "id": (str,), + "relationships": (EventEmailAddressResponseDataRelationships,), + "type": (EventEmailsType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + id: str, + type: EventEmailsType, + attributes: Union[EventEmailAddressResponseDataAttributes, UnsetType] = unset, + relationships: Union[EventEmailAddressResponseDataRelationships, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: EventEmailAddressResponseDataAttributes, optional + + :param id: + :type id: str + + :param relationships: + :type relationships: EventEmailAddressResponseDataRelationships, optional + + :param type: Event emails resource type. + :type type: EventEmailsType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if relationships is not unset: + kwargs["relationships"] = relationships + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/event_email_address_response_data_attributes.py b/src/datadog_api_client/v2/model/event_email_address_response_data_attributes.py new file mode 100644 index 0000000000..d784d18762 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_response_data_attributes.py @@ -0,0 +1,101 @@ +# 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 List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +class EventEmailAddressResponseDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "alert_type": (str,), + "created_at": (datetime,), + "description": (str,), + "email": (str,), + "format": (str,), + "last_used_at": (datetime,), + "notify_handles": ([str],), + "revoked_at": (datetime,), + "tags": ([str],), + } + + attribute_map = { + "alert_type": "alert_type", + "created_at": "created_at", + "description": "description", + "email": "email", + "format": "format", + "last_used_at": "last_used_at", + "notify_handles": "notify_handles", + "revoked_at": "revoked_at", + "tags": "tags", + } + + def __init__( + self_, + created_at: datetime, + email: str, + format: str, + notify_handles: List[str], + tags: List[str], + alert_type: Union[str, UnsetType] = unset, + description: Union[str, UnsetType] = unset, + last_used_at: Union[datetime, UnsetType] = unset, + revoked_at: Union[datetime, UnsetType] = unset, + **kwargs, + ): + """ + + + :param alert_type: + :type alert_type: str, optional + + :param created_at: + :type created_at: datetime + + :param description: + :type description: str, optional + + :param email: + :type email: str + + :param format: + :type format: str + + :param last_used_at: + :type last_used_at: datetime, optional + + :param notify_handles: + :type notify_handles: [str] + + :param revoked_at: + :type revoked_at: datetime, optional + + :param tags: + :type tags: [str] + """ + if alert_type is not unset: + kwargs["alert_type"] = alert_type + if description is not unset: + kwargs["description"] = description + if last_used_at is not unset: + kwargs["last_used_at"] = last_used_at + if revoked_at is not unset: + kwargs["revoked_at"] = revoked_at + super().__init__(kwargs) + + self_.created_at = created_at + self_.email = email + self_.format = format + self_.notify_handles = notify_handles + self_.tags = tags diff --git a/src/datadog_api_client/v2/model/event_email_address_response_data_relationships.py b/src/datadog_api_client/v2/model/event_email_address_response_data_relationships.py new file mode 100644 index 0000000000..9f51f8abb1 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_response_data_relationships.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.event_email_address_response_data_relationships_user import ( + EventEmailAddressResponseDataRelationshipsUser, + ) + + +class EventEmailAddressResponseDataRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_response_data_relationships_user import ( + EventEmailAddressResponseDataRelationshipsUser, + ) + + return { + "created_by": (EventEmailAddressResponseDataRelationshipsUser,), + "revoked_by": (EventEmailAddressResponseDataRelationshipsUser,), + } + + attribute_map = { + "created_by": "created_by", + "revoked_by": "revoked_by", + } + + def __init__( + self_, + created_by: EventEmailAddressResponseDataRelationshipsUser, + revoked_by: Union[EventEmailAddressResponseDataRelationshipsUser, UnsetType] = unset, + **kwargs, + ): + """ + + + :param created_by: + :type created_by: EventEmailAddressResponseDataRelationshipsUser + + :param revoked_by: + :type revoked_by: EventEmailAddressResponseDataRelationshipsUser, optional + """ + if revoked_by is not unset: + kwargs["revoked_by"] = revoked_by + super().__init__(kwargs) + + self_.created_by = created_by diff --git a/src/datadog_api_client/v2/model/event_email_address_response_data_relationships_user.py b/src/datadog_api_client/v2/model/event_email_address_response_data_relationships_user.py new file mode 100644 index 0000000000..cc6729fb43 --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_response_data_relationships_user.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.event_email_address_response_data_relationships_user_data import ( + EventEmailAddressResponseDataRelationshipsUserData, + ) + + +class EventEmailAddressResponseDataRelationshipsUser(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.event_email_address_response_data_relationships_user_data import ( + EventEmailAddressResponseDataRelationshipsUserData, + ) + + return { + "data": (EventEmailAddressResponseDataRelationshipsUserData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: EventEmailAddressResponseDataRelationshipsUserData, **kwargs): + """ + + + :param data: + :type data: EventEmailAddressResponseDataRelationshipsUserData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/event_email_address_response_data_relationships_user_data.py b/src/datadog_api_client/v2/model/event_email_address_response_data_relationships_user_data.py new file mode 100644 index 0000000000..659e565eed --- /dev/null +++ b/src/datadog_api_client/v2/model/event_email_address_response_data_relationships_user_data.py @@ -0,0 +1,46 @@ +# 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.users_type import UsersType + + +class EventEmailAddressResponseDataRelationshipsUserData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.users_type import UsersType + + return { + "id": (str,), + "type": (UsersType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: UsersType, **kwargs): + """ + + + :param id: + :type id: str + + :param type: Users resource type. + :type type: UsersType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/event_emails_type.py b/src/datadog_api_client/v2/model/event_emails_type.py new file mode 100644 index 0000000000..354b352d8e --- /dev/null +++ b/src/datadog_api_client/v2/model/event_emails_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 EventEmailsType(ModelSimple): + """ + Event emails resource type. + + :param value: If omitted defaults to "event_emails". Must be one of ["event_emails"]. + :type value: str + """ + + allowed_values = { + "event_emails", + } + EVENT_EMAILS: ClassVar["EventEmailsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +EventEmailsType.EVENT_EMAILS = EventEmailsType("event_emails") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 8bb7d245e2..f997fadf68 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -924,6 +924,11 @@ CreateDataDeletionRequestBodyDataType, ) from datadog_api_client.v2.model.create_data_deletion_response_body import CreateDataDeletionResponseBody +from datadog_api_client.v2.model.create_event_email_address_request import CreateEventEmailAddressRequest +from datadog_api_client.v2.model.create_event_email_address_request_data import CreateEventEmailAddressRequestData +from datadog_api_client.v2.model.create_event_email_address_request_data_attributes import ( + CreateEventEmailAddressRequestDataAttributes, +) from datadog_api_client.v2.model.create_incident_notification_rule_request import CreateIncidentNotificationRuleRequest from datadog_api_client.v2.model.create_incident_notification_template_request import ( CreateIncidentNotificationTemplateRequest, @@ -933,6 +938,13 @@ from datadog_api_client.v2.model.create_notification_rule_parameters_data_attributes import ( CreateNotificationRuleParametersDataAttributes, ) +from datadog_api_client.v2.model.create_on_call_event_email_address_request import CreateOnCallEventEmailAddressRequest +from datadog_api_client.v2.model.create_on_call_event_email_address_request_data import ( + CreateOnCallEventEmailAddressRequestData, +) +from datadog_api_client.v2.model.create_on_call_event_email_address_request_data_attributes import ( + CreateOnCallEventEmailAddressRequestDataAttributes, +) from datadog_api_client.v2.model.create_open_api_response import CreateOpenAPIResponse from datadog_api_client.v2.model.create_open_api_response_attributes import CreateOpenAPIResponseAttributes from datadog_api_client.v2.model.create_open_api_response_data import CreateOpenAPIResponseData @@ -1506,6 +1518,22 @@ ) from datadog_api_client.v2.model.event_create_response_payload import EventCreateResponsePayload from datadog_api_client.v2.model.event_create_response_payload_links import EventCreateResponsePayloadLinks +from datadog_api_client.v2.model.event_email_address_response import EventEmailAddressResponse +from datadog_api_client.v2.model.event_email_address_response_array import EventEmailAddressResponseArray +from datadog_api_client.v2.model.event_email_address_response_data import EventEmailAddressResponseData +from datadog_api_client.v2.model.event_email_address_response_data_attributes import ( + EventEmailAddressResponseDataAttributes, +) +from datadog_api_client.v2.model.event_email_address_response_data_relationships import ( + EventEmailAddressResponseDataRelationships, +) +from datadog_api_client.v2.model.event_email_address_response_data_relationships_user import ( + EventEmailAddressResponseDataRelationshipsUser, +) +from datadog_api_client.v2.model.event_email_address_response_data_relationships_user_data import ( + EventEmailAddressResponseDataRelationshipsUserData, +) +from datadog_api_client.v2.model.event_emails_type import EventEmailsType from datadog_api_client.v2.model.event_payload import EventPayload from datadog_api_client.v2.model.event_payload_attributes import EventPayloadAttributes from datadog_api_client.v2.model.event_payload_integration_id import EventPayloadIntegrationId @@ -5292,11 +5320,17 @@ "CreateDataDeletionRequestBodyData", "CreateDataDeletionRequestBodyDataType", "CreateDataDeletionResponseBody", + "CreateEventEmailAddressRequest", + "CreateEventEmailAddressRequestData", + "CreateEventEmailAddressRequestDataAttributes", "CreateIncidentNotificationRuleRequest", "CreateIncidentNotificationTemplateRequest", "CreateNotificationRuleParameters", "CreateNotificationRuleParametersData", "CreateNotificationRuleParametersDataAttributes", + "CreateOnCallEventEmailAddressRequest", + "CreateOnCallEventEmailAddressRequestData", + "CreateOnCallEventEmailAddressRequestDataAttributes", "CreateOpenAPIResponse", "CreateOpenAPIResponseAttributes", "CreateOpenAPIResponseData", @@ -5700,6 +5734,14 @@ "EventCreateResponseAttributesAttributesEvt", "EventCreateResponsePayload", "EventCreateResponsePayloadLinks", + "EventEmailAddressResponse", + "EventEmailAddressResponseArray", + "EventEmailAddressResponseData", + "EventEmailAddressResponseDataAttributes", + "EventEmailAddressResponseDataRelationships", + "EventEmailAddressResponseDataRelationshipsUser", + "EventEmailAddressResponseDataRelationshipsUserData", + "EventEmailsType", "EventPayload", "EventPayloadAttributes", "EventPayloadIntegrationId", diff --git a/tests/v2/features/events.feature b/tests/v2/features/events.feature index 61d824ce10..5d94369206 100644 --- a/tests/v2/features/events.feature +++ b/tests/v2/features/events.feature @@ -17,6 +17,22 @@ Feature: Events And a valid "appKeyAuth" key in the system And an instance of "Events" API + @generated @skip @team:DataDog/event-management + Scenario: Create event email address returns "Created" response + Given operation "CreateEventEmailAddress" enabled + And new "CreateEventEmailAddress" request + And body with value {"data": {"attributes": {"format": "", "notify_handles": [""], "tags": [""]}, "type": "event_emails"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/event-management + Scenario: Create on-call event email address returns "Created" response + Given operation "CreateOnCallEventEmailAddress" enabled + And new "CreateOnCallEventEmailAddress" request + And body with value {"data": {"attributes": {"format": "", "tags": [""]}, "type": "event_emails"}} + When the request is sent + Then the response status is 201 Created + @generated @skip @team:DataDog/event-management Scenario: Get a list of events returns "Bad Request" response Given new "ListEvents" request @@ -71,6 +87,20 @@ Feature: Events When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/event-management + Scenario: Get on-call event email address returns "OK" response + Given operation "GetOnCallEventEmailAddress" enabled + And new "GetOnCallEventEmailAddress" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-management + Scenario: List event email addresses returns "OK" response + Given operation "ListEventEmailAddresses" enabled + And new "ListEventEmailAddresses" request + When the request is sent + Then the response status is 200 OK + @team:DataDog/event-management Scenario: Post an event returns "Bad request" response Given new "CreateEvent" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index bb35cea36c..e94d595ef2 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1380,6 +1380,34 @@ "type": "safe" } }, + "ListEventEmailAddresses": { + "tag": "Events", + "undo": { + "type": "safe" + } + }, + "CreateEventEmailAddress": { + "tag": "Events", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "GetOnCallEventEmailAddress": { + "tag": "Events", + "undo": { + "type": "safe" + } + }, + "CreateOnCallEventEmailAddress": { + "tag": "Events", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, "SearchEvents": { "tag": "Events", "undo": {