diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 85c2631484..4377babe30 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -661,6 +661,13 @@ components: required: true schema: type: string + GoogleChatTargetAudienceIdPathParameter: + description: Your target audience ID. + in: path + name: target_audience_id + required: true + schema: + type: string HistoricalJobID: description: The ID of the job. in: path @@ -39055,6 +39062,84 @@ components: required: - attributes type: object + GoogleChatDelegatedUserAttributes: + description: Google Chat delegated user attributes. + properties: + display_name: + description: The delegated user's display name. + example: "fake-display-name" + type: string + email: + description: The delegated user's email address. + example: "user@example.com" + type: string + features: + description: The list of features enabled for the delegated user. + items: + type: string + type: array + type: object + GoogleChatDelegatedUserData: + description: Google Chat delegated user data from a response. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatDelegatedUserAttributes" + id: + description: The ID of the delegated user. + example: "2b3c4d5e-6f78-9012-bcde-f23456789012" + maxLength: 100 + minLength: 1 + type: string + type: + $ref: "#/components/schemas/GoogleChatDelegatedUserType" + type: object + GoogleChatDelegatedUserResponse: + description: Response containing a Google Chat delegated user. + properties: + data: + $ref: "#/components/schemas/GoogleChatDelegatedUserData" + required: + - data + type: object + GoogleChatDelegatedUserType: + default: google-chat-delegated-user + description: Google Chat delegated user resource type. + enum: + - google-chat-delegated-user + example: google-chat-delegated-user + type: string + x-enum-varnames: + - GOOGLE_CHAT_DELEGATED_USER_TYPE + GoogleChatOrganizationAttributes: + description: Google Chat organization attributes. + properties: + domain_id: + description: The Google Chat organization domain ID. + example: "fake-domain-id" + maxLength: 255 + type: string + domain_name: + description: The Google Chat organization domain name. + example: "example.com" + maxLength: 255 + type: string + type: object + GoogleChatOrganizationData: + description: Google Chat organization data from a response. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatOrganizationAttributes" + id: + description: The ID of the Google Chat organization binding. + example: "5ce87709-a12f-4086-fcc8-147045b73a19" + maxLength: 100 + minLength: 1 + type: string + relationships: + $ref: "#/components/schemas/GoogleChatOrganizationRelationships" + type: + $ref: "#/components/schemas/GoogleChatOrganizationType" + type: object GoogleChatOrganizationHandleResponse: description: Organization handle for monitor notifications to a Google Chat space within a Google organization. properties: @@ -39117,6 +39202,184 @@ components: required: - data type: object + GoogleChatOrganizationRelationships: + description: Google Chat organization relationships. + properties: + delegated_user: + $ref: "#/components/schemas/GoogleChatOrganizationRelationshipsDelegatedUser" + type: object + GoogleChatOrganizationRelationshipsDelegatedUser: + description: The delegated user relationship. + properties: + data: + $ref: "#/components/schemas/GoogleChatOrganizationRelationshipsDelegatedUserData" + type: object + GoogleChatOrganizationRelationshipsDelegatedUserData: + description: Delegated user relationship data. + properties: + id: + description: The ID of the delegated user. + example: "2b3c4d5e-6f78-9012-bcde-f23456789012" + type: string + type: + $ref: "#/components/schemas/GoogleChatDelegatedUserType" + type: object + GoogleChatOrganizationResponse: + description: Response containing a Google Chat organization binding. + properties: + data: + $ref: "#/components/schemas/GoogleChatOrganizationData" + required: + - data + type: object + GoogleChatOrganizationType: + default: google-chat-organization + description: Google Chat organization resource type. + enum: + - google-chat-organization + example: google-chat-organization + type: string + x-enum-varnames: + - GOOGLE_CHAT_ORGANIZATION_TYPE + GoogleChatOrganizationsResponse: + description: Response containing a list of Google Chat organization bindings. + properties: + data: + description: An array of Google Chat organization bindings. + items: + $ref: "#/components/schemas/GoogleChatOrganizationData" + type: array + required: + - data + type: object + GoogleChatTargetAudienceAttributes: + description: Google Chat target audience attributes. + properties: + audience_id: + description: The audience ID. + example: "fake-audience-id-1" + maxLength: 255 + type: string + audience_name: + description: The audience name. + example: "fake audience name 1" + maxLength: 255 + type: string + required: + - audience_name + - audience_id + type: object + GoogleChatTargetAudienceCreateRequest: + description: Create target audience request. + properties: + data: + $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequestData" + required: + - data + type: object + GoogleChatTargetAudienceCreateRequestAttributes: + description: Attributes for creating a Google Chat target audience. + properties: + audience_id: + description: The audience ID. + example: "fake-audience-id-1" + maxLength: 255 + type: string + audience_name: + description: The audience name. + example: "fake audience name 1" + maxLength: 255 + type: string + required: + - audience_name + - audience_id + type: object + GoogleChatTargetAudienceCreateRequestData: + description: Data for a create target audience request. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequestAttributes" + type: + $ref: "#/components/schemas/GoogleChatTargetAudienceType" + required: + - type + - attributes + type: object + GoogleChatTargetAudienceData: + description: Google Chat target audience data from a response. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatTargetAudienceAttributes" + id: + description: The ID of the target audience. + example: "1f3e5ce6-944a-4075-97ae-105b5920b5cb" + maxLength: 100 + minLength: 1 + type: string + type: + $ref: "#/components/schemas/GoogleChatTargetAudienceType" + type: object + GoogleChatTargetAudienceResponse: + description: Response containing a Google Chat target audience. + properties: + data: + $ref: "#/components/schemas/GoogleChatTargetAudienceData" + required: + - data + type: object + GoogleChatTargetAudienceType: + default: google-chat-target-audience + description: Google Chat target audience resource type. + enum: + - google-chat-target-audience + example: google-chat-target-audience + type: string + x-enum-varnames: + - GOOGLE_CHAT_TARGET_AUDIENCE_TYPE + GoogleChatTargetAudienceUpdateRequest: + description: Update target audience request. + properties: + data: + $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequestData" + required: + - data + type: object + GoogleChatTargetAudienceUpdateRequestAttributes: + description: Attributes for updating a Google Chat target audience. + properties: + audience_id: + description: The audience ID. + example: "fake-audience-id-1" + maxLength: 255 + type: string + audience_name: + description: The audience name. + example: "fake audience name 1" + maxLength: 255 + type: string + type: object + GoogleChatTargetAudienceUpdateRequestData: + description: Data for an update target audience request. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequestAttributes" + type: + $ref: "#/components/schemas/GoogleChatTargetAudienceType" + required: + - type + - attributes + type: object + GoogleChatTargetAudiencesResponse: + description: Response containing a list of Google Chat target audiences. + properties: + data: + description: An array of Google Chat target audiences. + items: + $ref: "#/components/schemas/GoogleChatTargetAudienceData" + type: array + required: + - data + type: object GoogleChatUpdateOrganizationHandleRequest: description: Update organization handle request. properties: @@ -128558,6 +128821,43 @@ paths: operator: OR permissions: - gcp_configuration_edit + /api/v2/integration/google-chat/organizations: + get: + description: Get a list of all Google Chat organization bindings in the Datadog Google Chat integration. + operationId: ListGoogleChatOrganizations + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + domain_id: fake-domain-id + domain_name: example.com + id: 00000000-0000-0000-0000-000000000001 + relationships: + delegated_user: + data: + id: 00000000-0000-0000-0000-000000000002 + type: google-chat-delegated-user + type: google-chat-organization + - attributes: + domain_id: fake-domain-id-2 + domain_name: example2.com + id: 00000000-0000-0000-0000-000000000003 + type: google-chat-organization + schema: + $ref: "#/components/schemas/GoogleChatOrganizationsResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all Google Chat organization bindings + tags: + - Google Chat Integration /api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}: get: description: Get the resource name and organization binding ID of a space in the Datadog Google Chat integration. @@ -128594,6 +128894,110 @@ paths: summary: Get space information by display name tags: - Google Chat Integration + /api/v2/integration/google-chat/organizations/{organization_binding_id}: + delete: + description: Delete a Google Chat organization binding from the Datadog Google Chat integration. + operationId: DeleteGoogleChatOrganization + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "204": + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a Google Chat organization binding + tags: + - Google Chat Integration + get: + description: Get a Google Chat organization binding from the Datadog Google Chat integration. + operationId: GetGoogleChatOrganization + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + domain_id: fake-domain-id + domain_name: example.com + id: 00000000-0000-0000-0000-000000000001 + relationships: + delegated_user: + data: + id: 00000000-0000-0000-0000-000000000002 + type: google-chat-delegated-user + type: google-chat-organization + schema: + $ref: "#/components/schemas/GoogleChatOrganizationResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a Google Chat organization binding + tags: + - Google Chat Integration + /api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user: + delete: + description: Delete the delegated user for a Google Chat organization binding from the Datadog Google Chat integration. + operationId: DeleteGoogleChatDelegatedUser + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "204": + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete the delegated user + tags: + - Google Chat Integration + get: + description: Get the delegated user for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: GetGoogleChatDelegatedUser + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + display_name: fake-display-name + email: user@example.com + features: + - incident-automatic-space-creation + - workflow-space-creation + id: 00000000-0000-0000-0000-000000000002 + type: google-chat-delegated-user + schema: + $ref: "#/components/schemas/GoogleChatDelegatedUserResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get the delegated user + tags: + - Google Chat Integration /api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles: get: description: Get a list of all organization handles from the Datadog Google Chat integration. @@ -128794,6 +129198,191 @@ paths: tags: - Google Chat Integration x-codegen-request-body-name: body + /api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences: + get: + description: Get a list of all target audiences for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: ListGoogleChatTargetAudiences + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + audience_id: fake-audience-id-1 + audience_name: fake audience name 1 + id: 00000000-0000-0000-0000-000000000004 + type: google-chat-target-audience + - attributes: + audience_id: fake-audience-id-2 + audience_name: fake-audience-name-2 + id: 00000000-0000-0000-0000-000000000005 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudiencesResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all target audiences + tags: + - Google Chat Integration + post: + description: Create a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: CreateGoogleChatTargetAudience + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: fake-audience-id-1 + audience_name: fake audience name 1 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequest" + description: Target audience payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: fake-audience-id-1 + audience_name: fake audience name 1 + id: 00000000-0000-0000-0000-000000000004 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceResponse" + description: CREATED + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a target audience + tags: + - Google Chat Integration + x-codegen-request-body-name: body + /api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}: + delete: + description: Delete a target audience from a Google Chat organization binding in the Datadog Google Chat integration. + operationId: DeleteGoogleChatTargetAudience + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter" + responses: + "204": + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a target audience + tags: + - Google Chat Integration + get: + description: Get a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: GetGoogleChatTargetAudience + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: fake-audience-id-1 + audience_name: fake audience name 1 + id: 00000000-0000-0000-0000-000000000004 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a target audience + tags: + - Google Chat Integration + patch: + description: Update a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: UpdateGoogleChatTargetAudience + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: updated-audience-id + audience_name: updated-audience-name + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequest" + description: Target audience payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: updated-audience-id + audience_name: updated-audience-name + id: 00000000-0000-0000-0000-000000000004 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a target audience + tags: + - Google Chat Integration + x-codegen-request-body-name: body /api/v2/integration/jira/accounts: get: description: |- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 6d0984990f..5eeb54c3c6 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -15964,6 +15964,48 @@ datadog\_api\_client.v2.model.google\_chat\_create\_organization\_handle\_reques :members: :show-inheritance: +datadog\_api\_client.v2.model.google\_chat\_delegated\_user\_attributes module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_delegated_user_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_delegated\_user\_data module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_delegated_user_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_delegated\_user\_response module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_delegated_user_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_delegated\_user\_type module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_delegated_user_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_organization\_attributes module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_organization_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_organization\_data module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_organization_data + :members: + :show-inheritance: + datadog\_api\_client.v2.model.google\_chat\_organization\_handle\_response module --------------------------------------------------------------------------------- @@ -15999,6 +16041,125 @@ datadog\_api\_client.v2.model.google\_chat\_organization\_handles\_response modu :members: :show-inheritance: +datadog\_api\_client.v2.model.google\_chat\_organization\_relationships module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_organization_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_organization\_relationships\_delegated\_user module +----------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_organization_relationships_delegated_user + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_organization\_relationships\_delegated\_user\_data module +----------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_organization_relationships_delegated_user_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_organization\_response module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_organization_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_organization\_type module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_organization_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_organizations\_response module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_organizations_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_attributes module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_create\_request module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_create_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_create\_request\_attributes module +------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_create_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_create\_request\_data module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_create_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_data module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_response module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_type module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_update\_request module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_update_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_update\_request\_attributes module +------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_update_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audience\_update\_request\_data module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audience_update_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.google\_chat\_target\_audiences\_response module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.google_chat_target_audiences_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.google\_chat\_update\_organization\_handle\_request module ---------------------------------------------------------------------------------------- diff --git a/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.py b/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.py new file mode 100644 index 0000000000..0804e7fc4a --- /dev/null +++ b/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.py @@ -0,0 +1,33 @@ +""" +Create a target audience returns "CREATED" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi +from datadog_api_client.v2.model.google_chat_target_audience_create_request import GoogleChatTargetAudienceCreateRequest +from datadog_api_client.v2.model.google_chat_target_audience_create_request_attributes import ( + GoogleChatTargetAudienceCreateRequestAttributes, +) +from datadog_api_client.v2.model.google_chat_target_audience_create_request_data import ( + GoogleChatTargetAudienceCreateRequestData, +) +from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType + +body = GoogleChatTargetAudienceCreateRequest( + data=GoogleChatTargetAudienceCreateRequestData( + attributes=GoogleChatTargetAudienceCreateRequestAttributes( + audience_id="fake-audience-id-1", + audience_name="fake audience name 1", + ), + type=GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + response = api_instance.create_google_chat_target_audience( + organization_binding_id="organization_binding_id", body=body + ) + + print(response) diff --git a/examples/v2/google-chat-integration/DeleteGoogleChatDelegatedUser.py b/examples/v2/google-chat-integration/DeleteGoogleChatDelegatedUser.py new file mode 100644 index 0000000000..71a07532b1 --- /dev/null +++ b/examples/v2/google-chat-integration/DeleteGoogleChatDelegatedUser.py @@ -0,0 +1,13 @@ +""" +Delete the delegated user returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + api_instance.delete_google_chat_delegated_user( + organization_binding_id="organization_binding_id", + ) diff --git a/examples/v2/google-chat-integration/DeleteGoogleChatOrganization.py b/examples/v2/google-chat-integration/DeleteGoogleChatOrganization.py new file mode 100644 index 0000000000..485eab8663 --- /dev/null +++ b/examples/v2/google-chat-integration/DeleteGoogleChatOrganization.py @@ -0,0 +1,13 @@ +""" +Delete a Google Chat organization binding returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + api_instance.delete_google_chat_organization( + organization_binding_id="organization_binding_id", + ) diff --git a/examples/v2/google-chat-integration/DeleteGoogleChatTargetAudience.py b/examples/v2/google-chat-integration/DeleteGoogleChatTargetAudience.py new file mode 100644 index 0000000000..a0a9c315ae --- /dev/null +++ b/examples/v2/google-chat-integration/DeleteGoogleChatTargetAudience.py @@ -0,0 +1,14 @@ +""" +Delete a target audience returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + api_instance.delete_google_chat_target_audience( + organization_binding_id="organization_binding_id", + target_audience_id="target_audience_id", + ) diff --git a/examples/v2/google-chat-integration/GetGoogleChatDelegatedUser.py b/examples/v2/google-chat-integration/GetGoogleChatDelegatedUser.py new file mode 100644 index 0000000000..1035647e22 --- /dev/null +++ b/examples/v2/google-chat-integration/GetGoogleChatDelegatedUser.py @@ -0,0 +1,15 @@ +""" +Get the delegated user returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + response = api_instance.get_google_chat_delegated_user( + organization_binding_id="organization_binding_id", + ) + + print(response) diff --git a/examples/v2/google-chat-integration/GetGoogleChatOrganization.py b/examples/v2/google-chat-integration/GetGoogleChatOrganization.py new file mode 100644 index 0000000000..fc45099d4c --- /dev/null +++ b/examples/v2/google-chat-integration/GetGoogleChatOrganization.py @@ -0,0 +1,15 @@ +""" +Get a Google Chat organization binding returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + response = api_instance.get_google_chat_organization( + organization_binding_id="organization_binding_id", + ) + + print(response) diff --git a/examples/v2/google-chat-integration/GetGoogleChatTargetAudience.py b/examples/v2/google-chat-integration/GetGoogleChatTargetAudience.py new file mode 100644 index 0000000000..abde1c1754 --- /dev/null +++ b/examples/v2/google-chat-integration/GetGoogleChatTargetAudience.py @@ -0,0 +1,16 @@ +""" +Get a target audience returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + response = api_instance.get_google_chat_target_audience( + organization_binding_id="organization_binding_id", + target_audience_id="target_audience_id", + ) + + print(response) diff --git a/examples/v2/google-chat-integration/ListGoogleChatOrganizations.py b/examples/v2/google-chat-integration/ListGoogleChatOrganizations.py new file mode 100644 index 0000000000..f9d78b2cac --- /dev/null +++ b/examples/v2/google-chat-integration/ListGoogleChatOrganizations.py @@ -0,0 +1,13 @@ +""" +Get all Google Chat organization bindings returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + response = api_instance.list_google_chat_organizations() + + print(response) diff --git a/examples/v2/google-chat-integration/ListGoogleChatTargetAudiences.py b/examples/v2/google-chat-integration/ListGoogleChatTargetAudiences.py new file mode 100644 index 0000000000..91356fabcf --- /dev/null +++ b/examples/v2/google-chat-integration/ListGoogleChatTargetAudiences.py @@ -0,0 +1,15 @@ +""" +Get all target audiences returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + response = api_instance.list_google_chat_target_audiences( + organization_binding_id="organization_binding_id", + ) + + print(response) diff --git a/examples/v2/google-chat-integration/UpdateGoogleChatTargetAudience.py b/examples/v2/google-chat-integration/UpdateGoogleChatTargetAudience.py new file mode 100644 index 0000000000..63f8db4441 --- /dev/null +++ b/examples/v2/google-chat-integration/UpdateGoogleChatTargetAudience.py @@ -0,0 +1,33 @@ +""" +Update a target audience returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi +from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType +from datadog_api_client.v2.model.google_chat_target_audience_update_request import GoogleChatTargetAudienceUpdateRequest +from datadog_api_client.v2.model.google_chat_target_audience_update_request_attributes import ( + GoogleChatTargetAudienceUpdateRequestAttributes, +) +from datadog_api_client.v2.model.google_chat_target_audience_update_request_data import ( + GoogleChatTargetAudienceUpdateRequestData, +) + +body = GoogleChatTargetAudienceUpdateRequest( + data=GoogleChatTargetAudienceUpdateRequestData( + attributes=GoogleChatTargetAudienceUpdateRequestAttributes( + audience_id="fake-audience-id-1", + audience_name="fake audience name 1", + ), + type=GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = GoogleChatIntegrationApi(api_client) + response = api_instance.update_google_chat_target_audience( + organization_binding_id="organization_binding_id", target_audience_id="target_audience_id", body=body + ) + + print(response) diff --git a/src/datadog_api_client/v2/api/google_chat_integration_api.py b/src/datadog_api_client/v2/api/google_chat_integration_api.py index d01de12582..e8e72581d0 100644 --- a/src/datadog_api_client/v2/api/google_chat_integration_api.py +++ b/src/datadog_api_client/v2/api/google_chat_integration_api.py @@ -7,7 +7,10 @@ from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration +from datadog_api_client.v2.model.google_chat_organizations_response import GoogleChatOrganizationsResponse from datadog_api_client.v2.model.google_chat_app_named_space_response import GoogleChatAppNamedSpaceResponse +from datadog_api_client.v2.model.google_chat_organization_response import GoogleChatOrganizationResponse +from datadog_api_client.v2.model.google_chat_delegated_user_response import GoogleChatDelegatedUserResponse from datadog_api_client.v2.model.google_chat_organization_handles_response import GoogleChatOrganizationHandlesResponse from datadog_api_client.v2.model.google_chat_organization_handle_response import GoogleChatOrganizationHandleResponse from datadog_api_client.v2.model.google_chat_create_organization_handle_request import ( @@ -16,6 +19,10 @@ from datadog_api_client.v2.model.google_chat_update_organization_handle_request import ( GoogleChatUpdateOrganizationHandleRequest, ) +from datadog_api_client.v2.model.google_chat_target_audiences_response import GoogleChatTargetAudiencesResponse +from datadog_api_client.v2.model.google_chat_target_audience_response import GoogleChatTargetAudienceResponse +from datadog_api_client.v2.model.google_chat_target_audience_create_request import GoogleChatTargetAudienceCreateRequest +from datadog_api_client.v2.model.google_chat_target_audience_update_request import GoogleChatTargetAudienceUpdateRequest class GoogleChatIntegrationApi: @@ -29,6 +36,32 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client + self._create_google_chat_target_audience_endpoint = _Endpoint( + settings={ + "response_type": (GoogleChatTargetAudienceResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences", + "operation_id": "create_google_chat_target_audience", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (GoogleChatTargetAudienceCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._create_organization_handle_endpoint = _Endpoint( settings={ "response_type": (GoogleChatOrganizationHandleResponse,), @@ -55,6 +88,81 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._delete_google_chat_delegated_user_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user", + "operation_id": "delete_google_chat_delegated_user", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._delete_google_chat_organization_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}", + "operation_id": "delete_google_chat_organization", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._delete_google_chat_target_audience_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}", + "operation_id": "delete_google_chat_target_audience", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + "target_audience_id": { + "required": True, + "openapi_types": (str,), + "attribute": "target_audience_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._delete_organization_handle_endpoint = _Endpoint( settings={ "response_type": None, @@ -84,6 +192,81 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_google_chat_delegated_user_endpoint = _Endpoint( + settings={ + "response_type": (GoogleChatDelegatedUserResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user", + "operation_id": "get_google_chat_delegated_user", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_google_chat_organization_endpoint = _Endpoint( + settings={ + "response_type": (GoogleChatOrganizationResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}", + "operation_id": "get_google_chat_organization", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_google_chat_target_audience_endpoint = _Endpoint( + settings={ + "response_type": (GoogleChatTargetAudienceResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}", + "operation_id": "get_google_chat_target_audience", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + "target_audience_id": { + "required": True, + "openapi_types": (str,), + "attribute": "target_audience_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_organization_handle_endpoint = _Endpoint( settings={ "response_type": (GoogleChatOrganizationHandleResponse,), @@ -142,6 +325,45 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_google_chat_organizations_endpoint = _Endpoint( + settings={ + "response_type": (GoogleChatOrganizationsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations", + "operation_id": "list_google_chat_organizations", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_google_chat_target_audiences_endpoint = _Endpoint( + settings={ + "response_type": (GoogleChatTargetAudiencesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences", + "operation_id": "list_google_chat_target_audiences", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_organization_handles_endpoint = _Endpoint( settings={ "response_type": (GoogleChatOrganizationHandlesResponse,), @@ -165,6 +387,38 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._update_google_chat_target_audience_endpoint = _Endpoint( + settings={ + "response_type": (GoogleChatTargetAudienceResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}", + "operation_id": "update_google_chat_target_audience", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "organization_binding_id": { + "required": True, + "openapi_types": (str,), + "attribute": "organization_binding_id", + "location": "path", + }, + "target_audience_id": { + "required": True, + "openapi_types": (str,), + "attribute": "target_audience_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (GoogleChatTargetAudienceUpdateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._update_organization_handle_endpoint = _Endpoint( settings={ "response_type": (GoogleChatOrganizationHandleResponse,), @@ -197,6 +451,28 @@ def __init__(self, api_client=None): api_client=api_client, ) + def create_google_chat_target_audience( + self, + organization_binding_id: str, + body: GoogleChatTargetAudienceCreateRequest, + ) -> GoogleChatTargetAudienceResponse: + """Create a target audience. + + Create a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :param body: Target audience payload. + :type body: GoogleChatTargetAudienceCreateRequest + :rtype: GoogleChatTargetAudienceResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + kwargs["body"] = body + + return self._create_google_chat_target_audience_endpoint.call_with_http_info(**kwargs) + def create_organization_handle( self, organization_binding_id: str, @@ -219,6 +495,62 @@ def create_organization_handle( return self._create_organization_handle_endpoint.call_with_http_info(**kwargs) + def delete_google_chat_delegated_user( + self, + organization_binding_id: str, + ) -> None: + """Delete the delegated user. + + Delete the delegated user for a Google Chat organization binding from the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + return self._delete_google_chat_delegated_user_endpoint.call_with_http_info(**kwargs) + + def delete_google_chat_organization( + self, + organization_binding_id: str, + ) -> None: + """Delete a Google Chat organization binding. + + Delete a Google Chat organization binding from the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + return self._delete_google_chat_organization_endpoint.call_with_http_info(**kwargs) + + def delete_google_chat_target_audience( + self, + organization_binding_id: str, + target_audience_id: str, + ) -> None: + """Delete a target audience. + + Delete a target audience from a Google Chat organization binding in the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :param target_audience_id: Your target audience ID. + :type target_audience_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + kwargs["target_audience_id"] = target_audience_id + + return self._delete_google_chat_target_audience_endpoint.call_with_http_info(**kwargs) + def delete_organization_handle( self, organization_binding_id: str, @@ -241,6 +573,62 @@ def delete_organization_handle( return self._delete_organization_handle_endpoint.call_with_http_info(**kwargs) + def get_google_chat_delegated_user( + self, + organization_binding_id: str, + ) -> GoogleChatDelegatedUserResponse: + """Get the delegated user. + + Get the delegated user for a Google Chat organization binding in the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :rtype: GoogleChatDelegatedUserResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + return self._get_google_chat_delegated_user_endpoint.call_with_http_info(**kwargs) + + def get_google_chat_organization( + self, + organization_binding_id: str, + ) -> GoogleChatOrganizationResponse: + """Get a Google Chat organization binding. + + Get a Google Chat organization binding from the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :rtype: GoogleChatOrganizationResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + return self._get_google_chat_organization_endpoint.call_with_http_info(**kwargs) + + def get_google_chat_target_audience( + self, + organization_binding_id: str, + target_audience_id: str, + ) -> GoogleChatTargetAudienceResponse: + """Get a target audience. + + Get a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :param target_audience_id: Your target audience ID. + :type target_audience_id: str + :rtype: GoogleChatTargetAudienceResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + kwargs["target_audience_id"] = target_audience_id + + return self._get_google_chat_target_audience_endpoint.call_with_http_info(**kwargs) + def get_organization_handle( self, organization_binding_id: str, @@ -285,6 +673,35 @@ def get_space_by_display_name( return self._get_space_by_display_name_endpoint.call_with_http_info(**kwargs) + def list_google_chat_organizations( + self, + ) -> GoogleChatOrganizationsResponse: + """Get all Google Chat organization bindings. + + Get a list of all Google Chat organization bindings in the Datadog Google Chat integration. + + :rtype: GoogleChatOrganizationsResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_google_chat_organizations_endpoint.call_with_http_info(**kwargs) + + def list_google_chat_target_audiences( + self, + organization_binding_id: str, + ) -> GoogleChatTargetAudiencesResponse: + """Get all target audiences. + + Get a list of all target audiences for a Google Chat organization binding in the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :rtype: GoogleChatTargetAudiencesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + return self._list_google_chat_target_audiences_endpoint.call_with_http_info(**kwargs) + def list_organization_handles( self, organization_binding_id: str, @@ -302,6 +719,33 @@ def list_organization_handles( return self._list_organization_handles_endpoint.call_with_http_info(**kwargs) + def update_google_chat_target_audience( + self, + organization_binding_id: str, + target_audience_id: str, + body: GoogleChatTargetAudienceUpdateRequest, + ) -> GoogleChatTargetAudienceResponse: + """Update a target audience. + + Update a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + + :param organization_binding_id: Your organization binding ID. + :type organization_binding_id: str + :param target_audience_id: Your target audience ID. + :type target_audience_id: str + :param body: Target audience payload. + :type body: GoogleChatTargetAudienceUpdateRequest + :rtype: GoogleChatTargetAudienceResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["organization_binding_id"] = organization_binding_id + + kwargs["target_audience_id"] = target_audience_id + + kwargs["body"] = body + + return self._update_google_chat_target_audience_endpoint.call_with_http_info(**kwargs) + def update_organization_handle( self, organization_binding_id: str, diff --git a/src/datadog_api_client/v2/model/google_chat_delegated_user_attributes.py b/src/datadog_api_client/v2/model/google_chat_delegated_user_attributes.py new file mode 100644 index 0000000000..c22d076f49 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_delegated_user_attributes.py @@ -0,0 +1,56 @@ +# 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 GoogleChatDelegatedUserAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "display_name": (str,), + "email": (str,), + "features": ([str],), + } + + attribute_map = { + "display_name": "display_name", + "email": "email", + "features": "features", + } + + def __init__( + self_, + display_name: Union[str, UnsetType] = unset, + email: Union[str, UnsetType] = unset, + features: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Google Chat delegated user attributes. + + :param display_name: The delegated user's display name. + :type display_name: str, optional + + :param email: The delegated user's email address. + :type email: str, optional + + :param features: The list of features enabled for the delegated user. + :type features: [str], optional + """ + if display_name is not unset: + kwargs["display_name"] = display_name + if email is not unset: + kwargs["email"] = email + if features is not unset: + kwargs["features"] = features + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_delegated_user_data.py b/src/datadog_api_client/v2/model/google_chat_delegated_user_data.py new file mode 100644 index 0000000000..980c7bb7e7 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_delegated_user_data.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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.google_chat_delegated_user_attributes import GoogleChatDelegatedUserAttributes + from datadog_api_client.v2.model.google_chat_delegated_user_type import GoogleChatDelegatedUserType + + +class GoogleChatDelegatedUserData(ModelNormal): + validations = { + "id": { + "max_length": 100, + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_delegated_user_attributes import GoogleChatDelegatedUserAttributes + from datadog_api_client.v2.model.google_chat_delegated_user_type import GoogleChatDelegatedUserType + + return { + "attributes": (GoogleChatDelegatedUserAttributes,), + "id": (str,), + "type": (GoogleChatDelegatedUserType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[GoogleChatDelegatedUserAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[GoogleChatDelegatedUserType, UnsetType] = unset, + **kwargs, + ): + """ + Google Chat delegated user data from a response. + + :param attributes: Google Chat delegated user attributes. + :type attributes: GoogleChatDelegatedUserAttributes, optional + + :param id: The ID of the delegated user. + :type id: str, optional + + :param type: Google Chat delegated user resource type. + :type type: GoogleChatDelegatedUserType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_delegated_user_response.py b/src/datadog_api_client/v2/model/google_chat_delegated_user_response.py new file mode 100644 index 0000000000..8d2ff6bd56 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_delegated_user_response.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.google_chat_delegated_user_data import GoogleChatDelegatedUserData + + +class GoogleChatDelegatedUserResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_delegated_user_data import GoogleChatDelegatedUserData + + return { + "data": (GoogleChatDelegatedUserData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: GoogleChatDelegatedUserData, **kwargs): + """ + Response containing a Google Chat delegated user. + + :param data: Google Chat delegated user data from a response. + :type data: GoogleChatDelegatedUserData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/google_chat_delegated_user_type.py b/src/datadog_api_client/v2/model/google_chat_delegated_user_type.py new file mode 100644 index 0000000000..f4ab7bcdc5 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_delegated_user_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 GoogleChatDelegatedUserType(ModelSimple): + """ + Google Chat delegated user resource type. + + :param value: If omitted defaults to "google-chat-delegated-user". Must be one of ["google-chat-delegated-user"]. + :type value: str + """ + + allowed_values = { + "google-chat-delegated-user", + } + GOOGLE_CHAT_DELEGATED_USER_TYPE: ClassVar["GoogleChatDelegatedUserType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +GoogleChatDelegatedUserType.GOOGLE_CHAT_DELEGATED_USER_TYPE = GoogleChatDelegatedUserType("google-chat-delegated-user") diff --git a/src/datadog_api_client/v2/model/google_chat_organization_attributes.py b/src/datadog_api_client/v2/model/google_chat_organization_attributes.py new file mode 100644 index 0000000000..059d6b1c4b --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_organization_attributes.py @@ -0,0 +1,52 @@ +# 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, + unset, + UnsetType, +) + + +class GoogleChatOrganizationAttributes(ModelNormal): + validations = { + "domain_id": { + "max_length": 255, + }, + "domain_name": { + "max_length": 255, + }, + } + + @cached_property + def openapi_types(_): + return { + "domain_id": (str,), + "domain_name": (str,), + } + + attribute_map = { + "domain_id": "domain_id", + "domain_name": "domain_name", + } + + def __init__(self_, domain_id: Union[str, UnsetType] = unset, domain_name: Union[str, UnsetType] = unset, **kwargs): + """ + Google Chat organization attributes. + + :param domain_id: The Google Chat organization domain ID. + :type domain_id: str, optional + + :param domain_name: The Google Chat organization domain name. + :type domain_name: str, optional + """ + if domain_id is not unset: + kwargs["domain_id"] = domain_id + if domain_name is not unset: + kwargs["domain_name"] = domain_name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_organization_data.py b/src/datadog_api_client/v2/model/google_chat_organization_data.py new file mode 100644 index 0000000000..885e5d39aa --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_organization_data.py @@ -0,0 +1,83 @@ +# 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.google_chat_organization_attributes import GoogleChatOrganizationAttributes + from datadog_api_client.v2.model.google_chat_organization_relationships import GoogleChatOrganizationRelationships + from datadog_api_client.v2.model.google_chat_organization_type import GoogleChatOrganizationType + + +class GoogleChatOrganizationData(ModelNormal): + validations = { + "id": { + "max_length": 100, + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_organization_attributes import GoogleChatOrganizationAttributes + from datadog_api_client.v2.model.google_chat_organization_relationships import ( + GoogleChatOrganizationRelationships, + ) + from datadog_api_client.v2.model.google_chat_organization_type import GoogleChatOrganizationType + + return { + "attributes": (GoogleChatOrganizationAttributes,), + "id": (str,), + "relationships": (GoogleChatOrganizationRelationships,), + "type": (GoogleChatOrganizationType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: Union[GoogleChatOrganizationAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + relationships: Union[GoogleChatOrganizationRelationships, UnsetType] = unset, + type: Union[GoogleChatOrganizationType, UnsetType] = unset, + **kwargs, + ): + """ + Google Chat organization data from a response. + + :param attributes: Google Chat organization attributes. + :type attributes: GoogleChatOrganizationAttributes, optional + + :param id: The ID of the Google Chat organization binding. + :type id: str, optional + + :param relationships: Google Chat organization relationships. + :type relationships: GoogleChatOrganizationRelationships, optional + + :param type: Google Chat organization resource type. + :type type: GoogleChatOrganizationType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if relationships is not unset: + kwargs["relationships"] = relationships + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_organization_relationships.py b/src/datadog_api_client/v2/model/google_chat_organization_relationships.py new file mode 100644 index 0000000000..d90b923a9f --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_organization_relationships.py @@ -0,0 +1,48 @@ +# 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.google_chat_organization_relationships_delegated_user import ( + GoogleChatOrganizationRelationshipsDelegatedUser, + ) + + +class GoogleChatOrganizationRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_organization_relationships_delegated_user import ( + GoogleChatOrganizationRelationshipsDelegatedUser, + ) + + return { + "delegated_user": (GoogleChatOrganizationRelationshipsDelegatedUser,), + } + + attribute_map = { + "delegated_user": "delegated_user", + } + + def __init__( + self_, delegated_user: Union[GoogleChatOrganizationRelationshipsDelegatedUser, UnsetType] = unset, **kwargs + ): + """ + Google Chat organization relationships. + + :param delegated_user: The delegated user relationship. + :type delegated_user: GoogleChatOrganizationRelationshipsDelegatedUser, optional + """ + if delegated_user is not unset: + kwargs["delegated_user"] = delegated_user + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_organization_relationships_delegated_user.py b/src/datadog_api_client/v2/model/google_chat_organization_relationships_delegated_user.py new file mode 100644 index 0000000000..9e11fd5a23 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_organization_relationships_delegated_user.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.google_chat_organization_relationships_delegated_user_data import ( + GoogleChatOrganizationRelationshipsDelegatedUserData, + ) + + +class GoogleChatOrganizationRelationshipsDelegatedUser(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_organization_relationships_delegated_user_data import ( + GoogleChatOrganizationRelationshipsDelegatedUserData, + ) + + return { + "data": (GoogleChatOrganizationRelationshipsDelegatedUserData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[GoogleChatOrganizationRelationshipsDelegatedUserData, UnsetType] = unset, **kwargs): + """ + The delegated user relationship. + + :param data: Delegated user relationship data. + :type data: GoogleChatOrganizationRelationshipsDelegatedUserData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_organization_relationships_delegated_user_data.py b/src/datadog_api_client/v2/model/google_chat_organization_relationships_delegated_user_data.py new file mode 100644 index 0000000000..afcb8b7f74 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_organization_relationships_delegated_user_data.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 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.google_chat_delegated_user_type import GoogleChatDelegatedUserType + + +class GoogleChatOrganizationRelationshipsDelegatedUserData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_delegated_user_type import GoogleChatDelegatedUserType + + return { + "id": (str,), + "type": (GoogleChatDelegatedUserType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__( + self_, id: Union[str, UnsetType] = unset, type: Union[GoogleChatDelegatedUserType, UnsetType] = unset, **kwargs + ): + """ + Delegated user relationship data. + + :param id: The ID of the delegated user. + :type id: str, optional + + :param type: Google Chat delegated user resource type. + :type type: GoogleChatDelegatedUserType, optional + """ + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_organization_response.py b/src/datadog_api_client/v2/model/google_chat_organization_response.py new file mode 100644 index 0000000000..634f17c08b --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_organization_response.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.google_chat_organization_data import GoogleChatOrganizationData + + +class GoogleChatOrganizationResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_organization_data import GoogleChatOrganizationData + + return { + "data": (GoogleChatOrganizationData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: GoogleChatOrganizationData, **kwargs): + """ + Response containing a Google Chat organization binding. + + :param data: Google Chat organization data from a response. + :type data: GoogleChatOrganizationData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/google_chat_organization_type.py b/src/datadog_api_client/v2/model/google_chat_organization_type.py new file mode 100644 index 0000000000..2d9c206085 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_organization_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 GoogleChatOrganizationType(ModelSimple): + """ + Google Chat organization resource type. + + :param value: If omitted defaults to "google-chat-organization". Must be one of ["google-chat-organization"]. + :type value: str + """ + + allowed_values = { + "google-chat-organization", + } + GOOGLE_CHAT_ORGANIZATION_TYPE: ClassVar["GoogleChatOrganizationType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +GoogleChatOrganizationType.GOOGLE_CHAT_ORGANIZATION_TYPE = GoogleChatOrganizationType("google-chat-organization") diff --git a/src/datadog_api_client/v2/model/google_chat_organizations_response.py b/src/datadog_api_client/v2/model/google_chat_organizations_response.py new file mode 100644 index 0000000000..4b8c6ae3ac --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_organizations_response.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.google_chat_organization_data import GoogleChatOrganizationData + + +class GoogleChatOrganizationsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_organization_data import GoogleChatOrganizationData + + return { + "data": ([GoogleChatOrganizationData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[GoogleChatOrganizationData], **kwargs): + """ + Response containing a list of Google Chat organization bindings. + + :param data: An array of Google Chat organization bindings. + :type data: [GoogleChatOrganizationData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_attributes.py b/src/datadog_api_client/v2/model/google_chat_target_audience_attributes.py new file mode 100644 index 0000000000..8a6c2e8c38 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_attributes.py @@ -0,0 +1,48 @@ +# 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 GoogleChatTargetAudienceAttributes(ModelNormal): + validations = { + "audience_id": { + "max_length": 255, + }, + "audience_name": { + "max_length": 255, + }, + } + + @cached_property + def openapi_types(_): + return { + "audience_id": (str,), + "audience_name": (str,), + } + + attribute_map = { + "audience_id": "audience_id", + "audience_name": "audience_name", + } + + def __init__(self_, audience_id: str, audience_name: str, **kwargs): + """ + Google Chat target audience attributes. + + :param audience_id: The audience ID. + :type audience_id: str + + :param audience_name: The audience name. + :type audience_name: str + """ + super().__init__(kwargs) + + self_.audience_id = audience_id + self_.audience_name = audience_name diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_create_request.py b/src/datadog_api_client/v2/model/google_chat_target_audience_create_request.py new file mode 100644 index 0000000000..34704688d2 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_create_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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.google_chat_target_audience_create_request_data import ( + GoogleChatTargetAudienceCreateRequestData, + ) + + +class GoogleChatTargetAudienceCreateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_target_audience_create_request_data import ( + GoogleChatTargetAudienceCreateRequestData, + ) + + return { + "data": (GoogleChatTargetAudienceCreateRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: GoogleChatTargetAudienceCreateRequestData, **kwargs): + """ + Create target audience request. + + :param data: Data for a create target audience request. + :type data: GoogleChatTargetAudienceCreateRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_create_request_attributes.py b/src/datadog_api_client/v2/model/google_chat_target_audience_create_request_attributes.py new file mode 100644 index 0000000000..19f12bfc45 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_create_request_attributes.py @@ -0,0 +1,48 @@ +# 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 GoogleChatTargetAudienceCreateRequestAttributes(ModelNormal): + validations = { + "audience_id": { + "max_length": 255, + }, + "audience_name": { + "max_length": 255, + }, + } + + @cached_property + def openapi_types(_): + return { + "audience_id": (str,), + "audience_name": (str,), + } + + attribute_map = { + "audience_id": "audience_id", + "audience_name": "audience_name", + } + + def __init__(self_, audience_id: str, audience_name: str, **kwargs): + """ + Attributes for creating a Google Chat target audience. + + :param audience_id: The audience ID. + :type audience_id: str + + :param audience_name: The audience name. + :type audience_name: str + """ + super().__init__(kwargs) + + self_.audience_id = audience_id + self_.audience_name = audience_name diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_create_request_data.py b/src/datadog_api_client/v2/model/google_chat_target_audience_create_request_data.py new file mode 100644 index 0000000000..56af63b893 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_create_request_data.py @@ -0,0 +1,54 @@ +# 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.google_chat_target_audience_create_request_attributes import ( + GoogleChatTargetAudienceCreateRequestAttributes, + ) + from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType + + +class GoogleChatTargetAudienceCreateRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_target_audience_create_request_attributes import ( + GoogleChatTargetAudienceCreateRequestAttributes, + ) + from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType + + return { + "attributes": (GoogleChatTargetAudienceCreateRequestAttributes,), + "type": (GoogleChatTargetAudienceType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, attributes: GoogleChatTargetAudienceCreateRequestAttributes, type: GoogleChatTargetAudienceType, **kwargs + ): + """ + Data for a create target audience request. + + :param attributes: Attributes for creating a Google Chat target audience. + :type attributes: GoogleChatTargetAudienceCreateRequestAttributes + + :param type: Google Chat target audience resource type. + :type type: GoogleChatTargetAudienceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_data.py b/src/datadog_api_client/v2/model/google_chat_target_audience_data.py new file mode 100644 index 0000000000..9023f43132 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_data.py @@ -0,0 +1,73 @@ +# 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.google_chat_target_audience_attributes import GoogleChatTargetAudienceAttributes + from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType + + +class GoogleChatTargetAudienceData(ModelNormal): + validations = { + "id": { + "max_length": 100, + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_target_audience_attributes import ( + GoogleChatTargetAudienceAttributes, + ) + from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType + + return { + "attributes": (GoogleChatTargetAudienceAttributes,), + "id": (str,), + "type": (GoogleChatTargetAudienceType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[GoogleChatTargetAudienceAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[GoogleChatTargetAudienceType, UnsetType] = unset, + **kwargs, + ): + """ + Google Chat target audience data from a response. + + :param attributes: Google Chat target audience attributes. + :type attributes: GoogleChatTargetAudienceAttributes, optional + + :param id: The ID of the target audience. + :type id: str, optional + + :param type: Google Chat target audience resource type. + :type type: GoogleChatTargetAudienceType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_response.py b/src/datadog_api_client/v2/model/google_chat_target_audience_response.py new file mode 100644 index 0000000000..75d550c52b --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_response.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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.google_chat_target_audience_data import GoogleChatTargetAudienceData + + +class GoogleChatTargetAudienceResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_target_audience_data import GoogleChatTargetAudienceData + + return { + "data": (GoogleChatTargetAudienceData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: GoogleChatTargetAudienceData, **kwargs): + """ + Response containing a Google Chat target audience. + + :param data: Google Chat target audience data from a response. + :type data: GoogleChatTargetAudienceData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_type.py b/src/datadog_api_client/v2/model/google_chat_target_audience_type.py new file mode 100644 index 0000000000..301046c218 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_type.py @@ -0,0 +1,37 @@ +# 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 GoogleChatTargetAudienceType(ModelSimple): + """ + Google Chat target audience resource type. + + :param value: If omitted defaults to "google-chat-target-audience". Must be one of ["google-chat-target-audience"]. + :type value: str + """ + + allowed_values = { + "google-chat-target-audience", + } + GOOGLE_CHAT_TARGET_AUDIENCE_TYPE: ClassVar["GoogleChatTargetAudienceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE = GoogleChatTargetAudienceType( + "google-chat-target-audience" +) diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_update_request.py b/src/datadog_api_client/v2/model/google_chat_target_audience_update_request.py new file mode 100644 index 0000000000..21efdd0a6c --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_update_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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.google_chat_target_audience_update_request_data import ( + GoogleChatTargetAudienceUpdateRequestData, + ) + + +class GoogleChatTargetAudienceUpdateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_target_audience_update_request_data import ( + GoogleChatTargetAudienceUpdateRequestData, + ) + + return { + "data": (GoogleChatTargetAudienceUpdateRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: GoogleChatTargetAudienceUpdateRequestData, **kwargs): + """ + Update target audience request. + + :param data: Data for an update target audience request. + :type data: GoogleChatTargetAudienceUpdateRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_update_request_attributes.py b/src/datadog_api_client/v2/model/google_chat_target_audience_update_request_attributes.py new file mode 100644 index 0000000000..944cbf5309 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_update_request_attributes.py @@ -0,0 +1,54 @@ +# 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, + unset, + UnsetType, +) + + +class GoogleChatTargetAudienceUpdateRequestAttributes(ModelNormal): + validations = { + "audience_id": { + "max_length": 255, + }, + "audience_name": { + "max_length": 255, + }, + } + + @cached_property + def openapi_types(_): + return { + "audience_id": (str,), + "audience_name": (str,), + } + + attribute_map = { + "audience_id": "audience_id", + "audience_name": "audience_name", + } + + def __init__( + self_, audience_id: Union[str, UnsetType] = unset, audience_name: Union[str, UnsetType] = unset, **kwargs + ): + """ + Attributes for updating a Google Chat target audience. + + :param audience_id: The audience ID. + :type audience_id: str, optional + + :param audience_name: The audience name. + :type audience_name: str, optional + """ + if audience_id is not unset: + kwargs["audience_id"] = audience_id + if audience_name is not unset: + kwargs["audience_name"] = audience_name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/google_chat_target_audience_update_request_data.py b/src/datadog_api_client/v2/model/google_chat_target_audience_update_request_data.py new file mode 100644 index 0000000000..d9a99e2bb1 --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audience_update_request_data.py @@ -0,0 +1,54 @@ +# 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.google_chat_target_audience_update_request_attributes import ( + GoogleChatTargetAudienceUpdateRequestAttributes, + ) + from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType + + +class GoogleChatTargetAudienceUpdateRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_target_audience_update_request_attributes import ( + GoogleChatTargetAudienceUpdateRequestAttributes, + ) + from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType + + return { + "attributes": (GoogleChatTargetAudienceUpdateRequestAttributes,), + "type": (GoogleChatTargetAudienceType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, attributes: GoogleChatTargetAudienceUpdateRequestAttributes, type: GoogleChatTargetAudienceType, **kwargs + ): + """ + Data for an update target audience request. + + :param attributes: Attributes for updating a Google Chat target audience. + :type attributes: GoogleChatTargetAudienceUpdateRequestAttributes + + :param type: Google Chat target audience resource type. + :type type: GoogleChatTargetAudienceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/google_chat_target_audiences_response.py b/src/datadog_api_client/v2/model/google_chat_target_audiences_response.py new file mode 100644 index 0000000000..b56898987b --- /dev/null +++ b/src/datadog_api_client/v2/model/google_chat_target_audiences_response.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.google_chat_target_audience_data import GoogleChatTargetAudienceData + + +class GoogleChatTargetAudiencesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.google_chat_target_audience_data import GoogleChatTargetAudienceData + + return { + "data": ([GoogleChatTargetAudienceData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[GoogleChatTargetAudienceData], **kwargs): + """ + Response containing a list of Google Chat target audiences. + + :param data: An array of Google Chat target audiences. + :type data: [GoogleChatTargetAudienceData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 1260a55e72..c404e68844 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2988,6 +2988,12 @@ from datadog_api_client.v2.model.google_chat_create_organization_handle_request_data import ( GoogleChatCreateOrganizationHandleRequestData, ) +from datadog_api_client.v2.model.google_chat_delegated_user_attributes import GoogleChatDelegatedUserAttributes +from datadog_api_client.v2.model.google_chat_delegated_user_data import GoogleChatDelegatedUserData +from datadog_api_client.v2.model.google_chat_delegated_user_response import GoogleChatDelegatedUserResponse +from datadog_api_client.v2.model.google_chat_delegated_user_type import GoogleChatDelegatedUserType +from datadog_api_client.v2.model.google_chat_organization_attributes import GoogleChatOrganizationAttributes +from datadog_api_client.v2.model.google_chat_organization_data import GoogleChatOrganizationData from datadog_api_client.v2.model.google_chat_organization_handle_response import GoogleChatOrganizationHandleResponse from datadog_api_client.v2.model.google_chat_organization_handle_response_attributes import ( GoogleChatOrganizationHandleResponseAttributes, @@ -2997,6 +3003,35 @@ ) from datadog_api_client.v2.model.google_chat_organization_handle_type import GoogleChatOrganizationHandleType from datadog_api_client.v2.model.google_chat_organization_handles_response import GoogleChatOrganizationHandlesResponse +from datadog_api_client.v2.model.google_chat_organization_relationships import GoogleChatOrganizationRelationships +from datadog_api_client.v2.model.google_chat_organization_relationships_delegated_user import ( + GoogleChatOrganizationRelationshipsDelegatedUser, +) +from datadog_api_client.v2.model.google_chat_organization_relationships_delegated_user_data import ( + GoogleChatOrganizationRelationshipsDelegatedUserData, +) +from datadog_api_client.v2.model.google_chat_organization_response import GoogleChatOrganizationResponse +from datadog_api_client.v2.model.google_chat_organization_type import GoogleChatOrganizationType +from datadog_api_client.v2.model.google_chat_organizations_response import GoogleChatOrganizationsResponse +from datadog_api_client.v2.model.google_chat_target_audience_attributes import GoogleChatTargetAudienceAttributes +from datadog_api_client.v2.model.google_chat_target_audience_create_request import GoogleChatTargetAudienceCreateRequest +from datadog_api_client.v2.model.google_chat_target_audience_create_request_attributes import ( + GoogleChatTargetAudienceCreateRequestAttributes, +) +from datadog_api_client.v2.model.google_chat_target_audience_create_request_data import ( + GoogleChatTargetAudienceCreateRequestData, +) +from datadog_api_client.v2.model.google_chat_target_audience_data import GoogleChatTargetAudienceData +from datadog_api_client.v2.model.google_chat_target_audience_response import GoogleChatTargetAudienceResponse +from datadog_api_client.v2.model.google_chat_target_audience_type import GoogleChatTargetAudienceType +from datadog_api_client.v2.model.google_chat_target_audience_update_request import GoogleChatTargetAudienceUpdateRequest +from datadog_api_client.v2.model.google_chat_target_audience_update_request_attributes import ( + GoogleChatTargetAudienceUpdateRequestAttributes, +) +from datadog_api_client.v2.model.google_chat_target_audience_update_request_data import ( + GoogleChatTargetAudienceUpdateRequestData, +) +from datadog_api_client.v2.model.google_chat_target_audiences_response import GoogleChatTargetAudiencesResponse from datadog_api_client.v2.model.google_chat_update_organization_handle_request import ( GoogleChatUpdateOrganizationHandleRequest, ) @@ -11134,11 +11169,34 @@ "GoogleChatCreateOrganizationHandleRequest", "GoogleChatCreateOrganizationHandleRequestAttributes", "GoogleChatCreateOrganizationHandleRequestData", + "GoogleChatDelegatedUserAttributes", + "GoogleChatDelegatedUserData", + "GoogleChatDelegatedUserResponse", + "GoogleChatDelegatedUserType", + "GoogleChatOrganizationAttributes", + "GoogleChatOrganizationData", "GoogleChatOrganizationHandleResponse", "GoogleChatOrganizationHandleResponseAttributes", "GoogleChatOrganizationHandleResponseData", "GoogleChatOrganizationHandleType", "GoogleChatOrganizationHandlesResponse", + "GoogleChatOrganizationRelationships", + "GoogleChatOrganizationRelationshipsDelegatedUser", + "GoogleChatOrganizationRelationshipsDelegatedUserData", + "GoogleChatOrganizationResponse", + "GoogleChatOrganizationType", + "GoogleChatOrganizationsResponse", + "GoogleChatTargetAudienceAttributes", + "GoogleChatTargetAudienceCreateRequest", + "GoogleChatTargetAudienceCreateRequestAttributes", + "GoogleChatTargetAudienceCreateRequestData", + "GoogleChatTargetAudienceData", + "GoogleChatTargetAudienceResponse", + "GoogleChatTargetAudienceType", + "GoogleChatTargetAudienceUpdateRequest", + "GoogleChatTargetAudienceUpdateRequestAttributes", + "GoogleChatTargetAudienceUpdateRequestData", + "GoogleChatTargetAudiencesResponse", "GoogleChatUpdateOrganizationHandleRequest", "GoogleChatUpdateOrganizationHandleRequestAttributes", "GoogleChatUpdateOrganizationHandleRequestData", diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 097f6a07d5..4936788356 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -650,6 +650,22 @@ "tag": "Google Chat Integration", "operationId": "CreateOrganizationHandle" }, + { + "parameters": [ + { + "name": "organization_binding_id", + "value": "\"e54cb570-c674-529c-769d-84b312288ed7\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"google-chat-target-audience\",\n \"attributes\": {\n \"audience_name\": \"{{ unique }}\",\n \"audience_id\": \"{{ unique }}\"\n }\n }\n}" + } + ], + "step": "there is a valid \"google_chat_target_audience\" in the system", + "key": "google_chat_target_audience", + "tag": "Google Chat Integration", + "operationId": "CreateGoogleChatTargetAudience" + }, { "parameters": [ { diff --git a/tests/v2/features/google_chat_integration.feature b/tests/v2/features/google_chat_integration.feature index f722a7ea20..65c1f264a6 100644 --- a/tests/v2/features/google_chat_integration.feature +++ b/tests/v2/features/google_chat_integration.feature @@ -9,6 +9,38 @@ Feature: Google Chat Integration And a valid "appKeyAuth" key in the system And an instance of "GoogleChatIntegration" API + @generated @skip @team:DataDog/chat-integrations + Scenario: Create a target audience returns "Bad Request" response + Given new "CreateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create a target audience returns "CREATED" response + Given new "CreateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create a target audience returns "Conflict" response + Given new "CreateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create a target audience returns "Not Found" response + Given new "CreateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/chat-integrations Scenario: Create organization handle returns "Bad Request" response Given new "CreateOrganizationHandle" request @@ -42,6 +74,36 @@ Feature: Google Chat Integration When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete a Google Chat organization binding returns "Bad Request" response + Given new "DeleteGoogleChatOrganization" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete a Google Chat organization binding returns "OK" response + Given new "DeleteGoogleChatOrganization" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete a target audience returns "Not Found" response + Given new "DeleteGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete a target audience returns "OK" response + Given new "DeleteGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + @generated @skip @team:DataDog/chat-integrations Scenario: Delete organization handle returns "Bad Request" response Given new "DeleteOrganizationHandle" request @@ -59,6 +121,56 @@ Feature: Google Chat Integration When the request is sent Then the response status is 204 OK + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete the delegated user returns "Not Found" response + Given new "DeleteGoogleChatDelegatedUser" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete the delegated user returns "OK" response + Given new "DeleteGoogleChatDelegatedUser" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get a Google Chat organization binding returns "Not Found" response + Given new "GetGoogleChatOrganization" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get a Google Chat organization binding returns "OK" response + Given new "GetGoogleChatOrganization" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get a target audience returns "Not Found" response + Given new "GetGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get a target audience returns "OK" response + Given new "GetGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all Google Chat organization bindings returns "OK" response + Given new "ListGoogleChatOrganizations" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/chat-integrations Scenario: Get all organization handles returns "Bad Request" response Given new "ListOrganizationHandles" request @@ -82,6 +194,20 @@ Feature: Google Chat Integration Then the response status is 200 OK And the response "data[0].type" is equal to "google-chat-organization-handle" + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all target audiences returns "Not Found" response + Given new "ListGoogleChatTargetAudiences" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all target audiences returns "OK" response + Given new "ListGoogleChatTargetAudiences" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/chat-integrations Scenario: Get organization handle returns "Bad Request" response Given new "GetOrganizationHandle" request @@ -136,6 +262,47 @@ Feature: Google Chat Integration And the response "data.attributes.resource_name" is equal to "spaces/AAQA-zFIks8" And the response "data.attributes.organization_binding_id" is equal to "e54cb570-c674-529c-769d-84b312288ed7" + @generated @skip @team:DataDog/chat-integrations + Scenario: Get the delegated user returns "Not Found" response + Given new "GetGoogleChatDelegatedUser" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get the delegated user returns "OK" response + Given new "GetGoogleChatDelegatedUser" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update a target audience returns "Bad Request" response + Given new "UpdateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update a target audience returns "Not Found" response + Given new "UpdateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update a target audience returns "OK" response + Given new "UpdateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/chat-integrations Scenario: Update organization handle returns "Bad Request" response Given new "UpdateOrganizationHandle" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index a2ff6ce184..56dde3dce0 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -3236,12 +3236,42 @@ "type": "idempotent" } }, + "ListGoogleChatOrganizations": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, "GetSpaceByDisplayName": { "tag": "Google Chat Integration", "undo": { "type": "safe" } }, + "DeleteGoogleChatOrganization": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, + "GetGoogleChatOrganization": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "DeleteGoogleChatDelegatedUser": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, + "GetGoogleChatDelegatedUser": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, "ListOrganizationHandles": { "tag": "Google Chat Integration", "undo": { @@ -3284,6 +3314,48 @@ "type": "idempotent" } }, + "ListGoogleChatTargetAudiences": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "CreateGoogleChatTargetAudience": { + "tag": "Google Chat Integration", + "undo": { + "operationId": "DeleteGoogleChatTargetAudience", + "parameters": [ + { + "name": "organization_binding_id", + "origin": "path", + "source": "organization_binding_id" + }, + { + "name": "target_audience_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteGoogleChatTargetAudience": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, + "GetGoogleChatTargetAudience": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "UpdateGoogleChatTargetAudience": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, "ListJiraAccounts": { "tag": "Jira Integration", "undo": {