From 523b9ef3e94cf94f02cc4b81c91f5d706755f460 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 15 Jan 2026 02:32:19 +0000 Subject: [PATCH] Regenerate client from commit a349cc0 of spec repo --- .generator/schemas/v2/openapi.yaml | 395 +++++++++++++++ ...ion-handle-returns-CREATED-response.frozen | 1 + ...zation-handle-returns-CREATED-response.yml | 44 ++ ...nization-handle-returns-OK-response.frozen | 1 + ...rganization-handle-returns-OK-response.yml | 60 +++ ...ization-handles-returns-OK-response.frozen | 1 + ...ganization-handles-returns-OK-response.yml | 62 +++ ...nization-handle-returns-OK-response.frozen | 1 + ...rganization-handle-returns-OK-response.yml | 62 +++ ...by-display-name-returns-OK-response.frozen | 1 + ...on-by-display-name-returns-OK-response.yml | 20 + ...nization-handle-returns-OK-response.frozen | 1 + ...rganization-handle-returns-OK-response.yml | 66 +++ .../CreateOrganizationHandle.rb | 15 + .../DeleteOrganizationHandle.rb | 8 + .../GetOrganizationHandle.rb | 8 + .../GetSpaceByDisplayName.rb | 5 + .../ListOrganizationHandles.rb | 5 + .../UpdateOrganizationHandle.rb | 18 + features/scenarios_model_mapping.rb | 24 + features/v2/given.json | 16 + features/v2/google_chat_integration.feature | 175 +++++++ features/v2/undo.json | 47 ++ lib/datadog_api_client/inflector.rb | 16 + .../v2/api/google_chat_integration_api.rb | 450 ++++++++++++++++++ .../google_chat_app_named_space_response.rb | 123 +++++ ...hat_app_named_space_response_attributes.rb | 186 ++++++++ ...ogle_chat_app_named_space_response_data.rb | 147 ++++++ .../google_chat_app_named_space_type.rb | 26 + ...chat_create_organization_handle_request.rb | 144 ++++++ ..._organization_handle_request_attributes.rb | 152 ++++++ ...create_organization_handle_request_data.rb | 123 +++++ ...oogle_chat_organization_handle_response.rb | 123 +++++ ...organization_handle_response_attributes.rb | 165 +++++++ ..._chat_organization_handle_response_data.rb | 147 ++++++ .../google_chat_organization_handle_type.rb | 26 + ...ogle_chat_organization_handles_response.rb | 125 +++++ ...chat_update_organization_handle_request.rb | 144 ++++++ ..._organization_handle_request_attributes.rb | 144 ++++++ ...update_organization_handle_request_data.rb | 123 +++++ 40 files changed, 3400 insertions(+) create mode 100644 cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.frozen create mode 100644 cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.yml create mode 100644 cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.frozen create mode 100644 cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.yml create mode 100644 cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.frozen create mode 100644 cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.yml create mode 100644 cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.frozen create mode 100644 cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.yml create mode 100644 cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.frozen create mode 100644 cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.yml create mode 100644 cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.frozen create mode 100644 cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.yml create mode 100644 examples/v2/google-chat-integration/CreateOrganizationHandle.rb create mode 100644 examples/v2/google-chat-integration/DeleteOrganizationHandle.rb create mode 100644 examples/v2/google-chat-integration/GetOrganizationHandle.rb create mode 100644 examples/v2/google-chat-integration/GetSpaceByDisplayName.rb create mode 100644 examples/v2/google-chat-integration/ListOrganizationHandles.rb create mode 100644 examples/v2/google-chat-integration/UpdateOrganizationHandle.rb create mode 100644 features/v2/google_chat_integration.feature create mode 100644 lib/datadog_api_client/v2/api/google_chat_integration_api.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_app_named_space_response.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_app_named_space_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_app_named_space_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_app_named_space_type.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_organization_handle_response.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_organization_handle_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_organization_handle_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_organization_handle_type.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_organization_handles_response.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request_data.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9e32a13f42a..927020d4c92 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -467,6 +467,34 @@ components: items: $ref: '#/components/schemas/GetIssueIncludeQueryParameterItem' type: array + GoogleChatHandleIdPathParameter: + description: Your organization handle ID. + in: path + name: handle_id + required: true + schema: + type: string + GoogleChatOrganizationBindingIdPathParameter: + description: Your organization binding ID. + in: path + name: organization_binding_id + required: true + schema: + type: string + GoogleChatOrganizationDomainNamePathParameter: + description: The Google Chat domain name. + in: path + name: domain_name + required: true + schema: + type: string + GoogleChatOrganizationSpaceDisplayNamePathParameter: + description: The Google Chat space display name. + in: path + name: space_display_name + required: true + schema: + type: string IncidentIDPathParameter: description: The UUID of the incident. in: path @@ -25429,6 +25457,204 @@ components: type: string x-enum-varnames: - GLOBAL_VARIABLES + GoogleChatAppNamedSpaceResponse: + description: Response of a Google Chat app named space. + properties: + data: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceResponseData' + required: + - data + type: object + GoogleChatAppNamedSpaceResponseAttributes: + description: Google Chat app named space attributes. + properties: + display_name: + description: Google space display name. + example: Fake Space Name + maxLength: 255 + type: string + organization_binding_id: + description: Organization binding ID. + example: 2f18a894-adb5-4c53-8248-39fd3f5386a5 + maxLength: 255 + type: string + resource_name: + description: Google space resource name. + example: spaces/AAAAAAAAA + maxLength: 255 + type: string + space_uri: + description: Google space URI. + example: https://chat.google.com/room/AAAAAAAAA + maxLength: 255 + type: string + type: object + GoogleChatAppNamedSpaceResponseData: + description: Google Chat app named space data from a response. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceResponseAttributes' + id: + description: The ID of the app named space. + example: 596da4af-0563-4097-90ff-07230c3f9db3 + maxLength: 100 + minLength: 1 + type: string + type: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceType' + type: object + GoogleChatAppNamedSpaceType: + default: google-chat-app-named-space + description: Google Chat app named space resource type. + enum: + - google-chat-app-named-space + example: google-chat-app-named-space + type: string + x-enum-varnames: + - GOOGLE_CHAT_APP_NAMED_SPACE_TYPE + GoogleChatCreateOrganizationHandleRequest: + description: Create organization handle request. + properties: + data: + $ref: '#/components/schemas/GoogleChatCreateOrganizationHandleRequestData' + type: + $ref: '#/components/schemas/GoogleChatOrganizationHandleType' + required: + - type + - data + type: object + GoogleChatCreateOrganizationHandleRequestAttributes: + description: Organization handle attributes for a create request. + properties: + name: + description: Organization handle name. + example: fake-handle-name + maxLength: 255 + type: string + space_resource_name: + description: Google space resource name. + example: spaces/AAAAAAAAA + maxLength: 255 + type: string + required: + - name + - space_resource_name + type: object + GoogleChatCreateOrganizationHandleRequestData: + description: Organization handle data for a create request. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatCreateOrganizationHandleRequestAttributes' + required: + - attributes + type: object + GoogleChatOrganizationHandleResponse: + description: Response of a organization handle. + properties: + data: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponseData' + required: + - data + type: object + GoogleChatOrganizationHandleResponseAttributes: + description: Organization handle attributes. + properties: + name: + description: Organization handle name. + example: fake-handle-name + maxLength: 255 + type: string + space_display_name: + description: Google space display name. + example: Fake Space Name + maxLength: 255 + type: string + space_resource_name: + description: Google space resource name. + example: spaces/AAAAAAAAA + maxLength: 255 + type: string + type: object + GoogleChatOrganizationHandleResponseData: + description: Organization handle data from a response. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponseAttributes' + id: + description: The ID of the organization handle. + example: 596da4af-0563-4097-90ff-07230c3f9db3 + maxLength: 100 + minLength: 1 + type: string + type: + $ref: '#/components/schemas/GoogleChatOrganizationHandleType' + type: object + GoogleChatOrganizationHandleType: + default: google-chat-organization-handle + description: Organization handle resource type. + enum: + - google-chat-organization-handle + example: google-chat-organization-handle + type: string + x-enum-varnames: + - GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE + GoogleChatOrganizationHandlesResponse: + description: Response with a list of organization handles. + properties: + data: + description: An array of organization handles. + example: + - attributes: + name: general-handle + space_display_name: General + space_resource_name: spaces/AAAAAAAAA + id: 596da4af-0563-4097-90ff-07230c3f9db3 + type: google-chat-organization-handle + - attributes: + name: general-handle-2 + space_display_name: General2 + space_resource_name: spaces/BBBBBBBBB + id: 596da4af-0563-4097-90ff-07230c3f9db4 + type: google-chat-organization-handle + items: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponseData' + type: array + required: + - data + type: object + GoogleChatUpdateOrganizationHandleRequest: + description: Update organization handle request. + properties: + data: + $ref: '#/components/schemas/GoogleChatUpdateOrganizationHandleRequestData' + type: + $ref: '#/components/schemas/GoogleChatOrganizationHandleType' + required: + - type + - data + type: object + GoogleChatUpdateOrganizationHandleRequestAttributes: + description: Organization handle attributes for an update request. + properties: + name: + description: Organization handle name. + example: fake-handle-name + maxLength: 255 + type: string + space_resource_name: + description: Google space resource name. + example: spaces/AAAAAAAAA + maxLength: 255 + type: string + type: object + GoogleChatUpdateOrganizationHandleRequestData: + description: Organization handle data for an update request. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatUpdateOrganizationHandleRequestAttributes' + required: + - attributes + type: object GoogleMeetConfigurationReference: description: A reference to a Google Meet Configuration resource. nullable: true @@ -72559,6 +72785,167 @@ paths: operator: OR permissions: - gcp_configuration_edit + /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. + operationId: GetSpaceByDisplayName + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationDomainNamePathParameter' + - $ref: '#/components/parameters/GoogleChatOrganizationSpaceDisplayNamePathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get space information by display name + 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. + operationId: ListOrganizationHandles + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatOrganizationHandlesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all organization handles + tags: + - Google Chat Integration + post: + description: Create an organization handle in the Datadog Google Chat integration. + operationId: CreateOrganizationHandle + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatCreateOrganizationHandleRequest' + description: Organization handle payload. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponse' + 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 organization handle + tags: + - Google Chat Integration + x-codegen-request-body-name: body + /api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}: + delete: + description: Delete an organization handle from the Datadog Google Chat integration. + operationId: DeleteOrganizationHandle + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + - $ref: '#/components/parameters/GoogleChatHandleIdPathParameter' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete organization handle + tags: + - Google Chat Integration + get: + description: Get an organization handle from the Datadog Google Chat integration. + operationId: GetOrganizationHandle + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + - $ref: '#/components/parameters/GoogleChatHandleIdPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get organization handle + tags: + - Google Chat Integration + patch: + description: Update an organization handle from the Datadog Google Chat integration. + operationId: UpdateOrganizationHandle + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + - $ref: '#/components/parameters/GoogleChatHandleIdPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatUpdateOrganizationHandleRequest' + description: Organization handle payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponse' + description: OK + '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: Update organization handle + tags: + - Google Chat Integration + x-codegen-request-body-name: body /api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}: get: description: Get the tenant, team, and channel ID of a channel in the Datadog @@ -92012,6 +92399,14 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/google_cloud_platform name: GCP Integration +- description: 'Configure your [Datadog Google Chat integration](https://docs.datadoghq.com/integrations/google-hangouts-chat/) + + directly through the Datadog API.' + externalDocs: + description: For more information about the Datadog Google Chat integration, see + the integration page. + url: https://docs.datadoghq.com/integrations/google-hangouts-chat/ + name: Google Chat Integration - description: 'The IP allowlist API is used to manage the IP addresses that can access the Datadog API and web UI. It does not block diff --git a/cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.frozen b/cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.frozen new file mode 100644 index 00000000000..91584ceeebc --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.frozen @@ -0,0 +1 @@ +2026-01-15T02:21:36.242Z \ No newline at end of file diff --git a/cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.yml b/cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.yml new file mode 100644 index 00000000000..147e5eb9eea --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.yml @@ -0,0 +1,44 @@ +http_interactions: +- recorded_at: Thu, 15 Jan 2026 02:21:36 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Create_organization_handle_returns_CREATED_response-1768443696","space_resource_name":"spaces/AAQA-zFIks8"}},"type":"google-chat-organization-handle"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"816b3532-ebb4-4518-9087-b3fc02598eef","type":"google-chat-organization-handle","attributes":{"name":"Test-Create_organization_handle_returns_CREATED_response-1768443696","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Thu, 15 Jan 2026 02:21:36 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/816b3532-ebb4-4518-9087-b3fc02598eef + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Invalid Parameter","detail":"invalid + parameter \"google_chat_organization_binding_id\" in \"path\"; expected type + \"uuid\""}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.frozen b/cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.frozen new file mode 100644 index 00000000000..86e3ac81c96 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-15T02:21:36.964Z \ No newline at end of file diff --git a/cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.yml b/cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.yml new file mode 100644 index 00000000000..6e9b2a10bdb --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Thu, 15 Jan 2026 02:21:36 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Delete_organization_handle_returns_OK_response-1768443696","space_resource_name":"spaces/AAQA-zFIks8"}},"type":"google-chat-organization-handle"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"31073514-1747-41a2-9606-4a21ff5dfffd","type":"google-chat-organization-handle","attributes":{"name":"Test-Delete_organization_handle_returns_OK_response-1768443696","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Thu, 15 Jan 2026 02:21:36 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles/31073514-1747-41a2-9606-4a21ff5dfffd + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Thu, 15 Jan 2026 02:21:36 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/31073514-1747-41a2-9606-4a21ff5dfffd + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Invalid Parameter","detail":"invalid + parameter \"google_chat_organization_binding_id\" in \"path\"; expected type + \"uuid\""}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.frozen b/cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.frozen new file mode 100644 index 00000000000..a580c932621 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-15T02:21:37.737Z \ No newline at end of file diff --git a/cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.yml b/cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.yml new file mode 100644 index 00000000000..d47de7b2da8 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.yml @@ -0,0 +1,62 @@ +http_interactions: +- recorded_at: Thu, 15 Jan 2026 02:21:37 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Get_all_organization_handles_returns_OK_response-1768443697","space_resource_name":"spaces/AAQA-zFIks8"}},"type":"google-chat-organization-handle"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"c255808f-31ed-44e4-9daa-f36ba91e5da5","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_all_organization_handles_returns_OK_response-1768443697","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Thu, 15 Jan 2026 02:21:37 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"4cb25d88-09cb-41bd-91d2-2ce83e7f48e2","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768410894","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"0c523f11-00fc-4232-9302-a4194bec088a","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768411668","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"fd026c96-994d-47a3-affd-c7b8b439c664","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768413147","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"00f632d9-1463-4ab6-902a-14efa83d13c3","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768413200","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"6d7c571a-8ae2-4fc9-885f-e2c72d713a2f","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768413359","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"7de5d51a-cef9-43a5-82b0-5e5465cd985b","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768414434","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"2d97d54c-6a89-41c7-b37c-dec64c4ae4d7","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415357","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"998878e7-91e8-4627-ae28-f816ece451a3","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415410","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"1048964c-3e42-475d-812a-ae0e52626bfb","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415444","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"669866bb-34e5-40f7-9da6-476bf9bbe8ca","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415571","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"c47893d4-35c6-4ddb-bc76-707220f0211a","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415637","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"55266f5b-3067-4631-883e-cfb1dc49256d","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768416992","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"c3cb3868-7d64-4a0c-bd7f-819f7de97e0b","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768417235","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"4e13aa5f-7e47-4b4f-b95f-aabea862aedc","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768417898","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"25f41f79-2f98-44cd-a89e-65921b62c3d5","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433110","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"e1174e5c-d09d-4f89-bf9d-2ea97634fa8f","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433111","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"c5401188-ae0e-4d78-9bb8-c97b089b88ab","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433243","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"349bddd9-b6e6-4bfa-aa77-279469cb8c02","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433245","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"607be0b6-1b63-4620-a6b6-22838e545e1d","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_organization_handle_returns_OK_response-1768433246","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"0bde990e-a2d8-4fbc-8185-db4b760503e3","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433723","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"d83962e1-b506-4b44-b6af-f22cc64ebfb4","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433724","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"7b253152-9ab3-416f-ab3d-33ae688addf0","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_organization_handle_returns_OK_response-1768433725","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"6413555c-fd47-4909-826d-a88e48a6c6fb","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433747","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"3e63fd96-71af-4d89-97a3-de1c407072b5","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433749","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"b1f31471-ffc6-4f00-adca-65834cbcd507","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_organization_handle_returns_OK_response-1768433750","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"6c7fea65-24cd-4e7e-a0a4-dc080d74343f","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433851","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"4349abba-180b-462a-b277-274a56b39802","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433852","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"308d6c06-a2b3-4316-b0d4-5cf10edab69e","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_organization_handle_returns_OK_response-1768433853","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"96f53b75-9f2e-4a1e-a6f0-ae485007d5b3","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768434195","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"30b2f976-6f38-462d-bc34-c4e4b33cc3cc","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768434196","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"27703fb9-7f3e-47dc-a1d2-b8d8a9963e76","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_organization_handle_returns_OK_response-1768434197","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"083e58b9-15a9-4aff-9cbc-b86834e52c2b","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Update_organization_handle_returns_OK_response-1768434198--updated","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"9b9cc0a6-29ab-47f8-96d4-bc30721ccaa1","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768434578","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"1e4e3dd4-1d90-4636-9ff9-eedb2f54addc","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768434580","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"868ec752-faf5-4f44-8b52-8c3a122472c2","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_organization_handle_returns_OK_response-1768434581","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"9de230e5-ab9e-4580-b35d-eeaa0aeff0b6","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Update_organization_handle_returns_OK_response-1768434582--updated","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"30e260a4-6f82-42de-a3e1-2502d423c866","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768440733","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"8fbbe4fa-deee-425e-bc71-ad86d6e1d9bc","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768440734","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"37cf2395-7004-479f-bd63-89c77b3668e6","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_organization_handle_returns_OK_response-1768440735","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"caf066bb-44a5-45c7-a039-1c7fe3eaaf8d","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Update_organization_handle_returns_OK_response-1768440736--updated","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"76752f89-bc33-4ee6-affc-693a0d37881f","type":"google-chat-organization-handle","attributes":{"name":"Test-Create_organization_handle_returns_CREATED_response-1768440799","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"9bda54c5-2410-4cdf-9147-a039b6b8f734","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_all_organization_handles_returns_OK_response-1768440800","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"a37fe35d-e599-40fa-83aa-87d0fdfcc81b","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_organization_handle_returns_OK_response-1768440801","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"e8eb5d83-6dcb-4664-a35b-eaa0d1e22136","type":"google-chat-organization-handle","attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1768440803--updated","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"f2239624-d5fb-4c61-b069-7902fc0cbfc5","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768441148","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"31863558-31d4-42f6-b2a9-8e9dadf2ac80","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768441150","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"cae37ed4-cec4-465c-9af7-6e65c137ae21","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Get_organization_handle_returns_OK_response-1768441151","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"0b0465a9-e0a8-4efd-be4b-8dc5d0283dfb","type":"google-chat-organization-handle","attributes":{"name":"Test-Typescript-Update_organization_handle_returns_OK_response-1768441152--updated","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"816b3532-ebb4-4518-9087-b3fc02598eef","type":"google-chat-organization-handle","attributes":{"name":"Test-Create_organization_handle_returns_CREATED_response-1768443696","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}},{"id":"c255808f-31ed-44e4-9daa-f36ba91e5da5","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_all_organization_handles_returns_OK_response-1768443697","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Thu, 15 Jan 2026 02:21:37 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/c255808f-31ed-44e4-9daa-f36ba91e5da5 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Invalid Parameter","detail":"invalid + parameter \"google_chat_organization_binding_id\" in \"path\"; expected type + \"uuid\""}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.frozen b/cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.frozen new file mode 100644 index 00000000000..d11e45dc1d7 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-15T02:21:38.766Z \ No newline at end of file diff --git a/cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.yml b/cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.yml new file mode 100644 index 00000000000..84467ac6b35 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.yml @@ -0,0 +1,62 @@ +http_interactions: +- recorded_at: Thu, 15 Jan 2026 02:21:38 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Get_organization_handle_returns_OK_response-1768443698","space_resource_name":"spaces/AAQA-zFIks8"}},"type":"google-chat-organization-handle"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"7a4e4593-fd25-4171-9ed0-54e2542a8fcf","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_organization_handle_returns_OK_response-1768443698","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Thu, 15 Jan 2026 02:21:38 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles/7a4e4593-fd25-4171-9ed0-54e2542a8fcf + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"7a4e4593-fd25-4171-9ed0-54e2542a8fcf","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_organization_handle_returns_OK_response-1768443698","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Thu, 15 Jan 2026 02:21:38 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/7a4e4593-fd25-4171-9ed0-54e2542a8fcf + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Invalid Parameter","detail":"invalid + parameter \"google_chat_organization_binding_id\" in \"path\"; expected type + \"uuid\""}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.frozen b/cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.frozen new file mode 100644 index 00000000000..7449b5fb2bb --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-15T02:21:39.795Z \ No newline at end of file diff --git a/cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.yml b/cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.yml new file mode 100644 index 00000000000..8f9d33da1e3 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Thu, 15 Jan 2026 02:21:39 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/app/named-spaces/datadog.ninja/api-test-space + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d57f39c4-f22b-6da0-108c-23bdb9c460a3","type":"google-chat-app-named-space","attributes":{"display_name":"api-test-space","organization_binding_id":"e54cb570-c674-529c-769d-84b312288ed7","resource_name":"spaces/AAQA-zFIks8","space_uri":"https://chat.google.com/room/AAQA-zFIks8?cls=11"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.frozen b/cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.frozen new file mode 100644 index 00000000000..21a44de3338 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-15T02:21:40.120Z \ No newline at end of file diff --git a/cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.yml b/cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.yml new file mode 100644 index 00000000000..bdd6f34a3b7 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Thu, 15 Jan 2026 02:21:40 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1768443700","space_resource_name":"spaces/AAQA-zFIks8"}},"type":"google-chat-organization-handle"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"e4e62f90-9ec7-459b-ac0a-62157eefeb2c","type":"google-chat-organization-handle","attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1768443700","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Thu, 15 Jan 2026 02:21:40 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1768443700--updated"}},"type":"google-chat-organization-handle"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles/e4e62f90-9ec7-459b-ac0a-62157eefeb2c + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"e4e62f90-9ec7-459b-ac0a-62157eefeb2c","type":"google-chat-organization-handle","attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1768443700--updated","space_display_name":"api-test-space","space_resource_name":"spaces/AAQA-zFIks8"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Thu, 15 Jan 2026 02:21:40 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/e4e62f90-9ec7-459b-ac0a-62157eefeb2c + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Invalid Parameter","detail":"invalid + parameter \"google_chat_organization_binding_id\" in \"path\"; expected type + \"uuid\""}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/examples/v2/google-chat-integration/CreateOrganizationHandle.rb b/examples/v2/google-chat-integration/CreateOrganizationHandle.rb new file mode 100644 index 00000000000..777862c9681 --- /dev/null +++ b/examples/v2/google-chat-integration/CreateOrganizationHandle.rb @@ -0,0 +1,15 @@ +# Create organization handle returns "CREATED" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new + +body = DatadogAPIClient::V2::GoogleChatCreateOrganizationHandleRequest.new({ + data: DatadogAPIClient::V2::GoogleChatCreateOrganizationHandleRequestData.new({ + attributes: DatadogAPIClient::V2::GoogleChatCreateOrganizationHandleRequestAttributes.new({ + name: "Example-Google-Chat-Integration", + space_resource_name: "spaces/AAQA-zFIks8", + }), + }), + type: DatadogAPIClient::V2::GoogleChatOrganizationHandleType::GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE, +}) +p api_instance.create_organization_handle("e54cb570-c674-529c-769d-84b312288ed7", body) diff --git a/examples/v2/google-chat-integration/DeleteOrganizationHandle.rb b/examples/v2/google-chat-integration/DeleteOrganizationHandle.rb new file mode 100644 index 00000000000..fd047fe9499 --- /dev/null +++ b/examples/v2/google-chat-integration/DeleteOrganizationHandle.rb @@ -0,0 +1,8 @@ +# Delete organization handle returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new + +# there is a valid "organization_handle" in the system +ORGANIZATION_HANDLE_DATA_ID = ENV["ORGANIZATION_HANDLE_DATA_ID"] +api_instance.delete_organization_handle("e54cb570-c674-529c-769d-84b312288ed7", ORGANIZATION_HANDLE_DATA_ID) diff --git a/examples/v2/google-chat-integration/GetOrganizationHandle.rb b/examples/v2/google-chat-integration/GetOrganizationHandle.rb new file mode 100644 index 00000000000..1082553f3f3 --- /dev/null +++ b/examples/v2/google-chat-integration/GetOrganizationHandle.rb @@ -0,0 +1,8 @@ +# Get organization handle returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new + +# there is a valid "organization_handle" in the system +ORGANIZATION_HANDLE_DATA_ID = ENV["ORGANIZATION_HANDLE_DATA_ID"] +p api_instance.get_organization_handle("e54cb570-c674-529c-769d-84b312288ed7", ORGANIZATION_HANDLE_DATA_ID) diff --git a/examples/v2/google-chat-integration/GetSpaceByDisplayName.rb b/examples/v2/google-chat-integration/GetSpaceByDisplayName.rb new file mode 100644 index 00000000000..8630ded5501 --- /dev/null +++ b/examples/v2/google-chat-integration/GetSpaceByDisplayName.rb @@ -0,0 +1,5 @@ +# Get space information by display name returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new +p api_instance.get_space_by_display_name("datadog.ninja", "api-test-space") diff --git a/examples/v2/google-chat-integration/ListOrganizationHandles.rb b/examples/v2/google-chat-integration/ListOrganizationHandles.rb new file mode 100644 index 00000000000..430f89455b8 --- /dev/null +++ b/examples/v2/google-chat-integration/ListOrganizationHandles.rb @@ -0,0 +1,5 @@ +# Get all organization handles returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new +p api_instance.list_organization_handles("e54cb570-c674-529c-769d-84b312288ed7") diff --git a/examples/v2/google-chat-integration/UpdateOrganizationHandle.rb b/examples/v2/google-chat-integration/UpdateOrganizationHandle.rb new file mode 100644 index 00000000000..b5e0074b741 --- /dev/null +++ b/examples/v2/google-chat-integration/UpdateOrganizationHandle.rb @@ -0,0 +1,18 @@ +# Update organization handle returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::GoogleChatIntegrationAPI.new + +# there is a valid "organization_handle" in the system +ORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME = ENV["ORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME"] +ORGANIZATION_HANDLE_DATA_ID = ENV["ORGANIZATION_HANDLE_DATA_ID"] + +body = DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequest.new({ + data: DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequestData.new({ + attributes: DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequestAttributes.new({ + name: "fake-handle-name--updated", + }), + }), + type: DatadogAPIClient::V2::GoogleChatOrganizationHandleType::GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE, +}) +p api_instance.update_organization_handle("e54cb570-c674-529c-769d-84b312288ed7", ORGANIZATION_HANDLE_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 4b8aa365e24..70a4fde6ff3 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2219,6 +2219,30 @@ "v2.MakeGCPSTSDelegate" => { "body" => "Object", }, + "v2.GetSpaceByDisplayName" => { + "domain_name" => "String", + "space_display_name" => "String", + }, + "v2.ListOrganizationHandles" => { + "organization_binding_id" => "String", + }, + "v2.CreateOrganizationHandle" => { + "organization_binding_id" => "String", + "body" => "GoogleChatCreateOrganizationHandleRequest", + }, + "v2.DeleteOrganizationHandle" => { + "organization_binding_id" => "String", + "handle_id" => "String", + }, + "v2.GetOrganizationHandle" => { + "organization_binding_id" => "String", + "handle_id" => "String", + }, + "v2.UpdateOrganizationHandle" => { + "organization_binding_id" => "String", + "handle_id" => "String", + "body" => "GoogleChatUpdateOrganizationHandleRequest", + }, "v2.GetChannelByName" => { "tenant_name" => "String", "team_name" => "String", diff --git a/features/v2/given.json b/features/v2/given.json index 3a01a060c5b..5b891d6285a 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -519,6 +519,22 @@ "tag": "GCP Integration", "operationId": "CreateGCPSTSAccount" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"type\": \"google-chat-organization-handle\",\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"space_resource_name\": \"spaces/AAQA-zFIks8\"\n }\n }\n}" + }, + { + "name": "organization_binding_id", + "value": "\"e54cb570-c674-529c-769d-84b312288ed7\"" + } + ], + "step": "there is a valid \"organization_handle\" in the system", + "key": "organization_handle", + "tag": "Google Chat Integration", + "operationId": "CreateOrganizationHandle" + }, { "parameters": [ { diff --git a/features/v2/google_chat_integration.feature b/features/v2/google_chat_integration.feature new file mode 100644 index 00000000000..f722a7ea208 --- /dev/null +++ b/features/v2/google_chat_integration.feature @@ -0,0 +1,175 @@ +@endpoint(google-chat-integration) @endpoint(google-chat-integration-v2) +Feature: Google Chat Integration + Configure your [Datadog Google Chat + integration](https://docs.datadoghq.com/integrations/google-hangouts- + chat/) directly through the Datadog API. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "GoogleChatIntegration" API + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create organization handle returns "Bad Request" response + Given new "CreateOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "fake-handle-name", "space_resource_name": "spaces/AAAAAAAAA"}}, "type": "google-chat-organization-handle"} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/chat-integrations + Scenario: Create organization handle returns "CREATED" response + Given new "CreateOrganizationHandle" request + And request contains "organization_binding_id" parameter with value "e54cb570-c674-529c-769d-84b312288ed7" + And body with value {"data": {"attributes": {"name": "{{unique}}", "space_resource_name": "spaces/AAQA-zFIks8"}}, "type": "google-chat-organization-handle"} + When the request is sent + Then the response status is 201 CREATED + And the response "data.attributes.name" is equal to "{{unique}}" + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create organization handle returns "Conflict" response + Given new "CreateOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "fake-handle-name", "space_resource_name": "spaces/AAAAAAAAA"}}, "type": "google-chat-organization-handle"} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create organization handle returns "Not Found" response + Given new "CreateOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "fake-handle-name", "space_resource_name": "spaces/AAAAAAAAA"}}, "type": "google-chat-organization-handle"} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete organization handle returns "Bad Request" response + Given new "DeleteOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/chat-integrations + Scenario: Delete organization handle returns "OK" response + Given new "DeleteOrganizationHandle" request + And there is a valid "organization_handle" in the system + And request contains "organization_binding_id" parameter with value "e54cb570-c674-529c-769d-84b312288ed7" + And request contains "handle_id" parameter from "organization_handle.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all organization handles returns "Bad Request" response + Given new "ListOrganizationHandles" 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: Get all organization handles returns "Not Found" response + Given new "ListOrganizationHandles" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/chat-integrations + Scenario: Get all organization handles returns "OK" response + Given new "ListOrganizationHandles" request + And there is a valid "organization_handle" in the system + And request contains "organization_binding_id" parameter with value "e54cb570-c674-529c-769d-84b312288ed7" + When the request is sent + 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 organization handle returns "Bad Request" response + Given new "GetOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "handle_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: Get organization handle returns "Not Found" response + Given new "GetOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/chat-integrations + Scenario: Get organization handle returns "OK" response + Given new "GetOrganizationHandle" request + And there is a valid "organization_handle" in the system + And request contains "organization_binding_id" parameter with value "e54cb570-c674-529c-769d-84b312288ed7" + And request contains "handle_id" parameter from "organization_handle.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" has the same value as "organization_handle.data.attributes.name" + And the response "data.attributes.space_display_name" has the same value as "organization_handle.data.attributes.space_display_name" + And the response "data.attributes.space_resource_name" has the same value as "organization_handle.data.attributes.space_resource_name" + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get space information by display name returns "Bad Request" response + Given new "GetSpaceByDisplayName" request + And request contains "domain_name" parameter from "REPLACE.ME" + And request contains "space_display_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get space information by display name returns "Not Found" response + Given new "GetSpaceByDisplayName" request + And request contains "domain_name" parameter from "REPLACE.ME" + And request contains "space_display_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/chat-integrations + Scenario: Get space information by display name returns "OK" response + Given new "GetSpaceByDisplayName" request + And request contains "domain_name" parameter with value "datadog.ninja" + And request contains "space_display_name" parameter with value "api-test-space" + When the request is sent + Then the response status is 200 OK + 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: Update organization handle returns "Bad Request" response + Given new "UpdateOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "handle_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "fake-handle-name", "space_resource_name": "spaces/AAAAAAAAA"}}, "type": "google-chat-organization-handle"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update organization handle returns "Conflict" response + Given new "UpdateOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "handle_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "fake-handle-name", "space_resource_name": "spaces/AAAAAAAAA"}}, "type": "google-chat-organization-handle"} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update organization handle returns "Not Found" response + Given new "UpdateOrganizationHandle" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "handle_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "fake-handle-name", "space_resource_name": "spaces/AAAAAAAAA"}}, "type": "google-chat-organization-handle"} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/chat-integrations + Scenario: Update organization handle returns "OK" response + Given new "UpdateOrganizationHandle" request + And there is a valid "organization_handle" in the system + And request contains "organization_binding_id" parameter with value "e54cb570-c674-529c-769d-84b312288ed7" + And request contains "handle_id" parameter from "organization_handle.data.id" + And body with value {"data": {"attributes": {"name": "{{organization_handle.data.attributes.name}}--updated"}}, "type": "google-chat-organization-handle"} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "{{organization_handle.data.attributes.name}}--updated" diff --git a/features/v2/undo.json b/features/v2/undo.json index 661482db869..bc320446cbd 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1993,6 +1993,53 @@ "type": "idempotent" } }, + "GetSpaceByDisplayName": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "ListOrganizationHandles": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "CreateOrganizationHandle": { + "tag": "Google Chat Integration", + "undo": { + "operationId": "DeleteOrganizationHandle", + "parameters": [ + { + "name": "handle_id", + "source": "data.id" + }, + { + "name": "organization_binding_id", + "value": "\"e54cb570-c674-529c-769d-84b312288ed7\"" + } + ], + "type": "unsafe" + } + }, + "DeleteOrganizationHandle": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, + "GetOrganizationHandle": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "UpdateOrganizationHandle": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, "GetChannelByName": { "tag": "Microsoft Teams Integration", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 6c200ba36fd..fd0bedbc025 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2494,6 +2494,21 @@ def overrides "v2.global_variable_json_patch_type" => "GlobalVariableJsonPatchType", "v2.global_variable_response" => "GlobalVariableResponse", "v2.global_variable_type" => "GlobalVariableType", + "v2.google_chat_app_named_space_response" => "GoogleChatAppNamedSpaceResponse", + "v2.google_chat_app_named_space_response_attributes" => "GoogleChatAppNamedSpaceResponseAttributes", + "v2.google_chat_app_named_space_response_data" => "GoogleChatAppNamedSpaceResponseData", + "v2.google_chat_app_named_space_type" => "GoogleChatAppNamedSpaceType", + "v2.google_chat_create_organization_handle_request" => "GoogleChatCreateOrganizationHandleRequest", + "v2.google_chat_create_organization_handle_request_attributes" => "GoogleChatCreateOrganizationHandleRequestAttributes", + "v2.google_chat_create_organization_handle_request_data" => "GoogleChatCreateOrganizationHandleRequestData", + "v2.google_chat_organization_handle_response" => "GoogleChatOrganizationHandleResponse", + "v2.google_chat_organization_handle_response_attributes" => "GoogleChatOrganizationHandleResponseAttributes", + "v2.google_chat_organization_handle_response_data" => "GoogleChatOrganizationHandleResponseData", + "v2.google_chat_organization_handles_response" => "GoogleChatOrganizationHandlesResponse", + "v2.google_chat_organization_handle_type" => "GoogleChatOrganizationHandleType", + "v2.google_chat_update_organization_handle_request" => "GoogleChatUpdateOrganizationHandleRequest", + "v2.google_chat_update_organization_handle_request_attributes" => "GoogleChatUpdateOrganizationHandleRequestAttributes", + "v2.google_chat_update_organization_handle_request_data" => "GoogleChatUpdateOrganizationHandleRequestData", "v2.google_meet_configuration_reference" => "GoogleMeetConfigurationReference", "v2.google_meet_configuration_reference_data" => "GoogleMeetConfigurationReferenceData", "v2.grey_noise_api_key" => "GreyNoiseAPIKey", @@ -4833,6 +4848,7 @@ def overrides "v2.fastly_integration_api" => "FastlyIntegrationAPI", "v2.fleet_automation_api" => "FleetAutomationAPI", "v2.gcp_integration_api" => "GCPIntegrationAPI", + "v2.google_chat_integration_api" => "GoogleChatIntegrationAPI", "v2.incident_services_api" => "IncidentServicesAPI", "v2.incident_teams_api" => "IncidentTeamsAPI", "v2.incidents_api" => "IncidentsAPI", diff --git a/lib/datadog_api_client/v2/api/google_chat_integration_api.rb b/lib/datadog_api_client/v2/api/google_chat_integration_api.rb new file mode 100644 index 00000000000..266fbd1d256 --- /dev/null +++ b/lib/datadog_api_client/v2/api/google_chat_integration_api.rb @@ -0,0 +1,450 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class GoogleChatIntegrationAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create organization handle. + # + # @see #create_organization_handle_with_http_info + def create_organization_handle(organization_binding_id, body, opts = {}) + data, _status_code, _headers = create_organization_handle_with_http_info(organization_binding_id, body, opts) + data + end + + # Create organization handle. + # + # Create an organization handle in the Datadog Google Chat integration. + # + # @param organization_binding_id [String] Your organization binding ID. + # @param body [GoogleChatCreateOrganizationHandleRequest] Organization handle payload. + # @param opts [Hash] the optional parameters + # @return [Array<(GoogleChatOrganizationHandleResponse, Integer, Hash)>] GoogleChatOrganizationHandleResponse data, response status code and response headers + def create_organization_handle_with_http_info(organization_binding_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoogleChatIntegrationAPI.create_organization_handle ...' + end + # verify the required parameter 'organization_binding_id' is set + if @api_client.config.client_side_validation && organization_binding_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_binding_id' when calling GoogleChatIntegrationAPI.create_organization_handle" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling GoogleChatIntegrationAPI.create_organization_handle" + end + # resource path + local_var_path = '/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles'.sub('{organization_binding_id}', CGI.escape(organization_binding_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'GoogleChatOrganizationHandleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_organization_handle, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoogleChatIntegrationAPI#create_organization_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete organization handle. + # + # @see #delete_organization_handle_with_http_info + def delete_organization_handle(organization_binding_id, handle_id, opts = {}) + delete_organization_handle_with_http_info(organization_binding_id, handle_id, opts) + nil + end + + # Delete organization handle. + # + # Delete an organization handle from the Datadog Google Chat integration. + # + # @param organization_binding_id [String] Your organization binding ID. + # @param handle_id [String] Your organization handle ID. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_organization_handle_with_http_info(organization_binding_id, handle_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoogleChatIntegrationAPI.delete_organization_handle ...' + end + # verify the required parameter 'organization_binding_id' is set + if @api_client.config.client_side_validation && organization_binding_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_binding_id' when calling GoogleChatIntegrationAPI.delete_organization_handle" + end + # verify the required parameter 'handle_id' is set + if @api_client.config.client_side_validation && handle_id.nil? + fail ArgumentError, "Missing the required parameter 'handle_id' when calling GoogleChatIntegrationAPI.delete_organization_handle" + end + # resource path + local_var_path = '/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}'.sub('{organization_binding_id}', CGI.escape(organization_binding_id.to_s).gsub('%2F', '/')).sub('{handle_id}', CGI.escape(handle_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_organization_handle, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoogleChatIntegrationAPI#delete_organization_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get organization handle. + # + # @see #get_organization_handle_with_http_info + def get_organization_handle(organization_binding_id, handle_id, opts = {}) + data, _status_code, _headers = get_organization_handle_with_http_info(organization_binding_id, handle_id, opts) + data + end + + # Get organization handle. + # + # Get an organization handle from the Datadog Google Chat integration. + # + # @param organization_binding_id [String] Your organization binding ID. + # @param handle_id [String] Your organization handle ID. + # @param opts [Hash] the optional parameters + # @return [Array<(GoogleChatOrganizationHandleResponse, Integer, Hash)>] GoogleChatOrganizationHandleResponse data, response status code and response headers + def get_organization_handle_with_http_info(organization_binding_id, handle_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoogleChatIntegrationAPI.get_organization_handle ...' + end + # verify the required parameter 'organization_binding_id' is set + if @api_client.config.client_side_validation && organization_binding_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_binding_id' when calling GoogleChatIntegrationAPI.get_organization_handle" + end + # verify the required parameter 'handle_id' is set + if @api_client.config.client_side_validation && handle_id.nil? + fail ArgumentError, "Missing the required parameter 'handle_id' when calling GoogleChatIntegrationAPI.get_organization_handle" + end + # resource path + local_var_path = '/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}'.sub('{organization_binding_id}', CGI.escape(organization_binding_id.to_s).gsub('%2F', '/')).sub('{handle_id}', CGI.escape(handle_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GoogleChatOrganizationHandleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_organization_handle, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoogleChatIntegrationAPI#get_organization_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get space information by display name. + # + # @see #get_space_by_display_name_with_http_info + def get_space_by_display_name(domain_name, space_display_name, opts = {}) + data, _status_code, _headers = get_space_by_display_name_with_http_info(domain_name, space_display_name, opts) + data + end + + # Get space information by display name. + # + # Get the resource name and organization binding ID of a space in the Datadog Google Chat integration. + # + # @param domain_name [String] The Google Chat domain name. + # @param space_display_name [String] The Google Chat space display name. + # @param opts [Hash] the optional parameters + # @return [Array<(GoogleChatAppNamedSpaceResponse, Integer, Hash)>] GoogleChatAppNamedSpaceResponse data, response status code and response headers + def get_space_by_display_name_with_http_info(domain_name, space_display_name, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoogleChatIntegrationAPI.get_space_by_display_name ...' + end + # verify the required parameter 'domain_name' is set + if @api_client.config.client_side_validation && domain_name.nil? + fail ArgumentError, "Missing the required parameter 'domain_name' when calling GoogleChatIntegrationAPI.get_space_by_display_name" + end + # verify the required parameter 'space_display_name' is set + if @api_client.config.client_side_validation && space_display_name.nil? + fail ArgumentError, "Missing the required parameter 'space_display_name' when calling GoogleChatIntegrationAPI.get_space_by_display_name" + end + # resource path + local_var_path = '/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}'.sub('{domain_name}', CGI.escape(domain_name.to_s).gsub('%2F', '/')).sub('{space_display_name}', CGI.escape(space_display_name.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GoogleChatAppNamedSpaceResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_space_by_display_name, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoogleChatIntegrationAPI#get_space_by_display_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get all organization handles. + # + # @see #list_organization_handles_with_http_info + def list_organization_handles(organization_binding_id, opts = {}) + data, _status_code, _headers = list_organization_handles_with_http_info(organization_binding_id, opts) + data + end + + # Get all organization handles. + # + # Get a list of all organization handles from the Datadog Google Chat integration. + # + # @param organization_binding_id [String] Your organization binding ID. + # @param opts [Hash] the optional parameters + # @return [Array<(GoogleChatOrganizationHandlesResponse, Integer, Hash)>] GoogleChatOrganizationHandlesResponse data, response status code and response headers + def list_organization_handles_with_http_info(organization_binding_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoogleChatIntegrationAPI.list_organization_handles ...' + end + # verify the required parameter 'organization_binding_id' is set + if @api_client.config.client_side_validation && organization_binding_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_binding_id' when calling GoogleChatIntegrationAPI.list_organization_handles" + end + # resource path + local_var_path = '/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles'.sub('{organization_binding_id}', CGI.escape(organization_binding_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GoogleChatOrganizationHandlesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_organization_handles, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoogleChatIntegrationAPI#list_organization_handles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update organization handle. + # + # @see #update_organization_handle_with_http_info + def update_organization_handle(organization_binding_id, handle_id, body, opts = {}) + data, _status_code, _headers = update_organization_handle_with_http_info(organization_binding_id, handle_id, body, opts) + data + end + + # Update organization handle. + # + # Update an organization handle from the Datadog Google Chat integration. + # + # @param organization_binding_id [String] Your organization binding ID. + # @param handle_id [String] Your organization handle ID. + # @param body [GoogleChatUpdateOrganizationHandleRequest] Organization handle payload. + # @param opts [Hash] the optional parameters + # @return [Array<(GoogleChatOrganizationHandleResponse, Integer, Hash)>] GoogleChatOrganizationHandleResponse data, response status code and response headers + def update_organization_handle_with_http_info(organization_binding_id, handle_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GoogleChatIntegrationAPI.update_organization_handle ...' + end + # verify the required parameter 'organization_binding_id' is set + if @api_client.config.client_side_validation && organization_binding_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_binding_id' when calling GoogleChatIntegrationAPI.update_organization_handle" + end + # verify the required parameter 'handle_id' is set + if @api_client.config.client_side_validation && handle_id.nil? + fail ArgumentError, "Missing the required parameter 'handle_id' when calling GoogleChatIntegrationAPI.update_organization_handle" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling GoogleChatIntegrationAPI.update_organization_handle" + end + # resource path + local_var_path = '/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}'.sub('{organization_binding_id}', CGI.escape(organization_binding_id.to_s).gsub('%2F', '/')).sub('{handle_id}', CGI.escape(handle_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'GoogleChatOrganizationHandleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_organization_handle, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GoogleChatIntegrationAPI#update_organization_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_app_named_space_response.rb b/lib/datadog_api_client/v2/models/google_chat_app_named_space_response.rb new file mode 100644 index 00000000000..ebfd02f3580 --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_app_named_space_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response of a Google Chat app named space. + class GoogleChatAppNamedSpaceResponse + include BaseGenericModel + + # Google Chat app named space data from a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'GoogleChatAppNamedSpaceResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatAppNamedSpaceResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_app_named_space_response_attributes.rb b/lib/datadog_api_client/v2/models/google_chat_app_named_space_response_attributes.rb new file mode 100644 index 00000000000..1f0f1695de8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_app_named_space_response_attributes.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Google Chat app named space attributes. + class GoogleChatAppNamedSpaceResponseAttributes + include BaseGenericModel + + # Google space display name. + attr_reader :display_name + + # Organization binding ID. + attr_reader :organization_binding_id + + # Google space resource name. + attr_reader :resource_name + + # Google space URI. + attr_reader :space_uri + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'display_name' => :'display_name', + :'organization_binding_id' => :'organization_binding_id', + :'resource_name' => :'resource_name', + :'space_uri' => :'space_uri' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'display_name' => :'String', + :'organization_binding_id' => :'String', + :'resource_name' => :'String', + :'space_uri' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatAppNamedSpaceResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'organization_binding_id') + self.organization_binding_id = attributes[:'organization_binding_id'] + end + + if attributes.key?(:'resource_name') + self.resource_name = attributes[:'resource_name'] + end + + if attributes.key?(:'space_uri') + self.space_uri = attributes[:'space_uri'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@display_name.nil? && @display_name.to_s.length > 255 + return false if !@organization_binding_id.nil? && @organization_binding_id.to_s.length > 255 + return false if !@resource_name.nil? && @resource_name.to_s.length > 255 + return false if !@space_uri.nil? && @space_uri.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param display_name [Object] Object to be assigned + # @!visibility private + def display_name=(display_name) + if !display_name.nil? && display_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 255.' + end + @display_name = display_name + end + + # Custom attribute writer method with validation + # @param organization_binding_id [Object] Object to be assigned + # @!visibility private + def organization_binding_id=(organization_binding_id) + if !organization_binding_id.nil? && organization_binding_id.to_s.length > 255 + fail ArgumentError, 'invalid value for "organization_binding_id", the character length must be smaller than or equal to 255.' + end + @organization_binding_id = organization_binding_id + end + + # Custom attribute writer method with validation + # @param resource_name [Object] Object to be assigned + # @!visibility private + def resource_name=(resource_name) + if !resource_name.nil? && resource_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "resource_name", the character length must be smaller than or equal to 255.' + end + @resource_name = resource_name + end + + # Custom attribute writer method with validation + # @param space_uri [Object] Object to be assigned + # @!visibility private + def space_uri=(space_uri) + if !space_uri.nil? && space_uri.to_s.length > 255 + fail ArgumentError, 'invalid value for "space_uri", the character length must be smaller than or equal to 255.' + end + @space_uri = space_uri + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + display_name == o.display_name && + organization_binding_id == o.organization_binding_id && + resource_name == o.resource_name && + space_uri == o.space_uri && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [display_name, organization_binding_id, resource_name, space_uri, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_app_named_space_response_data.rb b/lib/datadog_api_client/v2/models/google_chat_app_named_space_response_data.rb new file mode 100644 index 00000000000..b161a8c1b46 --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_app_named_space_response_data.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Google Chat app named space data from a response. + class GoogleChatAppNamedSpaceResponseData + include BaseGenericModel + + # Google Chat app named space attributes. + attr_accessor :attributes + + # The ID of the app named space. + attr_reader :id + + # Google Chat app named space resource type. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'GoogleChatAppNamedSpaceResponseAttributes', + :'id' => :'String', + :'type' => :'GoogleChatAppNamedSpaceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatAppNamedSpaceResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@id.nil? && @id.to_s.length > 100 + return false if !@id.nil? && @id.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if !id.nil? && id.to_s.length > 100 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 100.' + end + if !id.nil? && id.to_s.length < 1 + fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.' + end + @id = id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_app_named_space_type.rb b/lib/datadog_api_client/v2/models/google_chat_app_named_space_type.rb new file mode 100644 index 00000000000..60b1882a2ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_app_named_space_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Google Chat app named space resource type. + class GoogleChatAppNamedSpaceType + include BaseEnumModel + + GOOGLE_CHAT_APP_NAMED_SPACE_TYPE = "google-chat-app-named-space".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request.rb b/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request.rb new file mode 100644 index 00000000000..879bdc12f9a --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Create organization handle request. + class GoogleChatCreateOrganizationHandleRequest + include BaseGenericModel + + # Organization handle data for a create request. + attr_reader :data + + # Organization handle resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'GoogleChatCreateOrganizationHandleRequestData', + :'type' => :'GoogleChatOrganizationHandleType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatCreateOrganizationHandleRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request_attributes.rb b/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request_attributes.rb new file mode 100644 index 00000000000..ac1d5d0ce14 --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request_attributes.rb @@ -0,0 +1,152 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Organization handle attributes for a create request. + class GoogleChatCreateOrganizationHandleRequestAttributes + include BaseGenericModel + + # Organization handle name. + attr_reader :name + + # Google space resource name. + attr_reader :space_resource_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'space_resource_name' => :'space_resource_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'space_resource_name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatCreateOrganizationHandleRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'space_resource_name') + self.space_resource_name = attributes[:'space_resource_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @name.to_s.length > 255 + return false if @space_resource_name.nil? + return false if @space_resource_name.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + if name.to_s.length > 255 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param space_resource_name [Object] Object to be assigned + # @!visibility private + def space_resource_name=(space_resource_name) + if space_resource_name.nil? + fail ArgumentError, 'invalid value for "space_resource_name", space_resource_name cannot be nil.' + end + if space_resource_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "space_resource_name", the character length must be smaller than or equal to 255.' + end + @space_resource_name = space_resource_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + space_resource_name == o.space_resource_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, space_resource_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request_data.rb b/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request_data.rb new file mode 100644 index 00000000000..aebeedf9521 --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_create_organization_handle_request_data.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Organization handle data for a create request. + class GoogleChatCreateOrganizationHandleRequestData + include BaseGenericModel + + # Organization handle attributes for a create request. + attr_reader :attributes + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'GoogleChatCreateOrganizationHandleRequestAttributes' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatCreateOrganizationHandleRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_organization_handle_response.rb b/lib/datadog_api_client/v2/models/google_chat_organization_handle_response.rb new file mode 100644 index 00000000000..d2fac82173f --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_organization_handle_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response of a organization handle. + class GoogleChatOrganizationHandleResponse + include BaseGenericModel + + # Organization handle data from a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'GoogleChatOrganizationHandleResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatOrganizationHandleResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_organization_handle_response_attributes.rb b/lib/datadog_api_client/v2/models/google_chat_organization_handle_response_attributes.rb new file mode 100644 index 00000000000..0d754f0af3a --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_organization_handle_response_attributes.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Organization handle attributes. + class GoogleChatOrganizationHandleResponseAttributes + include BaseGenericModel + + # Organization handle name. + attr_reader :name + + # Google space display name. + attr_reader :space_display_name + + # Google space resource name. + attr_reader :space_resource_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'space_display_name' => :'space_display_name', + :'space_resource_name' => :'space_resource_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'space_display_name' => :'String', + :'space_resource_name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatOrganizationHandleResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'space_display_name') + self.space_display_name = attributes[:'space_display_name'] + end + + if attributes.key?(:'space_resource_name') + self.space_resource_name = attributes[:'space_resource_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@name.nil? && @name.to_s.length > 255 + return false if !@space_display_name.nil? && @space_display_name.to_s.length > 255 + return false if !@space_resource_name.nil? && @space_resource_name.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if !name.nil? && name.to_s.length > 255 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param space_display_name [Object] Object to be assigned + # @!visibility private + def space_display_name=(space_display_name) + if !space_display_name.nil? && space_display_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "space_display_name", the character length must be smaller than or equal to 255.' + end + @space_display_name = space_display_name + end + + # Custom attribute writer method with validation + # @param space_resource_name [Object] Object to be assigned + # @!visibility private + def space_resource_name=(space_resource_name) + if !space_resource_name.nil? && space_resource_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "space_resource_name", the character length must be smaller than or equal to 255.' + end + @space_resource_name = space_resource_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + space_display_name == o.space_display_name && + space_resource_name == o.space_resource_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, space_display_name, space_resource_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_organization_handle_response_data.rb b/lib/datadog_api_client/v2/models/google_chat_organization_handle_response_data.rb new file mode 100644 index 00000000000..10f640a2a0d --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_organization_handle_response_data.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Organization handle data from a response. + class GoogleChatOrganizationHandleResponseData + include BaseGenericModel + + # Organization handle attributes. + attr_accessor :attributes + + # The ID of the organization handle. + attr_reader :id + + # Organization handle resource type. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'GoogleChatOrganizationHandleResponseAttributes', + :'id' => :'String', + :'type' => :'GoogleChatOrganizationHandleType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatOrganizationHandleResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@id.nil? && @id.to_s.length > 100 + return false if !@id.nil? && @id.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if !id.nil? && id.to_s.length > 100 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 100.' + end + if !id.nil? && id.to_s.length < 1 + fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.' + end + @id = id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_organization_handle_type.rb b/lib/datadog_api_client/v2/models/google_chat_organization_handle_type.rb new file mode 100644 index 00000000000..e182d29b6c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_organization_handle_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Organization handle resource type. + class GoogleChatOrganizationHandleType + include BaseEnumModel + + GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE = "google-chat-organization-handle".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_organization_handles_response.rb b/lib/datadog_api_client/v2/models/google_chat_organization_handles_response.rb new file mode 100644 index 00000000000..9759bb0fb44 --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_organization_handles_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of organization handles. + class GoogleChatOrganizationHandlesResponse + include BaseGenericModel + + # An array of organization handles. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatOrganizationHandlesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request.rb b/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request.rb new file mode 100644 index 00000000000..01678f5762d --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Update organization handle request. + class GoogleChatUpdateOrganizationHandleRequest + include BaseGenericModel + + # Organization handle data for an update request. + attr_reader :data + + # Organization handle resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'GoogleChatUpdateOrganizationHandleRequestData', + :'type' => :'GoogleChatOrganizationHandleType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request_attributes.rb b/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request_attributes.rb new file mode 100644 index 00000000000..bd473a1ec2f --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request_attributes.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Organization handle attributes for an update request. + class GoogleChatUpdateOrganizationHandleRequestAttributes + include BaseGenericModel + + # Organization handle name. + attr_reader :name + + # Google space resource name. + attr_reader :space_resource_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'space_resource_name' => :'space_resource_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'space_resource_name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'space_resource_name') + self.space_resource_name = attributes[:'space_resource_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@name.nil? && @name.to_s.length > 255 + return false if !@space_resource_name.nil? && @space_resource_name.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if !name.nil? && name.to_s.length > 255 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param space_resource_name [Object] Object to be assigned + # @!visibility private + def space_resource_name=(space_resource_name) + if !space_resource_name.nil? && space_resource_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "space_resource_name", the character length must be smaller than or equal to 255.' + end + @space_resource_name = space_resource_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + space_resource_name == o.space_resource_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, space_resource_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request_data.rb b/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request_data.rb new file mode 100644 index 00000000000..65f3647cd0e --- /dev/null +++ b/lib/datadog_api_client/v2/models/google_chat_update_organization_handle_request_data.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Organization handle data for an update request. + class GoogleChatUpdateOrganizationHandleRequestData + include BaseGenericModel + + # Organization handle attributes for an update request. + attr_reader :attributes + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'GoogleChatUpdateOrganizationHandleRequestAttributes' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GoogleChatUpdateOrganizationHandleRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, additional_properties].hash + end + end +end