diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9e32a13f42a..927020d4c92 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -467,6 +467,34 @@ components: items: $ref: '#/components/schemas/GetIssueIncludeQueryParameterItem' type: array + GoogleChatHandleIdPathParameter: + description: Your organization handle ID. + in: path + name: handle_id + required: true + schema: + type: string + GoogleChatOrganizationBindingIdPathParameter: + description: Your organization binding ID. + in: path + name: organization_binding_id + required: true + schema: + type: string + GoogleChatOrganizationDomainNamePathParameter: + description: The Google Chat domain name. + in: path + name: domain_name + required: true + schema: + type: string + GoogleChatOrganizationSpaceDisplayNamePathParameter: + description: The Google Chat space display name. + in: path + name: space_display_name + required: true + schema: + type: string IncidentIDPathParameter: description: The UUID of the incident. in: path @@ -25429,6 +25457,204 @@ components: type: string x-enum-varnames: - GLOBAL_VARIABLES + GoogleChatAppNamedSpaceResponse: + description: Response of a Google Chat app named space. + properties: + data: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceResponseData' + required: + - data + type: object + GoogleChatAppNamedSpaceResponseAttributes: + description: Google Chat app named space attributes. + properties: + display_name: + description: Google space display name. + example: Fake Space Name + maxLength: 255 + type: string + organization_binding_id: + description: Organization binding ID. + example: 2f18a894-adb5-4c53-8248-39fd3f5386a5 + maxLength: 255 + type: string + resource_name: + description: Google space resource name. + example: spaces/AAAAAAAAA + maxLength: 255 + type: string + space_uri: + description: Google space URI. + example: https://chat.google.com/room/AAAAAAAAA + maxLength: 255 + type: string + type: object + GoogleChatAppNamedSpaceResponseData: + description: Google Chat app named space data from a response. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceResponseAttributes' + id: + description: The ID of the app named space. + example: 596da4af-0563-4097-90ff-07230c3f9db3 + maxLength: 100 + minLength: 1 + type: string + type: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceType' + type: object + GoogleChatAppNamedSpaceType: + default: google-chat-app-named-space + description: Google Chat app named space resource type. + enum: + - google-chat-app-named-space + example: google-chat-app-named-space + type: string + x-enum-varnames: + - GOOGLE_CHAT_APP_NAMED_SPACE_TYPE + GoogleChatCreateOrganizationHandleRequest: + description: Create organization handle request. + properties: + data: + $ref: '#/components/schemas/GoogleChatCreateOrganizationHandleRequestData' + type: + $ref: '#/components/schemas/GoogleChatOrganizationHandleType' + required: + - type + - data + type: object + GoogleChatCreateOrganizationHandleRequestAttributes: + description: Organization handle attributes for a create request. + properties: + name: + description: Organization handle name. + example: fake-handle-name + maxLength: 255 + type: string + space_resource_name: + description: Google space resource name. + example: spaces/AAAAAAAAA + maxLength: 255 + type: string + required: + - name + - space_resource_name + type: object + GoogleChatCreateOrganizationHandleRequestData: + description: Organization handle data for a create request. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatCreateOrganizationHandleRequestAttributes' + required: + - attributes + type: object + GoogleChatOrganizationHandleResponse: + description: Response of a organization handle. + properties: + data: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponseData' + required: + - data + type: object + GoogleChatOrganizationHandleResponseAttributes: + description: Organization handle attributes. + properties: + name: + description: Organization handle name. + example: fake-handle-name + maxLength: 255 + type: string + space_display_name: + description: Google space display name. + example: Fake Space Name + maxLength: 255 + type: string + space_resource_name: + description: Google space resource name. + example: spaces/AAAAAAAAA + maxLength: 255 + type: string + type: object + GoogleChatOrganizationHandleResponseData: + description: Organization handle data from a response. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponseAttributes' + id: + description: The ID of the organization handle. + example: 596da4af-0563-4097-90ff-07230c3f9db3 + maxLength: 100 + minLength: 1 + type: string + type: + $ref: '#/components/schemas/GoogleChatOrganizationHandleType' + type: object + GoogleChatOrganizationHandleType: + default: google-chat-organization-handle + description: Organization handle resource type. + enum: + - google-chat-organization-handle + example: google-chat-organization-handle + type: string + x-enum-varnames: + - GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE + GoogleChatOrganizationHandlesResponse: + description: Response with a list of organization handles. + properties: + data: + description: An array of organization handles. + example: + - attributes: + name: general-handle + space_display_name: General + space_resource_name: spaces/AAAAAAAAA + id: 596da4af-0563-4097-90ff-07230c3f9db3 + type: google-chat-organization-handle + - attributes: + name: general-handle-2 + space_display_name: General2 + space_resource_name: spaces/BBBBBBBBB + id: 596da4af-0563-4097-90ff-07230c3f9db4 + type: google-chat-organization-handle + items: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponseData' + type: array + required: + - data + type: object + GoogleChatUpdateOrganizationHandleRequest: + description: Update organization handle request. + properties: + data: + $ref: '#/components/schemas/GoogleChatUpdateOrganizationHandleRequestData' + type: + $ref: '#/components/schemas/GoogleChatOrganizationHandleType' + required: + - type + - data + type: object + GoogleChatUpdateOrganizationHandleRequestAttributes: + description: Organization handle attributes for an update request. + properties: + name: + description: Organization handle name. + example: fake-handle-name + maxLength: 255 + type: string + space_resource_name: + description: Google space resource name. + example: spaces/AAAAAAAAA + maxLength: 255 + type: string + type: object + GoogleChatUpdateOrganizationHandleRequestData: + description: Organization handle data for an update request. + properties: + attributes: + $ref: '#/components/schemas/GoogleChatUpdateOrganizationHandleRequestAttributes' + required: + - attributes + type: object GoogleMeetConfigurationReference: description: A reference to a Google Meet Configuration resource. nullable: true @@ -72559,6 +72785,167 @@ paths: operator: OR permissions: - gcp_configuration_edit + /api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}: + get: + description: Get the resource name and organization binding ID of a space in + the Datadog Google Chat integration. + operationId: GetSpaceByDisplayName + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationDomainNamePathParameter' + - $ref: '#/components/parameters/GoogleChatOrganizationSpaceDisplayNamePathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatAppNamedSpaceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get space information by display name + tags: + - Google Chat Integration + /api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles: + get: + description: Get a list of all organization handles from the Datadog Google + Chat integration. + operationId: ListOrganizationHandles + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatOrganizationHandlesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all organization handles + tags: + - Google Chat Integration + post: + description: Create an organization handle in the Datadog Google Chat integration. + operationId: CreateOrganizationHandle + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatCreateOrganizationHandleRequest' + description: Organization handle payload. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create organization handle + tags: + - Google Chat Integration + x-codegen-request-body-name: body + /api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}: + delete: + description: Delete an organization handle from the Datadog Google Chat integration. + operationId: DeleteOrganizationHandle + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + - $ref: '#/components/parameters/GoogleChatHandleIdPathParameter' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete organization handle + tags: + - Google Chat Integration + get: + description: Get an organization handle from the Datadog Google Chat integration. + operationId: GetOrganizationHandle + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + - $ref: '#/components/parameters/GoogleChatHandleIdPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get organization handle + tags: + - Google Chat Integration + patch: + description: Update an organization handle from the Datadog Google Chat integration. + operationId: UpdateOrganizationHandle + parameters: + - $ref: '#/components/parameters/GoogleChatOrganizationBindingIdPathParameter' + - $ref: '#/components/parameters/GoogleChatHandleIdPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatUpdateOrganizationHandleRequest' + description: Organization handle payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GoogleChatOrganizationHandleResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update organization handle + tags: + - Google Chat Integration + x-codegen-request-body-name: body /api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}: get: description: Get the tenant, team, and channel ID of a channel in the Datadog @@ -92012,6 +92399,14 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/google_cloud_platform name: GCP Integration +- description: 'Configure your [Datadog Google Chat integration](https://docs.datadoghq.com/integrations/google-hangouts-chat/) + + directly through the Datadog API.' + externalDocs: + description: For more information about the Datadog Google Chat integration, see + the integration page. + url: https://docs.datadoghq.com/integrations/google-hangouts-chat/ + name: Google Chat Integration - description: 'The IP allowlist API is used to manage the IP addresses that can access the Datadog API and web UI. It does not block diff --git a/examples/v2/google-chat-integration/CreateOrganizationHandle.java b/examples/v2/google-chat-integration/CreateOrganizationHandle.java new file mode 100644 index 00000000000..45b0f4d73e0 --- /dev/null +++ b/examples/v2/google-chat-integration/CreateOrganizationHandle.java @@ -0,0 +1,40 @@ +// Create organization handle returns "CREATED" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatCreateOrganizationHandleRequest; +import com.datadog.api.client.v2.model.GoogleChatCreateOrganizationHandleRequestAttributes; +import com.datadog.api.client.v2.model.GoogleChatCreateOrganizationHandleRequestData; +import com.datadog.api.client.v2.model.GoogleChatOrganizationHandleResponse; +import com.datadog.api.client.v2.model.GoogleChatOrganizationHandleType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + GoogleChatCreateOrganizationHandleRequest body = + new GoogleChatCreateOrganizationHandleRequest() + .data( + new GoogleChatCreateOrganizationHandleRequestData() + .attributes( + new GoogleChatCreateOrganizationHandleRequestAttributes() + .name("Example-Google-Chat-Integration") + .spaceResourceName("spaces/AAQA-zFIks8"))) + .type(GoogleChatOrganizationHandleType.GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE); + + try { + GoogleChatOrganizationHandleResponse result = + apiInstance.createOrganizationHandle("e54cb570-c674-529c-769d-84b312288ed7", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#createOrganizationHandle"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/DeleteOrganizationHandle.java b/examples/v2/google-chat-integration/DeleteOrganizationHandle.java new file mode 100644 index 00000000000..051224cf7af --- /dev/null +++ b/examples/v2/google-chat-integration/DeleteOrganizationHandle.java @@ -0,0 +1,27 @@ +// Delete organization handle returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + // there is a valid "organization_handle" in the system + String ORGANIZATION_HANDLE_DATA_ID = System.getenv("ORGANIZATION_HANDLE_DATA_ID"); + + try { + apiInstance.deleteOrganizationHandle( + "e54cb570-c674-529c-769d-84b312288ed7", ORGANIZATION_HANDLE_DATA_ID); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#deleteOrganizationHandle"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/GetOrganizationHandle.java b/examples/v2/google-chat-integration/GetOrganizationHandle.java new file mode 100644 index 00000000000..edf15b791c8 --- /dev/null +++ b/examples/v2/google-chat-integration/GetOrganizationHandle.java @@ -0,0 +1,29 @@ +// Get organization handle returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatOrganizationHandleResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + // there is a valid "organization_handle" in the system + String ORGANIZATION_HANDLE_DATA_ID = System.getenv("ORGANIZATION_HANDLE_DATA_ID"); + + try { + GoogleChatOrganizationHandleResponse result = + apiInstance.getOrganizationHandle( + "e54cb570-c674-529c-769d-84b312288ed7", ORGANIZATION_HANDLE_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GoogleChatIntegrationApi#getOrganizationHandle"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/GetSpaceByDisplayName.java b/examples/v2/google-chat-integration/GetSpaceByDisplayName.java new file mode 100644 index 00000000000..c36c7259bcc --- /dev/null +++ b/examples/v2/google-chat-integration/GetSpaceByDisplayName.java @@ -0,0 +1,25 @@ +// Get space information by display name returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatAppNamedSpaceResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + GoogleChatAppNamedSpaceResponse result = + apiInstance.getSpaceByDisplayName("datadog.ninja", "api-test-space"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GoogleChatIntegrationApi#getSpaceByDisplayName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/ListOrganizationHandles.java b/examples/v2/google-chat-integration/ListOrganizationHandles.java new file mode 100644 index 00000000000..d8cb2b738a9 --- /dev/null +++ b/examples/v2/google-chat-integration/ListOrganizationHandles.java @@ -0,0 +1,25 @@ +// Get all organization handles returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatOrganizationHandlesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + GoogleChatOrganizationHandlesResponse result = + apiInstance.listOrganizationHandles("e54cb570-c674-529c-769d-84b312288ed7"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GoogleChatIntegrationApi#listOrganizationHandles"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/UpdateOrganizationHandle.java b/examples/v2/google-chat-integration/UpdateOrganizationHandle.java new file mode 100644 index 00000000000..e54b473877a --- /dev/null +++ b/examples/v2/google-chat-integration/UpdateOrganizationHandle.java @@ -0,0 +1,45 @@ +// Update organization handle returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatOrganizationHandleResponse; +import com.datadog.api.client.v2.model.GoogleChatOrganizationHandleType; +import com.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequest; +import com.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequestAttributes; +import com.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequestData; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + // there is a valid "organization_handle" in the system + String ORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME = + System.getenv("ORGANIZATION_HANDLE_DATA_ATTRIBUTES_NAME"); + String ORGANIZATION_HANDLE_DATA_ID = System.getenv("ORGANIZATION_HANDLE_DATA_ID"); + + GoogleChatUpdateOrganizationHandleRequest body = + new GoogleChatUpdateOrganizationHandleRequest() + .data( + new GoogleChatUpdateOrganizationHandleRequestData() + .attributes( + new GoogleChatUpdateOrganizationHandleRequestAttributes() + .name("fake-handle-name--updated"))) + .type(GoogleChatOrganizationHandleType.GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE); + + try { + GoogleChatOrganizationHandleResponse result = + apiInstance.updateOrganizationHandle( + "e54cb570-c674-529c-769d-84b312288ed7", ORGANIZATION_HANDLE_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#updateOrganizationHandle"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java new file mode 100644 index 00000000000..61e1c6a403f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java @@ -0,0 +1,1077 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.GoogleChatAppNamedSpaceResponse; +import com.datadog.api.client.v2.model.GoogleChatCreateOrganizationHandleRequest; +import com.datadog.api.client.v2.model.GoogleChatOrganizationHandleResponse; +import com.datadog.api.client.v2.model.GoogleChatOrganizationHandlesResponse; +import com.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequest; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatIntegrationApi { + private ApiClient apiClient; + + public GoogleChatIntegrationApi() { + this(ApiClient.getDefaultApiClient()); + } + + public GoogleChatIntegrationApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create organization handle. + * + *

See {@link #createOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param body Organization handle payload. (required) + * @return GoogleChatOrganizationHandleResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatOrganizationHandleResponse createOrganizationHandle( + String organizationBindingId, GoogleChatCreateOrganizationHandleRequest body) + throws ApiException { + return createOrganizationHandleWithHttpInfo(organizationBindingId, body).getData(); + } + + /** + * Create organization handle. + * + *

See {@link #createOrganizationHandleWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param body Organization handle payload. (required) + * @return CompletableFuture<GoogleChatOrganizationHandleResponse> + */ + public CompletableFuture createOrganizationHandleAsync( + String organizationBindingId, GoogleChatCreateOrganizationHandleRequest body) { + return createOrganizationHandleWithHttpInfoAsync(organizationBindingId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an organization handle in the Datadog Google Chat integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param body Organization handle payload. (required) + * @return ApiResponse<GoogleChatOrganizationHandleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 CREATED -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createOrganizationHandleWithHttpInfo( + String organizationBindingId, GoogleChatCreateOrganizationHandleRequest body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " createOrganizationHandle"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createOrganizationHandle"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.createOrganizationHandle", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create organization handle. + * + *

See {@link #createOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param body Organization handle payload. (required) + * @return CompletableFuture<ApiResponse<GoogleChatOrganizationHandleResponse>> + */ + public CompletableFuture> + createOrganizationHandleWithHttpInfoAsync( + String organizationBindingId, GoogleChatCreateOrganizationHandleRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " createOrganizationHandle")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createOrganizationHandle")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.createOrganizationHandle", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete organization handle. + * + *

See {@link #deleteOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteOrganizationHandle(String organizationBindingId, String handleId) + throws ApiException { + deleteOrganizationHandleWithHttpInfo(organizationBindingId, handleId); + } + + /** + * Delete organization handle. + * + *

See {@link #deleteOrganizationHandleWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteOrganizationHandleAsync( + String organizationBindingId, String handleId) { + return deleteOrganizationHandleWithHttpInfoAsync(organizationBindingId, handleId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an organization handle from the Datadog Google Chat integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse deleteOrganizationHandleWithHttpInfo( + String organizationBindingId, String handleId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " deleteOrganizationHandle"); + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'handleId' when calling deleteOrganizationHandle"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.deleteOrganizationHandle", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete organization handle. + * + *

See {@link #deleteOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteOrganizationHandleWithHttpInfoAsync( + String organizationBindingId, String handleId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " deleteOrganizationHandle")); + return result; + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'handleId' when calling deleteOrganizationHandle")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.deleteOrganizationHandle", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get organization handle. + * + *

See {@link #getOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return GoogleChatOrganizationHandleResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatOrganizationHandleResponse getOrganizationHandle( + String organizationBindingId, String handleId) throws ApiException { + return getOrganizationHandleWithHttpInfo(organizationBindingId, handleId).getData(); + } + + /** + * Get organization handle. + * + *

See {@link #getOrganizationHandleWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return CompletableFuture<GoogleChatOrganizationHandleResponse> + */ + public CompletableFuture getOrganizationHandleAsync( + String organizationBindingId, String handleId) { + return getOrganizationHandleWithHttpInfoAsync(organizationBindingId, handleId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an organization handle from the Datadog Google Chat integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return ApiResponse<GoogleChatOrganizationHandleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getOrganizationHandleWithHttpInfo( + String organizationBindingId, String handleId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getOrganizationHandle"); + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'handleId' when calling getOrganizationHandle"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getOrganizationHandle", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get organization handle. + * + *

See {@link #getOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return CompletableFuture<ApiResponse<GoogleChatOrganizationHandleResponse>> + */ + public CompletableFuture> + getOrganizationHandleWithHttpInfoAsync(String organizationBindingId, String handleId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getOrganizationHandle")); + return result; + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'handleId' when calling getOrganizationHandle")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getOrganizationHandle", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get space information by display name. + * + *

See {@link #getSpaceByDisplayNameWithHttpInfo}. + * + * @param domainName The Google Chat domain name. (required) + * @param spaceDisplayName The Google Chat space display name. (required) + * @return GoogleChatAppNamedSpaceResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatAppNamedSpaceResponse getSpaceByDisplayName( + String domainName, String spaceDisplayName) throws ApiException { + return getSpaceByDisplayNameWithHttpInfo(domainName, spaceDisplayName).getData(); + } + + /** + * Get space information by display name. + * + *

See {@link #getSpaceByDisplayNameWithHttpInfoAsync}. + * + * @param domainName The Google Chat domain name. (required) + * @param spaceDisplayName The Google Chat space display name. (required) + * @return CompletableFuture<GoogleChatAppNamedSpaceResponse> + */ + public CompletableFuture getSpaceByDisplayNameAsync( + String domainName, String spaceDisplayName) { + return getSpaceByDisplayNameWithHttpInfoAsync(domainName, spaceDisplayName) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the resource name and organization binding ID of a space in the Datadog Google Chat + * integration. + * + * @param domainName The Google Chat domain name. (required) + * @param spaceDisplayName The Google Chat space display name. (required) + * @return ApiResponse<GoogleChatAppNamedSpaceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getSpaceByDisplayNameWithHttpInfo( + String domainName, String spaceDisplayName) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'domainName' is set + if (domainName == null) { + throw new ApiException( + 400, "Missing the required parameter 'domainName' when calling getSpaceByDisplayName"); + } + + // verify the required parameter 'spaceDisplayName' is set + if (spaceDisplayName == null) { + throw new ApiException( + 400, + "Missing the required parameter 'spaceDisplayName' when calling getSpaceByDisplayName"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}" + .replaceAll( + "\\{" + "domain_name" + "\\}", apiClient.escapeString(domainName.toString())) + .replaceAll( + "\\{" + "space_display_name" + "\\}", + apiClient.escapeString(spaceDisplayName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getSpaceByDisplayName", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get space information by display name. + * + *

See {@link #getSpaceByDisplayNameWithHttpInfo}. + * + * @param domainName The Google Chat domain name. (required) + * @param spaceDisplayName The Google Chat space display name. (required) + * @return CompletableFuture<ApiResponse<GoogleChatAppNamedSpaceResponse>> + */ + public CompletableFuture> + getSpaceByDisplayNameWithHttpInfoAsync(String domainName, String spaceDisplayName) { + Object localVarPostBody = null; + + // verify the required parameter 'domainName' is set + if (domainName == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'domainName' when calling getSpaceByDisplayName")); + return result; + } + + // verify the required parameter 'spaceDisplayName' is set + if (spaceDisplayName == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'spaceDisplayName' when calling" + + " getSpaceByDisplayName")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}" + .replaceAll( + "\\{" + "domain_name" + "\\}", apiClient.escapeString(domainName.toString())) + .replaceAll( + "\\{" + "space_display_name" + "\\}", + apiClient.escapeString(spaceDisplayName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getSpaceByDisplayName", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get all organization handles. + * + *

See {@link #listOrganizationHandlesWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return GoogleChatOrganizationHandlesResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatOrganizationHandlesResponse listOrganizationHandles(String organizationBindingId) + throws ApiException { + return listOrganizationHandlesWithHttpInfo(organizationBindingId).getData(); + } + + /** + * Get all organization handles. + * + *

See {@link #listOrganizationHandlesWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return CompletableFuture<GoogleChatOrganizationHandlesResponse> + */ + public CompletableFuture listOrganizationHandlesAsync( + String organizationBindingId) { + return listOrganizationHandlesWithHttpInfoAsync(organizationBindingId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of all organization handles from the Datadog Google Chat integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return ApiResponse<GoogleChatOrganizationHandlesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listOrganizationHandlesWithHttpInfo( + String organizationBindingId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " listOrganizationHandles"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.listOrganizationHandles", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get all organization handles. + * + *

See {@link #listOrganizationHandlesWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return CompletableFuture<ApiResponse<GoogleChatOrganizationHandlesResponse>> + */ + public CompletableFuture> + listOrganizationHandlesWithHttpInfoAsync(String organizationBindingId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " listOrganizationHandles")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.listOrganizationHandles", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update organization handle. + * + *

See {@link #updateOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @param body Organization handle payload. (required) + * @return GoogleChatOrganizationHandleResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatOrganizationHandleResponse updateOrganizationHandle( + String organizationBindingId, String handleId, GoogleChatUpdateOrganizationHandleRequest body) + throws ApiException { + return updateOrganizationHandleWithHttpInfo(organizationBindingId, handleId, body).getData(); + } + + /** + * Update organization handle. + * + *

See {@link #updateOrganizationHandleWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @param body Organization handle payload. (required) + * @return CompletableFuture<GoogleChatOrganizationHandleResponse> + */ + public CompletableFuture updateOrganizationHandleAsync( + String organizationBindingId, + String handleId, + GoogleChatUpdateOrganizationHandleRequest body) { + return updateOrganizationHandleWithHttpInfoAsync(organizationBindingId, handleId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an organization handle from the Datadog Google Chat integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @param body Organization handle payload. (required) + * @return ApiResponse<GoogleChatOrganizationHandleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse updateOrganizationHandleWithHttpInfo( + String organizationBindingId, String handleId, GoogleChatUpdateOrganizationHandleRequest body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " updateOrganizationHandle"); + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'handleId' when calling updateOrganizationHandle"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateOrganizationHandle"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.updateOrganizationHandle", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update organization handle. + * + *

See {@link #updateOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @param body Organization handle payload. (required) + * @return CompletableFuture<ApiResponse<GoogleChatOrganizationHandleResponse>> + */ + public CompletableFuture> + updateOrganizationHandleWithHttpInfoAsync( + String organizationBindingId, + String handleId, + GoogleChatUpdateOrganizationHandleRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " updateOrganizationHandle")); + return result; + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'handleId' when calling updateOrganizationHandle")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateOrganizationHandle")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.updateOrganizationHandle", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponse.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponse.java new file mode 100644 index 00000000000..3f2008b95a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponse.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response of a Google Chat app named space. */ +@JsonPropertyOrder({GoogleChatAppNamedSpaceResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatAppNamedSpaceResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatAppNamedSpaceResponseData data; + + public GoogleChatAppNamedSpaceResponse() {} + + @JsonCreator + public GoogleChatAppNamedSpaceResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GoogleChatAppNamedSpaceResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GoogleChatAppNamedSpaceResponse data(GoogleChatAppNamedSpaceResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Chat app named space data from a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatAppNamedSpaceResponseData getData() { + return data; + } + + public void setData(GoogleChatAppNamedSpaceResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatAppNamedSpaceResponse + */ + @JsonAnySetter + public GoogleChatAppNamedSpaceResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatAppNamedSpaceResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatAppNamedSpaceResponse googleChatAppNamedSpaceResponse = + (GoogleChatAppNamedSpaceResponse) o; + return Objects.equals(this.data, googleChatAppNamedSpaceResponse.data) + && Objects.equals( + this.additionalProperties, googleChatAppNamedSpaceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatAppNamedSpaceResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponseAttributes.java new file mode 100644 index 00000000000..dedab419f76 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponseAttributes.java @@ -0,0 +1,227 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Google Chat app named space attributes. */ +@JsonPropertyOrder({ + GoogleChatAppNamedSpaceResponseAttributes.JSON_PROPERTY_DISPLAY_NAME, + GoogleChatAppNamedSpaceResponseAttributes.JSON_PROPERTY_ORGANIZATION_BINDING_ID, + GoogleChatAppNamedSpaceResponseAttributes.JSON_PROPERTY_RESOURCE_NAME, + GoogleChatAppNamedSpaceResponseAttributes.JSON_PROPERTY_SPACE_URI +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatAppNamedSpaceResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_ORGANIZATION_BINDING_ID = "organization_binding_id"; + private String organizationBindingId; + + public static final String JSON_PROPERTY_RESOURCE_NAME = "resource_name"; + private String resourceName; + + public static final String JSON_PROPERTY_SPACE_URI = "space_uri"; + private String spaceUri; + + public GoogleChatAppNamedSpaceResponseAttributes displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Google space display name. + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public GoogleChatAppNamedSpaceResponseAttributes organizationBindingId( + String organizationBindingId) { + this.organizationBindingId = organizationBindingId; + return this; + } + + /** + * Organization binding ID. + * + * @return organizationBindingId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORGANIZATION_BINDING_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrganizationBindingId() { + return organizationBindingId; + } + + public void setOrganizationBindingId(String organizationBindingId) { + this.organizationBindingId = organizationBindingId; + } + + public GoogleChatAppNamedSpaceResponseAttributes resourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Google space resource name. + * + * @return resourceName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public GoogleChatAppNamedSpaceResponseAttributes spaceUri(String spaceUri) { + this.spaceUri = spaceUri; + return this; + } + + /** + * Google space URI. + * + * @return spaceUri + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPACE_URI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSpaceUri() { + return spaceUri; + } + + public void setSpaceUri(String spaceUri) { + this.spaceUri = spaceUri; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatAppNamedSpaceResponseAttributes + */ + @JsonAnySetter + public GoogleChatAppNamedSpaceResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatAppNamedSpaceResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatAppNamedSpaceResponseAttributes googleChatAppNamedSpaceResponseAttributes = + (GoogleChatAppNamedSpaceResponseAttributes) o; + return Objects.equals(this.displayName, googleChatAppNamedSpaceResponseAttributes.displayName) + && Objects.equals( + this.organizationBindingId, + googleChatAppNamedSpaceResponseAttributes.organizationBindingId) + && Objects.equals(this.resourceName, googleChatAppNamedSpaceResponseAttributes.resourceName) + && Objects.equals(this.spaceUri, googleChatAppNamedSpaceResponseAttributes.spaceUri) + && Objects.equals( + this.additionalProperties, + googleChatAppNamedSpaceResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + displayName, organizationBindingId, resourceName, spaceUri, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatAppNamedSpaceResponseAttributes {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" organizationBindingId: ") + .append(toIndentedString(organizationBindingId)) + .append("\n"); + sb.append(" resourceName: ").append(toIndentedString(resourceName)).append("\n"); + sb.append(" spaceUri: ").append(toIndentedString(spaceUri)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponseData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponseData.java new file mode 100644 index 00000000000..77c8185a265 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceResponseData.java @@ -0,0 +1,200 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Google Chat app named space data from a response. */ +@JsonPropertyOrder({ + GoogleChatAppNamedSpaceResponseData.JSON_PROPERTY_ATTRIBUTES, + GoogleChatAppNamedSpaceResponseData.JSON_PROPERTY_ID, + GoogleChatAppNamedSpaceResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatAppNamedSpaceResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatAppNamedSpaceResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatAppNamedSpaceType type = + GoogleChatAppNamedSpaceType.GOOGLE_CHAT_APP_NAMED_SPACE_TYPE; + + public GoogleChatAppNamedSpaceResponseData attributes( + GoogleChatAppNamedSpaceResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Google Chat app named space attributes. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatAppNamedSpaceResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatAppNamedSpaceResponseAttributes attributes) { + this.attributes = attributes; + } + + public GoogleChatAppNamedSpaceResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the app named space. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public GoogleChatAppNamedSpaceResponseData type(GoogleChatAppNamedSpaceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat app named space resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatAppNamedSpaceType getType() { + return type; + } + + public void setType(GoogleChatAppNamedSpaceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatAppNamedSpaceResponseData + */ + @JsonAnySetter + public GoogleChatAppNamedSpaceResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatAppNamedSpaceResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatAppNamedSpaceResponseData googleChatAppNamedSpaceResponseData = + (GoogleChatAppNamedSpaceResponseData) o; + return Objects.equals(this.attributes, googleChatAppNamedSpaceResponseData.attributes) + && Objects.equals(this.id, googleChatAppNamedSpaceResponseData.id) + && Objects.equals(this.type, googleChatAppNamedSpaceResponseData.type) + && Objects.equals( + this.additionalProperties, googleChatAppNamedSpaceResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatAppNamedSpaceResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceType.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceType.java new file mode 100644 index 00000000000..72a2b024ca1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatAppNamedSpaceType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Google Chat app named space resource type. */ +@JsonSerialize(using = GoogleChatAppNamedSpaceType.GoogleChatAppNamedSpaceTypeSerializer.class) +public class GoogleChatAppNamedSpaceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("google-chat-app-named-space")); + + public static final GoogleChatAppNamedSpaceType GOOGLE_CHAT_APP_NAMED_SPACE_TYPE = + new GoogleChatAppNamedSpaceType("google-chat-app-named-space"); + + GoogleChatAppNamedSpaceType(String value) { + super(value, allowedValues); + } + + public static class GoogleChatAppNamedSpaceTypeSerializer + extends StdSerializer { + public GoogleChatAppNamedSpaceTypeSerializer(Class t) { + super(t); + } + + public GoogleChatAppNamedSpaceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GoogleChatAppNamedSpaceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GoogleChatAppNamedSpaceType fromValue(String value) { + return new GoogleChatAppNamedSpaceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequest.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequest.java new file mode 100644 index 00000000000..672232eff0d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequest.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Create organization handle request. */ +@JsonPropertyOrder({ + GoogleChatCreateOrganizationHandleRequest.JSON_PROPERTY_DATA, + GoogleChatCreateOrganizationHandleRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatCreateOrganizationHandleRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatCreateOrganizationHandleRequestData data; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatOrganizationHandleType type = + GoogleChatOrganizationHandleType.GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE; + + public GoogleChatCreateOrganizationHandleRequest() {} + + @JsonCreator + public GoogleChatCreateOrganizationHandleRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GoogleChatCreateOrganizationHandleRequestData data, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + GoogleChatOrganizationHandleType type) { + this.data = data; + this.unparsed |= data.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GoogleChatCreateOrganizationHandleRequest data( + GoogleChatCreateOrganizationHandleRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Organization handle data for a create request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatCreateOrganizationHandleRequestData getData() { + return data; + } + + public void setData(GoogleChatCreateOrganizationHandleRequestData data) { + this.data = data; + } + + public GoogleChatCreateOrganizationHandleRequest type(GoogleChatOrganizationHandleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Organization handle resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatOrganizationHandleType getType() { + return type; + } + + public void setType(GoogleChatOrganizationHandleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatCreateOrganizationHandleRequest + */ + @JsonAnySetter + public GoogleChatCreateOrganizationHandleRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatCreateOrganizationHandleRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatCreateOrganizationHandleRequest googleChatCreateOrganizationHandleRequest = + (GoogleChatCreateOrganizationHandleRequest) o; + return Objects.equals(this.data, googleChatCreateOrganizationHandleRequest.data) + && Objects.equals(this.type, googleChatCreateOrganizationHandleRequest.type) + && Objects.equals( + this.additionalProperties, + googleChatCreateOrganizationHandleRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatCreateOrganizationHandleRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequestAttributes.java new file mode 100644 index 00000000000..c423c04c0c0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequestAttributes.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Organization handle attributes for a create request. */ +@JsonPropertyOrder({ + GoogleChatCreateOrganizationHandleRequestAttributes.JSON_PROPERTY_NAME, + GoogleChatCreateOrganizationHandleRequestAttributes.JSON_PROPERTY_SPACE_RESOURCE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatCreateOrganizationHandleRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SPACE_RESOURCE_NAME = "space_resource_name"; + private String spaceResourceName; + + public GoogleChatCreateOrganizationHandleRequestAttributes() {} + + @JsonCreator + public GoogleChatCreateOrganizationHandleRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SPACE_RESOURCE_NAME) + String spaceResourceName) { + this.name = name; + this.spaceResourceName = spaceResourceName; + } + + public GoogleChatCreateOrganizationHandleRequestAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Organization handle name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GoogleChatCreateOrganizationHandleRequestAttributes spaceResourceName( + String spaceResourceName) { + this.spaceResourceName = spaceResourceName; + return this; + } + + /** + * Google space resource name. + * + * @return spaceResourceName + */ + @JsonProperty(JSON_PROPERTY_SPACE_RESOURCE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpaceResourceName() { + return spaceResourceName; + } + + public void setSpaceResourceName(String spaceResourceName) { + this.spaceResourceName = spaceResourceName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatCreateOrganizationHandleRequestAttributes + */ + @JsonAnySetter + public GoogleChatCreateOrganizationHandleRequestAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this GoogleChatCreateOrganizationHandleRequestAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatCreateOrganizationHandleRequestAttributes + googleChatCreateOrganizationHandleRequestAttributes = + (GoogleChatCreateOrganizationHandleRequestAttributes) o; + return Objects.equals(this.name, googleChatCreateOrganizationHandleRequestAttributes.name) + && Objects.equals( + this.spaceResourceName, + googleChatCreateOrganizationHandleRequestAttributes.spaceResourceName) + && Objects.equals( + this.additionalProperties, + googleChatCreateOrganizationHandleRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, spaceResourceName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatCreateOrganizationHandleRequestAttributes {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" spaceResourceName: ").append(toIndentedString(spaceResourceName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequestData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequestData.java new file mode 100644 index 00000000000..d2f74d9eff3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatCreateOrganizationHandleRequestData.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Organization handle data for a create request. */ +@JsonPropertyOrder({GoogleChatCreateOrganizationHandleRequestData.JSON_PROPERTY_ATTRIBUTES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatCreateOrganizationHandleRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatCreateOrganizationHandleRequestAttributes attributes; + + public GoogleChatCreateOrganizationHandleRequestData() {} + + @JsonCreator + public GoogleChatCreateOrganizationHandleRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + GoogleChatCreateOrganizationHandleRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + } + + public GoogleChatCreateOrganizationHandleRequestData attributes( + GoogleChatCreateOrganizationHandleRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Organization handle attributes for a create request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatCreateOrganizationHandleRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatCreateOrganizationHandleRequestAttributes attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatCreateOrganizationHandleRequestData + */ + @JsonAnySetter + public GoogleChatCreateOrganizationHandleRequestData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatCreateOrganizationHandleRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatCreateOrganizationHandleRequestData googleChatCreateOrganizationHandleRequestData = + (GoogleChatCreateOrganizationHandleRequestData) o; + return Objects.equals(this.attributes, googleChatCreateOrganizationHandleRequestData.attributes) + && Objects.equals( + this.additionalProperties, + googleChatCreateOrganizationHandleRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatCreateOrganizationHandleRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponse.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponse.java new file mode 100644 index 00000000000..ace27c49e85 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponse.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response of a organization handle. */ +@JsonPropertyOrder({GoogleChatOrganizationHandleResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationHandleResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatOrganizationHandleResponseData data; + + public GoogleChatOrganizationHandleResponse() {} + + @JsonCreator + public GoogleChatOrganizationHandleResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GoogleChatOrganizationHandleResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GoogleChatOrganizationHandleResponse data(GoogleChatOrganizationHandleResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Organization handle data from a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatOrganizationHandleResponseData getData() { + return data; + } + + public void setData(GoogleChatOrganizationHandleResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationHandleResponse + */ + @JsonAnySetter + public GoogleChatOrganizationHandleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationHandleResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationHandleResponse googleChatOrganizationHandleResponse = + (GoogleChatOrganizationHandleResponse) o; + return Objects.equals(this.data, googleChatOrganizationHandleResponse.data) + && Objects.equals( + this.additionalProperties, googleChatOrganizationHandleResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationHandleResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponseAttributes.java new file mode 100644 index 00000000000..13cf355c87b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponseAttributes.java @@ -0,0 +1,199 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Organization handle attributes. */ +@JsonPropertyOrder({ + GoogleChatOrganizationHandleResponseAttributes.JSON_PROPERTY_NAME, + GoogleChatOrganizationHandleResponseAttributes.JSON_PROPERTY_SPACE_DISPLAY_NAME, + GoogleChatOrganizationHandleResponseAttributes.JSON_PROPERTY_SPACE_RESOURCE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationHandleResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SPACE_DISPLAY_NAME = "space_display_name"; + private String spaceDisplayName; + + public static final String JSON_PROPERTY_SPACE_RESOURCE_NAME = "space_resource_name"; + private String spaceResourceName; + + public GoogleChatOrganizationHandleResponseAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Organization handle name. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GoogleChatOrganizationHandleResponseAttributes spaceDisplayName(String spaceDisplayName) { + this.spaceDisplayName = spaceDisplayName; + return this; + } + + /** + * Google space display name. + * + * @return spaceDisplayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPACE_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSpaceDisplayName() { + return spaceDisplayName; + } + + public void setSpaceDisplayName(String spaceDisplayName) { + this.spaceDisplayName = spaceDisplayName; + } + + public GoogleChatOrganizationHandleResponseAttributes spaceResourceName( + String spaceResourceName) { + this.spaceResourceName = spaceResourceName; + return this; + } + + /** + * Google space resource name. + * + * @return spaceResourceName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPACE_RESOURCE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSpaceResourceName() { + return spaceResourceName; + } + + public void setSpaceResourceName(String spaceResourceName) { + this.spaceResourceName = spaceResourceName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationHandleResponseAttributes + */ + @JsonAnySetter + public GoogleChatOrganizationHandleResponseAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationHandleResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationHandleResponseAttributes googleChatOrganizationHandleResponseAttributes = + (GoogleChatOrganizationHandleResponseAttributes) o; + return Objects.equals(this.name, googleChatOrganizationHandleResponseAttributes.name) + && Objects.equals( + this.spaceDisplayName, googleChatOrganizationHandleResponseAttributes.spaceDisplayName) + && Objects.equals( + this.spaceResourceName, + googleChatOrganizationHandleResponseAttributes.spaceResourceName) + && Objects.equals( + this.additionalProperties, + googleChatOrganizationHandleResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, spaceDisplayName, spaceResourceName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationHandleResponseAttributes {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" spaceDisplayName: ").append(toIndentedString(spaceDisplayName)).append("\n"); + sb.append(" spaceResourceName: ").append(toIndentedString(spaceResourceName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponseData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponseData.java new file mode 100644 index 00000000000..f9d12c97707 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleResponseData.java @@ -0,0 +1,201 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Organization handle data from a response. */ +@JsonPropertyOrder({ + GoogleChatOrganizationHandleResponseData.JSON_PROPERTY_ATTRIBUTES, + GoogleChatOrganizationHandleResponseData.JSON_PROPERTY_ID, + GoogleChatOrganizationHandleResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationHandleResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatOrganizationHandleResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatOrganizationHandleType type = + GoogleChatOrganizationHandleType.GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE; + + public GoogleChatOrganizationHandleResponseData attributes( + GoogleChatOrganizationHandleResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Organization handle attributes. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatOrganizationHandleResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatOrganizationHandleResponseAttributes attributes) { + this.attributes = attributes; + } + + public GoogleChatOrganizationHandleResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the organization handle. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public GoogleChatOrganizationHandleResponseData type(GoogleChatOrganizationHandleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Organization handle resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatOrganizationHandleType getType() { + return type; + } + + public void setType(GoogleChatOrganizationHandleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationHandleResponseData + */ + @JsonAnySetter + public GoogleChatOrganizationHandleResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationHandleResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationHandleResponseData googleChatOrganizationHandleResponseData = + (GoogleChatOrganizationHandleResponseData) o; + return Objects.equals(this.attributes, googleChatOrganizationHandleResponseData.attributes) + && Objects.equals(this.id, googleChatOrganizationHandleResponseData.id) + && Objects.equals(this.type, googleChatOrganizationHandleResponseData.type) + && Objects.equals( + this.additionalProperties, + googleChatOrganizationHandleResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationHandleResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleType.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleType.java new file mode 100644 index 00000000000..1930380a293 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandleType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Organization handle resource type. */ +@JsonSerialize( + using = GoogleChatOrganizationHandleType.GoogleChatOrganizationHandleTypeSerializer.class) +public class GoogleChatOrganizationHandleType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("google-chat-organization-handle")); + + public static final GoogleChatOrganizationHandleType GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE = + new GoogleChatOrganizationHandleType("google-chat-organization-handle"); + + GoogleChatOrganizationHandleType(String value) { + super(value, allowedValues); + } + + public static class GoogleChatOrganizationHandleTypeSerializer + extends StdSerializer { + public GoogleChatOrganizationHandleTypeSerializer(Class t) { + super(t); + } + + public GoogleChatOrganizationHandleTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GoogleChatOrganizationHandleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GoogleChatOrganizationHandleType fromValue(String value) { + return new GoogleChatOrganizationHandleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandlesResponse.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandlesResponse.java new file mode 100644 index 00000000000..b756dfef462 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationHandlesResponse.java @@ -0,0 +1,159 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a list of organization handles. */ +@JsonPropertyOrder({GoogleChatOrganizationHandlesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationHandlesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public GoogleChatOrganizationHandlesResponse() {} + + @JsonCreator + public GoogleChatOrganizationHandlesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public GoogleChatOrganizationHandlesResponse data( + List data) { + this.data = data; + for (GoogleChatOrganizationHandleResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GoogleChatOrganizationHandlesResponse addDataItem( + GoogleChatOrganizationHandleResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of organization handles. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationHandlesResponse + */ + @JsonAnySetter + public GoogleChatOrganizationHandlesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationHandlesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationHandlesResponse googleChatOrganizationHandlesResponse = + (GoogleChatOrganizationHandlesResponse) o; + return Objects.equals(this.data, googleChatOrganizationHandlesResponse.data) + && Objects.equals( + this.additionalProperties, googleChatOrganizationHandlesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationHandlesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequest.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequest.java new file mode 100644 index 00000000000..2cc2c5adb64 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequest.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Update organization handle request. */ +@JsonPropertyOrder({ + GoogleChatUpdateOrganizationHandleRequest.JSON_PROPERTY_DATA, + GoogleChatUpdateOrganizationHandleRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatUpdateOrganizationHandleRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatUpdateOrganizationHandleRequestData data; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatOrganizationHandleType type = + GoogleChatOrganizationHandleType.GOOGLE_CHAT_ORGANIZATION_HANDLE_TYPE; + + public GoogleChatUpdateOrganizationHandleRequest() {} + + @JsonCreator + public GoogleChatUpdateOrganizationHandleRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GoogleChatUpdateOrganizationHandleRequestData data, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + GoogleChatOrganizationHandleType type) { + this.data = data; + this.unparsed |= data.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GoogleChatUpdateOrganizationHandleRequest data( + GoogleChatUpdateOrganizationHandleRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Organization handle data for an update request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatUpdateOrganizationHandleRequestData getData() { + return data; + } + + public void setData(GoogleChatUpdateOrganizationHandleRequestData data) { + this.data = data; + } + + public GoogleChatUpdateOrganizationHandleRequest type(GoogleChatOrganizationHandleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Organization handle resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatOrganizationHandleType getType() { + return type; + } + + public void setType(GoogleChatOrganizationHandleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatUpdateOrganizationHandleRequest + */ + @JsonAnySetter + public GoogleChatUpdateOrganizationHandleRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatUpdateOrganizationHandleRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatUpdateOrganizationHandleRequest googleChatUpdateOrganizationHandleRequest = + (GoogleChatUpdateOrganizationHandleRequest) o; + return Objects.equals(this.data, googleChatUpdateOrganizationHandleRequest.data) + && Objects.equals(this.type, googleChatUpdateOrganizationHandleRequest.type) + && Objects.equals( + this.additionalProperties, + googleChatUpdateOrganizationHandleRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatUpdateOrganizationHandleRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequestAttributes.java new file mode 100644 index 00000000000..c0e4c8d8546 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequestAttributes.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Organization handle attributes for an update request. */ +@JsonPropertyOrder({ + GoogleChatUpdateOrganizationHandleRequestAttributes.JSON_PROPERTY_NAME, + GoogleChatUpdateOrganizationHandleRequestAttributes.JSON_PROPERTY_SPACE_RESOURCE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatUpdateOrganizationHandleRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SPACE_RESOURCE_NAME = "space_resource_name"; + private String spaceResourceName; + + public GoogleChatUpdateOrganizationHandleRequestAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Organization handle name. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GoogleChatUpdateOrganizationHandleRequestAttributes spaceResourceName( + String spaceResourceName) { + this.spaceResourceName = spaceResourceName; + return this; + } + + /** + * Google space resource name. + * + * @return spaceResourceName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPACE_RESOURCE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSpaceResourceName() { + return spaceResourceName; + } + + public void setSpaceResourceName(String spaceResourceName) { + this.spaceResourceName = spaceResourceName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatUpdateOrganizationHandleRequestAttributes + */ + @JsonAnySetter + public GoogleChatUpdateOrganizationHandleRequestAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this GoogleChatUpdateOrganizationHandleRequestAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatUpdateOrganizationHandleRequestAttributes + googleChatUpdateOrganizationHandleRequestAttributes = + (GoogleChatUpdateOrganizationHandleRequestAttributes) o; + return Objects.equals(this.name, googleChatUpdateOrganizationHandleRequestAttributes.name) + && Objects.equals( + this.spaceResourceName, + googleChatUpdateOrganizationHandleRequestAttributes.spaceResourceName) + && Objects.equals( + this.additionalProperties, + googleChatUpdateOrganizationHandleRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, spaceResourceName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatUpdateOrganizationHandleRequestAttributes {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" spaceResourceName: ").append(toIndentedString(spaceResourceName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequestData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequestData.java new file mode 100644 index 00000000000..0f1e90e9967 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatUpdateOrganizationHandleRequestData.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Organization handle data for an update request. */ +@JsonPropertyOrder({GoogleChatUpdateOrganizationHandleRequestData.JSON_PROPERTY_ATTRIBUTES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatUpdateOrganizationHandleRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatUpdateOrganizationHandleRequestAttributes attributes; + + public GoogleChatUpdateOrganizationHandleRequestData() {} + + @JsonCreator + public GoogleChatUpdateOrganizationHandleRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + GoogleChatUpdateOrganizationHandleRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + } + + public GoogleChatUpdateOrganizationHandleRequestData attributes( + GoogleChatUpdateOrganizationHandleRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Organization handle attributes for an update request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatUpdateOrganizationHandleRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatUpdateOrganizationHandleRequestAttributes attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatUpdateOrganizationHandleRequestData + */ + @JsonAnySetter + public GoogleChatUpdateOrganizationHandleRequestData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatUpdateOrganizationHandleRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatUpdateOrganizationHandleRequestData googleChatUpdateOrganizationHandleRequestData = + (GoogleChatUpdateOrganizationHandleRequestData) o; + return Objects.equals(this.attributes, googleChatUpdateOrganizationHandleRequestData.attributes) + && Objects.equals( + this.additionalProperties, + googleChatUpdateOrganizationHandleRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatUpdateOrganizationHandleRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/cassettes/features/v2/Create_organization_handle_returns_CREATED_response.freeze b/src/test/resources/cassettes/features/v2/Create_organization_handle_returns_CREATED_response.freeze new file mode 100644 index 00000000000..91584ceeebc --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_organization_handle_returns_CREATED_response.freeze @@ -0,0 +1 @@ +2026-01-15T02:21:36.242Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_organization_handle_returns_CREATED_response.json b/src/test/resources/cassettes/features/v2/Create_organization_handle_returns_CREATED_response.json new file mode 100644 index 00000000000..3ce17b1b22a --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_organization_handle_returns_CREATED_response.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Create_organization_handle_returns_CREATED_response-1768443696\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},\"type\":\"google-chat-organization-handle\"}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"816b3532-ebb4-4518-9087-b3fc02598eef\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Create_organization_handle_returns_CREATED_response-1768443696\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f28be721-6891-b155-c06e-043cacba2960" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/816b3532-ebb4-4518-9087-b3fc02598eef", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid Parameter\",\"detail\":\"invalid parameter \\\"google_chat_organization_binding_id\\\" in \\\"path\\\"; expected type \\\"uuid\\\"\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0c875243-f7f9-8efe-f008-b6561c22c28e" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_organization_handle_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_organization_handle_returns_OK_response.freeze new file mode 100644 index 00000000000..86e3ac81c96 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_organization_handle_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-15T02:21:36.964Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_organization_handle_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_organization_handle_returns_OK_response.json new file mode 100644 index 00000000000..5de5c247313 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_organization_handle_returns_OK_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Delete_organization_handle_returns_OK_response-1768443696\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},\"type\":\"google-chat-organization-handle\"}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"31073514-1747-41a2-9606-4a21ff5dfffd\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Delete_organization_handle_returns_OK_response-1768443696\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "4561b9c2-d219-503b-78c9-9eb0ede78162" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles/31073514-1747-41a2-9606-4a21ff5dfffd", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6aad9e16-b77b-7dba-f412-7c5763651876" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/31073514-1747-41a2-9606-4a21ff5dfffd", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid Parameter\",\"detail\":\"invalid parameter \\\"google_chat_organization_binding_id\\\" in \\\"path\\\"; expected type \\\"uuid\\\"\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "1fab276e-c66a-0c83-fb4f-31e2895f8606" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_organization_handles_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_all_organization_handles_returns_OK_response.freeze new file mode 100644 index 00000000000..a580c932621 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_organization_handles_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-15T02:21:37.737Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_organization_handles_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_all_organization_handles_returns_OK_response.json new file mode 100644 index 00000000000..fd8912f0e40 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_organization_handles_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_all_organization_handles_returns_OK_response-1768443697\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},\"type\":\"google-chat-organization-handle\"}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"c255808f-31ed-44e4-9daa-f36ba91e5da5\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Get_all_organization_handles_returns_OK_response-1768443697\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9ff5f361-d61c-7df3-a2b6-d99ba1b73d19" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"4cb25d88-09cb-41bd-91d2-2ce83e7f48e2\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768410894\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"0c523f11-00fc-4232-9302-a4194bec088a\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768411668\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"fd026c96-994d-47a3-affd-c7b8b439c664\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768413147\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"00f632d9-1463-4ab6-902a-14efa83d13c3\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768413200\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"6d7c571a-8ae2-4fc9-885f-e2c72d713a2f\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768413359\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"7de5d51a-cef9-43a5-82b0-5e5465cd985b\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768414434\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"2d97d54c-6a89-41c7-b37c-dec64c4ae4d7\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415357\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"998878e7-91e8-4627-ae28-f816ece451a3\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415410\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"1048964c-3e42-475d-812a-ae0e52626bfb\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415444\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"669866bb-34e5-40f7-9da6-476bf9bbe8ca\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415571\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"c47893d4-35c6-4ddb-bc76-707220f0211a\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768415637\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"55266f5b-3067-4631-883e-cfb1dc49256d\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768416992\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"c3cb3868-7d64-4a0c-bd7f-819f7de97e0b\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768417235\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"4e13aa5f-7e47-4b4f-b95f-aabea862aedc\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768417898\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"25f41f79-2f98-44cd-a89e-65921b62c3d5\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433110\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"e1174e5c-d09d-4f89-bf9d-2ea97634fa8f\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433111\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"c5401188-ae0e-4d78-9bb8-c97b089b88ab\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433243\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"349bddd9-b6e6-4bfa-aa77-279469cb8c02\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433245\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"607be0b6-1b63-4620-a6b6-22838e545e1d\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_organization_handle_returns_OK_response-1768433246\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"0bde990e-a2d8-4fbc-8185-db4b760503e3\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433723\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"d83962e1-b506-4b44-b6af-f22cc64ebfb4\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433724\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"7b253152-9ab3-416f-ab3d-33ae688addf0\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_organization_handle_returns_OK_response-1768433725\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"6413555c-fd47-4909-826d-a88e48a6c6fb\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433747\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"3e63fd96-71af-4d89-97a3-de1c407072b5\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433749\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"b1f31471-ffc6-4f00-adca-65834cbcd507\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_organization_handle_returns_OK_response-1768433750\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"6c7fea65-24cd-4e7e-a0a4-dc080d74343f\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768433851\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"4349abba-180b-462a-b277-274a56b39802\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768433852\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"308d6c06-a2b3-4316-b0d4-5cf10edab69e\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_organization_handle_returns_OK_response-1768433853\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"96f53b75-9f2e-4a1e-a6f0-ae485007d5b3\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768434195\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"30b2f976-6f38-462d-bc34-c4e4b33cc3cc\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768434196\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"27703fb9-7f3e-47dc-a1d2-b8d8a9963e76\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_organization_handle_returns_OK_response-1768434197\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"083e58b9-15a9-4aff-9cbc-b86834e52c2b\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Update_organization_handle_returns_OK_response-1768434198--updated\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"9b9cc0a6-29ab-47f8-96d4-bc30721ccaa1\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768434578\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"1e4e3dd4-1d90-4636-9ff9-eedb2f54addc\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768434580\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"868ec752-faf5-4f44-8b52-8c3a122472c2\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_organization_handle_returns_OK_response-1768434581\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"9de230e5-ab9e-4580-b35d-eeaa0aeff0b6\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Update_organization_handle_returns_OK_response-1768434582--updated\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"30e260a4-6f82-42de-a3e1-2502d423c866\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768440733\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"8fbbe4fa-deee-425e-bc71-ad86d6e1d9bc\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768440734\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"37cf2395-7004-479f-bd63-89c77b3668e6\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_organization_handle_returns_OK_response-1768440735\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"caf066bb-44a5-45c7-a039-1c7fe3eaaf8d\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Update_organization_handle_returns_OK_response-1768440736--updated\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"76752f89-bc33-4ee6-affc-693a0d37881f\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Create_organization_handle_returns_CREATED_response-1768440799\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"9bda54c5-2410-4cdf-9147-a039b6b8f734\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Get_all_organization_handles_returns_OK_response-1768440800\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"a37fe35d-e599-40fa-83aa-87d0fdfcc81b\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Get_organization_handle_returns_OK_response-1768440801\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"e8eb5d83-6dcb-4664-a35b-eaa0d1e22136\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Update_organization_handle_returns_OK_response-1768440803--updated\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"f2239624-d5fb-4c61-b069-7902fc0cbfc5\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Create_organization_handle_returns_CREATED_response-1768441148\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"31863558-31d4-42f6-b2a9-8e9dadf2ac80\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_all_organization_handles_returns_OK_response-1768441150\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"cae37ed4-cec4-465c-9af7-6e65c137ae21\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Get_organization_handle_returns_OK_response-1768441151\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"0b0465a9-e0a8-4efd-be4b-8dc5d0283dfb\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Typescript-Update_organization_handle_returns_OK_response-1768441152--updated\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"816b3532-ebb4-4518-9087-b3fc02598eef\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Create_organization_handle_returns_CREATED_response-1768443696\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},{\"id\":\"c255808f-31ed-44e4-9daa-f36ba91e5da5\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Get_all_organization_handles_returns_OK_response-1768443697\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ae5d5fc8-6f94-e60f-0851-4ac4e061bed6" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/c255808f-31ed-44e4-9daa-f36ba91e5da5", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid Parameter\",\"detail\":\"invalid parameter \\\"google_chat_organization_binding_id\\\" in \\\"path\\\"; expected type \\\"uuid\\\"\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "bce29e05-01e0-a0d7-c7d2-4e257291d9b4" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_organization_handle_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_organization_handle_returns_OK_response.freeze new file mode 100644 index 00000000000..d11e45dc1d7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_organization_handle_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-15T02:21:38.766Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_organization_handle_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_organization_handle_returns_OK_response.json new file mode 100644 index 00000000000..83df22682b5 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_organization_handle_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_organization_handle_returns_OK_response-1768443698\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},\"type\":\"google-chat-organization-handle\"}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"7a4e4593-fd25-4171-9ed0-54e2542a8fcf\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Get_organization_handle_returns_OK_response-1768443698\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "59367794-57e7-b618-c71d-16afb9ec3105" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles/7a4e4593-fd25-4171-9ed0-54e2542a8fcf", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"7a4e4593-fd25-4171-9ed0-54e2542a8fcf\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Get_organization_handle_returns_OK_response-1768443698\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e9dcb620-87a0-c1c7-c314-fd6650f432db" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/7a4e4593-fd25-4171-9ed0-54e2542a8fcf", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid Parameter\",\"detail\":\"invalid parameter \\\"google_chat_organization_binding_id\\\" in \\\"path\\\"; expected type \\\"uuid\\\"\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2023e133-811b-f4bf-1261-f48b0d0a7f0a" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_space_information_by_display_name_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_space_information_by_display_name_returns_OK_response.freeze new file mode 100644 index 00000000000..7449b5fb2bb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_space_information_by_display_name_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-15T02:21:39.795Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_space_information_by_display_name_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_space_information_by_display_name_returns_OK_response.json new file mode 100644 index 00000000000..d87bc75c58c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_space_information_by_display_name_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/integration/google-chat/organizations/app/named-spaces/datadog.ninja/api-test-space", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5c0717bd-3bff-bf0c-bc70-ab3e4d29d478" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_organization_handle_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_organization_handle_returns_OK_response.freeze new file mode 100644 index 00000000000..21a44de3338 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_organization_handle_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-15T02:21:40.120Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_organization_handle_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_organization_handle_returns_OK_response.json new file mode 100644 index 00000000000..ddf589d5fba --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_organization_handle_returns_OK_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_organization_handle_returns_OK_response-1768443700\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}},\"type\":\"google-chat-organization-handle\"}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"e4e62f90-9ec7-459b-ac0a-62157eefeb2c\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Update_organization_handle_returns_OK_response-1768443700\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fe839fb4-f1ca-e889-f326-a1293fcb7d62" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_organization_handle_returns_OK_response-1768443700--updated\"}},\"type\":\"google-chat-organization-handle\"}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/integration/google-chat/organizations/e54cb570-c674-529c-769d-84b312288ed7/organization-handles/e4e62f90-9ec7-459b-ac0a-62157eefeb2c", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"e4e62f90-9ec7-459b-ac0a-62157eefeb2c\",\"type\":\"google-chat-organization-handle\",\"attributes\":{\"name\":\"Test-Update_organization_handle_returns_OK_response-1768443700--updated\",\"space_display_name\":\"api-test-space\",\"space_resource_name\":\"spaces/AAQA-zFIks8\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7ae42810-ec47-4bcc-9a91-fecf317801bc" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/integration/google-chat/organizations/%7Borganization_binding_id%7D/organization-handles/e4e62f90-9ec7-459b-ac0a-62157eefeb2c", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid Parameter\",\"detail\":\"invalid parameter \\\"google_chat_organization_binding_id\\\" in \\\"path\\\"; expected type \\\"uuid\\\"\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5c571ca9-22ae-d828-2261-18dcd9d0bb04" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index 3a01a060c5b..5b891d6285a 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -519,6 +519,22 @@ "tag": "GCP Integration", "operationId": "CreateGCPSTSAccount" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"type\": \"google-chat-organization-handle\",\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"space_resource_name\": \"spaces/AAQA-zFIks8\"\n }\n }\n}" + }, + { + "name": "organization_binding_id", + "value": "\"e54cb570-c674-529c-769d-84b312288ed7\"" + } + ], + "step": "there is a valid \"organization_handle\" in the system", + "key": "organization_handle", + "tag": "Google Chat Integration", + "operationId": "CreateOrganizationHandle" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/google_chat_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/google_chat_integration.feature new file mode 100644 index 00000000000..f722a7ea208 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/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/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 661482db869..bc320446cbd 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -1993,6 +1993,53 @@ "type": "idempotent" } }, + "GetSpaceByDisplayName": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "ListOrganizationHandles": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "CreateOrganizationHandle": { + "tag": "Google Chat Integration", + "undo": { + "operationId": "DeleteOrganizationHandle", + "parameters": [ + { + "name": "handle_id", + "source": "data.id" + }, + { + "name": "organization_binding_id", + "value": "\"e54cb570-c674-529c-769d-84b312288ed7\"" + } + ], + "type": "unsafe" + } + }, + "DeleteOrganizationHandle": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, + "GetOrganizationHandle": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "UpdateOrganizationHandle": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, "GetChannelByName": { "tag": "Microsoft Teams Integration", "undo": {