diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 1d81e8b2f75..8e66456bc78 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -494,6 +494,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 @@ -27435,6 +27463,207 @@ components: type: string x-enum-varnames: - GLOBAL_VARIABLES + GoogleChatAppNamedSpaceResponse: + description: Response with Google Chat space information. + properties: + data: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceResponseData' + required: + - data + type: object + GoogleChatAppNamedSpaceResponseAttributes: + description: Google Chat 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 space data from a response. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceResponseAttributes' + id: + description: The ID of the Google Chat 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 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 with an organization handle. Organization handle is a + handle for monitor notifications to a Google Chat space within a Google organization. + 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. Organization handle + is a handle for monitor notifications to a Google Chat space within a Google + organization. + 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 @@ -40869,8 +41098,6 @@ components: type: integer type: $ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType' - when_full: - $ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull' type: object ObservabilityPipelineMemoryBufferSizeOptions: description: Options for configuring a memory buffer by queue length. @@ -40882,8 +41109,6 @@ components: type: integer type: $ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType' - when_full: - $ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull' type: object ObservabilityPipelineMetadataEntry: description: A custom metadata entry. @@ -80778,6 +81003,177 @@ 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: + - description: Your organization binding ID. + in: path + name: organization_binding_id + required: true + schema: + type: string + - description: Your organization handle ID. + in: path + name: handle_id + required: true + schema: + type: string + 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/jira/accounts: get: description: Get all Jira accounts for the organization. @@ -103602,6 +103998,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: 'Configure High Availability Multi-Region (HAMR) connections between Datadog organizations. 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..ea2dcfddaef --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.frozen @@ -0,0 +1 @@ +2026-02-10T19:17:08.664Z \ 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..ca0326d8bd7 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Create-organization-handle-returns-CREATED-response.yml @@ -0,0 +1,40 @@ +http_interactions: +- recorded_at: Tue, 10 Feb 2026 19:17:08 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Create_organization_handle_returns_CREATED_response-1770751028","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":"dcad18fd-a3b1-4544-8fee-e1e2988204d8","type":"google-chat-organization-handle","attributes":{"name":"Test-Create_organization_handle_returns_CREATED_response-1770751028","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: Tue, 10 Feb 2026 19:17:08 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/dcad18fd-a3b1-4544-8fee-e1e2988204d8 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +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..874d0ee2e65 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-02-10T19:17:09.317Z \ 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..1aa810ed623 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Delete-organization-handle-returns-OK-response.yml @@ -0,0 +1,56 @@ +http_interactions: +- recorded_at: Tue, 10 Feb 2026 19:17:09 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Delete_organization_handle_returns_OK_response-1770751029","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":"e70e04d1-7547-47de-ad3b-41a345fd1abe","type":"google-chat-organization-handle","attributes":{"name":"Test-Delete_organization_handle_returns_OK_response-1770751029","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: Tue, 10 Feb 2026 19:17:09 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/e70e04d1-7547-47de-ad3b-41a345fd1abe + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Tue, 10 Feb 2026 19:17:09 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/e70e04d1-7547-47de-ad3b-41a345fd1abe + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +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..339a9835bb6 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-02-10T19:17:10.064Z \ 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..6970d11c559 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-all-organization-handles-returns-OK-response.yml @@ -0,0 +1,58 @@ +http_interactions: +- recorded_at: Tue, 10 Feb 2026 19:17:10 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Get_all_organization_handles_returns_OK_response-1770751030","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":"9c140b3f-05c1-4943-959a-cae272356979","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_all_organization_handles_returns_OK_response-1770751030","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: Tue, 10 Feb 2026 19:17:10 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":"9c140b3f-05c1-4943-959a-cae272356979","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_all_organization_handles_returns_OK_response-1770751030","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: Tue, 10 Feb 2026 19:17:10 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/9c140b3f-05c1-4943-959a-cae272356979 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +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..71947fc9496 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-02-10T19:17:11.045Z \ 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..8312296acea --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-organization-handle-returns-OK-response.yml @@ -0,0 +1,58 @@ +http_interactions: +- recorded_at: Tue, 10 Feb 2026 19:17:11 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Get_organization_handle_returns_OK_response-1770751031","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":"f712e551-628f-4688-be1d-cb69c69c9690","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_organization_handle_returns_OK_response-1770751031","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: Tue, 10 Feb 2026 19:17:11 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/f712e551-628f-4688-be1d-cb69c69c9690 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"f712e551-628f-4688-be1d-cb69c69c9690","type":"google-chat-organization-handle","attributes":{"name":"Test-Get_organization_handle_returns_OK_response-1770751031","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: Tue, 10 Feb 2026 19:17:11 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/f712e551-628f-4688-be1d-cb69c69c9690 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +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..d11f3c86a31 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Get-space-information-by-display-name-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-02-10T19:17:12.022Z \ 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..6166333266a --- /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: Tue, 10 Feb 2026 19:17:12 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..b30514cc3b6 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-02-10T19:17:12.337Z \ 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..eae38129df6 --- /dev/null +++ b/cassettes/features/v2/google_chat_integration/Update-organization-handle-returns-OK-response.yml @@ -0,0 +1,62 @@ +http_interactions: +- recorded_at: Tue, 10 Feb 2026 19:17:12 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1770751032","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":"b036578c-665f-4ff2-8785-ba4d00fc87b5","type":"google-chat-organization-handle","attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1770751032","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: Tue, 10 Feb 2026 19:17:12 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1770751032--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/b036578c-665f-4ff2-8785-ba4d00fc87b5 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"b036578c-665f-4ff2-8785-ba4d00fc87b5","type":"google-chat-organization-handle","attributes":{"name":"Test-Update_organization_handle_returns_OK_response-1770751032--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: Tue, 10 Feb 2026 19:17:12 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/b036578c-665f-4ff2-8785-ba4d00fc87b5 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +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 47cf73e3045..38cdd230367 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2338,6 +2338,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.DeleteJiraAccount" => { "account_id" => "UUID", }, diff --git a/features/v2/given.json b/features/v2/given.json index 3605ca7f8e7..678a7157c53 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -565,6 +565,22 @@ "tag": "GCP Integration", "operationId": "CreateGCPSTSAccount" }, + { + "parameters": [ + { + "name": "organization_binding_id", + "value": "\"e54cb570-c674-529c-769d-84b312288ed7\"" + }, + { + "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}" + } + ], + "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 5727d36b956..478c5781966 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2199,6 +2199,54 @@ "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": "organization_binding_id", + "origin": "path", + "source": "organization_binding_id" + }, + { + "name": "handle_id", + "source": "data.id" + } + ], + "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" + } + }, "ListJiraAccounts": { "tag": "Jira Integration", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c22c80ca427..381d0cf6f63 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2621,6 +2621,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", @@ -5299,6 +5314,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.high_availability_multi_region_api" => "HighAvailabilityMultiRegionAPI", "v2.incident_services_api" => "IncidentServicesAPI", "v2.incident_teams_api" => "IncidentTeamsAPI", 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..b47c4e79f7b --- /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 with Google Chat space information. + class GoogleChatAppNamedSpaceResponse + include BaseGenericModel + + # Google Chat 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..52568ea5592 --- /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 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..dae0d248d43 --- /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 space data from a response. + class GoogleChatAppNamedSpaceResponseData + include BaseGenericModel + + # Google Chat space attributes. + attr_accessor :attributes + + # The ID of the Google Chat space. + attr_reader :id + + # Google Chat 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..5fa8dc45f5d --- /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 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..d1e12a1e11a --- /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 with an organization handle. Organization handle is a handle for monitor notifications to a Google Chat space within a Google organization. + 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..9d264ffda2a --- /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. Organization handle is a handle for monitor notifications to a Google Chat space within a Google organization. + 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 diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_options.rb b/lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_options.rb index 76360b8bc15..eb67ff1e90d 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_options.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_options.rb @@ -27,9 +27,6 @@ class ObservabilityPipelineMemoryBufferOptions # The type of the buffer that will be configured, a memory buffer. attr_accessor :type - # Behavior when the buffer is full (block and stop accepting new events, or drop new events) - attr_accessor :when_full - attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -37,8 +34,7 @@ class ObservabilityPipelineMemoryBufferOptions def self.attribute_map { :'max_size' => :'max_size', - :'type' => :'type', - :'when_full' => :'when_full' + :'type' => :'type' } end @@ -47,8 +43,7 @@ def self.attribute_map def self.openapi_types { :'max_size' => :'Integer', - :'type' => :'ObservabilityPipelineBufferOptionsMemoryType', - :'when_full' => :'ObservabilityPipelineBufferOptionsWhenFull' + :'type' => :'ObservabilityPipelineBufferOptionsMemoryType' } end @@ -77,10 +72,6 @@ def initialize(attributes = {}) if attributes.key?(:'type') self.type = attributes[:'type'] end - - if attributes.key?(:'when_full') - self.when_full = attributes[:'when_full'] - end end # Returns the object in the form of hash, with additionalProperties support. @@ -111,7 +102,6 @@ def ==(o) self.class == o.class && max_size == o.max_size && type == o.type && - when_full == o.when_full && additional_properties == o.additional_properties end @@ -119,7 +109,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [max_size, type, when_full, additional_properties].hash + [max_size, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_size_options.rb b/lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_size_options.rb index f6d2b81f9e2..04f5e0b68aa 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_size_options.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_memory_buffer_size_options.rb @@ -27,9 +27,6 @@ class ObservabilityPipelineMemoryBufferSizeOptions # The type of the buffer that will be configured, a memory buffer. attr_accessor :type - # Behavior when the buffer is full (block and stop accepting new events, or drop new events) - attr_accessor :when_full - attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -37,8 +34,7 @@ class ObservabilityPipelineMemoryBufferSizeOptions def self.attribute_map { :'max_events' => :'max_events', - :'type' => :'type', - :'when_full' => :'when_full' + :'type' => :'type' } end @@ -47,8 +43,7 @@ def self.attribute_map def self.openapi_types { :'max_events' => :'Integer', - :'type' => :'ObservabilityPipelineBufferOptionsMemoryType', - :'when_full' => :'ObservabilityPipelineBufferOptionsWhenFull' + :'type' => :'ObservabilityPipelineBufferOptionsMemoryType' } end @@ -77,10 +72,6 @@ def initialize(attributes = {}) if attributes.key?(:'type') self.type = attributes[:'type'] end - - if attributes.key?(:'when_full') - self.when_full = attributes[:'when_full'] - end end # Returns the object in the form of hash, with additionalProperties support. @@ -111,7 +102,6 @@ def ==(o) self.class == o.class && max_events == o.max_events && type == o.type && - when_full == o.when_full && additional_properties == o.additional_properties end @@ -119,7 +109,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [max_events, type, when_full, additional_properties].hash + [max_events, type, additional_properties].hash end end end