diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 85c26314849..4377babe307 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -661,6 +661,13 @@ components:
required: true
schema:
type: string
+ GoogleChatTargetAudienceIdPathParameter:
+ description: Your target audience ID.
+ in: path
+ name: target_audience_id
+ required: true
+ schema:
+ type: string
HistoricalJobID:
description: The ID of the job.
in: path
@@ -39055,6 +39062,84 @@ components:
required:
- attributes
type: object
+ GoogleChatDelegatedUserAttributes:
+ description: Google Chat delegated user attributes.
+ properties:
+ display_name:
+ description: The delegated user's display name.
+ example: "fake-display-name"
+ type: string
+ email:
+ description: The delegated user's email address.
+ example: "user@example.com"
+ type: string
+ features:
+ description: The list of features enabled for the delegated user.
+ items:
+ type: string
+ type: array
+ type: object
+ GoogleChatDelegatedUserData:
+ description: Google Chat delegated user data from a response.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/GoogleChatDelegatedUserAttributes"
+ id:
+ description: The ID of the delegated user.
+ example: "2b3c4d5e-6f78-9012-bcde-f23456789012"
+ maxLength: 100
+ minLength: 1
+ type: string
+ type:
+ $ref: "#/components/schemas/GoogleChatDelegatedUserType"
+ type: object
+ GoogleChatDelegatedUserResponse:
+ description: Response containing a Google Chat delegated user.
+ properties:
+ data:
+ $ref: "#/components/schemas/GoogleChatDelegatedUserData"
+ required:
+ - data
+ type: object
+ GoogleChatDelegatedUserType:
+ default: google-chat-delegated-user
+ description: Google Chat delegated user resource type.
+ enum:
+ - google-chat-delegated-user
+ example: google-chat-delegated-user
+ type: string
+ x-enum-varnames:
+ - GOOGLE_CHAT_DELEGATED_USER_TYPE
+ GoogleChatOrganizationAttributes:
+ description: Google Chat organization attributes.
+ properties:
+ domain_id:
+ description: The Google Chat organization domain ID.
+ example: "fake-domain-id"
+ maxLength: 255
+ type: string
+ domain_name:
+ description: The Google Chat organization domain name.
+ example: "example.com"
+ maxLength: 255
+ type: string
+ type: object
+ GoogleChatOrganizationData:
+ description: Google Chat organization data from a response.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/GoogleChatOrganizationAttributes"
+ id:
+ description: The ID of the Google Chat organization binding.
+ example: "5ce87709-a12f-4086-fcc8-147045b73a19"
+ maxLength: 100
+ minLength: 1
+ type: string
+ relationships:
+ $ref: "#/components/schemas/GoogleChatOrganizationRelationships"
+ type:
+ $ref: "#/components/schemas/GoogleChatOrganizationType"
+ type: object
GoogleChatOrganizationHandleResponse:
description: Organization handle for monitor notifications to a Google Chat space within a Google organization.
properties:
@@ -39117,6 +39202,184 @@ components:
required:
- data
type: object
+ GoogleChatOrganizationRelationships:
+ description: Google Chat organization relationships.
+ properties:
+ delegated_user:
+ $ref: "#/components/schemas/GoogleChatOrganizationRelationshipsDelegatedUser"
+ type: object
+ GoogleChatOrganizationRelationshipsDelegatedUser:
+ description: The delegated user relationship.
+ properties:
+ data:
+ $ref: "#/components/schemas/GoogleChatOrganizationRelationshipsDelegatedUserData"
+ type: object
+ GoogleChatOrganizationRelationshipsDelegatedUserData:
+ description: Delegated user relationship data.
+ properties:
+ id:
+ description: The ID of the delegated user.
+ example: "2b3c4d5e-6f78-9012-bcde-f23456789012"
+ type: string
+ type:
+ $ref: "#/components/schemas/GoogleChatDelegatedUserType"
+ type: object
+ GoogleChatOrganizationResponse:
+ description: Response containing a Google Chat organization binding.
+ properties:
+ data:
+ $ref: "#/components/schemas/GoogleChatOrganizationData"
+ required:
+ - data
+ type: object
+ GoogleChatOrganizationType:
+ default: google-chat-organization
+ description: Google Chat organization resource type.
+ enum:
+ - google-chat-organization
+ example: google-chat-organization
+ type: string
+ x-enum-varnames:
+ - GOOGLE_CHAT_ORGANIZATION_TYPE
+ GoogleChatOrganizationsResponse:
+ description: Response containing a list of Google Chat organization bindings.
+ properties:
+ data:
+ description: An array of Google Chat organization bindings.
+ items:
+ $ref: "#/components/schemas/GoogleChatOrganizationData"
+ type: array
+ required:
+ - data
+ type: object
+ GoogleChatTargetAudienceAttributes:
+ description: Google Chat target audience attributes.
+ properties:
+ audience_id:
+ description: The audience ID.
+ example: "fake-audience-id-1"
+ maxLength: 255
+ type: string
+ audience_name:
+ description: The audience name.
+ example: "fake audience name 1"
+ maxLength: 255
+ type: string
+ required:
+ - audience_name
+ - audience_id
+ type: object
+ GoogleChatTargetAudienceCreateRequest:
+ description: Create target audience request.
+ properties:
+ data:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequestData"
+ required:
+ - data
+ type: object
+ GoogleChatTargetAudienceCreateRequestAttributes:
+ description: Attributes for creating a Google Chat target audience.
+ properties:
+ audience_id:
+ description: The audience ID.
+ example: "fake-audience-id-1"
+ maxLength: 255
+ type: string
+ audience_name:
+ description: The audience name.
+ example: "fake audience name 1"
+ maxLength: 255
+ type: string
+ required:
+ - audience_name
+ - audience_id
+ type: object
+ GoogleChatTargetAudienceCreateRequestData:
+ description: Data for a create target audience request.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequestAttributes"
+ type:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceType"
+ required:
+ - type
+ - attributes
+ type: object
+ GoogleChatTargetAudienceData:
+ description: Google Chat target audience data from a response.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceAttributes"
+ id:
+ description: The ID of the target audience.
+ example: "1f3e5ce6-944a-4075-97ae-105b5920b5cb"
+ maxLength: 100
+ minLength: 1
+ type: string
+ type:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceType"
+ type: object
+ GoogleChatTargetAudienceResponse:
+ description: Response containing a Google Chat target audience.
+ properties:
+ data:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceData"
+ required:
+ - data
+ type: object
+ GoogleChatTargetAudienceType:
+ default: google-chat-target-audience
+ description: Google Chat target audience resource type.
+ enum:
+ - google-chat-target-audience
+ example: google-chat-target-audience
+ type: string
+ x-enum-varnames:
+ - GOOGLE_CHAT_TARGET_AUDIENCE_TYPE
+ GoogleChatTargetAudienceUpdateRequest:
+ description: Update target audience request.
+ properties:
+ data:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequestData"
+ required:
+ - data
+ type: object
+ GoogleChatTargetAudienceUpdateRequestAttributes:
+ description: Attributes for updating a Google Chat target audience.
+ properties:
+ audience_id:
+ description: The audience ID.
+ example: "fake-audience-id-1"
+ maxLength: 255
+ type: string
+ audience_name:
+ description: The audience name.
+ example: "fake audience name 1"
+ maxLength: 255
+ type: string
+ type: object
+ GoogleChatTargetAudienceUpdateRequestData:
+ description: Data for an update target audience request.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequestAttributes"
+ type:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceType"
+ required:
+ - type
+ - attributes
+ type: object
+ GoogleChatTargetAudiencesResponse:
+ description: Response containing a list of Google Chat target audiences.
+ properties:
+ data:
+ description: An array of Google Chat target audiences.
+ items:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceData"
+ type: array
+ required:
+ - data
+ type: object
GoogleChatUpdateOrganizationHandleRequest:
description: Update organization handle request.
properties:
@@ -128558,6 +128821,43 @@ paths:
operator: OR
permissions:
- gcp_configuration_edit
+ /api/v2/integration/google-chat/organizations:
+ get:
+ description: Get a list of all Google Chat organization bindings in the Datadog Google Chat integration.
+ operationId: ListGoogleChatOrganizations
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ domain_id: fake-domain-id
+ domain_name: example.com
+ id: 00000000-0000-0000-0000-000000000001
+ relationships:
+ delegated_user:
+ data:
+ id: 00000000-0000-0000-0000-000000000002
+ type: google-chat-delegated-user
+ type: google-chat-organization
+ - attributes:
+ domain_id: fake-domain-id-2
+ domain_name: example2.com
+ id: 00000000-0000-0000-0000-000000000003
+ type: google-chat-organization
+ schema:
+ $ref: "#/components/schemas/GoogleChatOrganizationsResponse"
+ description: OK
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get all Google Chat organization bindings
+ tags:
+ - Google Chat Integration
/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}:
get:
description: Get the resource name and organization binding ID of a space in the Datadog Google Chat integration.
@@ -128594,6 +128894,110 @@ paths:
summary: Get space information by display name
tags:
- Google Chat Integration
+ /api/v2/integration/google-chat/organizations/{organization_binding_id}:
+ delete:
+ description: Delete a Google Chat organization binding from the Datadog Google Chat integration.
+ operationId: DeleteGoogleChatOrganization
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ responses:
+ "204":
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Delete a Google Chat organization binding
+ tags:
+ - Google Chat Integration
+ get:
+ description: Get a Google Chat organization binding from the Datadog Google Chat integration.
+ operationId: GetGoogleChatOrganization
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ domain_id: fake-domain-id
+ domain_name: example.com
+ id: 00000000-0000-0000-0000-000000000001
+ relationships:
+ delegated_user:
+ data:
+ id: 00000000-0000-0000-0000-000000000002
+ type: google-chat-delegated-user
+ type: google-chat-organization
+ schema:
+ $ref: "#/components/schemas/GoogleChatOrganizationResponse"
+ description: OK
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get a Google Chat organization binding
+ tags:
+ - Google Chat Integration
+ /api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user:
+ delete:
+ description: Delete the delegated user for a Google Chat organization binding from the Datadog Google Chat integration.
+ operationId: DeleteGoogleChatDelegatedUser
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ responses:
+ "204":
+ description: OK
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Delete the delegated user
+ tags:
+ - Google Chat Integration
+ get:
+ description: Get the delegated user for a Google Chat organization binding in the Datadog Google Chat integration.
+ operationId: GetGoogleChatDelegatedUser
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ display_name: fake-display-name
+ email: user@example.com
+ features:
+ - incident-automatic-space-creation
+ - workflow-space-creation
+ id: 00000000-0000-0000-0000-000000000002
+ type: google-chat-delegated-user
+ schema:
+ $ref: "#/components/schemas/GoogleChatDelegatedUserResponse"
+ description: OK
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get the delegated user
+ tags:
+ - Google Chat Integration
/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles:
get:
description: Get a list of all organization handles from the Datadog Google Chat integration.
@@ -128794,6 +129198,191 @@ paths:
tags:
- Google Chat Integration
x-codegen-request-body-name: body
+ /api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences:
+ get:
+ description: Get a list of all target audiences for a Google Chat organization binding in the Datadog Google Chat integration.
+ operationId: ListGoogleChatTargetAudiences
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ audience_id: fake-audience-id-1
+ audience_name: fake audience name 1
+ id: 00000000-0000-0000-0000-000000000004
+ type: google-chat-target-audience
+ - attributes:
+ audience_id: fake-audience-id-2
+ audience_name: fake-audience-name-2
+ id: 00000000-0000-0000-0000-000000000005
+ type: google-chat-target-audience
+ schema:
+ $ref: "#/components/schemas/GoogleChatTargetAudiencesResponse"
+ description: OK
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get all target audiences
+ tags:
+ - Google Chat Integration
+ post:
+ description: Create a target audience for a Google Chat organization binding in the Datadog Google Chat integration.
+ operationId: CreateGoogleChatTargetAudience
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ audience_id: fake-audience-id-1
+ audience_name: fake audience name 1
+ type: google-chat-target-audience
+ schema:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequest"
+ description: Target audience payload.
+ required: true
+ responses:
+ "201":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ audience_id: fake-audience-id-1
+ audience_name: fake audience name 1
+ id: 00000000-0000-0000-0000-000000000004
+ type: google-chat-target-audience
+ schema:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceResponse"
+ description: CREATED
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "409":
+ $ref: "#/components/responses/ConflictResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Create a target audience
+ tags:
+ - Google Chat Integration
+ x-codegen-request-body-name: body
+ /api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}:
+ delete:
+ description: Delete a target audience from a Google Chat organization binding in the Datadog Google Chat integration.
+ operationId: DeleteGoogleChatTargetAudience
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter"
+ responses:
+ "204":
+ description: OK
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Delete a target audience
+ tags:
+ - Google Chat Integration
+ get:
+ description: Get a target audience for a Google Chat organization binding in the Datadog Google Chat integration.
+ operationId: GetGoogleChatTargetAudience
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter"
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ audience_id: fake-audience-id-1
+ audience_name: fake audience name 1
+ id: 00000000-0000-0000-0000-000000000004
+ type: google-chat-target-audience
+ schema:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceResponse"
+ description: OK
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get a target audience
+ tags:
+ - Google Chat Integration
+ patch:
+ description: Update a target audience for a Google Chat organization binding in the Datadog Google Chat integration.
+ operationId: UpdateGoogleChatTargetAudience
+ parameters:
+ - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter"
+ - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter"
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ audience_id: updated-audience-id
+ audience_name: updated-audience-name
+ type: google-chat-target-audience
+ schema:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequest"
+ description: Target audience payload.
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ audience_id: updated-audience-id
+ audience_name: updated-audience-name
+ id: 00000000-0000-0000-0000-000000000004
+ type: google-chat-target-audience
+ schema:
+ $ref: "#/components/schemas/GoogleChatTargetAudienceResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Update a target audience
+ tags:
+ - Google Chat Integration
+ x-codegen-request-body-name: body
/api/v2/integration/jira/accounts:
get:
description: |-
diff --git a/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.java b/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.java
new file mode 100644
index 00000000000..c332b8e7cae
--- /dev/null
+++ b/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.java
@@ -0,0 +1,40 @@
+// Create a target audience 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.GoogleChatTargetAudienceCreateRequest;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceCreateRequestAttributes;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceCreateRequestData;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceResponse;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient);
+
+ GoogleChatTargetAudienceCreateRequest body =
+ new GoogleChatTargetAudienceCreateRequest()
+ .data(
+ new GoogleChatTargetAudienceCreateRequestData()
+ .attributes(
+ new GoogleChatTargetAudienceCreateRequestAttributes()
+ .audienceId("fake-audience-id-1")
+ .audienceName("fake audience name 1"))
+ .type(GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE));
+
+ try {
+ GoogleChatTargetAudienceResponse result =
+ apiInstance.createGoogleChatTargetAudience("organization_binding_id", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#createGoogleChatTargetAudience");
+ 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/DeleteGoogleChatDelegatedUser.java b/examples/v2/google-chat-integration/DeleteGoogleChatDelegatedUser.java
new file mode 100644
index 00000000000..0f034ed34e0
--- /dev/null
+++ b/examples/v2/google-chat-integration/DeleteGoogleChatDelegatedUser.java
@@ -0,0 +1,23 @@
+// Delete the delegated user 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);
+
+ try {
+ apiInstance.deleteGoogleChatDelegatedUser("organization_binding_id");
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#deleteGoogleChatDelegatedUser");
+ 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/DeleteGoogleChatOrganization.java b/examples/v2/google-chat-integration/DeleteGoogleChatOrganization.java
new file mode 100644
index 00000000000..30308296bc5
--- /dev/null
+++ b/examples/v2/google-chat-integration/DeleteGoogleChatOrganization.java
@@ -0,0 +1,23 @@
+// Delete a Google Chat organization binding 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);
+
+ try {
+ apiInstance.deleteGoogleChatOrganization("organization_binding_id");
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#deleteGoogleChatOrganization");
+ 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/DeleteGoogleChatTargetAudience.java b/examples/v2/google-chat-integration/DeleteGoogleChatTargetAudience.java
new file mode 100644
index 00000000000..7fccf9817db
--- /dev/null
+++ b/examples/v2/google-chat-integration/DeleteGoogleChatTargetAudience.java
@@ -0,0 +1,23 @@
+// Delete a target audience 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);
+
+ try {
+ apiInstance.deleteGoogleChatTargetAudience("organization_binding_id", "target_audience_id");
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#deleteGoogleChatTargetAudience");
+ 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/GetGoogleChatDelegatedUser.java b/examples/v2/google-chat-integration/GetGoogleChatDelegatedUser.java
new file mode 100644
index 00000000000..53fe13e449c
--- /dev/null
+++ b/examples/v2/google-chat-integration/GetGoogleChatDelegatedUser.java
@@ -0,0 +1,26 @@
+// Get the delegated user 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.GoogleChatDelegatedUserResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient);
+
+ try {
+ GoogleChatDelegatedUserResponse result =
+ apiInstance.getGoogleChatDelegatedUser("organization_binding_id");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#getGoogleChatDelegatedUser");
+ 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/GetGoogleChatOrganization.java b/examples/v2/google-chat-integration/GetGoogleChatOrganization.java
new file mode 100644
index 00000000000..98535e1b035
--- /dev/null
+++ b/examples/v2/google-chat-integration/GetGoogleChatOrganization.java
@@ -0,0 +1,26 @@
+// Get a Google Chat organization binding 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.GoogleChatOrganizationResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient);
+
+ try {
+ GoogleChatOrganizationResponse result =
+ apiInstance.getGoogleChatOrganization("organization_binding_id");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#getGoogleChatOrganization");
+ 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/GetGoogleChatTargetAudience.java b/examples/v2/google-chat-integration/GetGoogleChatTargetAudience.java
new file mode 100644
index 00000000000..16aaea85d57
--- /dev/null
+++ b/examples/v2/google-chat-integration/GetGoogleChatTargetAudience.java
@@ -0,0 +1,26 @@
+// Get a target audience 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.GoogleChatTargetAudienceResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient);
+
+ try {
+ GoogleChatTargetAudienceResponse result =
+ apiInstance.getGoogleChatTargetAudience("organization_binding_id", "target_audience_id");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#getGoogleChatTargetAudience");
+ 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/ListGoogleChatOrganizations.java b/examples/v2/google-chat-integration/ListGoogleChatOrganizations.java
new file mode 100644
index 00000000000..2c808b522a4
--- /dev/null
+++ b/examples/v2/google-chat-integration/ListGoogleChatOrganizations.java
@@ -0,0 +1,25 @@
+// Get all Google Chat organization bindings 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.GoogleChatOrganizationsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient);
+
+ try {
+ GoogleChatOrganizationsResponse result = apiInstance.listGoogleChatOrganizations();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#listGoogleChatOrganizations");
+ 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/ListGoogleChatTargetAudiences.java b/examples/v2/google-chat-integration/ListGoogleChatTargetAudiences.java
new file mode 100644
index 00000000000..31904f15504
--- /dev/null
+++ b/examples/v2/google-chat-integration/ListGoogleChatTargetAudiences.java
@@ -0,0 +1,26 @@
+// Get all target audiences 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.GoogleChatTargetAudiencesResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient);
+
+ try {
+ GoogleChatTargetAudiencesResponse result =
+ apiInstance.listGoogleChatTargetAudiences("organization_binding_id");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#listGoogleChatTargetAudiences");
+ 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/UpdateGoogleChatTargetAudience.java b/examples/v2/google-chat-integration/UpdateGoogleChatTargetAudience.java
new file mode 100644
index 00000000000..b0f75da654b
--- /dev/null
+++ b/examples/v2/google-chat-integration/UpdateGoogleChatTargetAudience.java
@@ -0,0 +1,41 @@
+// Update a target audience 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.GoogleChatTargetAudienceResponse;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceType;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceUpdateRequest;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceUpdateRequestAttributes;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceUpdateRequestData;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient);
+
+ GoogleChatTargetAudienceUpdateRequest body =
+ new GoogleChatTargetAudienceUpdateRequest()
+ .data(
+ new GoogleChatTargetAudienceUpdateRequestData()
+ .attributes(
+ new GoogleChatTargetAudienceUpdateRequestAttributes()
+ .audienceId("fake-audience-id-1")
+ .audienceName("fake audience name 1"))
+ .type(GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE));
+
+ try {
+ GoogleChatTargetAudienceResponse result =
+ apiInstance.updateGoogleChatTargetAudience(
+ "organization_binding_id", "target_audience_id", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling GoogleChatIntegrationApi#updateGoogleChatTargetAudience");
+ 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
index 61e1c6a403f..bf437a0155a 100644
--- a/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java
+++ b/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java
@@ -6,8 +6,15 @@
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.GoogleChatDelegatedUserResponse;
import com.datadog.api.client.v2.model.GoogleChatOrganizationHandleResponse;
import com.datadog.api.client.v2.model.GoogleChatOrganizationHandlesResponse;
+import com.datadog.api.client.v2.model.GoogleChatOrganizationResponse;
+import com.datadog.api.client.v2.model.GoogleChatOrganizationsResponse;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceCreateRequest;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceResponse;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudienceUpdateRequest;
+import com.datadog.api.client.v2.model.GoogleChatTargetAudiencesResponse;
import com.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequest;
import jakarta.ws.rs.client.Invocation;
import jakarta.ws.rs.core.GenericType;
@@ -47,6 +54,180 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
+ /**
+ * Create a target audience.
+ *
+ *
See {@link #createGoogleChatTargetAudienceWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param body Target audience payload. (required)
+ * @return GoogleChatTargetAudienceResponse
+ * @throws ApiException if fails to make API call
+ */
+ public GoogleChatTargetAudienceResponse createGoogleChatTargetAudience(
+ String organizationBindingId, GoogleChatTargetAudienceCreateRequest body)
+ throws ApiException {
+ return createGoogleChatTargetAudienceWithHttpInfo(organizationBindingId, body).getData();
+ }
+
+ /**
+ * Create a target audience.
+ *
+ *
See {@link #createGoogleChatTargetAudienceWithHttpInfoAsync}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param body Target audience payload. (required)
+ * @return CompletableFuture<GoogleChatTargetAudienceResponse>
+ */
+ public CompletableFuture createGoogleChatTargetAudienceAsync(
+ String organizationBindingId, GoogleChatTargetAudienceCreateRequest body) {
+ return createGoogleChatTargetAudienceWithHttpInfoAsync(organizationBindingId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a target audience for a Google Chat organization binding in the Datadog Google Chat
+ * integration.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param body Target audience payload. (required)
+ * @return ApiResponse<GoogleChatTargetAudienceResponse>
+ * @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 createGoogleChatTargetAudienceWithHttpInfo(
+ String organizationBindingId, GoogleChatTargetAudienceCreateRequest 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"
+ + " createGoogleChatTargetAudience");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createGoogleChatTargetAudience");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.createGoogleChatTargetAudience",
+ 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 a target audience.
+ *
+ * See {@link #createGoogleChatTargetAudienceWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param body Target audience payload. (required)
+ * @return CompletableFuture<ApiResponse<GoogleChatTargetAudienceResponse>>
+ */
+ public CompletableFuture>
+ createGoogleChatTargetAudienceWithHttpInfoAsync(
+ String organizationBindingId, GoogleChatTargetAudienceCreateRequest 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"
+ + " createGoogleChatTargetAudience"));
+ 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 createGoogleChatTargetAudience"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.createGoogleChatTargetAudience",
+ 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() {});
+ }
+
/**
* Create organization handle.
*
@@ -220,31 +401,27 @@ public ApiResponse createOrganizationHandl
}
/**
- * Delete organization handle.
+ * Delete the delegated user.
*
- * See {@link #deleteOrganizationHandleWithHttpInfo}.
+ *
See {@link #deleteGoogleChatDelegatedUserWithHttpInfo}.
*
* @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);
+ public void deleteGoogleChatDelegatedUser(String organizationBindingId) throws ApiException {
+ deleteGoogleChatDelegatedUserWithHttpInfo(organizationBindingId);
}
/**
- * Delete organization handle.
+ * Delete the delegated user.
*
- *
See {@link #deleteOrganizationHandleWithHttpInfoAsync}.
+ *
See {@link #deleteGoogleChatDelegatedUserWithHttpInfoAsync}.
*
* @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)
+ public CompletableFuture deleteGoogleChatDelegatedUserAsync(String organizationBindingId) {
+ return deleteGoogleChatDelegatedUserWithHttpInfoAsync(organizationBindingId)
.thenApply(
response -> {
return response.getData();
@@ -252,10 +429,10 @@ public CompletableFuture deleteOrganizationHandleAsync(
}
/**
- * Delete an organization handle from the Datadog Google Chat integration.
+ * Delete the delegated user for a Google Chat organization binding 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
@@ -263,13 +440,13 @@ public CompletableFuture deleteOrganizationHandleAsync(
* Response details
* | Status Code | Description | Response Headers |
* | 204 | OK | - |
- * | 400 | Bad Request | - |
* | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
* | 429 | Too many requests | - |
*
*/
- public ApiResponse deleteOrganizationHandleWithHttpInfo(
- String organizationBindingId, String handleId) throws ApiException {
+ public ApiResponse deleteGoogleChatDelegatedUserWithHttpInfo(String organizationBindingId)
+ throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'organizationBindingId' is set
@@ -277,27 +454,20 @@ public ApiResponse deleteOrganizationHandleWithHttpInfo(
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");
+ + " deleteGoogleChatDelegatedUser");
}
// create path and map variables
String localVarPath =
- "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}"
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user"
.replaceAll(
"\\{" + "organization_binding_id" + "\\}",
- apiClient.escapeString(organizationBindingId.toString()))
- .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString()));
+ apiClient.escapeString(organizationBindingId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.GoogleChatIntegrationApi.deleteOrganizationHandle",
+ "v2.GoogleChatIntegrationApi.deleteGoogleChatDelegatedUser",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -316,16 +486,15 @@ public ApiResponse deleteOrganizationHandleWithHttpInfo(
}
/**
- * Delete organization handle.
+ * Delete the delegated user.
*
- * See {@link #deleteOrganizationHandleWithHttpInfo}.
+ *
See {@link #deleteGoogleChatDelegatedUserWithHttpInfo}.
*
* @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) {
+ public CompletableFuture> deleteGoogleChatDelegatedUserWithHttpInfoAsync(
+ String organizationBindingId) {
Object localVarPostBody = null;
// verify the required parameter 'organizationBindingId' is set
@@ -335,26 +504,15 @@ public CompletableFuture> deleteOrganizationHandleWithHttpInfo
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"));
+ + " deleteGoogleChatDelegatedUser"));
return result;
}
// create path and map variables
String localVarPath =
- "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}"
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user"
.replaceAll(
"\\{" + "organization_binding_id" + "\\}",
- apiClient.escapeString(organizationBindingId.toString()))
- .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString()));
+ apiClient.escapeString(organizationBindingId.toString()));
Map localVarHeaderParams = new HashMap();
@@ -362,7 +520,7 @@ public CompletableFuture> deleteOrganizationHandleWithHttpInfo
try {
builder =
apiClient.createBuilder(
- "v2.GoogleChatIntegrationApi.deleteOrganizationHandle",
+ "v2.GoogleChatIntegrationApi.deleteGoogleChatDelegatedUser",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -386,32 +544,27 @@ public CompletableFuture> deleteOrganizationHandleWithHttpInfo
}
/**
- * Get organization handle.
+ * Delete a Google Chat organization binding.
*
- * See {@link #getOrganizationHandleWithHttpInfo}.
+ *
See {@link #deleteGoogleChatOrganizationWithHttpInfo}.
*
* @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();
+ public void deleteGoogleChatOrganization(String organizationBindingId) throws ApiException {
+ deleteGoogleChatOrganizationWithHttpInfo(organizationBindingId);
}
/**
- * Get organization handle.
+ * Delete a Google Chat organization binding.
*
- *
See {@link #getOrganizationHandleWithHttpInfoAsync}.
+ *
See {@link #deleteGoogleChatOrganizationWithHttpInfoAsync}.
*
* @param organizationBindingId Your organization binding ID. (required)
- * @param handleId Your organization handle ID. (required)
- * @return CompletableFuture<GoogleChatOrganizationHandleResponse>
+ * @return CompletableFuture
*/
- public CompletableFuture getOrganizationHandleAsync(
- String organizationBindingId, String handleId) {
- return getOrganizationHandleWithHttpInfoAsync(organizationBindingId, handleId)
+ public CompletableFuture deleteGoogleChatOrganizationAsync(String organizationBindingId) {
+ return deleteGoogleChatOrganizationWithHttpInfoAsync(organizationBindingId)
.thenApply(
response -> {
return response.getData();
@@ -419,25 +572,23 @@ public CompletableFuture getOrganizationHa
}
/**
- * Get an organization handle from the Datadog Google Chat integration.
+ * Delete a Google Chat organization binding from the Datadog Google Chat integration.
*
* @param organizationBindingId Your organization binding ID. (required)
- * @param handleId Your organization handle ID. (required)
- * @return ApiResponse<GoogleChatOrganizationHandleResponse>
+ * @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* | Status Code | Description | Response Headers |
- * | 200 | OK | - |
+ * | 204 | OK | - |
* | 400 | Bad Request | - |
* | 403 | Forbidden | - |
- * | 404 | Not Found | - |
* | 429 | Too many requests | - |
*
*/
- public ApiResponse getOrganizationHandleWithHttpInfo(
- String organizationBindingId, String handleId) throws ApiException {
+ public ApiResponse deleteGoogleChatOrganizationWithHttpInfo(String organizationBindingId)
+ throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'organizationBindingId' is set
@@ -445,84 +596,1048 @@ public ApiResponse getOrganizationHandleWi
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");
+ + " deleteGoogleChatOrganization");
}
// create path and map variables
String localVarPath =
- "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}"
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}"
.replaceAll(
"\\{" + "organization_binding_id" + "\\}",
- apiClient.escapeString(organizationBindingId.toString()))
- .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString()));
+ apiClient.escapeString(organizationBindingId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.GoogleChatIntegrationApi.getOrganizationHandle",
+ "v2.GoogleChatIntegrationApi.deleteGoogleChatOrganization",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
- new String[] {"application/json"},
+ new String[] {"*/*"},
new String[] {"apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
- "GET",
+ "DELETE",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ null);
}
/**
- * Get organization handle.
+ * Delete a Google Chat organization binding.
*
- * See {@link #getOrganizationHandleWithHttpInfo}.
+ *
See {@link #deleteGoogleChatOrganizationWithHttpInfo}.
*
* @param organizationBindingId Your organization binding ID. (required)
- * @param handleId Your organization handle ID. (required)
- * @return CompletableFuture<ApiResponse<GoogleChatOrganizationHandleResponse>>
+ * @return CompletableFuture<ApiResponse<Void>>
*/
- public CompletableFuture>
- getOrganizationHandleWithHttpInfoAsync(String organizationBindingId, String handleId) {
+ public CompletableFuture> deleteGoogleChatOrganizationWithHttpInfoAsync(
+ String organizationBindingId) {
Object localVarPostBody = null;
// verify the required parameter 'organizationBindingId' is set
if (organizationBindingId == null) {
- CompletableFuture> result =
- new CompletableFuture<>();
+ 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"));
+ + " deleteGoogleChatOrganization"));
return result;
}
// create path and map variables
String localVarPath =
- "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}"
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}"
.replaceAll(
"\\{" + "organization_binding_id" + "\\}",
- apiClient.escapeString(organizationBindingId.toString()))
+ apiClient.escapeString(organizationBindingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.deleteGoogleChatOrganization",
+ 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);
+ }
+
+ /**
+ * Delete a target audience.
+ *
+ * See {@link #deleteGoogleChatTargetAudienceWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param targetAudienceId Your target audience ID. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteGoogleChatTargetAudience(String organizationBindingId, String targetAudienceId)
+ throws ApiException {
+ deleteGoogleChatTargetAudienceWithHttpInfo(organizationBindingId, targetAudienceId);
+ }
+
+ /**
+ * Delete a target audience.
+ *
+ *
See {@link #deleteGoogleChatTargetAudienceWithHttpInfoAsync}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param targetAudienceId Your target audience ID. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteGoogleChatTargetAudienceAsync(
+ String organizationBindingId, String targetAudienceId) {
+ return deleteGoogleChatTargetAudienceWithHttpInfoAsync(organizationBindingId, targetAudienceId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete a target audience from a Google Chat organization binding in the Datadog Google Chat
+ * integration.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param targetAudienceId Your target audience 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 | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteGoogleChatTargetAudienceWithHttpInfo(
+ String organizationBindingId, String targetAudienceId) 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"
+ + " deleteGoogleChatTargetAudience");
+ }
+
+ // verify the required parameter 'targetAudienceId' is set
+ if (targetAudienceId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'targetAudienceId' when calling"
+ + " deleteGoogleChatTargetAudience");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()))
+ .replaceAll(
+ "\\{" + "target_audience_id" + "\\}",
+ apiClient.escapeString(targetAudienceId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.deleteGoogleChatTargetAudience",
+ 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 a target audience.
+ *
+ * See {@link #deleteGoogleChatTargetAudienceWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param targetAudienceId Your target audience ID. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteGoogleChatTargetAudienceWithHttpInfoAsync(
+ String organizationBindingId, String targetAudienceId) {
+ 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"
+ + " deleteGoogleChatTargetAudience"));
+ return result;
+ }
+
+ // verify the required parameter 'targetAudienceId' is set
+ if (targetAudienceId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'targetAudienceId' when calling"
+ + " deleteGoogleChatTargetAudience"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()))
+ .replaceAll(
+ "\\{" + "target_audience_id" + "\\}",
+ apiClient.escapeString(targetAudienceId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.deleteGoogleChatTargetAudience",
+ 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);
+ }
+
+ /**
+ * 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 the delegated user.
+ *
+ * See {@link #getGoogleChatDelegatedUserWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return GoogleChatDelegatedUserResponse
+ * @throws ApiException if fails to make API call
+ */
+ public GoogleChatDelegatedUserResponse getGoogleChatDelegatedUser(String organizationBindingId)
+ throws ApiException {
+ return getGoogleChatDelegatedUserWithHttpInfo(organizationBindingId).getData();
+ }
+
+ /**
+ * Get the delegated user.
+ *
+ *
See {@link #getGoogleChatDelegatedUserWithHttpInfoAsync}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return CompletableFuture<GoogleChatDelegatedUserResponse>
+ */
+ public CompletableFuture getGoogleChatDelegatedUserAsync(
+ String organizationBindingId) {
+ return getGoogleChatDelegatedUserWithHttpInfoAsync(organizationBindingId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get the delegated user for a Google Chat organization binding in the Datadog Google Chat
+ * integration.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return ApiResponse<GoogleChatDelegatedUserResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getGoogleChatDelegatedUserWithHttpInfo(
+ 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"
+ + " getGoogleChatDelegatedUser");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.getGoogleChatDelegatedUser",
+ 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 the delegated user.
+ *
+ * See {@link #getGoogleChatDelegatedUserWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return CompletableFuture<ApiResponse<GoogleChatDelegatedUserResponse>>
+ */
+ public CompletableFuture>
+ getGoogleChatDelegatedUserWithHttpInfoAsync(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"
+ + " getGoogleChatDelegatedUser"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.getGoogleChatDelegatedUser",
+ 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 a Google Chat organization binding.
+ *
+ * See {@link #getGoogleChatOrganizationWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return GoogleChatOrganizationResponse
+ * @throws ApiException if fails to make API call
+ */
+ public GoogleChatOrganizationResponse getGoogleChatOrganization(String organizationBindingId)
+ throws ApiException {
+ return getGoogleChatOrganizationWithHttpInfo(organizationBindingId).getData();
+ }
+
+ /**
+ * Get a Google Chat organization binding.
+ *
+ *
See {@link #getGoogleChatOrganizationWithHttpInfoAsync}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return CompletableFuture<GoogleChatOrganizationResponse>
+ */
+ public CompletableFuture getGoogleChatOrganizationAsync(
+ String organizationBindingId) {
+ return getGoogleChatOrganizationWithHttpInfoAsync(organizationBindingId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a Google Chat organization binding from the Datadog Google Chat integration.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return ApiResponse<GoogleChatOrganizationResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getGoogleChatOrganizationWithHttpInfo(
+ 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"
+ + " getGoogleChatOrganization");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.getGoogleChatOrganization",
+ 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 a Google Chat organization binding.
+ *
+ * See {@link #getGoogleChatOrganizationWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return CompletableFuture<ApiResponse<GoogleChatOrganizationResponse>>
+ */
+ public CompletableFuture>
+ getGoogleChatOrganizationWithHttpInfoAsync(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"
+ + " getGoogleChatOrganization"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.getGoogleChatOrganization",
+ 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 a target audience.
+ *
+ * See {@link #getGoogleChatTargetAudienceWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param targetAudienceId Your target audience ID. (required)
+ * @return GoogleChatTargetAudienceResponse
+ * @throws ApiException if fails to make API call
+ */
+ public GoogleChatTargetAudienceResponse getGoogleChatTargetAudience(
+ String organizationBindingId, String targetAudienceId) throws ApiException {
+ return getGoogleChatTargetAudienceWithHttpInfo(organizationBindingId, targetAudienceId)
+ .getData();
+ }
+
+ /**
+ * Get a target audience.
+ *
+ *
See {@link #getGoogleChatTargetAudienceWithHttpInfoAsync}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param targetAudienceId Your target audience ID. (required)
+ * @return CompletableFuture<GoogleChatTargetAudienceResponse>
+ */
+ public CompletableFuture getGoogleChatTargetAudienceAsync(
+ String organizationBindingId, String targetAudienceId) {
+ return getGoogleChatTargetAudienceWithHttpInfoAsync(organizationBindingId, targetAudienceId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a target audience for a Google Chat organization binding in the Datadog Google Chat
+ * integration.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param targetAudienceId Your target audience ID. (required)
+ * @return ApiResponse<GoogleChatTargetAudienceResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getGoogleChatTargetAudienceWithHttpInfo(
+ String organizationBindingId, String targetAudienceId) 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"
+ + " getGoogleChatTargetAudience");
+ }
+
+ // verify the required parameter 'targetAudienceId' is set
+ if (targetAudienceId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'targetAudienceId' when calling"
+ + " getGoogleChatTargetAudience");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()))
+ .replaceAll(
+ "\\{" + "target_audience_id" + "\\}",
+ apiClient.escapeString(targetAudienceId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.getGoogleChatTargetAudience",
+ 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 a target audience.
+ *
+ * See {@link #getGoogleChatTargetAudienceWithHttpInfo}.
+ *
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @param targetAudienceId Your target audience ID. (required)
+ * @return CompletableFuture<ApiResponse<GoogleChatTargetAudienceResponse>>
+ */
+ public CompletableFuture>
+ getGoogleChatTargetAudienceWithHttpInfoAsync(
+ String organizationBindingId, String targetAudienceId) {
+ 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"
+ + " getGoogleChatTargetAudience"));
+ return result;
+ }
+
+ // verify the required parameter 'targetAudienceId' is set
+ if (targetAudienceId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'targetAudienceId' when calling"
+ + " getGoogleChatTargetAudience"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}"
+ .replaceAll(
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()))
+ .replaceAll(
+ "\\{" + "target_audience_id" + "\\}",
+ apiClient.escapeString(targetAudienceId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.getGoogleChatTargetAudience",
+ 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 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();
@@ -531,7 +1646,292 @@ public ApiResponse getOrganizationHandleWi
try {
builder =
apiClient.createBuilder(
- "v2.GoogleChatIntegrationApi.getOrganizationHandle",
+ "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 Google Chat organization bindings.
+ *
+ * See {@link #listGoogleChatOrganizationsWithHttpInfo}.
+ *
+ * @return GoogleChatOrganizationsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public GoogleChatOrganizationsResponse listGoogleChatOrganizations() throws ApiException {
+ return listGoogleChatOrganizationsWithHttpInfo().getData();
+ }
+
+ /**
+ * Get all Google Chat organization bindings.
+ *
+ *
See {@link #listGoogleChatOrganizationsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<GoogleChatOrganizationsResponse>
+ */
+ public CompletableFuture listGoogleChatOrganizationsAsync() {
+ return listGoogleChatOrganizationsWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a list of all Google Chat organization bindings in the Datadog Google Chat integration.
+ *
+ * @return ApiResponse<GoogleChatOrganizationsResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 403 | Forbidden | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listGoogleChatOrganizationsWithHttpInfo()
+ throws ApiException {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/google-chat/organizations";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.listGoogleChatOrganizations",
+ 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 Google Chat organization bindings.
+ *
+ * See {@link #listGoogleChatOrganizationsWithHttpInfo}.
+ *
+ * @return CompletableFuture<ApiResponse<GoogleChatOrganizationsResponse>>
+ */
+ public CompletableFuture>
+ listGoogleChatOrganizationsWithHttpInfoAsync() {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/google-chat/organizations";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.GoogleChatIntegrationApi.listGoogleChatOrganizations",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -539,7 +1939,7 @@ public ApiResponse getOrganizationHandleWi
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
- CompletableFuture> result =
+ CompletableFuture> result =
new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
@@ -552,36 +1952,34 @@ public ApiResponse getOrganizationHandleWi
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
- * Get space information by display name.
+ * Get all target audiences.
*
- * See {@link #getSpaceByDisplayNameWithHttpInfo}.
+ *
See {@link #listGoogleChatTargetAudiencesWithHttpInfo}.
*
- * @param domainName The Google Chat domain name. (required)
- * @param spaceDisplayName The Google Chat space display name. (required)
- * @return GoogleChatAppNamedSpaceResponse
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return GoogleChatTargetAudiencesResponse
* @throws ApiException if fails to make API call
*/
- public GoogleChatAppNamedSpaceResponse getSpaceByDisplayName(
- String domainName, String spaceDisplayName) throws ApiException {
- return getSpaceByDisplayNameWithHttpInfo(domainName, spaceDisplayName).getData();
+ public GoogleChatTargetAudiencesResponse listGoogleChatTargetAudiences(
+ String organizationBindingId) throws ApiException {
+ return listGoogleChatTargetAudiencesWithHttpInfo(organizationBindingId).getData();
}
/**
- * Get space information by display name.
+ * Get all target audiences.
*
- *
See {@link #getSpaceByDisplayNameWithHttpInfoAsync}.
+ *
See {@link #listGoogleChatTargetAudiencesWithHttpInfoAsync}.
*
- * @param domainName The Google Chat domain name. (required)
- * @param spaceDisplayName The Google Chat space display name. (required)
- * @return CompletableFuture<GoogleChatAppNamedSpaceResponse>
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return CompletableFuture<GoogleChatTargetAudiencesResponse>
*/
- public CompletableFuture getSpaceByDisplayNameAsync(
- String domainName, String spaceDisplayName) {
- return getSpaceByDisplayNameWithHttpInfoAsync(domainName, spaceDisplayName)
+ public CompletableFuture listGoogleChatTargetAudiencesAsync(
+ String organizationBindingId) {
+ return listGoogleChatTargetAudiencesWithHttpInfoAsync(organizationBindingId)
.thenApply(
response -> {
return response.getData();
@@ -589,54 +1987,45 @@ public CompletableFuture getSpaceByDisplayNameA
}
/**
- * Get the resource name and organization binding ID of a space in the Datadog Google Chat
- * integration.
+ * Get a list of all target audiences for a Google Chat organization binding 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>
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return ApiResponse<GoogleChatTargetAudiencesResponse>
* @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 {
+ public ApiResponse listGoogleChatTargetAudiencesWithHttpInfo(
+ String organizationBindingId) 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) {
+ // verify the required parameter 'organizationBindingId' is set
+ if (organizationBindingId == null) {
throw new ApiException(
400,
- "Missing the required parameter 'spaceDisplayName' when calling getSpaceByDisplayName");
+ "Missing the required parameter 'organizationBindingId' when calling"
+ + " listGoogleChatTargetAudiences");
}
// create path and map variables
String localVarPath =
- "/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}"
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences"
.replaceAll(
- "\\{" + "domain_name" + "\\}", apiClient.escapeString(domainName.toString()))
- .replaceAll(
- "\\{" + "space_display_name" + "\\}",
- apiClient.escapeString(spaceDisplayName.toString()));
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.GoogleChatIntegrationApi.getSpaceByDisplayName",
+ "v2.GoogleChatIntegrationApi.listGoogleChatTargetAudiences",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -651,52 +2040,38 @@ public ApiResponse getSpaceByDisplayNameWithHtt
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
- * Get space information by display name.
+ * Get all target audiences.
*
- * See {@link #getSpaceByDisplayNameWithHttpInfo}.
+ *
See {@link #listGoogleChatTargetAudiencesWithHttpInfo}.
*
- * @param domainName The Google Chat domain name. (required)
- * @param spaceDisplayName The Google Chat space display name. (required)
- * @return CompletableFuture<ApiResponse<GoogleChatAppNamedSpaceResponse>>
+ * @param organizationBindingId Your organization binding ID. (required)
+ * @return CompletableFuture<ApiResponse<GoogleChatTargetAudiencesResponse>>
*/
- public CompletableFuture>
- getSpaceByDisplayNameWithHttpInfoAsync(String domainName, String spaceDisplayName) {
+ public CompletableFuture>
+ listGoogleChatTargetAudiencesWithHttpInfoAsync(String organizationBindingId) {
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 =
+ // verify the required parameter 'organizationBindingId' is set
+ if (organizationBindingId == null) {
+ CompletableFuture> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400,
- "Missing the required parameter 'spaceDisplayName' when calling"
- + " getSpaceByDisplayName"));
+ "Missing the required parameter 'organizationBindingId' when calling"
+ + " listGoogleChatTargetAudiences"));
return result;
}
// create path and map variables
String localVarPath =
- "/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}"
+ "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences"
.replaceAll(
- "\\{" + "domain_name" + "\\}", apiClient.escapeString(domainName.toString()))
- .replaceAll(
- "\\{" + "space_display_name" + "\\}",
- apiClient.escapeString(spaceDisplayName.toString()));
+ "\\{" + "organization_binding_id" + "\\}",
+ apiClient.escapeString(organizationBindingId.toString()));
Map localVarHeaderParams = new HashMap();
@@ -704,7 +2079,7 @@ public ApiResponse getSpaceByDisplayNameWithHtt
try {
builder =
apiClient.createBuilder(
- "v2.GoogleChatIntegrationApi.getSpaceByDisplayName",
+ "v2.GoogleChatIntegrationApi.listGoogleChatTargetAudiences",
localVarPath,
new ArrayList(),
localVarHeaderParams,
@@ -712,7 +2087,7 @@ public ApiResponse getSpaceByDisplayNameWithHtt
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
- CompletableFuture> result =
+ CompletableFuture> result =
new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
@@ -725,7 +2100,7 @@ public ApiResponse getSpaceByDisplayNameWithHtt
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType