diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index b0d3125fb5b..ce80244d235 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -707,6 +707,15 @@ components:
schema:
example: monitor_timezone
type: string
+ OrgConnectionId:
+ description: The unique identifier of the org connection.
+ in: path
+ name: connection_id
+ required: true
+ schema:
+ example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a
+ format: uuid
+ type: string
PageNumber:
description: Specific page number to return.
in: query
@@ -31762,6 +31771,255 @@ components:
required:
- data
type: object
+ OrgConnection:
+ description: An org connection.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/OrgConnectionAttributes'
+ id:
+ description: The unique identifier of the org connection.
+ example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a
+ format: uuid
+ type: string
+ relationships:
+ $ref: '#/components/schemas/OrgConnectionRelationships'
+ type:
+ $ref: '#/components/schemas/OrgConnectionType'
+ required:
+ - id
+ - type
+ - attributes
+ - relationships
+ type: object
+ OrgConnectionAttributes:
+ description: Org connection attributes.
+ properties:
+ connection_types:
+ description: List of connection types.
+ example:
+ - logs
+ - metrics
+ items:
+ $ref: '#/components/schemas/OrgConnectionTypeEnum'
+ type: array
+ created_at:
+ description: Timestamp when the connection was created.
+ example: '2023-01-01T12:00:00Z'
+ format: date-time
+ type: string
+ required:
+ - connection_types
+ - created_at
+ type: object
+ OrgConnectionCreate:
+ description: Org connection creation data.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/OrgConnectionCreateAttributes'
+ relationships:
+ $ref: '#/components/schemas/OrgConnectionCreateRelationships'
+ type:
+ $ref: '#/components/schemas/OrgConnectionType'
+ required:
+ - type
+ - attributes
+ - relationships
+ type: object
+ OrgConnectionCreateAttributes:
+ description: Attributes for creating an org connection.
+ properties:
+ connection_types:
+ description: List of connection types to establish.
+ example:
+ - logs
+ items:
+ $ref: '#/components/schemas/OrgConnectionTypeEnum'
+ minItems: 1
+ type: array
+ required:
+ - connection_types
+ type: object
+ OrgConnectionCreateRelationships:
+ description: Relationships for org connection creation.
+ properties:
+ sink_org:
+ $ref: '#/components/schemas/OrgConnectionOrgRelationship'
+ required:
+ - sink_org
+ type: object
+ OrgConnectionCreateRequest:
+ description: Request to create an org connection.
+ properties:
+ data:
+ $ref: '#/components/schemas/OrgConnectionCreate'
+ required:
+ - data
+ type: object
+ OrgConnectionListResponse:
+ description: Response containing a list of org connections.
+ properties:
+ data:
+ description: List of org connections.
+ items:
+ $ref: '#/components/schemas/OrgConnection'
+ type: array
+ meta:
+ $ref: '#/components/schemas/OrgConnectionListResponseMeta'
+ required:
+ - data
+ type: object
+ OrgConnectionListResponseMeta:
+ description: Pagination metadata.
+ properties:
+ page:
+ $ref: '#/components/schemas/OrgConnectionListResponseMetaPage'
+ type: object
+ OrgConnectionListResponseMetaPage:
+ description: Page information.
+ properties:
+ total_count:
+ description: Total number of org connections.
+ example: 0
+ format: int64
+ type: integer
+ total_filtered_count:
+ description: Total number of org connections matching the filter.
+ example: 0
+ format: int64
+ type: integer
+ type: object
+ OrgConnectionOrgRelationship:
+ description: Org relationship.
+ properties:
+ data:
+ $ref: '#/components/schemas/OrgConnectionOrgRelationshipData'
+ type: object
+ OrgConnectionOrgRelationshipData:
+ description: The definition of `OrgConnectionOrgRelationshipData` object.
+ properties:
+ id:
+ description: Org UUID.
+ example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a
+ type: string
+ name:
+ description: Org name.
+ example: Example Org
+ type: string
+ type:
+ $ref: '#/components/schemas/OrgConnectionOrgRelationshipDataType'
+ type: object
+ OrgConnectionOrgRelationshipDataType:
+ description: The type of the organization relationship.
+ enum:
+ - orgs
+ example: orgs
+ type: string
+ x-enum-varnames:
+ - ORGS
+ OrgConnectionRelationships:
+ description: Related organizations and user.
+ properties:
+ created_by:
+ $ref: '#/components/schemas/OrgConnectionUserRelationship'
+ sink_org:
+ $ref: '#/components/schemas/OrgConnectionOrgRelationship'
+ source_org:
+ $ref: '#/components/schemas/OrgConnectionOrgRelationship'
+ type: object
+ OrgConnectionResponse:
+ description: Response containing a single org connection.
+ properties:
+ data:
+ $ref: '#/components/schemas/OrgConnection'
+ required:
+ - data
+ type: object
+ OrgConnectionType:
+ description: Org connection type.
+ enum:
+ - org_connection
+ example: org_connection
+ type: string
+ x-enum-varnames:
+ - ORG_CONNECTION
+ OrgConnectionTypeEnum:
+ description: Available connection types between organizations.
+ enum:
+ - logs
+ - metrics
+ example: logs
+ type: string
+ x-enum-varnames:
+ - LOGS
+ - METRICS
+ OrgConnectionUpdate:
+ description: Org connection update data.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/OrgConnectionUpdateAttributes'
+ id:
+ description: The unique identifier of the org connection.
+ example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a
+ format: uuid
+ type: string
+ type:
+ $ref: '#/components/schemas/OrgConnectionType'
+ required:
+ - type
+ - id
+ - attributes
+ type: object
+ OrgConnectionUpdateAttributes:
+ description: Attributes for updating an org connection.
+ properties:
+ connection_types:
+ description: Updated list of connection types.
+ example:
+ - logs
+ - metrics
+ items:
+ $ref: '#/components/schemas/OrgConnectionTypeEnum'
+ minItems: 1
+ type: array
+ required:
+ - connection_types
+ type: object
+ OrgConnectionUpdateRequest:
+ description: Request to update an org connection.
+ properties:
+ data:
+ $ref: '#/components/schemas/OrgConnectionUpdate'
+ required:
+ - data
+ type: object
+ OrgConnectionUserRelationship:
+ description: User relationship.
+ properties:
+ data:
+ $ref: '#/components/schemas/OrgConnectionUserRelationshipData'
+ type: object
+ OrgConnectionUserRelationshipData:
+ description: The data for a user relationship.
+ properties:
+ id:
+ description: User UUID.
+ example: usr123abc456
+ type: string
+ name:
+ description: User name.
+ example: John Doe
+ type: string
+ type:
+ $ref: '#/components/schemas/OrgConnectionUserRelationshipDataType'
+ type: object
+ OrgConnectionUserRelationshipDataType:
+ description: The type of the user relationship.
+ enum:
+ - users
+ example: users
+ type: string
+ x-enum-varnames:
+ - USERS
Organization:
description: Organization object.
properties:
@@ -46610,6 +46868,8 @@ components:
is not required to set downtimes.
monitors_read: View monitors.
monitors_write: Edit, delete, and resolve individual monitors.
+ org_connections_read: Read cross organization connections.
+ org_connections_write: Create, edit, and delete cross organization connections.
org_management: Edit org configurations, including authentication and
certain security preferences such as configuring SAML, renaming an org,
configuring allowed login methods, creating child orgs, subscribing
@@ -60010,6 +60270,148 @@ paths:
operator: OR
permissions:
- org_management
+ /api/v2/org_connections:
+ get:
+ description: Returns a list of org connections.
+ operationId: ListOrgConnections
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrgConnectionListResponse'
+ description: OK
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - org_connections_read
+ summary: List Org Connections
+ tags:
+ - Org Connections
+ x-permission:
+ operator: OR
+ permissions:
+ - org_connections_read
+ post:
+ description: Create a new org connection between the current org and a target
+ org.
+ operationId: CreateOrgConnections
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrgConnectionCreateRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrgConnectionResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - org_connections_write
+ summary: Create Org Connection
+ tags:
+ - Org Connections
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - org_connections_write
+ /api/v2/org_connections/{connection_id}:
+ delete:
+ description: Delete an existing org connection.
+ operationId: DeleteOrgConnections
+ parameters:
+ - $ref: '#/components/parameters/OrgConnectionId'
+ responses:
+ '200':
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - org_connections_write
+ summary: Delete Org Connection
+ tags:
+ - Org Connections
+ x-permission:
+ operator: OR
+ permissions:
+ - org_connections_write
+ patch:
+ description: Update an existing org connection.
+ operationId: UpdateOrgConnections
+ parameters:
+ - $ref: '#/components/parameters/OrgConnectionId'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrgConnectionUpdateRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrgConnectionResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - org_connections_write
+ summary: Update Org Connection
+ tags:
+ - Org Connections
+ x-permission:
+ operator: OR
+ permissions:
+ - org_connections_write
/api/v2/permissions:
get:
description: Returns a list of all permissions, including name, description,
@@ -70600,6 +71002,11 @@ tags:
externalDocs:
url: https://docs.datadoghq.com/api/latest/opsgenie-integration
name: Opsgenie Integration
+- description: Manage connections between organizations. Org connections allow for
+ controlled sharing of data between different Datadog organizations. See the [Cross-Organization
+ Visibiltiy](https://docs.datadoghq.com/account_management/org_settings/cross_org_visibility/)
+ page for more information.
+ name: Org Connections
- description: Create, edit, and manage your organizations. Read more about [multi-org
accounts](https://docs.datadoghq.com/account_management/multi_organization).
externalDocs:
diff --git a/examples/v2/org-connections/CreateOrgConnections.java b/examples/v2/org-connections/CreateOrgConnections.java
new file mode 100644
index 00000000000..a23825d4d57
--- /dev/null
+++ b/examples/v2/org-connections/CreateOrgConnections.java
@@ -0,0 +1,52 @@
+// Create Org Connection returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OrgConnectionsApi;
+import com.datadog.api.client.v2.model.OrgConnectionCreate;
+import com.datadog.api.client.v2.model.OrgConnectionCreateAttributes;
+import com.datadog.api.client.v2.model.OrgConnectionCreateRelationships;
+import com.datadog.api.client.v2.model.OrgConnectionCreateRequest;
+import com.datadog.api.client.v2.model.OrgConnectionOrgRelationship;
+import com.datadog.api.client.v2.model.OrgConnectionOrgRelationshipData;
+import com.datadog.api.client.v2.model.OrgConnectionOrgRelationshipDataType;
+import com.datadog.api.client.v2.model.OrgConnectionResponse;
+import com.datadog.api.client.v2.model.OrgConnectionType;
+import com.datadog.api.client.v2.model.OrgConnectionTypeEnum;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ OrgConnectionsApi apiInstance = new OrgConnectionsApi(defaultClient);
+
+ OrgConnectionCreateRequest body =
+ new OrgConnectionCreateRequest()
+ .data(
+ new OrgConnectionCreate()
+ .type(OrgConnectionType.ORG_CONNECTION)
+ .relationships(
+ new OrgConnectionCreateRelationships()
+ .sinkOrg(
+ new OrgConnectionOrgRelationship()
+ .data(
+ new OrgConnectionOrgRelationshipData()
+ .type(OrgConnectionOrgRelationshipDataType.ORGS)
+ .id("83999dcd-7f97-11f0-8de1-1ecf66f1aa85"))))
+ .attributes(
+ new OrgConnectionCreateAttributes()
+ .connectionTypes(
+ Collections.singletonList(OrgConnectionTypeEnum.LOGS))));
+
+ try {
+ OrgConnectionResponse result = apiInstance.createOrgConnections(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling OrgConnectionsApi#createOrgConnections");
+ 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/org-connections/DeleteOrgConnections.java b/examples/v2/org-connections/DeleteOrgConnections.java
new file mode 100644
index 00000000000..2a2497201ce
--- /dev/null
+++ b/examples/v2/org-connections/DeleteOrgConnections.java
@@ -0,0 +1,31 @@
+// Delete Org Connection returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OrgConnectionsApi;
+import java.util.UUID;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ OrgConnectionsApi apiInstance = new OrgConnectionsApi(defaultClient);
+
+ // there is a valid "org_connection" in the system
+ UUID ORG_CONNECTION_DATA_ID = null;
+ try {
+ ORG_CONNECTION_DATA_ID = UUID.fromString(System.getenv("ORG_CONNECTION_DATA_ID"));
+ } catch (IllegalArgumentException e) {
+ System.err.println("Error parsing UUID: " + e.getMessage());
+ }
+
+ try {
+ apiInstance.deleteOrgConnections(ORG_CONNECTION_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling OrgConnectionsApi#deleteOrgConnections");
+ 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/org-connections/ListOrgConnections.java b/examples/v2/org-connections/ListOrgConnections.java
new file mode 100644
index 00000000000..4828169a040
--- /dev/null
+++ b/examples/v2/org-connections/ListOrgConnections.java
@@ -0,0 +1,24 @@
+// List Org Connections returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OrgConnectionsApi;
+import com.datadog.api.client.v2.model.OrgConnectionListResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ OrgConnectionsApi apiInstance = new OrgConnectionsApi(defaultClient);
+
+ try {
+ OrgConnectionListResponse result = apiInstance.listOrgConnections();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling OrgConnectionsApi#listOrgConnections");
+ 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/org-connections/UpdateOrgConnections.java b/examples/v2/org-connections/UpdateOrgConnections.java
new file mode 100644
index 00000000000..1109014f2f4
--- /dev/null
+++ b/examples/v2/org-connections/UpdateOrgConnections.java
@@ -0,0 +1,51 @@
+// Update Org Connection returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OrgConnectionsApi;
+import com.datadog.api.client.v2.model.OrgConnectionResponse;
+import com.datadog.api.client.v2.model.OrgConnectionType;
+import com.datadog.api.client.v2.model.OrgConnectionTypeEnum;
+import com.datadog.api.client.v2.model.OrgConnectionUpdate;
+import com.datadog.api.client.v2.model.OrgConnectionUpdateAttributes;
+import com.datadog.api.client.v2.model.OrgConnectionUpdateRequest;
+import java.util.Arrays;
+import java.util.UUID;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ OrgConnectionsApi apiInstance = new OrgConnectionsApi(defaultClient);
+
+ // there is a valid "org_connection" in the system
+ UUID ORG_CONNECTION_DATA_ID = null;
+ try {
+ ORG_CONNECTION_DATA_ID = UUID.fromString(System.getenv("ORG_CONNECTION_DATA_ID"));
+ } catch (IllegalArgumentException e) {
+ System.err.println("Error parsing UUID: " + e.getMessage());
+ }
+
+ OrgConnectionUpdateRequest body =
+ new OrgConnectionUpdateRequest()
+ .data(
+ new OrgConnectionUpdate()
+ .type(OrgConnectionType.ORG_CONNECTION)
+ .id(ORG_CONNECTION_DATA_ID)
+ .attributes(
+ new OrgConnectionUpdateAttributes()
+ .connectionTypes(
+ Arrays.asList(
+ OrgConnectionTypeEnum.LOGS, OrgConnectionTypeEnum.METRICS))));
+
+ try {
+ OrgConnectionResponse result = apiInstance.updateOrgConnections(ORG_CONNECTION_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling OrgConnectionsApi#updateOrgConnections");
+ 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/OrgConnectionsApi.java b/src/main/java/com/datadog/api/client/v2/api/OrgConnectionsApi.java
new file mode 100644
index 00000000000..a589da39420
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/OrgConnectionsApi.java
@@ -0,0 +1,596 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.OrgConnectionCreateRequest;
+import com.datadog.api.client.v2.model.OrgConnectionListResponse;
+import com.datadog.api.client.v2.model.OrgConnectionResponse;
+import com.datadog.api.client.v2.model.OrgConnectionUpdateRequest;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionsApi {
+ private ApiClient apiClient;
+
+ public OrgConnectionsApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public OrgConnectionsApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create Org Connection.
+ *
+ *
See {@link #createOrgConnectionsWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return OrgConnectionResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OrgConnectionResponse createOrgConnections(OrgConnectionCreateRequest body)
+ throws ApiException {
+ return createOrgConnectionsWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create Org Connection.
+ *
+ *
See {@link #createOrgConnectionsWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<OrgConnectionResponse>
+ */
+ public CompletableFuture createOrgConnectionsAsync(
+ OrgConnectionCreateRequest body) {
+ return createOrgConnectionsWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a new org connection between the current org and a target org.
+ *
+ * @param body (required)
+ * @return ApiResponse<OrgConnectionResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 409 | Conflict | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createOrgConnectionsWithHttpInfo(
+ OrgConnectionCreateRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createOrgConnections");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/org_connections";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OrgConnectionsApi.createOrgConnections",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create Org Connection.
+ *
+ * See {@link #createOrgConnectionsWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<OrgConnectionResponse>>
+ */
+ public CompletableFuture>
+ createOrgConnectionsWithHttpInfoAsync(OrgConnectionCreateRequest body) {
+ Object localVarPostBody = body;
+
+ // 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 createOrgConnections"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/org_connections";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OrgConnectionsApi.createOrgConnections",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete Org Connection.
+ *
+ * See {@link #deleteOrgConnectionsWithHttpInfo}.
+ *
+ * @param connectionId The unique identifier of the org connection. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteOrgConnections(UUID connectionId) throws ApiException {
+ deleteOrgConnectionsWithHttpInfo(connectionId);
+ }
+
+ /**
+ * Delete Org Connection.
+ *
+ *
See {@link #deleteOrgConnectionsWithHttpInfoAsync}.
+ *
+ * @param connectionId The unique identifier of the org connection. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteOrgConnectionsAsync(UUID connectionId) {
+ return deleteOrgConnectionsWithHttpInfoAsync(connectionId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete an existing org connection.
+ *
+ * @param connectionId The unique identifier of the org connection. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteOrgConnectionsWithHttpInfo(UUID connectionId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'connectionId' is set
+ if (connectionId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'connectionId' when calling deleteOrgConnections");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/org_connections/{connection_id}"
+ .replaceAll(
+ "\\{" + "connection_id" + "\\}", apiClient.escapeString(connectionId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OrgConnectionsApi.deleteOrgConnections",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete Org Connection.
+ *
+ * See {@link #deleteOrgConnectionsWithHttpInfo}.
+ *
+ * @param connectionId The unique identifier of the org connection. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteOrgConnectionsWithHttpInfoAsync(
+ UUID connectionId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'connectionId' is set
+ if (connectionId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'connectionId' when calling deleteOrgConnections"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/org_connections/{connection_id}"
+ .replaceAll(
+ "\\{" + "connection_id" + "\\}", apiClient.escapeString(connectionId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OrgConnectionsApi.deleteOrgConnections",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } 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);
+ }
+
+ /**
+ * List Org Connections.
+ *
+ * See {@link #listOrgConnectionsWithHttpInfo}.
+ *
+ * @return OrgConnectionListResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OrgConnectionListResponse listOrgConnections() throws ApiException {
+ return listOrgConnectionsWithHttpInfo().getData();
+ }
+
+ /**
+ * List Org Connections.
+ *
+ *
See {@link #listOrgConnectionsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<OrgConnectionListResponse>
+ */
+ public CompletableFuture listOrgConnectionsAsync() {
+ return listOrgConnectionsWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Returns a list of org connections.
+ *
+ * @return ApiResponse<OrgConnectionListResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listOrgConnectionsWithHttpInfo()
+ throws ApiException {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/org_connections";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OrgConnectionsApi.listOrgConnections",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List Org Connections.
+ *
+ * See {@link #listOrgConnectionsWithHttpInfo}.
+ *
+ * @return CompletableFuture<ApiResponse<OrgConnectionListResponse>>
+ */
+ public CompletableFuture>
+ listOrgConnectionsWithHttpInfoAsync() {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/org_connections";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OrgConnectionsApi.listOrgConnections",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update Org Connection.
+ *
+ * See {@link #updateOrgConnectionsWithHttpInfo}.
+ *
+ * @param connectionId The unique identifier of the org connection. (required)
+ * @param body (required)
+ * @return OrgConnectionResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OrgConnectionResponse updateOrgConnections(
+ UUID connectionId, OrgConnectionUpdateRequest body) throws ApiException {
+ return updateOrgConnectionsWithHttpInfo(connectionId, body).getData();
+ }
+
+ /**
+ * Update Org Connection.
+ *
+ *
See {@link #updateOrgConnectionsWithHttpInfoAsync}.
+ *
+ * @param connectionId The unique identifier of the org connection. (required)
+ * @param body (required)
+ * @return CompletableFuture<OrgConnectionResponse>
+ */
+ public CompletableFuture updateOrgConnectionsAsync(
+ UUID connectionId, OrgConnectionUpdateRequest body) {
+ return updateOrgConnectionsWithHttpInfoAsync(connectionId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update an existing org connection.
+ *
+ * @param connectionId The unique identifier of the org connection. (required)
+ * @param body (required)
+ * @return ApiResponse<OrgConnectionResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateOrgConnectionsWithHttpInfo(
+ UUID connectionId, OrgConnectionUpdateRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'connectionId' is set
+ if (connectionId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'connectionId' when calling updateOrgConnections");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateOrgConnections");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/org_connections/{connection_id}"
+ .replaceAll(
+ "\\{" + "connection_id" + "\\}", apiClient.escapeString(connectionId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OrgConnectionsApi.updateOrgConnections",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update Org Connection.
+ *
+ * See {@link #updateOrgConnectionsWithHttpInfo}.
+ *
+ * @param connectionId The unique identifier of the org connection. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<OrgConnectionResponse>>
+ */
+ public CompletableFuture>
+ updateOrgConnectionsWithHttpInfoAsync(UUID connectionId, OrgConnectionUpdateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'connectionId' is set
+ if (connectionId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'connectionId' when calling updateOrgConnections"));
+ 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 updateOrgConnections"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/org_connections/{connection_id}"
+ .replaceAll(
+ "\\{" + "connection_id" + "\\}", apiClient.escapeString(connectionId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OrgConnectionsApi.updateOrgConnections",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnection.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnection.java
new file mode 100644
index 00000000000..3057fcc678b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnection.java
@@ -0,0 +1,241 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.UUID;
+
+/** An org connection. */
+@JsonPropertyOrder({
+ OrgConnection.JSON_PROPERTY_ATTRIBUTES,
+ OrgConnection.JSON_PROPERTY_ID,
+ OrgConnection.JSON_PROPERTY_RELATIONSHIPS,
+ OrgConnection.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnection {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private OrgConnectionAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private UUID id;
+
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
+ private OrgConnectionRelationships relationships;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OrgConnectionType type;
+
+ public OrgConnection() {}
+
+ @JsonCreator
+ public OrgConnection(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ OrgConnectionAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS)
+ OrgConnectionRelationships relationships,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OrgConnectionType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public OrgConnection attributes(OrgConnectionAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Org connection attributes.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(OrgConnectionAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public OrgConnection id(UUID id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the org connection.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ public OrgConnection relationships(OrgConnectionRelationships relationships) {
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ return this;
+ }
+
+ /**
+ * Related organizations and user.
+ *
+ * @return relationships
+ */
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionRelationships getRelationships() {
+ return relationships;
+ }
+
+ public void setRelationships(OrgConnectionRelationships relationships) {
+ this.relationships = relationships;
+ }
+
+ public OrgConnection type(OrgConnectionType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Org connection type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionType getType() {
+ return type;
+ }
+
+ public void setType(OrgConnectionType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnection
+ */
+ @JsonAnySetter
+ public OrgConnection putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnection object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnection orgConnection = (OrgConnection) o;
+ return Objects.equals(this.attributes, orgConnection.attributes)
+ && Objects.equals(this.id, orgConnection.id)
+ && Objects.equals(this.relationships, orgConnection.relationships)
+ && Objects.equals(this.type, orgConnection.type)
+ && Objects.equals(this.additionalProperties, orgConnection.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, relationships, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnection {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionAttributes.java
new file mode 100644
index 00000000000..9c8aad6c9cc
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionAttributes.java
@@ -0,0 +1,183 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Org connection attributes. */
+@JsonPropertyOrder({
+ OrgConnectionAttributes.JSON_PROPERTY_CONNECTION_TYPES,
+ OrgConnectionAttributes.JSON_PROPERTY_CREATED_AT
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CONNECTION_TYPES = "connection_types";
+ private List connectionTypes = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_CREATED_AT = "created_at";
+ private OffsetDateTime createdAt;
+
+ public OrgConnectionAttributes() {}
+
+ @JsonCreator
+ public OrgConnectionAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CONNECTION_TYPES)
+ List connectionTypes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt) {
+ this.connectionTypes = connectionTypes;
+ this.createdAt = createdAt;
+ }
+
+ public OrgConnectionAttributes connectionTypes(List connectionTypes) {
+ this.connectionTypes = connectionTypes;
+ return this;
+ }
+
+ public OrgConnectionAttributes addConnectionTypesItem(OrgConnectionTypeEnum connectionTypesItem) {
+ this.connectionTypes.add(connectionTypesItem);
+ this.unparsed |= !connectionTypesItem.isValid();
+ return this;
+ }
+
+ /**
+ * List of connection types.
+ *
+ * @return connectionTypes
+ */
+ @JsonProperty(JSON_PROPERTY_CONNECTION_TYPES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getConnectionTypes() {
+ return connectionTypes;
+ }
+
+ public void setConnectionTypes(List connectionTypes) {
+ this.connectionTypes = connectionTypes;
+ }
+
+ public OrgConnectionAttributes createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * Timestamp when the connection was created.
+ *
+ * @return createdAt
+ */
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionAttributes
+ */
+ @JsonAnySetter
+ public OrgConnectionAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionAttributes orgConnectionAttributes = (OrgConnectionAttributes) o;
+ return Objects.equals(this.connectionTypes, orgConnectionAttributes.connectionTypes)
+ && Objects.equals(this.createdAt, orgConnectionAttributes.createdAt)
+ && Objects.equals(this.additionalProperties, orgConnectionAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(connectionTypes, createdAt, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionAttributes {\n");
+ sb.append(" connectionTypes: ").append(toIndentedString(connectionTypes)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreate.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreate.java
new file mode 100644
index 00000000000..e8e908229ea
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreate.java
@@ -0,0 +1,212 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Org connection creation data. */
+@JsonPropertyOrder({
+ OrgConnectionCreate.JSON_PROPERTY_ATTRIBUTES,
+ OrgConnectionCreate.JSON_PROPERTY_RELATIONSHIPS,
+ OrgConnectionCreate.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionCreate {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private OrgConnectionCreateAttributes attributes;
+
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
+ private OrgConnectionCreateRelationships relationships;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OrgConnectionType type;
+
+ public OrgConnectionCreate() {}
+
+ @JsonCreator
+ public OrgConnectionCreate(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ OrgConnectionCreateAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS)
+ OrgConnectionCreateRelationships relationships,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OrgConnectionType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public OrgConnectionCreate attributes(OrgConnectionCreateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for creating an org connection.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionCreateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(OrgConnectionCreateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public OrgConnectionCreate relationships(OrgConnectionCreateRelationships relationships) {
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationships for org connection creation.
+ *
+ * @return relationships
+ */
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionCreateRelationships getRelationships() {
+ return relationships;
+ }
+
+ public void setRelationships(OrgConnectionCreateRelationships relationships) {
+ this.relationships = relationships;
+ }
+
+ public OrgConnectionCreate type(OrgConnectionType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Org connection type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionType getType() {
+ return type;
+ }
+
+ public void setType(OrgConnectionType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionCreate
+ */
+ @JsonAnySetter
+ public OrgConnectionCreate putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionCreate object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionCreate orgConnectionCreate = (OrgConnectionCreate) o;
+ return Objects.equals(this.attributes, orgConnectionCreate.attributes)
+ && Objects.equals(this.relationships, orgConnectionCreate.relationships)
+ && Objects.equals(this.type, orgConnectionCreate.type)
+ && Objects.equals(this.additionalProperties, orgConnectionCreate.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, relationships, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionCreate {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateAttributes.java
new file mode 100644
index 00000000000..abca62b3628
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateAttributes.java
@@ -0,0 +1,155 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes for creating an org connection. */
+@JsonPropertyOrder({OrgConnectionCreateAttributes.JSON_PROPERTY_CONNECTION_TYPES})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionCreateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CONNECTION_TYPES = "connection_types";
+ private List connectionTypes = new ArrayList<>();
+
+ public OrgConnectionCreateAttributes() {}
+
+ @JsonCreator
+ public OrgConnectionCreateAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CONNECTION_TYPES)
+ List connectionTypes) {
+ this.connectionTypes = connectionTypes;
+ }
+
+ public OrgConnectionCreateAttributes connectionTypes(
+ List connectionTypes) {
+ this.connectionTypes = connectionTypes;
+ return this;
+ }
+
+ public OrgConnectionCreateAttributes addConnectionTypesItem(
+ OrgConnectionTypeEnum connectionTypesItem) {
+ this.connectionTypes.add(connectionTypesItem);
+ this.unparsed |= !connectionTypesItem.isValid();
+ return this;
+ }
+
+ /**
+ * List of connection types to establish.
+ *
+ * @return connectionTypes
+ */
+ @JsonProperty(JSON_PROPERTY_CONNECTION_TYPES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getConnectionTypes() {
+ return connectionTypes;
+ }
+
+ public void setConnectionTypes(List connectionTypes) {
+ this.connectionTypes = connectionTypes;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionCreateAttributes
+ */
+ @JsonAnySetter
+ public OrgConnectionCreateAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionCreateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionCreateAttributes orgConnectionCreateAttributes = (OrgConnectionCreateAttributes) o;
+ return Objects.equals(this.connectionTypes, orgConnectionCreateAttributes.connectionTypes)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionCreateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(connectionTypes, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionCreateAttributes {\n");
+ sb.append(" connectionTypes: ").append(toIndentedString(connectionTypes)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateRelationships.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateRelationships.java
new file mode 100644
index 00000000000..ba21a549b53
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateRelationships.java
@@ -0,0 +1,148 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Relationships for org connection creation. */
+@JsonPropertyOrder({OrgConnectionCreateRelationships.JSON_PROPERTY_SINK_ORG})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionCreateRelationships {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_SINK_ORG = "sink_org";
+ private OrgConnectionOrgRelationship sinkOrg;
+
+ public OrgConnectionCreateRelationships() {}
+
+ @JsonCreator
+ public OrgConnectionCreateRelationships(
+ @JsonProperty(required = true, value = JSON_PROPERTY_SINK_ORG)
+ OrgConnectionOrgRelationship sinkOrg) {
+ this.sinkOrg = sinkOrg;
+ this.unparsed |= sinkOrg.unparsed;
+ }
+
+ public OrgConnectionCreateRelationships sinkOrg(OrgConnectionOrgRelationship sinkOrg) {
+ this.sinkOrg = sinkOrg;
+ this.unparsed |= sinkOrg.unparsed;
+ return this;
+ }
+
+ /**
+ * Org relationship.
+ *
+ * @return sinkOrg
+ */
+ @JsonProperty(JSON_PROPERTY_SINK_ORG)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionOrgRelationship getSinkOrg() {
+ return sinkOrg;
+ }
+
+ public void setSinkOrg(OrgConnectionOrgRelationship sinkOrg) {
+ this.sinkOrg = sinkOrg;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionCreateRelationships
+ */
+ @JsonAnySetter
+ public OrgConnectionCreateRelationships putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionCreateRelationships object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionCreateRelationships orgConnectionCreateRelationships =
+ (OrgConnectionCreateRelationships) o;
+ return Objects.equals(this.sinkOrg, orgConnectionCreateRelationships.sinkOrg)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionCreateRelationships.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(sinkOrg, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionCreateRelationships {\n");
+ sb.append(" sinkOrg: ").append(toIndentedString(sinkOrg)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateRequest.java
new file mode 100644
index 00000000000..6f14b5a08ee
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionCreateRequest.java
@@ -0,0 +1,146 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request to create an org connection. */
+@JsonPropertyOrder({OrgConnectionCreateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionCreateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OrgConnectionCreate data;
+
+ public OrgConnectionCreateRequest() {}
+
+ @JsonCreator
+ public OrgConnectionCreateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OrgConnectionCreate data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public OrgConnectionCreateRequest data(OrgConnectionCreate data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Org connection creation data.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionCreate getData() {
+ return data;
+ }
+
+ public void setData(OrgConnectionCreate data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionCreateRequest
+ */
+ @JsonAnySetter
+ public OrgConnectionCreateRequest putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionCreateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionCreateRequest orgConnectionCreateRequest = (OrgConnectionCreateRequest) o;
+ return Objects.equals(this.data, orgConnectionCreateRequest.data)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionCreateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionCreateRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponse.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponse.java
new file mode 100644
index 00000000000..0523009ab0d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponse.java
@@ -0,0 +1,185 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response containing a list of org connections. */
+@JsonPropertyOrder({
+ OrgConnectionListResponse.JSON_PROPERTY_DATA,
+ OrgConnectionListResponse.JSON_PROPERTY_META
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionListResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private List data = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_META = "meta";
+ private OrgConnectionListResponseMeta meta;
+
+ public OrgConnectionListResponse() {}
+
+ @JsonCreator
+ public OrgConnectionListResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) {
+ this.data = data;
+ }
+
+ public OrgConnectionListResponse data(List data) {
+ this.data = data;
+ for (OrgConnection item : data) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public OrgConnectionListResponse addDataItem(OrgConnection dataItem) {
+ this.data.add(dataItem);
+ this.unparsed |= dataItem.unparsed;
+ return this;
+ }
+
+ /**
+ * List of org connections.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getData() {
+ return data;
+ }
+
+ public void setData(List data) {
+ this.data = data;
+ }
+
+ public OrgConnectionListResponse meta(OrgConnectionListResponseMeta meta) {
+ this.meta = meta;
+ this.unparsed |= meta.unparsed;
+ return this;
+ }
+
+ /**
+ * Pagination metadata.
+ *
+ * @return meta
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_META)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionListResponseMeta getMeta() {
+ return meta;
+ }
+
+ public void setMeta(OrgConnectionListResponseMeta meta) {
+ this.meta = meta;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionListResponse
+ */
+ @JsonAnySetter
+ public OrgConnectionListResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionListResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionListResponse orgConnectionListResponse = (OrgConnectionListResponse) o;
+ return Objects.equals(this.data, orgConnectionListResponse.data)
+ && Objects.equals(this.meta, orgConnectionListResponse.meta)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionListResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, meta, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionListResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponseMeta.java
new file mode 100644
index 00000000000..5cf75680ae2
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponseMeta.java
@@ -0,0 +1,137 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Pagination metadata. */
+@JsonPropertyOrder({OrgConnectionListResponseMeta.JSON_PROPERTY_PAGE})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionListResponseMeta {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_PAGE = "page";
+ private OrgConnectionListResponseMetaPage page;
+
+ public OrgConnectionListResponseMeta page(OrgConnectionListResponseMetaPage page) {
+ this.page = page;
+ this.unparsed |= page.unparsed;
+ return this;
+ }
+
+ /**
+ * Page information.
+ *
+ * @return page
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PAGE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionListResponseMetaPage getPage() {
+ return page;
+ }
+
+ public void setPage(OrgConnectionListResponseMetaPage page) {
+ this.page = page;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionListResponseMeta
+ */
+ @JsonAnySetter
+ public OrgConnectionListResponseMeta putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionListResponseMeta object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionListResponseMeta orgConnectionListResponseMeta = (OrgConnectionListResponseMeta) o;
+ return Objects.equals(this.page, orgConnectionListResponseMeta.page)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionListResponseMeta.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(page, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionListResponseMeta {\n");
+ sb.append(" page: ").append(toIndentedString(page)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponseMetaPage.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponseMetaPage.java
new file mode 100644
index 00000000000..96d303203f4
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionListResponseMetaPage.java
@@ -0,0 +1,167 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Page information. */
+@JsonPropertyOrder({
+ OrgConnectionListResponseMetaPage.JSON_PROPERTY_TOTAL_COUNT,
+ OrgConnectionListResponseMetaPage.JSON_PROPERTY_TOTAL_FILTERED_COUNT
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionListResponseMetaPage {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count";
+ private Long totalCount;
+
+ public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count";
+ private Long totalFilteredCount;
+
+ public OrgConnectionListResponseMetaPage totalCount(Long totalCount) {
+ this.totalCount = totalCount;
+ return this;
+ }
+
+ /**
+ * Total number of org connections.
+ *
+ * @return totalCount
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TOTAL_COUNT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Long getTotalCount() {
+ return totalCount;
+ }
+
+ public void setTotalCount(Long totalCount) {
+ this.totalCount = totalCount;
+ }
+
+ public OrgConnectionListResponseMetaPage totalFilteredCount(Long totalFilteredCount) {
+ this.totalFilteredCount = totalFilteredCount;
+ return this;
+ }
+
+ /**
+ * Total number of org connections matching the filter.
+ *
+ * @return totalFilteredCount
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Long getTotalFilteredCount() {
+ return totalFilteredCount;
+ }
+
+ public void setTotalFilteredCount(Long totalFilteredCount) {
+ this.totalFilteredCount = totalFilteredCount;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionListResponseMetaPage
+ */
+ @JsonAnySetter
+ public OrgConnectionListResponseMetaPage putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionListResponseMetaPage object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionListResponseMetaPage orgConnectionListResponseMetaPage =
+ (OrgConnectionListResponseMetaPage) o;
+ return Objects.equals(this.totalCount, orgConnectionListResponseMetaPage.totalCount)
+ && Objects.equals(
+ this.totalFilteredCount, orgConnectionListResponseMetaPage.totalFilteredCount)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionListResponseMetaPage.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(totalCount, totalFilteredCount, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionListResponseMetaPage {\n");
+ sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n");
+ sb.append(" totalFilteredCount: ").append(toIndentedString(totalFilteredCount)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationship.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationship.java
new file mode 100644
index 00000000000..0e96c22269b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationship.java
@@ -0,0 +1,137 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Org relationship. */
+@JsonPropertyOrder({OrgConnectionOrgRelationship.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionOrgRelationship {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OrgConnectionOrgRelationshipData data;
+
+ public OrgConnectionOrgRelationship data(OrgConnectionOrgRelationshipData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * The definition of OrgConnectionOrgRelationshipData object.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionOrgRelationshipData getData() {
+ return data;
+ }
+
+ public void setData(OrgConnectionOrgRelationshipData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionOrgRelationship
+ */
+ @JsonAnySetter
+ public OrgConnectionOrgRelationship putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionOrgRelationship object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionOrgRelationship orgConnectionOrgRelationship = (OrgConnectionOrgRelationship) o;
+ return Objects.equals(this.data, orgConnectionOrgRelationship.data)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionOrgRelationship.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionOrgRelationship {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationshipData.java
new file mode 100644
index 00000000000..74d05627748
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationshipData.java
@@ -0,0 +1,197 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** The definition of OrgConnectionOrgRelationshipData object. */
+@JsonPropertyOrder({
+ OrgConnectionOrgRelationshipData.JSON_PROPERTY_ID,
+ OrgConnectionOrgRelationshipData.JSON_PROPERTY_NAME,
+ OrgConnectionOrgRelationshipData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionOrgRelationshipData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OrgConnectionOrgRelationshipDataType type;
+
+ public OrgConnectionOrgRelationshipData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Org UUID.
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public OrgConnectionOrgRelationshipData name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Org name.
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public OrgConnectionOrgRelationshipData type(OrgConnectionOrgRelationshipDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the organization relationship.
+ *
+ * @return type
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionOrgRelationshipDataType getType() {
+ return type;
+ }
+
+ public void setType(OrgConnectionOrgRelationshipDataType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionOrgRelationshipData
+ */
+ @JsonAnySetter
+ public OrgConnectionOrgRelationshipData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionOrgRelationshipData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionOrgRelationshipData orgConnectionOrgRelationshipData =
+ (OrgConnectionOrgRelationshipData) o;
+ return Objects.equals(this.id, orgConnectionOrgRelationshipData.id)
+ && Objects.equals(this.name, orgConnectionOrgRelationshipData.name)
+ && Objects.equals(this.type, orgConnectionOrgRelationshipData.type)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionOrgRelationshipData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionOrgRelationshipData {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationshipDataType.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationshipDataType.java
new file mode 100644
index 00000000000..949a7c6caf1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionOrgRelationshipDataType.java
@@ -0,0 +1,59 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The type of the organization relationship. */
+@JsonSerialize(
+ using =
+ OrgConnectionOrgRelationshipDataType.OrgConnectionOrgRelationshipDataTypeSerializer.class)
+public class OrgConnectionOrgRelationshipDataType extends ModelEnum {
+
+ private static final Set allowedValues = new HashSet(Arrays.asList("orgs"));
+
+ public static final OrgConnectionOrgRelationshipDataType ORGS =
+ new OrgConnectionOrgRelationshipDataType("orgs");
+
+ OrgConnectionOrgRelationshipDataType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OrgConnectionOrgRelationshipDataTypeSerializer
+ extends StdSerializer {
+ public OrgConnectionOrgRelationshipDataTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OrgConnectionOrgRelationshipDataTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OrgConnectionOrgRelationshipDataType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OrgConnectionOrgRelationshipDataType fromValue(String value) {
+ return new OrgConnectionOrgRelationshipDataType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionRelationships.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionRelationships.java
new file mode 100644
index 00000000000..81402c99d58
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionRelationships.java
@@ -0,0 +1,195 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Related organizations and user. */
+@JsonPropertyOrder({
+ OrgConnectionRelationships.JSON_PROPERTY_CREATED_BY,
+ OrgConnectionRelationships.JSON_PROPERTY_SINK_ORG,
+ OrgConnectionRelationships.JSON_PROPERTY_SOURCE_ORG
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionRelationships {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CREATED_BY = "created_by";
+ private OrgConnectionUserRelationship createdBy;
+
+ public static final String JSON_PROPERTY_SINK_ORG = "sink_org";
+ private OrgConnectionOrgRelationship sinkOrg;
+
+ public static final String JSON_PROPERTY_SOURCE_ORG = "source_org";
+ private OrgConnectionOrgRelationship sourceOrg;
+
+ public OrgConnectionRelationships createdBy(OrgConnectionUserRelationship createdBy) {
+ this.createdBy = createdBy;
+ this.unparsed |= createdBy.unparsed;
+ return this;
+ }
+
+ /**
+ * User relationship.
+ *
+ * @return createdBy
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_BY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionUserRelationship getCreatedBy() {
+ return createdBy;
+ }
+
+ public void setCreatedBy(OrgConnectionUserRelationship createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ public OrgConnectionRelationships sinkOrg(OrgConnectionOrgRelationship sinkOrg) {
+ this.sinkOrg = sinkOrg;
+ this.unparsed |= sinkOrg.unparsed;
+ return this;
+ }
+
+ /**
+ * Org relationship.
+ *
+ * @return sinkOrg
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_SINK_ORG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionOrgRelationship getSinkOrg() {
+ return sinkOrg;
+ }
+
+ public void setSinkOrg(OrgConnectionOrgRelationship sinkOrg) {
+ this.sinkOrg = sinkOrg;
+ }
+
+ public OrgConnectionRelationships sourceOrg(OrgConnectionOrgRelationship sourceOrg) {
+ this.sourceOrg = sourceOrg;
+ this.unparsed |= sourceOrg.unparsed;
+ return this;
+ }
+
+ /**
+ * Org relationship.
+ *
+ * @return sourceOrg
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_SOURCE_ORG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionOrgRelationship getSourceOrg() {
+ return sourceOrg;
+ }
+
+ public void setSourceOrg(OrgConnectionOrgRelationship sourceOrg) {
+ this.sourceOrg = sourceOrg;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionRelationships
+ */
+ @JsonAnySetter
+ public OrgConnectionRelationships putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionRelationships object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionRelationships orgConnectionRelationships = (OrgConnectionRelationships) o;
+ return Objects.equals(this.createdBy, orgConnectionRelationships.createdBy)
+ && Objects.equals(this.sinkOrg, orgConnectionRelationships.sinkOrg)
+ && Objects.equals(this.sourceOrg, orgConnectionRelationships.sourceOrg)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionRelationships.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(createdBy, sinkOrg, sourceOrg, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionRelationships {\n");
+ sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n");
+ sb.append(" sinkOrg: ").append(toIndentedString(sinkOrg)).append("\n");
+ sb.append(" sourceOrg: ").append(toIndentedString(sourceOrg)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionResponse.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionResponse.java
new file mode 100644
index 00000000000..c8868dbd5e8
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionResponse.java
@@ -0,0 +1,145 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response containing a single org connection. */
+@JsonPropertyOrder({OrgConnectionResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OrgConnection data;
+
+ public OrgConnectionResponse() {}
+
+ @JsonCreator
+ public OrgConnectionResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OrgConnection data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public OrgConnectionResponse data(OrgConnection data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * An org connection.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnection getData() {
+ return data;
+ }
+
+ public void setData(OrgConnection data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionResponse
+ */
+ @JsonAnySetter
+ public OrgConnectionResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionResponse orgConnectionResponse = (OrgConnectionResponse) o;
+ return Objects.equals(this.data, orgConnectionResponse.data)
+ && Objects.equals(this.additionalProperties, orgConnectionResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionType.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionType.java
new file mode 100644
index 00000000000..6a933b81426
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionType.java
@@ -0,0 +1,54 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** Org connection type. */
+@JsonSerialize(using = OrgConnectionType.OrgConnectionTypeSerializer.class)
+public class OrgConnectionType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("org_connection"));
+
+ public static final OrgConnectionType ORG_CONNECTION = new OrgConnectionType("org_connection");
+
+ OrgConnectionType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OrgConnectionTypeSerializer extends StdSerializer {
+ public OrgConnectionTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public OrgConnectionTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(OrgConnectionType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OrgConnectionType fromValue(String value) {
+ return new OrgConnectionType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionTypeEnum.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionTypeEnum.java
new file mode 100644
index 00000000000..c2d019d070d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionTypeEnum.java
@@ -0,0 +1,56 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** Available connection types between organizations. */
+@JsonSerialize(using = OrgConnectionTypeEnum.OrgConnectionTypeEnumSerializer.class)
+public class OrgConnectionTypeEnum extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("logs", "metrics"));
+
+ public static final OrgConnectionTypeEnum LOGS = new OrgConnectionTypeEnum("logs");
+ public static final OrgConnectionTypeEnum METRICS = new OrgConnectionTypeEnum("metrics");
+
+ OrgConnectionTypeEnum(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OrgConnectionTypeEnumSerializer extends StdSerializer {
+ public OrgConnectionTypeEnumSerializer(Class t) {
+ super(t);
+ }
+
+ public OrgConnectionTypeEnumSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OrgConnectionTypeEnum value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OrgConnectionTypeEnum fromValue(String value) {
+ return new OrgConnectionTypeEnum(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdate.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdate.java
new file mode 100644
index 00000000000..7317423fcfe
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdate.java
@@ -0,0 +1,210 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.UUID;
+
+/** Org connection update data. */
+@JsonPropertyOrder({
+ OrgConnectionUpdate.JSON_PROPERTY_ATTRIBUTES,
+ OrgConnectionUpdate.JSON_PROPERTY_ID,
+ OrgConnectionUpdate.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionUpdate {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private OrgConnectionUpdateAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private UUID id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OrgConnectionType type;
+
+ public OrgConnectionUpdate() {}
+
+ @JsonCreator
+ public OrgConnectionUpdate(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ OrgConnectionUpdateAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OrgConnectionType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public OrgConnectionUpdate attributes(OrgConnectionUpdateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for updating an org connection.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionUpdateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(OrgConnectionUpdateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public OrgConnectionUpdate id(UUID id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the org connection.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ public OrgConnectionUpdate type(OrgConnectionType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Org connection type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionType getType() {
+ return type;
+ }
+
+ public void setType(OrgConnectionType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionUpdate
+ */
+ @JsonAnySetter
+ public OrgConnectionUpdate putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionUpdate object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionUpdate orgConnectionUpdate = (OrgConnectionUpdate) o;
+ return Objects.equals(this.attributes, orgConnectionUpdate.attributes)
+ && Objects.equals(this.id, orgConnectionUpdate.id)
+ && Objects.equals(this.type, orgConnectionUpdate.type)
+ && Objects.equals(this.additionalProperties, orgConnectionUpdate.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionUpdate {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdateAttributes.java
new file mode 100644
index 00000000000..090685494af
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdateAttributes.java
@@ -0,0 +1,155 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes for updating an org connection. */
+@JsonPropertyOrder({OrgConnectionUpdateAttributes.JSON_PROPERTY_CONNECTION_TYPES})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionUpdateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CONNECTION_TYPES = "connection_types";
+ private List connectionTypes = new ArrayList<>();
+
+ public OrgConnectionUpdateAttributes() {}
+
+ @JsonCreator
+ public OrgConnectionUpdateAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CONNECTION_TYPES)
+ List connectionTypes) {
+ this.connectionTypes = connectionTypes;
+ }
+
+ public OrgConnectionUpdateAttributes connectionTypes(
+ List connectionTypes) {
+ this.connectionTypes = connectionTypes;
+ return this;
+ }
+
+ public OrgConnectionUpdateAttributes addConnectionTypesItem(
+ OrgConnectionTypeEnum connectionTypesItem) {
+ this.connectionTypes.add(connectionTypesItem);
+ this.unparsed |= !connectionTypesItem.isValid();
+ return this;
+ }
+
+ /**
+ * Updated list of connection types.
+ *
+ * @return connectionTypes
+ */
+ @JsonProperty(JSON_PROPERTY_CONNECTION_TYPES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getConnectionTypes() {
+ return connectionTypes;
+ }
+
+ public void setConnectionTypes(List connectionTypes) {
+ this.connectionTypes = connectionTypes;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionUpdateAttributes
+ */
+ @JsonAnySetter
+ public OrgConnectionUpdateAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionUpdateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionUpdateAttributes orgConnectionUpdateAttributes = (OrgConnectionUpdateAttributes) o;
+ return Objects.equals(this.connectionTypes, orgConnectionUpdateAttributes.connectionTypes)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionUpdateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(connectionTypes, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionUpdateAttributes {\n");
+ sb.append(" connectionTypes: ").append(toIndentedString(connectionTypes)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdateRequest.java
new file mode 100644
index 00000000000..b8497bf7d32
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUpdateRequest.java
@@ -0,0 +1,146 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request to update an org connection. */
+@JsonPropertyOrder({OrgConnectionUpdateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionUpdateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OrgConnectionUpdate data;
+
+ public OrgConnectionUpdateRequest() {}
+
+ @JsonCreator
+ public OrgConnectionUpdateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OrgConnectionUpdate data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public OrgConnectionUpdateRequest data(OrgConnectionUpdate data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Org connection update data.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OrgConnectionUpdate getData() {
+ return data;
+ }
+
+ public void setData(OrgConnectionUpdate data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionUpdateRequest
+ */
+ @JsonAnySetter
+ public OrgConnectionUpdateRequest putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionUpdateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionUpdateRequest orgConnectionUpdateRequest = (OrgConnectionUpdateRequest) o;
+ return Objects.equals(this.data, orgConnectionUpdateRequest.data)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionUpdateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionUpdateRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationship.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationship.java
new file mode 100644
index 00000000000..07f752841cb
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationship.java
@@ -0,0 +1,137 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** User relationship. */
+@JsonPropertyOrder({OrgConnectionUserRelationship.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionUserRelationship {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private OrgConnectionUserRelationshipData data;
+
+ public OrgConnectionUserRelationship data(OrgConnectionUserRelationshipData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * The data for a user relationship.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionUserRelationshipData getData() {
+ return data;
+ }
+
+ public void setData(OrgConnectionUserRelationshipData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionUserRelationship
+ */
+ @JsonAnySetter
+ public OrgConnectionUserRelationship putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionUserRelationship object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionUserRelationship orgConnectionUserRelationship = (OrgConnectionUserRelationship) o;
+ return Objects.equals(this.data, orgConnectionUserRelationship.data)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionUserRelationship.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionUserRelationship {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationshipData.java
new file mode 100644
index 00000000000..dc4626e43a5
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationshipData.java
@@ -0,0 +1,197 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** The data for a user relationship. */
+@JsonPropertyOrder({
+ OrgConnectionUserRelationshipData.JSON_PROPERTY_ID,
+ OrgConnectionUserRelationshipData.JSON_PROPERTY_NAME,
+ OrgConnectionUserRelationshipData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OrgConnectionUserRelationshipData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private OrgConnectionUserRelationshipDataType type;
+
+ public OrgConnectionUserRelationshipData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * User UUID.
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public OrgConnectionUserRelationshipData name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * User name.
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public OrgConnectionUserRelationshipData type(OrgConnectionUserRelationshipDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the user relationship.
+ *
+ * @return type
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OrgConnectionUserRelationshipDataType getType() {
+ return type;
+ }
+
+ public void setType(OrgConnectionUserRelationshipDataType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return OrgConnectionUserRelationshipData
+ */
+ @JsonAnySetter
+ public OrgConnectionUserRelationshipData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this OrgConnectionUserRelationshipData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OrgConnectionUserRelationshipData orgConnectionUserRelationshipData =
+ (OrgConnectionUserRelationshipData) o;
+ return Objects.equals(this.id, orgConnectionUserRelationshipData.id)
+ && Objects.equals(this.name, orgConnectionUserRelationshipData.name)
+ && Objects.equals(this.type, orgConnectionUserRelationshipData.type)
+ && Objects.equals(
+ this.additionalProperties, orgConnectionUserRelationshipData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OrgConnectionUserRelationshipData {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationshipDataType.java b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationshipDataType.java
new file mode 100644
index 00000000000..923242ef1d1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OrgConnectionUserRelationshipDataType.java
@@ -0,0 +1,61 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The type of the user relationship. */
+@JsonSerialize(
+ using =
+ OrgConnectionUserRelationshipDataType.OrgConnectionUserRelationshipDataTypeSerializer.class)
+public class OrgConnectionUserRelationshipDataType extends ModelEnum {
+
+ private static final Set allowedValues = new HashSet(Arrays.asList("users"));
+
+ public static final OrgConnectionUserRelationshipDataType USERS =
+ new OrgConnectionUserRelationshipDataType("users");
+
+ OrgConnectionUserRelationshipDataType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class OrgConnectionUserRelationshipDataTypeSerializer
+ extends StdSerializer {
+ public OrgConnectionUserRelationshipDataTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OrgConnectionUserRelationshipDataTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OrgConnectionUserRelationshipDataType value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static OrgConnectionUserRelationshipDataType fromValue(String value) {
+ return new OrgConnectionUserRelationshipDataType(value);
+ }
+}
diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Bad_Request_response.freeze
new file mode 100644
index 00000000000..bdb5f4a2d21
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Bad_Request_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:35.269Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Bad_Request_response.json
new file mode 100644
index 00000000000..a57b54fa208
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Bad_Request_response.json
@@ -0,0 +1,32 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\",\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[\"connection between orgs 4dee724d-00cc-11ea-a77b-570c9d03c6c5 and 83999dcd-7f97-11f0-8de1-1ecf66f1aa85 is not allowed\"]}",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 400,
+ "reasonPhrase": "Bad Request"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "7a214084-52cc-d5a6-1e91-557a7b822b3c"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.freeze
new file mode 100644
index 00000000000..6f07529abc1
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:35.429Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json
new file mode 100644
index 00000000000..95cb4a17509
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json
@@ -0,0 +1,88 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"type\":\"org_connection\",\"id\":\"b5d3a360-d6e2-4af7-8da2-b2ff41b9f5e0\",\"attributes\":{\"created_at\":\"2025-08-26T20:19:35.554634+00:00\",\"connection_types\":[\"logs\"]},\"relationships\":{\"source_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"name\":\"DD Integration Tests (321813)\"}},\"sink_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"name\":\"Cross-Org BDD Test Org\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"03e6bc43-7ecc-11f0-b50b-f28f2be41840\",\"name\":\"Amy Li\"}}}}}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae45"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[\"connection between orgs 4dee724d-00cc-11ea-a77b-570c9d03c6c5 and 83999dcd-7f97-11f0-8de1-1ecf66f1aa85 already exists\"]}",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 409,
+ "reasonPhrase": "Conflict"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae46"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/b5d3a360-d6e2-4af7-8da2-b2ff41b9f5e0",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "de32e8df-4f04-4ebd-af9b-c2a872bbd00c"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Not_Found_response.freeze
new file mode 100644
index 00000000000..bdeeb5688d2
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Not_Found_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:35.916Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Not_Found_response.json
new file mode 100644
index 00000000000..7d83dfb451d
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Not_Found_response.json
@@ -0,0 +1,32 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"nonexistent-org-id\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[\"Not found\"]}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 404,
+ "reasonPhrase": "Not Found"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "7f0e9dad-6b89-fbf4-0ba6-1c6424be2da7"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.freeze
new file mode 100644
index 00000000000..878b43f439f
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:36.045Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json
new file mode 100644
index 00000000000..fa161e3c9f3
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json
@@ -0,0 +1,58 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"type\":\"org_connection\",\"id\":\"40bbb1c2-32b2-4aa3-8a1a-5d93b5382e3d\",\"attributes\":{\"created_at\":\"2025-08-26T20:19:36.177236+00:00\",\"connection_types\":[\"logs\"]},\"relationships\":{\"source_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"name\":\"DD Integration Tests (321813)\"}},\"sink_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"name\":\"Cross-Org BDD Test Org\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"03e6bc43-7ecc-11f0-b50b-f28f2be41840\",\"name\":\"Amy Li\"}}}}}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae43"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/40bbb1c2-32b2-4aa3-8a1a-5d93b5382e3d",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "36e827df-f44d-23a2-7b43-3c55baf1e36b"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Bad_Request_response.freeze
new file mode 100644
index 00000000000..563493e1bff
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Bad_Request_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:36.363Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Bad_Request_response.json
new file mode 100644
index 00000000000..f227239e96a
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Bad_Request_response.json
@@ -0,0 +1,28 @@
+[
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/malformed_id",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[\"connection id must be a valid uuid\"]}",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 400,
+ "reasonPhrase": "Bad Request"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "c5bc887f-e392-d215-2357-18b29cbb258f"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Not_Found_response.freeze
new file mode 100644
index 00000000000..908df97ed05
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Not_Found_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:36.481Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Not_Found_response.json
new file mode 100644
index 00000000000..85b3b687a71
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_Not_Found_response.json
@@ -0,0 +1,28 @@
+[
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/00000000-0000-0000-0000-000000000000",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[\"org connection with id:00000000-0000-0000-0000-000000000000 not found not found\"]}",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 404,
+ "reasonPhrase": "Not Found"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "93d95246-8c03-e9f4-3cfa-4183413e3c46"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.freeze
new file mode 100644
index 00000000000..a6ac9aae215
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:36.615Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json
new file mode 100644
index 00000000000..c63dd04ca65
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json
@@ -0,0 +1,84 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"type\":\"org_connection\",\"id\":\"7b01f30c-6100-4cbf-b583-a5e353d7edb7\",\"attributes\":{\"created_at\":\"2025-08-26T20:19:36.737560+00:00\",\"connection_types\":[\"logs\"]},\"relationships\":{\"source_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"name\":\"DD Integration Tests (321813)\"}},\"sink_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"name\":\"Cross-Org BDD Test Org\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"03e6bc43-7ecc-11f0-b50b-f28f2be41840\",\"name\":\"Amy Li\"}}}}}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae48"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/7b01f30c-6100-4cbf-b583-a5e353d7edb7",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "3341cd1b-c3ff-f5e2-5baf-e8947a2ea52d"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/7b01f30c-6100-4cbf-b583-a5e353d7edb7",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[\"org connection with id:7b01f30c-6100-4cbf-b583-a5e353d7edb7 not found not found\"]}",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 404,
+ "reasonPhrase": "Not Found"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "3341cd1b-c3ff-f5e2-5baf-e8947a2ea52e"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/List_Org_Connections_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_Org_Connections_returns_OK_response.freeze
new file mode 100644
index 00000000000..feb7d7484cf
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/List_Org_Connections_returns_OK_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:37.084Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/List_Org_Connections_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_Org_Connections_returns_OK_response.json
new file mode 100644
index 00000000000..f92a1bebc60
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/List_Org_Connections_returns_OK_response.json
@@ -0,0 +1,28 @@
+[
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "GET",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":[],\"meta\":{\"page\":{\"total_count\":0,\"total_filtered_count\":0}}}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "c4a45f02-2843-cd72-1bba-31dac1a31203"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.freeze
new file mode 100644
index 00000000000..c28d682e610
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:37.212Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.json
new file mode 100644
index 00000000000..78da17d9040
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.json
@@ -0,0 +1,88 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"type\":\"org_connection\",\"id\":\"76e1a71f-81e5-40c8-b8e0-1b98265d26fe\",\"attributes\":{\"created_at\":\"2025-08-26T20:19:37.335819+00:00\",\"connection_types\":[\"logs\"]},\"relationships\":{\"source_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"name\":\"DD Integration Tests (321813)\"}},\"sink_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"name\":\"Cross-Org BDD Test Org\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"03e6bc43-7ecc-11f0-b50b-f28f2be41840\",\"name\":\"Amy Li\"}}}}}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae44"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\",\"logs\"]},\"id\":\"76e1a71f-81e5-40c8-b8e0-1b98265d26fe\",\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "PATCH",
+ "path": "/api/v2/org_connections/76e1a71f-81e5-40c8-b8e0-1b98265d26fe",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[\"Validation failed for input.\"]}",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 400,
+ "reasonPhrase": "Bad Request"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "0baa85f5-7971-d9e2-73f4-a6740ce0eb1b"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/76e1a71f-81e5-40c8-b8e0-1b98265d26fe",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "d129ad25-cb8d-b0d8-b518-ebfda109c597"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.freeze
new file mode 100644
index 00000000000..742e61df8a6
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:37.609Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json
new file mode 100644
index 00000000000..cb8bbfa87f3
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json
@@ -0,0 +1,88 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"type\":\"org_connection\",\"id\":\"d348b9ab-c7cf-4298-83a6-b4762fafff5e\",\"attributes\":{\"created_at\":\"2025-08-26T20:19:37.737812+00:00\",\"connection_types\":[\"logs\"]},\"relationships\":{\"source_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"name\":\"DD Integration Tests (321813)\"}},\"sink_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"name\":\"Cross-Org BDD Test Org\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"03e6bc43-7ecc-11f0-b50b-f28f2be41840\",\"name\":\"Amy Li\"}}}}}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae47"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\",\"metrics\"]},\"id\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "PATCH",
+ "path": "/api/v2/org_connections/00000000-0000-0000-0000-000000000000",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[\"Org connection with id:00000000-0000-0000-0000-000000000000 not found not found\"]}",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 404,
+ "reasonPhrase": "Not Found"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "ee8cf63c-2566-6878-1e6d-a82afed6dc44"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/d348b9ab-c7cf-4298-83a6-b4762fafff5e",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "3ea3241b-0341-8f98-437d-ebf025dea747"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.freeze
new file mode 100644
index 00000000000..291e5d534dc
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.freeze
@@ -0,0 +1 @@
+2025-08-26T20:19:38.089Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json
new file mode 100644
index 00000000000..98eacb05028
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json
@@ -0,0 +1,88 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/org_connections",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"type\":\"org_connection\",\"id\":\"0105233a-4d7b-4c52-b364-cc968d003de0\",\"attributes\":{\"created_at\":\"2025-08-26T20:19:38.208326+00:00\",\"connection_types\":[\"logs\"]},\"relationships\":{\"source_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\",\"name\":\"DD Integration Tests (321813)\"}},\"sink_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"name\":\"Cross-Org BDD Test Org\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"03e6bc43-7ecc-11f0-b50b-f28f2be41840\",\"name\":\"Amy Li\"}}}}}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae49"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\",\"metrics\"]},\"id\":\"0105233a-4d7b-4c52-b364-cc968d003de0\",\"type\":\"org_connection\"}}"
+ },
+ "headers": {},
+ "method": "PATCH",
+ "path": "/api/v2/org_connections/0105233a-4d7b-4c52-b364-cc968d003de0",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"type\":\"org_connection\",\"id\":\"0105233a-4d7b-4c52-b364-cc968d003de0\",\"attributes\":{\"created_at\":\"2025-08-26T20:19:38.208326+00:00\",\"connection_types\":[\"logs\",\"metrics\"]},\"relationships\":{\"source_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}},\"sink_org\":{\"data\":{\"type\":\"orgs\",\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"03e6bc43-7ecc-11f0-b50b-f28f2be41840\"}}}}}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "d9e0b64c-3bbe-b3f7-093c-6afc4436a1b0"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/org_connections/0105233a-4d7b-4c52-b364-cc968d003de0",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{}\n",
+ "headers": {
+ "Content-Type": [
+ "application/json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "0d265c58-9ea2-653b-134a-dcc39dc45e4a"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json
index 79e6d4c45d2..ef93bc042ea 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/given.json
+++ b/src/test/resources/com/datadog/api/client/v2/api/given.json
@@ -569,6 +569,19 @@
"tag": "On-Call",
"operationId": "SetOnCallTeamRoutingRules"
},
+ {
+ "parameters": [
+ {
+ "name": "body",
+ "origin": "request",
+ "value": "{\n \"data\": {\n \"type\": \"org_connection\",\n \"relationships\": {\n \"sink_org\": {\n \"data\": {\n \"type\": \"orgs\",\n \"id\": \"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\"\n }\n }\n },\n \"attributes\": {\n \"connection_types\": [\"logs\"]\n }\n }\n}"
+ }
+ ],
+ "step": "there is a valid \"org_connection\" in the system",
+ "key": "org_connection",
+ "tag": "Org Connections",
+ "operationId": "CreateOrgConnections"
+ },
{
"source": "data[4]",
"step": "there is a valid \"permission\" in the system",
diff --git a/src/test/resources/com/datadog/api/client/v2/api/org_connections.feature b/src/test/resources/com/datadog/api/client/v2/api/org_connections.feature
new file mode 100644
index 00000000000..321e7c77f24
--- /dev/null
+++ b/src/test/resources/com/datadog/api/client/v2/api/org_connections.feature
@@ -0,0 +1,95 @@
+@endpoint(org-connections) @endpoint(org-connections-v2)
+Feature: Org Connections
+ Manage connections between organizations. Org connections allow for
+ controlled sharing of data between different Datadog organizations. See
+ the [Cross-Organization Visibiltiy](https://docs.datadoghq.com/account_man
+ agement/org_settings/cross_org_visibility/) page for more information.
+
+ Background:
+ Given a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And an instance of "OrgConnections" API
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Create Org Connection returns "Bad Request" response
+ Given new "CreateOrgConnections" request
+ And body with value {"data": {"type": "org_connection", "relationships": {"sink_org": {"data": {"type": "orgs", "id": "83999dcd-7f97-11f0-8de1-1ecf66f1aa85"}}}, "attributes": {"connection_types": ["logs", "logs"]}}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Create Org Connection returns "Conflict" response
+ Given there is a valid "org_connection" in the system
+ And new "CreateOrgConnections" request
+ And body with value {"data": {"type": "org_connection", "relationships": {"sink_org": {"data": {"type": "orgs", "id": "83999dcd-7f97-11f0-8de1-1ecf66f1aa85"}}}, "attributes": {"connection_types": ["logs"]}}}
+ When the request is sent
+ Then the response status is 409 Conflict
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Create Org Connection returns "Not Found" response
+ Given new "CreateOrgConnections" request
+ And body with value {"data": {"type": "org_connection", "relationships": {"sink_org": {"data": {"type": "orgs", "id": "nonexistent-org-id"}}}, "attributes": {"connection_types": ["logs"]}}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Create Org Connection returns "OK" response
+ Given new "CreateOrgConnections" request
+ And body with value {"data": {"type": "org_connection", "relationships": {"sink_org": {"data": {"type": "orgs", "id": "83999dcd-7f97-11f0-8de1-1ecf66f1aa85"}}}, "attributes": {"connection_types": ["logs"]}}}
+ When the request is sent
+ Then the response status is 200 Created
+
+ @skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-terraform-config @skip-typescript @skip-validation @team:DataDog/aaa-granular-access
+ Scenario: Delete Org Connection returns "Bad Request" response
+ Given new "DeleteOrgConnections" request
+ And request contains "connection_id" parameter with value "malformed_id"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Delete Org Connection returns "Not Found" response
+ Given new "DeleteOrgConnections" request
+ And request contains "connection_id" parameter with value "00000000-0000-0000-0000-000000000000"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Delete Org Connection returns "OK" response
+ Given there is a valid "org_connection" in the system
+ And new "DeleteOrgConnections" request
+ And request contains "connection_id" parameter from "org_connection.data.id"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @team:DataDog/aaa-granular-access
+ Scenario: List Org Connections returns "OK" response
+ Given new "ListOrgConnections" request
+ When the request is sent
+ Then the response status is 200 OK
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Update Org Connection returns "Bad Request" response
+ Given there is a valid "org_connection" in the system
+ And new "UpdateOrgConnections" request
+ And request contains "connection_id" parameter from "org_connection.data.id"
+ And body with value {"data": {"type": "org_connection", "id": "{{ org_connection.data.id }}", "attributes": {"connection_types": ["logs", "logs"]}}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Update Org Connection returns "Not Found" response
+ Given there is a valid "org_connection" in the system
+ And new "UpdateOrgConnections" request
+ And request contains "connection_id" parameter with value "00000000-0000-0000-0000-000000000000"
+ And body with value {"data": {"type": "org_connection", "id": "00000000-0000-0000-0000-000000000000", "attributes": {"connection_types": ["logs", "metrics"]}}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @team:DataDog/aaa-granular-access
+ Scenario: Update Org Connection returns "OK" response
+ Given there is a valid "org_connection" in the system
+ And new "UpdateOrgConnections" request
+ And request contains "connection_id" parameter from "org_connection.data.id"
+ And body with value {"data": {"type": "org_connection", "id": "{{ org_connection.data.id }}", "attributes": {"connection_types": ["logs", "metrics"]}}}
+ When the request is sent
+ Then the response status is 200 OK
diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json
index b3731714ef6..1ade02a7370 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/undo.json
+++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json
@@ -2252,6 +2252,37 @@
"type": "idempotent"
}
},
+ "ListOrgConnections": {
+ "tag": "Org Connections",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "CreateOrgConnections": {
+ "tag": "Org Connections",
+ "undo": {
+ "operationId": "DeleteOrgConnections",
+ "parameters": [
+ {
+ "name": "connection_id",
+ "source": "data.id"
+ }
+ ],
+ "type": "unsafe"
+ }
+ },
+ "DeleteOrgConnections": {
+ "tag": "Org Connections",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
+ "UpdateOrgConnections": {
+ "tag": "Org Connections",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
"ListPermissions": {
"tag": "Roles",
"undo": {