From 99c34e17a722df7b744e43ab4233d2b354bbdc65 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 4 Feb 2026 13:37:19 +0000 Subject: [PATCH] Regenerate client from commit 5a257cf of spec repo --- .generator/schemas/v2/openapi.yaml | 641 +++++++++++++ .../ListActionConnections.java | 25 + .../ListConnectionGroups.java | 25 + .../UpdateConnectionGroup.java | 40 + .../com/datadog/api/client/ApiClient.java | 3 + .../client/v2/api/ActionConnectionApi.java | 855 ++++++++++++++++++ .../ConnectionDataAttributesResponse.java | 489 ++++++++++ .../v2/model/ConnectionDataResponse.java | 209 +++++ .../ConnectionGroupDataAttributesRequest.java | 301 ++++++ ...ConnectionGroupDataAttributesResponse.java | 368 ++++++++ .../v2/model/ConnectionGroupDataRequest.java | 179 ++++ .../v2/model/ConnectionGroupDataResponse.java | 238 +++++ .../model/ConnectionGroupRelationships.java | 137 +++ .../client/v2/model/ConnectionGroupType.java | 56 ++ .../api/client/v2/model/CreatedBy.java | 142 +++ .../v2/model/CreatedByRelationship.java | 136 +++ .../v2/model/CreatedByRelationshipData.java | 174 ++++ .../client/v2/model/IntegrationCounts.java | 191 ++++ .../model/ListActionConnectionsResponse.java | 186 ++++ .../ListActionConnectionsResponseMeta.java | 232 +++++ .../model/ListConnectionGroupsResponse.java | 186 ++++ .../ListConnectionGroupsResponseMeta.java | 232 +++++ .../client/v2/model/PrivateActionsRunner.java | 142 +++ .../model/UpdateConnectionGroupRequest.java | 146 +++ .../model/UpdateConnectionGroupResponse.java | 146 +++ .../client/v2/api/action_connection.feature | 55 ++ .../com/datadog/api/client/v2/api/undo.json | 18 + 27 files changed, 5552 insertions(+) create mode 100644 examples/v2/action-connection/ListActionConnections.java create mode 100644 examples/v2/action-connection/ListConnectionGroups.java create mode 100644 examples/v2/action-connection/UpdateConnectionGroup.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ConnectionDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ConnectionDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataAttributesRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ConnectionGroupRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ConnectionGroupType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreatedBy.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreatedByRelationship.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreatedByRelationshipData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IntegrationCounts.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListActionConnectionsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListActionConnectionsResponseMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListConnectionGroupsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListConnectionGroupsResponseMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/PrivateActionsRunner.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateConnectionGroupRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateConnectionGroupResponse.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a8908359f48..10caa0cc4a6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -310,6 +310,13 @@ components: required: true schema: type: string + ConnectionGroupId: + description: The ID of the connection group. + in: path + name: connection_group_id + required: true + schema: + type: string ConnectionId: description: The ID of the action connection in: path @@ -12460,6 +12467,83 @@ components: - connectionId - label type: object + ConnectionDataAttributesResponse: + description: Attributes of an action connection. + properties: + acting_user_can_resolve: + description: Indicates if the acting user can resolve the connection. + example: true + type: boolean + created_at: + description: The creation timestamp of the connection. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + created_by: + $ref: '#/components/schemas/CreatedBy' + description: + description: The description of the connection. + example: A test connection for AWS integrations + type: string + external_secrets_manager: + description: External secrets manager configuration. + nullable: true + type: object + integration: + description: Integration configuration details. + example: + credentials: + account_id: '123456789012' + role: role + type: AWSAssumeRole + type: AWS + type: object + is_favorite: + description: Indicates if the connection is marked as favorite. + example: false + type: boolean + last_updated: + description: The last updated timestamp of the connection. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + name: + description: The name of the connection. + example: My Connection + type: string + private_actions_runner: + $ref: '#/components/schemas/PrivateActionsRunner' + runner_id: + description: The ID of the runner associated with the connection. + type: string + tags: + description: Tags associated with the connection. + items: + type: string + type: array + required: + - acting_user_can_resolve + - integration + - external_secrets_manager + - is_favorite + - name + type: object + ConnectionDataResponse: + description: Data object for an action connection. + properties: + attributes: + $ref: '#/components/schemas/ConnectionDataAttributesResponse' + id: + description: The unique identifier of the connection. + example: afda2727-c55e-4258-b4c6-e170c32be1dd + type: string + type: + $ref: '#/components/schemas/ActionConnectionDataType' + required: + - id + - type + - attributes + type: object ConnectionEnv: description: A list of connections or connection groups used in the workflow. properties: @@ -12509,6 +12593,129 @@ components: - label - tags type: object + ConnectionGroupDataAttributesRequest: + description: Attributes for updating a connection group. + properties: + connections: + description: List of connection IDs associated with the connection group. + items: + type: string + type: array + description: + description: The description of the connection group. + example: An updated test connection group for AWS integrations + type: string + integration_type: + description: The integration type of the connection group. + type: string + name: + description: The name of the connection group. + example: My Connection Group Updated + type: string + policy_attributes: + description: Policy attributes for the connection group. + type: string + tag_keys: + description: Tag keys associated with the connection group. + items: + type: string + type: array + type: object + ConnectionGroupDataAttributesResponse: + description: Attributes of a connection group. + properties: + connections: + description: List of connection IDs associated with the connection group. + example: + - connection1 + - connection2 + items: + type: string + type: array + created_at: + description: The creation timestamp of the connection group. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + description: + description: The description of the connection group. + example: A test connection group for AWS integrations + type: string + integration_type: + description: The integration type of the connection group. + example: AWS + type: string + is_favorite: + description: Indicates if the connection group is marked as favorite. + example: false + type: boolean + last_updated_at: + description: The last updated timestamp of the connection group. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + name: + description: The name of the connection group. + example: My Connection Group + type: string + tag_keys: + description: Tag keys associated with the connection group. + example: + - env + - service + items: + type: string + type: array + required: + - name + - tag_keys + - integration_type + - created_at + - last_updated_at + - is_favorite + type: object + ConnectionGroupDataRequest: + description: Data object for updating a connection group. + properties: + attributes: + $ref: '#/components/schemas/ConnectionGroupDataAttributesRequest' + type: + $ref: '#/components/schemas/ConnectionGroupType' + required: + - type + type: object + ConnectionGroupDataResponse: + description: Data object for a connection group. + properties: + attributes: + $ref: '#/components/schemas/ConnectionGroupDataAttributesResponse' + id: + description: The unique identifier of the connection group. + example: afda2727-c55e-4258-b4c6-e170c32be1dd + type: string + relationships: + $ref: '#/components/schemas/ConnectionGroupRelationships' + type: + $ref: '#/components/schemas/ConnectionGroupType' + required: + - id + - type + - attributes + type: object + ConnectionGroupRelationships: + description: Relationships for a connection group. + properties: + created_by: + $ref: '#/components/schemas/CreatedByRelationship' + type: object + ConnectionGroupType: + description: The definition of `ConnectionGroupType` object. + enum: + - connection_group + example: connection_group + type: string + x-enum-varnames: + - CONNECTION_GROUP ConnectionsPagePagination: description: Page-based pagination metadata. properties: @@ -15376,6 +15583,37 @@ components: required: - data type: object + CreatedBy: + description: Information about the user who created the resource. + properties: + id: + description: The unique identifier of the user. + example: '' + type: string + required: + - id + type: object + CreatedByRelationship: + description: Relationship to the user who created the resource. + properties: + data: + $ref: '#/components/schemas/CreatedByRelationshipData' + type: object + CreatedByRelationshipData: + description: Data for the created_by relationship. + properties: + id: + description: The unique identifier of the user. + example: 2a10fb69-5ee6-47c8-96f5-d30e18bf883d + type: string + type: + description: The type of the relationship. + example: created_by + type: string + required: + - id + - type + type: object Creator: description: Creator of the object. properties: @@ -31020,6 +31258,21 @@ components: type: string type: array type: object + IntegrationCounts: + description: Count of integrations by type. + properties: + filtered_count: + description: The filtered count of integrations. + format: int64 + type: integer + integration_type: + description: The integration type. + type: string + total_count: + description: The total count of integrations. + format: int64 + type: integer + type: object IntegrationIncident: description: Incident integration settings properties: @@ -33137,6 +33390,42 @@ components: format: int64 type: integer type: object + ListActionConnectionsResponse: + description: Response for listing action connections. + properties: + data: + description: An array of action connections. + items: + $ref: '#/components/schemas/ConnectionDataResponse' + type: array + meta: + $ref: '#/components/schemas/ListActionConnectionsResponseMeta' + required: + - data + type: object + ListActionConnectionsResponseMeta: + description: Metadata for the list connections response. + properties: + integration_counts: + description: Count of integrations by type. + items: + $ref: '#/components/schemas/IntegrationCounts' + nullable: true + type: array + total: + description: The total number of connections. + example: 1 + format: int64 + type: integer + total_filtered: + description: The total number of connections that match the specified filters. + example: 1 + format: int64 + type: integer + required: + - total + - total_filtered + type: object ListAppKeyRegistrationsResponse: description: A paginated list of app key registrations. properties: @@ -33284,6 +33573,43 @@ components: required: - data type: object + ListConnectionGroupsResponse: + description: Response for listing connection groups. + properties: + data: + description: An array of connection groups. + items: + $ref: '#/components/schemas/ConnectionGroupDataResponse' + type: array + meta: + $ref: '#/components/schemas/ListConnectionGroupsResponseMeta' + required: + - data + type: object + ListConnectionGroupsResponseMeta: + description: Metadata for the list connection groups response. + properties: + integration_counts: + description: Count of integrations by type. + items: + $ref: '#/components/schemas/IntegrationCounts' + nullable: true + type: array + total: + description: The total number of connection groups. + example: 1 + format: int64 + type: integer + total_filtered: + description: The total number of connection groups that match the specified + filters. + example: 1 + format: int64 + type: integer + required: + - total + - total_filtered + type: object ListConnectionsResponse: example: data: @@ -45468,6 +45794,16 @@ components: required: - type type: object + PrivateActionsRunner: + description: Information about the private actions runner. + properties: + id: + description: The unique identifier of the runner. + example: '' + type: string + required: + - id + type: object ProcessSummariesMeta: description: Response metadata object. properties: @@ -64252,6 +64588,22 @@ components: description: The display name of the datastore. type: string type: object + UpdateConnectionGroupRequest: + description: Request for updating a connection group. + properties: + data: + $ref: '#/components/schemas/ConnectionGroupDataRequest' + required: + - data + type: object + UpdateConnectionGroupResponse: + description: Response for updating a connection group. + properties: + data: + $ref: '#/components/schemas/ConnectionGroupDataResponse' + required: + - data + type: object UpdateConnectionRequest: example: data: @@ -68864,6 +69216,125 @@ paths: - user_app_keys - service_account_write /api/v2/actions/connections: + get: + description: List all action connections for the organization. This endpoint + supports filtering by integration type, tags, environment, and search strings. + Pagination is supported using page size and page number parameters. + operationId: ListActionConnections + parameters: + - description: The number of connections to return per page. + in: query + name: page[size] + required: false + schema: + default: 50 + example: 1 + format: int64 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 10 + format: int64 + type: integer + - description: Filter by integration type. + explode: true + in: query + name: filter[integration] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by tags. + explode: true + in: query + name: filter[tags] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by environment. + in: query + name: filter[environment] + required: false + schema: + type: string + - description: Filter by connection IDs. + explode: true + in: query + name: filter[connection_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by creator IDs. + explode: true + in: query + name: filter[creator_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Search string to filter connections. + in: query + name: filter[search] + required: false + schema: + type: string + - description: Sort parameters. + explode: true + in: query + name: sort + required: false + schema: + items: + type: string + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListActionConnectionsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: List action connections + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' post: description: Create a new Action Connection. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). @@ -68902,6 +69373,176 @@ paths: summary: Create a new Action Connection tags: - Action Connection + /api/v2/actions/connections/groups: + get: + description: List all connection groups for the organization. This endpoint + supports filtering by integration type, environment, connection group IDs, + and search strings. Pagination is supported using page size and page number + parameters. + operationId: ListConnectionGroups + parameters: + - description: The number of connection groups to return per page. + in: query + name: page[size] + required: false + schema: + default: 50 + example: 1 + format: int64 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 10 + format: int64 + type: integer + - description: Filter by integration type. + explode: true + in: query + name: filter[integration] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by environment. + in: query + name: filter[environment] + required: false + schema: + type: string + - description: Filter by connection group IDs. + explode: true + in: query + name: filter[connection_group_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by creator ID. + in: query + name: filter[creator_id] + required: false + schema: + type: string + - description: Filter by creator IDs. + explode: true + in: query + name: filter[creator_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Search string to filter connection groups. + in: query + name: filter[search] + required: false + schema: + type: string + - description: Sort parameters. + explode: true + in: query + name: sort + required: false + schema: + items: + type: string + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListConnectionGroupsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: List connection groups + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/actions/connections/groups/{connection_group_id}: + patch: + description: Update an existing connection group by ID. This endpoint allows + updating the name, description, tag keys, integration type, connections, and + policy attributes of a connection group. + operationId: UpdateConnectionGroup + parameters: + - $ref: '#/components/parameters/ConnectionGroupId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionGroupRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionGroupResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Update a connection group + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/actions/connections/{connection_id}: delete: description: Delete an existing Action Connection. This API requires a [registered diff --git a/examples/v2/action-connection/ListActionConnections.java b/examples/v2/action-connection/ListActionConnections.java new file mode 100644 index 00000000000..3e0a73ea97f --- /dev/null +++ b/examples/v2/action-connection/ListActionConnections.java @@ -0,0 +1,25 @@ +// List action connections returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ActionConnectionApi; +import com.datadog.api.client.v2.model.ListActionConnectionsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listActionConnections", true); + ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient); + + try { + ListActionConnectionsResponse result = apiInstance.listActionConnections(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ActionConnectionApi#listActionConnections"); + 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/action-connection/ListConnectionGroups.java b/examples/v2/action-connection/ListConnectionGroups.java new file mode 100644 index 00000000000..a94d8e92dcc --- /dev/null +++ b/examples/v2/action-connection/ListConnectionGroups.java @@ -0,0 +1,25 @@ +// List connection groups returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ActionConnectionApi; +import com.datadog.api.client.v2.model.ListConnectionGroupsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listConnectionGroups", true); + ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient); + + try { + ListConnectionGroupsResponse result = apiInstance.listConnectionGroups(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ActionConnectionApi#listConnectionGroups"); + 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/action-connection/UpdateConnectionGroup.java b/examples/v2/action-connection/UpdateConnectionGroup.java new file mode 100644 index 00000000000..99b0247785a --- /dev/null +++ b/examples/v2/action-connection/UpdateConnectionGroup.java @@ -0,0 +1,40 @@ +// Update a connection group returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ActionConnectionApi; +import com.datadog.api.client.v2.model.ConnectionGroupDataAttributesRequest; +import com.datadog.api.client.v2.model.ConnectionGroupDataRequest; +import com.datadog.api.client.v2.model.ConnectionGroupType; +import com.datadog.api.client.v2.model.UpdateConnectionGroupRequest; +import com.datadog.api.client.v2.model.UpdateConnectionGroupResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateConnectionGroup", true); + ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient); + + UpdateConnectionGroupRequest body = + new UpdateConnectionGroupRequest() + .data( + new ConnectionGroupDataRequest() + .attributes( + new ConnectionGroupDataAttributesRequest() + .description("An updated test connection group for AWS integrations") + .name("My Connection Group Updated")) + .type(ConnectionGroupType.CONNECTION_GROUP)); + + try { + UpdateConnectionGroupResponse result = + apiInstance.updateConnectionGroup("connection_group_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ActionConnectionApi#updateConnectionGroup"); + 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/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index ed7b5418859..9eab704d383 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -770,6 +770,9 @@ public class ApiClient { put("v2.listFleetSchedules", false); put("v2.triggerFleetSchedule", false); put("v2.updateFleetSchedule", false); + put("v2.listActionConnections", false); + put("v2.listConnectionGroups", false); + put("v2.updateConnectionGroup", false); put("v2.createOpenAPI", false); put("v2.deleteOpenAPI", false); put("v2.getOpenAPI", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/ActionConnectionApi.java b/src/main/java/com/datadog/api/client/v2/api/ActionConnectionApi.java index 85cd034bb85..c41888eae42 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ActionConnectionApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ActionConnectionApi.java @@ -8,10 +8,14 @@ import com.datadog.api.client.v2.model.CreateActionConnectionResponse; import com.datadog.api.client.v2.model.GetActionConnectionResponse; import com.datadog.api.client.v2.model.GetAppKeyRegistrationResponse; +import com.datadog.api.client.v2.model.ListActionConnectionsResponse; import com.datadog.api.client.v2.model.ListAppKeyRegistrationsResponse; +import com.datadog.api.client.v2.model.ListConnectionGroupsResponse; import com.datadog.api.client.v2.model.RegisterAppKeyResponse; import com.datadog.api.client.v2.model.UpdateActionConnectionRequest; import com.datadog.api.client.v2.model.UpdateActionConnectionResponse; +import com.datadog.api.client.v2.model.UpdateConnectionGroupRequest; +import com.datadog.api.client.v2.model.UpdateConnectionGroupResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; @@ -612,6 +616,336 @@ public ApiResponse getAppKeyRegistrationWithHttpI new GenericType() {}); } + /** Manage optional parameters to listActionConnections. */ + public static class ListActionConnectionsOptionalParameters { + private Long pageSize; + private Long pageNumber; + private List filterIntegration; + private List filterTags; + private String filterEnvironment; + private List filterConnectionIds; + private List filterCreatorIds; + private String filterSearch; + private List sort; + + /** + * Set pageSize. + * + * @param pageSize The number of connections to return per page. (optional, default to 50) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber The page number to return. (optional, default to 0) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set filterIntegration. + * + * @param filterIntegration Filter by integration type. (optional) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters filterIntegration( + List filterIntegration) { + this.filterIntegration = filterIntegration; + return this; + } + + /** + * Set filterTags. + * + * @param filterTags Filter by tags. (optional) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters filterTags(List filterTags) { + this.filterTags = filterTags; + return this; + } + + /** + * Set filterEnvironment. + * + * @param filterEnvironment Filter by environment. (optional) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters filterEnvironment(String filterEnvironment) { + this.filterEnvironment = filterEnvironment; + return this; + } + + /** + * Set filterConnectionIds. + * + * @param filterConnectionIds Filter by connection IDs. (optional) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters filterConnectionIds( + List filterConnectionIds) { + this.filterConnectionIds = filterConnectionIds; + return this; + } + + /** + * Set filterCreatorIds. + * + * @param filterCreatorIds Filter by creator IDs. (optional) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters filterCreatorIds(List filterCreatorIds) { + this.filterCreatorIds = filterCreatorIds; + return this; + } + + /** + * Set filterSearch. + * + * @param filterSearch Search string to filter connections. (optional) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters filterSearch(String filterSearch) { + this.filterSearch = filterSearch; + return this; + } + + /** + * Set sort. + * + * @param sort Sort parameters. (optional) + * @return ListActionConnectionsOptionalParameters + */ + public ListActionConnectionsOptionalParameters sort(List sort) { + this.sort = sort; + return this; + } + } + + /** + * List action connections. + * + *

See {@link #listActionConnectionsWithHttpInfo}. + * + * @return ListActionConnectionsResponse + * @throws ApiException if fails to make API call + */ + public ListActionConnectionsResponse listActionConnections() throws ApiException { + return listActionConnectionsWithHttpInfo(new ListActionConnectionsOptionalParameters()) + .getData(); + } + + /** + * List action connections. + * + *

See {@link #listActionConnectionsWithHttpInfoAsync}. + * + * @return CompletableFuture<ListActionConnectionsResponse> + */ + public CompletableFuture listActionConnectionsAsync() { + return listActionConnectionsWithHttpInfoAsync(new ListActionConnectionsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List action connections. + * + *

See {@link #listActionConnectionsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListActionConnectionsResponse + * @throws ApiException if fails to make API call + */ + public ListActionConnectionsResponse listActionConnections( + ListActionConnectionsOptionalParameters parameters) throws ApiException { + return listActionConnectionsWithHttpInfo(parameters).getData(); + } + + /** + * List action connections. + * + *

See {@link #listActionConnectionsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListActionConnectionsResponse> + */ + public CompletableFuture listActionConnectionsAsync( + ListActionConnectionsOptionalParameters parameters) { + return listActionConnectionsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all action connections for the organization. This endpoint supports filtering by + * integration type, tags, environment, and search strings. Pagination is supported using page + * size and page number parameters. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListActionConnectionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse listActionConnectionsWithHttpInfo( + ListActionConnectionsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listActionConnections"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + List filterIntegration = parameters.filterIntegration; + List filterTags = parameters.filterTags; + String filterEnvironment = parameters.filterEnvironment; + List filterConnectionIds = parameters.filterConnectionIds; + List filterCreatorIds = parameters.filterCreatorIds; + String filterSearch = parameters.filterSearch; + List sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/actions/connections"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[integration]", filterIntegration)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[tags]", filterTags)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[environment]", filterEnvironment)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[connection_ids]", filterConnectionIds)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[creator_ids]", filterCreatorIds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[search]", filterSearch)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "sort", sort)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ActionConnectionApi.listActionConnections", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List action connections. + * + *

See {@link #listActionConnectionsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListActionConnectionsResponse>> + */ + public CompletableFuture> + listActionConnectionsWithHttpInfoAsync(ListActionConnectionsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listActionConnections"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + List filterIntegration = parameters.filterIntegration; + List filterTags = parameters.filterTags; + String filterEnvironment = parameters.filterEnvironment; + List filterConnectionIds = parameters.filterConnectionIds; + List filterCreatorIds = parameters.filterCreatorIds; + String filterSearch = parameters.filterSearch; + List sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/actions/connections"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[integration]", filterIntegration)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[tags]", filterTags)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[environment]", filterEnvironment)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[connection_ids]", filterConnectionIds)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[creator_ids]", filterCreatorIds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[search]", filterSearch)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "sort", sort)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ActionConnectionApi.listActionConnections", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** Manage optional parameters to listAppKeyRegistrations. */ public static class ListAppKeyRegistrationsOptionalParameters { private Long pageSize; @@ -800,6 +1134,339 @@ public ApiResponse listAppKeyRegistrationsWithH new GenericType() {}); } + /** Manage optional parameters to listConnectionGroups. */ + public static class ListConnectionGroupsOptionalParameters { + private Long pageSize; + private Long pageNumber; + private List filterIntegration; + private String filterEnvironment; + private List filterConnectionGroupIds; + private String filterCreatorId; + private List filterCreatorIds; + private String filterSearch; + private List sort; + + /** + * Set pageSize. + * + * @param pageSize The number of connection groups to return per page. (optional, default to 50) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber The page number to return. (optional, default to 0) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set filterIntegration. + * + * @param filterIntegration Filter by integration type. (optional) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters filterIntegration( + List filterIntegration) { + this.filterIntegration = filterIntegration; + return this; + } + + /** + * Set filterEnvironment. + * + * @param filterEnvironment Filter by environment. (optional) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters filterEnvironment(String filterEnvironment) { + this.filterEnvironment = filterEnvironment; + return this; + } + + /** + * Set filterConnectionGroupIds. + * + * @param filterConnectionGroupIds Filter by connection group IDs. (optional) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters filterConnectionGroupIds( + List filterConnectionGroupIds) { + this.filterConnectionGroupIds = filterConnectionGroupIds; + return this; + } + + /** + * Set filterCreatorId. + * + * @param filterCreatorId Filter by creator ID. (optional) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters filterCreatorId(String filterCreatorId) { + this.filterCreatorId = filterCreatorId; + return this; + } + + /** + * Set filterCreatorIds. + * + * @param filterCreatorIds Filter by creator IDs. (optional) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters filterCreatorIds(List filterCreatorIds) { + this.filterCreatorIds = filterCreatorIds; + return this; + } + + /** + * Set filterSearch. + * + * @param filterSearch Search string to filter connection groups. (optional) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters filterSearch(String filterSearch) { + this.filterSearch = filterSearch; + return this; + } + + /** + * Set sort. + * + * @param sort Sort parameters. (optional) + * @return ListConnectionGroupsOptionalParameters + */ + public ListConnectionGroupsOptionalParameters sort(List sort) { + this.sort = sort; + return this; + } + } + + /** + * List connection groups. + * + *

See {@link #listConnectionGroupsWithHttpInfo}. + * + * @return ListConnectionGroupsResponse + * @throws ApiException if fails to make API call + */ + public ListConnectionGroupsResponse listConnectionGroups() throws ApiException { + return listConnectionGroupsWithHttpInfo(new ListConnectionGroupsOptionalParameters()).getData(); + } + + /** + * List connection groups. + * + *

See {@link #listConnectionGroupsWithHttpInfoAsync}. + * + * @return CompletableFuture<ListConnectionGroupsResponse> + */ + public CompletableFuture listConnectionGroupsAsync() { + return listConnectionGroupsWithHttpInfoAsync(new ListConnectionGroupsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List connection groups. + * + *

See {@link #listConnectionGroupsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListConnectionGroupsResponse + * @throws ApiException if fails to make API call + */ + public ListConnectionGroupsResponse listConnectionGroups( + ListConnectionGroupsOptionalParameters parameters) throws ApiException { + return listConnectionGroupsWithHttpInfo(parameters).getData(); + } + + /** + * List connection groups. + * + *

See {@link #listConnectionGroupsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListConnectionGroupsResponse> + */ + public CompletableFuture listConnectionGroupsAsync( + ListConnectionGroupsOptionalParameters parameters) { + return listConnectionGroupsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all connection groups for the organization. This endpoint supports filtering by + * integration type, environment, connection group IDs, and search strings. Pagination is + * supported using page size and page number parameters. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListConnectionGroupsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse listConnectionGroupsWithHttpInfo( + ListConnectionGroupsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listConnectionGroups"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + List filterIntegration = parameters.filterIntegration; + String filterEnvironment = parameters.filterEnvironment; + List filterConnectionGroupIds = parameters.filterConnectionGroupIds; + String filterCreatorId = parameters.filterCreatorId; + List filterCreatorIds = parameters.filterCreatorIds; + String filterSearch = parameters.filterSearch; + List sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/actions/connections/groups"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[integration]", filterIntegration)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[environment]", filterEnvironment)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "multi", "filter[connection_group_ids]", filterConnectionGroupIds)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[creator_id]", filterCreatorId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[creator_ids]", filterCreatorIds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[search]", filterSearch)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "sort", sort)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ActionConnectionApi.listConnectionGroups", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List connection groups. + * + *

See {@link #listConnectionGroupsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListConnectionGroupsResponse>> + */ + public CompletableFuture> + listConnectionGroupsWithHttpInfoAsync(ListConnectionGroupsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listConnectionGroups"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + List filterIntegration = parameters.filterIntegration; + String filterEnvironment = parameters.filterEnvironment; + List filterConnectionGroupIds = parameters.filterConnectionGroupIds; + String filterCreatorId = parameters.filterCreatorId; + List filterCreatorIds = parameters.filterCreatorIds; + String filterSearch = parameters.filterSearch; + List sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/actions/connections/groups"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[integration]", filterIntegration)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[environment]", filterEnvironment)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "multi", "filter[connection_group_ids]", filterConnectionGroupIds)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[creator_id]", filterCreatorId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[creator_ids]", filterCreatorIds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[search]", filterSearch)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "sort", sort)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ActionConnectionApi.listConnectionGroups", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Register a new App Key. * @@ -1233,4 +1900,192 @@ public ApiResponse updateActionConnectionWithHtt false, new GenericType() {}); } + + /** + * Update a connection group. + * + *

See {@link #updateConnectionGroupWithHttpInfo}. + * + * @param connectionGroupId The ID of the connection group. (required) + * @param body (required) + * @return UpdateConnectionGroupResponse + * @throws ApiException if fails to make API call + */ + public UpdateConnectionGroupResponse updateConnectionGroup( + String connectionGroupId, UpdateConnectionGroupRequest body) throws ApiException { + return updateConnectionGroupWithHttpInfo(connectionGroupId, body).getData(); + } + + /** + * Update a connection group. + * + *

See {@link #updateConnectionGroupWithHttpInfoAsync}. + * + * @param connectionGroupId The ID of the connection group. (required) + * @param body (required) + * @return CompletableFuture<UpdateConnectionGroupResponse> + */ + public CompletableFuture updateConnectionGroupAsync( + String connectionGroupId, UpdateConnectionGroupRequest body) { + return updateConnectionGroupWithHttpInfoAsync(connectionGroupId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing connection group by ID. This endpoint allows updating the name, description, + * tag keys, integration type, connections, and policy attributes of a connection group. + * + * @param connectionGroupId The ID of the connection group. (required) + * @param body (required) + * @return ApiResponse<UpdateConnectionGroupResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse updateConnectionGroupWithHttpInfo( + String connectionGroupId, UpdateConnectionGroupRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateConnectionGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'connectionGroupId' is set + if (connectionGroupId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'connectionGroupId' when calling updateConnectionGroup"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateConnectionGroup"); + } + // create path and map variables + String localVarPath = + "/api/v2/actions/connections/groups/{connection_group_id}" + .replaceAll( + "\\{" + "connection_group_id" + "\\}", + apiClient.escapeString(connectionGroupId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ActionConnectionApi.updateConnectionGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a connection group. + * + *

See {@link #updateConnectionGroupWithHttpInfo}. + * + * @param connectionGroupId The ID of the connection group. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<UpdateConnectionGroupResponse>> + */ + public CompletableFuture> + updateConnectionGroupWithHttpInfoAsync( + String connectionGroupId, UpdateConnectionGroupRequest body) { + // Check if unstable operation is enabled + String operationId = "updateConnectionGroup"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'connectionGroupId' is set + if (connectionGroupId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'connectionGroupId' when calling" + + " updateConnectionGroup")); + 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 updateConnectionGroup")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/actions/connections/groups/{connection_group_id}" + .replaceAll( + "\\{" + "connection_group_id" + "\\}", + apiClient.escapeString(connectionGroupId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ActionConnectionApi.updateConnectionGroup", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ConnectionDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/ConnectionDataAttributesResponse.java new file mode 100644 index 00000000000..17602cd5e0f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectionDataAttributesResponse.java @@ -0,0 +1,489 @@ +/* + * 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; + +/** Attributes of an action connection. */ +@JsonPropertyOrder({ + ConnectionDataAttributesResponse.JSON_PROPERTY_ACTING_USER_CAN_RESOLVE, + ConnectionDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + ConnectionDataAttributesResponse.JSON_PROPERTY_CREATED_BY, + ConnectionDataAttributesResponse.JSON_PROPERTY_DESCRIPTION, + ConnectionDataAttributesResponse.JSON_PROPERTY_EXTERNAL_SECRETS_MANAGER, + ConnectionDataAttributesResponse.JSON_PROPERTY_INTEGRATION, + ConnectionDataAttributesResponse.JSON_PROPERTY_IS_FAVORITE, + ConnectionDataAttributesResponse.JSON_PROPERTY_LAST_UPDATED, + ConnectionDataAttributesResponse.JSON_PROPERTY_NAME, + ConnectionDataAttributesResponse.JSON_PROPERTY_PRIVATE_ACTIONS_RUNNER, + ConnectionDataAttributesResponse.JSON_PROPERTY_RUNNER_ID, + ConnectionDataAttributesResponse.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ConnectionDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACTING_USER_CAN_RESOLVE = "acting_user_can_resolve"; + private Boolean actingUserCanResolve; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private CreatedBy createdBy; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EXTERNAL_SECRETS_MANAGER = "external_secrets_manager"; + private Object externalSecretsManager; + + public static final String JSON_PROPERTY_INTEGRATION = "integration"; + private Object integration; + + public static final String JSON_PROPERTY_IS_FAVORITE = "is_favorite"; + private Boolean isFavorite; + + public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; + private OffsetDateTime lastUpdated; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PRIVATE_ACTIONS_RUNNER = "private_actions_runner"; + private PrivateActionsRunner privateActionsRunner; + + public static final String JSON_PROPERTY_RUNNER_ID = "runner_id"; + private String runnerId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public ConnectionDataAttributesResponse() {} + + @JsonCreator + public ConnectionDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ACTING_USER_CAN_RESOLVE) + Boolean actingUserCanResolve, + @JsonProperty(required = true, value = JSON_PROPERTY_EXTERNAL_SECRETS_MANAGER) + Object externalSecretsManager, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION) Object integration, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_FAVORITE) Boolean isFavorite, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.actingUserCanResolve = actingUserCanResolve; + this.externalSecretsManager = externalSecretsManager; + if (externalSecretsManager != null) {} + this.integration = integration; + this.isFavorite = isFavorite; + this.name = name; + } + + public ConnectionDataAttributesResponse actingUserCanResolve(Boolean actingUserCanResolve) { + this.actingUserCanResolve = actingUserCanResolve; + return this; + } + + /** + * Indicates if the acting user can resolve the connection. + * + * @return actingUserCanResolve + */ + @JsonProperty(JSON_PROPERTY_ACTING_USER_CAN_RESOLVE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getActingUserCanResolve() { + return actingUserCanResolve; + } + + public void setActingUserCanResolve(Boolean actingUserCanResolve) { + this.actingUserCanResolve = actingUserCanResolve; + } + + public ConnectionDataAttributesResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The creation timestamp of the connection. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public ConnectionDataAttributesResponse createdBy(CreatedBy createdBy) { + this.createdBy = createdBy; + this.unparsed |= createdBy.unparsed; + return this; + } + + /** + * Information about the user who created the resource. + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreatedBy getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public ConnectionDataAttributesResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description of the connection. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ConnectionDataAttributesResponse externalSecretsManager(Object externalSecretsManager) { + this.externalSecretsManager = externalSecretsManager; + if (externalSecretsManager != null) {} + return this; + } + + /** + * External secrets manager configuration. + * + * @return externalSecretsManager + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTERNAL_SECRETS_MANAGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Object getExternalSecretsManager() { + return externalSecretsManager; + } + + public void setExternalSecretsManager(Object externalSecretsManager) { + this.externalSecretsManager = externalSecretsManager; + } + + public ConnectionDataAttributesResponse integration(Object integration) { + this.integration = integration; + return this; + } + + /** + * Integration configuration details. + * + * @return integration + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Object getIntegration() { + return integration; + } + + public void setIntegration(Object integration) { + this.integration = integration; + } + + public ConnectionDataAttributesResponse isFavorite(Boolean isFavorite) { + this.isFavorite = isFavorite; + return this; + } + + /** + * Indicates if the connection is marked as favorite. + * + * @return isFavorite + */ + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsFavorite() { + return isFavorite; + } + + public void setIsFavorite(Boolean isFavorite) { + this.isFavorite = isFavorite; + } + + public ConnectionDataAttributesResponse lastUpdated(OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * The last updated timestamp of the connection. + * + * @return lastUpdated + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastUpdated() { + return lastUpdated; + } + + public void setLastUpdated(OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + } + + public ConnectionDataAttributesResponse name(String name) { + this.name = name; + return this; + } + + /** + * The name of the connection. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ConnectionDataAttributesResponse privateActionsRunner( + PrivateActionsRunner privateActionsRunner) { + this.privateActionsRunner = privateActionsRunner; + this.unparsed |= privateActionsRunner.unparsed; + return this; + } + + /** + * Information about the private actions runner. + * + * @return privateActionsRunner + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIVATE_ACTIONS_RUNNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PrivateActionsRunner getPrivateActionsRunner() { + return privateActionsRunner; + } + + public void setPrivateActionsRunner(PrivateActionsRunner privateActionsRunner) { + this.privateActionsRunner = privateActionsRunner; + } + + public ConnectionDataAttributesResponse runnerId(String runnerId) { + this.runnerId = runnerId; + return this; + } + + /** + * The ID of the runner associated with the connection. + * + * @return runnerId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUNNER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRunnerId() { + return runnerId; + } + + public void setRunnerId(String runnerId) { + this.runnerId = runnerId; + } + + public ConnectionDataAttributesResponse tags(List tags) { + this.tags = tags; + return this; + } + + public ConnectionDataAttributesResponse addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags associated with the connection. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * 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 ConnectionDataAttributesResponse + */ + @JsonAnySetter + public ConnectionDataAttributesResponse 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 ConnectionDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionDataAttributesResponse connectionDataAttributesResponse = + (ConnectionDataAttributesResponse) o; + return Objects.equals( + this.actingUserCanResolve, connectionDataAttributesResponse.actingUserCanResolve) + && Objects.equals(this.createdAt, connectionDataAttributesResponse.createdAt) + && Objects.equals(this.createdBy, connectionDataAttributesResponse.createdBy) + && Objects.equals(this.description, connectionDataAttributesResponse.description) + && Objects.equals( + this.externalSecretsManager, connectionDataAttributesResponse.externalSecretsManager) + && Objects.equals(this.integration, connectionDataAttributesResponse.integration) + && Objects.equals(this.isFavorite, connectionDataAttributesResponse.isFavorite) + && Objects.equals(this.lastUpdated, connectionDataAttributesResponse.lastUpdated) + && Objects.equals(this.name, connectionDataAttributesResponse.name) + && Objects.equals( + this.privateActionsRunner, connectionDataAttributesResponse.privateActionsRunner) + && Objects.equals(this.runnerId, connectionDataAttributesResponse.runnerId) + && Objects.equals(this.tags, connectionDataAttributesResponse.tags) + && Objects.equals( + this.additionalProperties, connectionDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + actingUserCanResolve, + createdAt, + createdBy, + description, + externalSecretsManager, + integration, + isFavorite, + lastUpdated, + name, + privateActionsRunner, + runnerId, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionDataAttributesResponse {\n"); + sb.append(" actingUserCanResolve: ") + .append(toIndentedString(actingUserCanResolve)) + .append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" externalSecretsManager: ") + .append(toIndentedString(externalSecretsManager)) + .append("\n"); + sb.append(" integration: ").append(toIndentedString(integration)).append("\n"); + sb.append(" isFavorite: ").append(toIndentedString(isFavorite)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" privateActionsRunner: ") + .append(toIndentedString(privateActionsRunner)) + .append("\n"); + sb.append(" runnerId: ").append(toIndentedString(runnerId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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/ConnectionDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/ConnectionDataResponse.java new file mode 100644 index 00000000000..3874fdfe746 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectionDataResponse.java @@ -0,0 +1,209 @@ +/* + * 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; + +/** Data object for an action connection. */ +@JsonPropertyOrder({ + ConnectionDataResponse.JSON_PROPERTY_ATTRIBUTES, + ConnectionDataResponse.JSON_PROPERTY_ID, + ConnectionDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ConnectionDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ConnectionDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ActionConnectionDataType type; + + public ConnectionDataResponse() {} + + @JsonCreator + public ConnectionDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ConnectionDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ActionConnectionDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ConnectionDataResponse attributes(ConnectionDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an action connection. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectionDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(ConnectionDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public ConnectionDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the connection. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ConnectionDataResponse type(ActionConnectionDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The definition of ActionConnectionDataType object. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ActionConnectionDataType getType() { + return type; + } + + public void setType(ActionConnectionDataType 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 ConnectionDataResponse + */ + @JsonAnySetter + public ConnectionDataResponse 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 ConnectionDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionDataResponse connectionDataResponse = (ConnectionDataResponse) o; + return Objects.equals(this.attributes, connectionDataResponse.attributes) + && Objects.equals(this.id, connectionDataResponse.id) + && Objects.equals(this.type, connectionDataResponse.type) + && Objects.equals(this.additionalProperties, connectionDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionDataResponse {\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/ConnectionGroupDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataAttributesRequest.java new file mode 100644 index 00000000000..6f472a87a5a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataAttributesRequest.java @@ -0,0 +1,301 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for updating a connection group. */ +@JsonPropertyOrder({ + ConnectionGroupDataAttributesRequest.JSON_PROPERTY_CONNECTIONS, + ConnectionGroupDataAttributesRequest.JSON_PROPERTY_DESCRIPTION, + ConnectionGroupDataAttributesRequest.JSON_PROPERTY_INTEGRATION_TYPE, + ConnectionGroupDataAttributesRequest.JSON_PROPERTY_NAME, + ConnectionGroupDataAttributesRequest.JSON_PROPERTY_POLICY_ATTRIBUTES, + ConnectionGroupDataAttributesRequest.JSON_PROPERTY_TAG_KEYS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ConnectionGroupDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONNECTIONS = "connections"; + private List connections = null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POLICY_ATTRIBUTES = "policy_attributes"; + private String policyAttributes; + + public static final String JSON_PROPERTY_TAG_KEYS = "tag_keys"; + private List tagKeys = null; + + public ConnectionGroupDataAttributesRequest connections(List connections) { + this.connections = connections; + return this; + } + + public ConnectionGroupDataAttributesRequest addConnectionsItem(String connectionsItem) { + if (this.connections == null) { + this.connections = new ArrayList<>(); + } + this.connections.add(connectionsItem); + return this; + } + + /** + * List of connection IDs associated with the connection group. + * + * @return connections + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONNECTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConnections() { + return connections; + } + + public void setConnections(List connections) { + this.connections = connections; + } + + public ConnectionGroupDataAttributesRequest description(String description) { + this.description = description; + return this; + } + + /** + * The description of the connection group. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ConnectionGroupDataAttributesRequest integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The integration type of the connection group. + * + * @return integrationType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public ConnectionGroupDataAttributesRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the connection group. + * + * @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 ConnectionGroupDataAttributesRequest policyAttributes(String policyAttributes) { + this.policyAttributes = policyAttributes; + return this; + } + + /** + * Policy attributes for the connection group. + * + * @return policyAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POLICY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPolicyAttributes() { + return policyAttributes; + } + + public void setPolicyAttributes(String policyAttributes) { + this.policyAttributes = policyAttributes; + } + + public ConnectionGroupDataAttributesRequest tagKeys(List tagKeys) { + this.tagKeys = tagKeys; + return this; + } + + public ConnectionGroupDataAttributesRequest addTagKeysItem(String tagKeysItem) { + if (this.tagKeys == null) { + this.tagKeys = new ArrayList<>(); + } + this.tagKeys.add(tagKeysItem); + return this; + } + + /** + * Tag keys associated with the connection group. + * + * @return tagKeys + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTagKeys() { + return tagKeys; + } + + public void setTagKeys(List tagKeys) { + this.tagKeys = tagKeys; + } + + /** + * 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 ConnectionGroupDataAttributesRequest + */ + @JsonAnySetter + public ConnectionGroupDataAttributesRequest 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 ConnectionGroupDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionGroupDataAttributesRequest connectionGroupDataAttributesRequest = + (ConnectionGroupDataAttributesRequest) o; + return Objects.equals(this.connections, connectionGroupDataAttributesRequest.connections) + && Objects.equals(this.description, connectionGroupDataAttributesRequest.description) + && Objects.equals( + this.integrationType, connectionGroupDataAttributesRequest.integrationType) + && Objects.equals(this.name, connectionGroupDataAttributesRequest.name) + && Objects.equals( + this.policyAttributes, connectionGroupDataAttributesRequest.policyAttributes) + && Objects.equals(this.tagKeys, connectionGroupDataAttributesRequest.tagKeys) + && Objects.equals( + this.additionalProperties, connectionGroupDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + connections, + description, + integrationType, + name, + policyAttributes, + tagKeys, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionGroupDataAttributesRequest {\n"); + sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" policyAttributes: ").append(toIndentedString(policyAttributes)).append("\n"); + sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).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/ConnectionGroupDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataAttributesResponse.java new file mode 100644 index 00000000000..5ebe3145efb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataAttributesResponse.java @@ -0,0 +1,368 @@ +/* + * 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; + +/** Attributes of a connection group. */ +@JsonPropertyOrder({ + ConnectionGroupDataAttributesResponse.JSON_PROPERTY_CONNECTIONS, + ConnectionGroupDataAttributesResponse.JSON_PROPERTY_CREATED_AT, + ConnectionGroupDataAttributesResponse.JSON_PROPERTY_DESCRIPTION, + ConnectionGroupDataAttributesResponse.JSON_PROPERTY_INTEGRATION_TYPE, + ConnectionGroupDataAttributesResponse.JSON_PROPERTY_IS_FAVORITE, + ConnectionGroupDataAttributesResponse.JSON_PROPERTY_LAST_UPDATED_AT, + ConnectionGroupDataAttributesResponse.JSON_PROPERTY_NAME, + ConnectionGroupDataAttributesResponse.JSON_PROPERTY_TAG_KEYS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ConnectionGroupDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONNECTIONS = "connections"; + private List connections = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_IS_FAVORITE = "is_favorite"; + private Boolean isFavorite; + + public static final String JSON_PROPERTY_LAST_UPDATED_AT = "last_updated_at"; + private OffsetDateTime lastUpdatedAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TAG_KEYS = "tag_keys"; + private List tagKeys = new ArrayList<>(); + + public ConnectionGroupDataAttributesResponse() {} + + @JsonCreator + public ConnectionGroupDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_INTEGRATION_TYPE) String integrationType, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_FAVORITE) Boolean isFavorite, + @JsonProperty(required = true, value = JSON_PROPERTY_LAST_UPDATED_AT) + OffsetDateTime lastUpdatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG_KEYS) List tagKeys) { + this.createdAt = createdAt; + this.integrationType = integrationType; + this.isFavorite = isFavorite; + this.lastUpdatedAt = lastUpdatedAt; + this.name = name; + this.tagKeys = tagKeys; + } + + public ConnectionGroupDataAttributesResponse connections(List connections) { + this.connections = connections; + return this; + } + + public ConnectionGroupDataAttributesResponse addConnectionsItem(String connectionsItem) { + if (this.connections == null) { + this.connections = new ArrayList<>(); + } + this.connections.add(connectionsItem); + return this; + } + + /** + * List of connection IDs associated with the connection group. + * + * @return connections + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONNECTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConnections() { + return connections; + } + + public void setConnections(List connections) { + this.connections = connections; + } + + public ConnectionGroupDataAttributesResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The creation timestamp of the connection group. + * + * @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; + } + + public ConnectionGroupDataAttributesResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description of the connection group. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ConnectionGroupDataAttributesResponse integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The integration type of the connection group. + * + * @return integrationType + */ + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public ConnectionGroupDataAttributesResponse isFavorite(Boolean isFavorite) { + this.isFavorite = isFavorite; + return this; + } + + /** + * Indicates if the connection group is marked as favorite. + * + * @return isFavorite + */ + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsFavorite() { + return isFavorite; + } + + public void setIsFavorite(Boolean isFavorite) { + this.isFavorite = isFavorite; + } + + public ConnectionGroupDataAttributesResponse lastUpdatedAt(OffsetDateTime lastUpdatedAt) { + this.lastUpdatedAt = lastUpdatedAt; + return this; + } + + /** + * The last updated timestamp of the connection group. + * + * @return lastUpdatedAt + */ + @JsonProperty(JSON_PROPERTY_LAST_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastUpdatedAt() { + return lastUpdatedAt; + } + + public void setLastUpdatedAt(OffsetDateTime lastUpdatedAt) { + this.lastUpdatedAt = lastUpdatedAt; + } + + public ConnectionGroupDataAttributesResponse name(String name) { + this.name = name; + return this; + } + + /** + * The name of the connection group. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ConnectionGroupDataAttributesResponse tagKeys(List tagKeys) { + this.tagKeys = tagKeys; + return this; + } + + public ConnectionGroupDataAttributesResponse addTagKeysItem(String tagKeysItem) { + this.tagKeys.add(tagKeysItem); + return this; + } + + /** + * Tag keys associated with the connection group. + * + * @return tagKeys + */ + @JsonProperty(JSON_PROPERTY_TAG_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTagKeys() { + return tagKeys; + } + + public void setTagKeys(List tagKeys) { + this.tagKeys = tagKeys; + } + + /** + * 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 ConnectionGroupDataAttributesResponse + */ + @JsonAnySetter + public ConnectionGroupDataAttributesResponse 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 ConnectionGroupDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionGroupDataAttributesResponse connectionGroupDataAttributesResponse = + (ConnectionGroupDataAttributesResponse) o; + return Objects.equals(this.connections, connectionGroupDataAttributesResponse.connections) + && Objects.equals(this.createdAt, connectionGroupDataAttributesResponse.createdAt) + && Objects.equals(this.description, connectionGroupDataAttributesResponse.description) + && Objects.equals( + this.integrationType, connectionGroupDataAttributesResponse.integrationType) + && Objects.equals(this.isFavorite, connectionGroupDataAttributesResponse.isFavorite) + && Objects.equals(this.lastUpdatedAt, connectionGroupDataAttributesResponse.lastUpdatedAt) + && Objects.equals(this.name, connectionGroupDataAttributesResponse.name) + && Objects.equals(this.tagKeys, connectionGroupDataAttributesResponse.tagKeys) + && Objects.equals( + this.additionalProperties, connectionGroupDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + connections, + createdAt, + description, + integrationType, + isFavorite, + lastUpdatedAt, + name, + tagKeys, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionGroupDataAttributesResponse {\n"); + sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" isFavorite: ").append(toIndentedString(isFavorite)).append("\n"); + sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tagKeys: ").append(toIndentedString(tagKeys)).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/ConnectionGroupDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataRequest.java new file mode 100644 index 00000000000..969f81519f4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataRequest.java @@ -0,0 +1,179 @@ +/* + * 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; + +/** Data object for updating a connection group. */ +@JsonPropertyOrder({ + ConnectionGroupDataRequest.JSON_PROPERTY_ATTRIBUTES, + ConnectionGroupDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ConnectionGroupDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ConnectionGroupDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ConnectionGroupType type; + + public ConnectionGroupDataRequest() {} + + @JsonCreator + public ConnectionGroupDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ConnectionGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ConnectionGroupDataRequest attributes(ConnectionGroupDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for updating a connection group. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConnectionGroupDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(ConnectionGroupDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public ConnectionGroupDataRequest type(ConnectionGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The definition of ConnectionGroupType object. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectionGroupType getType() { + return type; + } + + public void setType(ConnectionGroupType 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 ConnectionGroupDataRequest + */ + @JsonAnySetter + public ConnectionGroupDataRequest 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 ConnectionGroupDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionGroupDataRequest connectionGroupDataRequest = (ConnectionGroupDataRequest) o; + return Objects.equals(this.attributes, connectionGroupDataRequest.attributes) + && Objects.equals(this.type, connectionGroupDataRequest.type) + && Objects.equals( + this.additionalProperties, connectionGroupDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionGroupDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).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/ConnectionGroupDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataResponse.java new file mode 100644 index 00000000000..adf4d17bc30 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupDataResponse.java @@ -0,0 +1,238 @@ +/* + * 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; + +/** Data object for a connection group. */ +@JsonPropertyOrder({ + ConnectionGroupDataResponse.JSON_PROPERTY_ATTRIBUTES, + ConnectionGroupDataResponse.JSON_PROPERTY_ID, + ConnectionGroupDataResponse.JSON_PROPERTY_RELATIONSHIPS, + ConnectionGroupDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ConnectionGroupDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ConnectionGroupDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private ConnectionGroupRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ConnectionGroupType type; + + public ConnectionGroupDataResponse() {} + + @JsonCreator + public ConnectionGroupDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ConnectionGroupDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ConnectionGroupType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ConnectionGroupDataResponse attributes(ConnectionGroupDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a connection group. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectionGroupDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(ConnectionGroupDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public ConnectionGroupDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the connection group. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ConnectionGroupDataResponse relationships(ConnectionGroupRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for a connection group. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ConnectionGroupRelationships getRelationships() { + return relationships; + } + + public void setRelationships(ConnectionGroupRelationships relationships) { + this.relationships = relationships; + } + + public ConnectionGroupDataResponse type(ConnectionGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The definition of ConnectionGroupType object. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectionGroupType getType() { + return type; + } + + public void setType(ConnectionGroupType 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 ConnectionGroupDataResponse + */ + @JsonAnySetter + public ConnectionGroupDataResponse 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 ConnectionGroupDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionGroupDataResponse connectionGroupDataResponse = (ConnectionGroupDataResponse) o; + return Objects.equals(this.attributes, connectionGroupDataResponse.attributes) + && Objects.equals(this.id, connectionGroupDataResponse.id) + && Objects.equals(this.relationships, connectionGroupDataResponse.relationships) + && Objects.equals(this.type, connectionGroupDataResponse.type) + && Objects.equals( + this.additionalProperties, connectionGroupDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionGroupDataResponse {\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/ConnectionGroupRelationships.java b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupRelationships.java new file mode 100644 index 00000000000..473342a73bb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupRelationships.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; + +/** Relationships for a connection group. */ +@JsonPropertyOrder({ConnectionGroupRelationships.JSON_PROPERTY_CREATED_BY}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ConnectionGroupRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private CreatedByRelationship createdBy; + + public ConnectionGroupRelationships createdBy(CreatedByRelationship createdBy) { + this.createdBy = createdBy; + this.unparsed |= createdBy.unparsed; + return this; + } + + /** + * Relationship to the user who created the resource. + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreatedByRelationship getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(CreatedByRelationship createdBy) { + this.createdBy = createdBy; + } + + /** + * 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 ConnectionGroupRelationships + */ + @JsonAnySetter + public ConnectionGroupRelationships 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 ConnectionGroupRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionGroupRelationships connectionGroupRelationships = (ConnectionGroupRelationships) o; + return Objects.equals(this.createdBy, connectionGroupRelationships.createdBy) + && Objects.equals( + this.additionalProperties, connectionGroupRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdBy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionGroupRelationships {\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).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/ConnectionGroupType.java b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupType.java new file mode 100644 index 00000000000..83aa3daf25c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectionGroupType.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; + +/** The definition of ConnectionGroupType object. */ +@JsonSerialize(using = ConnectionGroupType.ConnectionGroupTypeSerializer.class) +public class ConnectionGroupType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("connection_group")); + + public static final ConnectionGroupType CONNECTION_GROUP = + new ConnectionGroupType("connection_group"); + + ConnectionGroupType(String value) { + super(value, allowedValues); + } + + public static class ConnectionGroupTypeSerializer extends StdSerializer { + public ConnectionGroupTypeSerializer(Class t) { + super(t); + } + + public ConnectionGroupTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ConnectionGroupType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ConnectionGroupType fromValue(String value) { + return new ConnectionGroupType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreatedBy.java b/src/main/java/com/datadog/api/client/v2/model/CreatedBy.java new file mode 100644 index 00000000000..47e78d1bc1a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreatedBy.java @@ -0,0 +1,142 @@ +/* + * 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; + +/** Information about the user who created the resource. */ +@JsonPropertyOrder({CreatedBy.JSON_PROPERTY_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreatedBy { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public CreatedBy() {} + + @JsonCreator + public CreatedBy(@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) { + this.id = id; + } + + public CreatedBy id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the user. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * 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 CreatedBy + */ + @JsonAnySetter + public CreatedBy 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 CreatedBy object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatedBy createdBy = (CreatedBy) o; + return Objects.equals(this.id, createdBy.id) + && Objects.equals(this.additionalProperties, createdBy.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatedBy {\n"); + sb.append(" id: ").append(toIndentedString(id)).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/CreatedByRelationship.java b/src/main/java/com/datadog/api/client/v2/model/CreatedByRelationship.java new file mode 100644 index 00000000000..4741105bd43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreatedByRelationship.java @@ -0,0 +1,136 @@ +/* + * 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; + +/** Relationship to the user who created the resource. */ +@JsonPropertyOrder({CreatedByRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreatedByRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreatedByRelationshipData data; + + public CreatedByRelationship data(CreatedByRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for the created_by relationship. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreatedByRelationshipData getData() { + return data; + } + + public void setData(CreatedByRelationshipData 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 CreatedByRelationship + */ + @JsonAnySetter + public CreatedByRelationship 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 CreatedByRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatedByRelationship createdByRelationship = (CreatedByRelationship) o; + return Objects.equals(this.data, createdByRelationship.data) + && Objects.equals(this.additionalProperties, createdByRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatedByRelationship {\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/CreatedByRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/CreatedByRelationshipData.java new file mode 100644 index 00000000000..887e480fcdc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreatedByRelationshipData.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Data for the created_by relationship. */ +@JsonPropertyOrder({ + CreatedByRelationshipData.JSON_PROPERTY_ID, + CreatedByRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreatedByRelationshipData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public CreatedByRelationshipData() {} + + @JsonCreator + public CreatedByRelationshipData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.id = id; + this.type = type; + } + + public CreatedByRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the user. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public CreatedByRelationshipData type(String type) { + this.type = type; + return this; + } + + /** + * The type of the relationship. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + 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 CreatedByRelationshipData + */ + @JsonAnySetter + public CreatedByRelationshipData 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 CreatedByRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatedByRelationshipData createdByRelationshipData = (CreatedByRelationshipData) o; + return Objects.equals(this.id, createdByRelationshipData.id) + && Objects.equals(this.type, createdByRelationshipData.type) + && Objects.equals( + this.additionalProperties, createdByRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatedByRelationshipData {\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/IntegrationCounts.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationCounts.java new file mode 100644 index 00000000000..8b757f8fbaf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationCounts.java @@ -0,0 +1,191 @@ +/* + * 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; + +/** Count of integrations by type. */ +@JsonPropertyOrder({ + IntegrationCounts.JSON_PROPERTY_FILTERED_COUNT, + IntegrationCounts.JSON_PROPERTY_INTEGRATION_TYPE, + IntegrationCounts.JSON_PROPERTY_TOTAL_COUNT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IntegrationCounts { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FILTERED_COUNT = "filtered_count"; + private Long filteredCount; + + public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integration_type"; + private String integrationType; + + public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; + private Long totalCount; + + public IntegrationCounts filteredCount(Long filteredCount) { + this.filteredCount = filteredCount; + return this; + } + + /** + * The filtered count of integrations. + * + * @return filteredCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTERED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFilteredCount() { + return filteredCount; + } + + public void setFilteredCount(Long filteredCount) { + this.filteredCount = filteredCount; + } + + public IntegrationCounts integrationType(String integrationType) { + this.integrationType = integrationType; + return this; + } + + /** + * The integration type. + * + * @return integrationType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegrationType() { + return integrationType; + } + + public void setIntegrationType(String integrationType) { + this.integrationType = integrationType; + } + + public IntegrationCounts totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * The total count of integrations. + * + * @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; + } + + /** + * 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 IntegrationCounts + */ + @JsonAnySetter + public IntegrationCounts 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 IntegrationCounts object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationCounts integrationCounts = (IntegrationCounts) o; + return Objects.equals(this.filteredCount, integrationCounts.filteredCount) + && Objects.equals(this.integrationType, integrationCounts.integrationType) + && Objects.equals(this.totalCount, integrationCounts.totalCount) + && Objects.equals(this.additionalProperties, integrationCounts.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filteredCount, integrationType, totalCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationCounts {\n"); + sb.append(" filteredCount: ").append(toIndentedString(filteredCount)).append("\n"); + sb.append(" integrationType: ").append(toIndentedString(integrationType)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).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/ListActionConnectionsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListActionConnectionsResponse.java new file mode 100644 index 00000000000..4f2599a2fbf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListActionConnectionsResponse.java @@ -0,0 +1,186 @@ +/* + * 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 for listing action connections. */ +@JsonPropertyOrder({ + ListActionConnectionsResponse.JSON_PROPERTY_DATA, + ListActionConnectionsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListActionConnectionsResponse { + @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 ListActionConnectionsResponseMeta meta; + + public ListActionConnectionsResponse() {} + + @JsonCreator + public ListActionConnectionsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public ListActionConnectionsResponse data(List data) { + this.data = data; + for (ConnectionDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ListActionConnectionsResponse addDataItem(ConnectionDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of action 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 ListActionConnectionsResponse meta(ListActionConnectionsResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for the list connections response. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ListActionConnectionsResponseMeta getMeta() { + return meta; + } + + public void setMeta(ListActionConnectionsResponseMeta 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 ListActionConnectionsResponse + */ + @JsonAnySetter + public ListActionConnectionsResponse 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 ListActionConnectionsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListActionConnectionsResponse listActionConnectionsResponse = (ListActionConnectionsResponse) o; + return Objects.equals(this.data, listActionConnectionsResponse.data) + && Objects.equals(this.meta, listActionConnectionsResponse.meta) + && Objects.equals( + this.additionalProperties, listActionConnectionsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListActionConnectionsResponse {\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/ListActionConnectionsResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/ListActionConnectionsResponseMeta.java new file mode 100644 index 00000000000..a6a104ba2ce --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListActionConnectionsResponseMeta.java @@ -0,0 +1,232 @@ +/* + * 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; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Metadata for the list connections response. */ +@JsonPropertyOrder({ + ListActionConnectionsResponseMeta.JSON_PROPERTY_INTEGRATION_COUNTS, + ListActionConnectionsResponseMeta.JSON_PROPERTY_TOTAL, + ListActionConnectionsResponseMeta.JSON_PROPERTY_TOTAL_FILTERED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListActionConnectionsResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INTEGRATION_COUNTS = "integration_counts"; + private JsonNullable> integrationCounts = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + private Long total; + + public static final String JSON_PROPERTY_TOTAL_FILTERED = "total_filtered"; + private Long totalFiltered; + + public ListActionConnectionsResponseMeta() {} + + @JsonCreator + public ListActionConnectionsResponseMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL) Long total, + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_FILTERED) Long totalFiltered) { + this.total = total; + this.totalFiltered = totalFiltered; + } + + public ListActionConnectionsResponseMeta integrationCounts( + List integrationCounts) { + this.integrationCounts = JsonNullable.>of(integrationCounts); + return this; + } + + public ListActionConnectionsResponseMeta addIntegrationCountsItem( + IntegrationCounts integrationCountsItem) { + if (this.integrationCounts == null || !this.integrationCounts.isPresent()) { + this.integrationCounts = JsonNullable.>of(new ArrayList<>()); + } + try { + this.integrationCounts.get().add(integrationCountsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Count of integrations by type. + * + * @return integrationCounts + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getIntegrationCounts() { + return integrationCounts.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_COUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getIntegrationCounts_JsonNullable() { + return integrationCounts; + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_COUNTS) + public void setIntegrationCounts_JsonNullable( + JsonNullable> integrationCounts) { + this.integrationCounts = integrationCounts; + } + + public void setIntegrationCounts(List integrationCounts) { + this.integrationCounts = JsonNullable.>of(integrationCounts); + } + + public ListActionConnectionsResponseMeta total(Long total) { + this.total = total; + return this; + } + + /** + * The total number of connections. + * + * @return total + */ + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotal() { + return total; + } + + public void setTotal(Long total) { + this.total = total; + } + + public ListActionConnectionsResponseMeta totalFiltered(Long totalFiltered) { + this.totalFiltered = totalFiltered; + return this; + } + + /** + * The total number of connections that match the specified filters. + * + * @return totalFiltered + */ + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalFiltered() { + return totalFiltered; + } + + public void setTotalFiltered(Long totalFiltered) { + this.totalFiltered = totalFiltered; + } + + /** + * 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 ListActionConnectionsResponseMeta + */ + @JsonAnySetter + public ListActionConnectionsResponseMeta 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 ListActionConnectionsResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListActionConnectionsResponseMeta listActionConnectionsResponseMeta = + (ListActionConnectionsResponseMeta) o; + return Objects.equals( + this.integrationCounts, listActionConnectionsResponseMeta.integrationCounts) + && Objects.equals(this.total, listActionConnectionsResponseMeta.total) + && Objects.equals(this.totalFiltered, listActionConnectionsResponseMeta.totalFiltered) + && Objects.equals( + this.additionalProperties, listActionConnectionsResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(integrationCounts, total, totalFiltered, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListActionConnectionsResponseMeta {\n"); + sb.append(" integrationCounts: ").append(toIndentedString(integrationCounts)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" totalFiltered: ").append(toIndentedString(totalFiltered)).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/ListConnectionGroupsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListConnectionGroupsResponse.java new file mode 100644 index 00000000000..01c359f339e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListConnectionGroupsResponse.java @@ -0,0 +1,186 @@ +/* + * 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 for listing connection groups. */ +@JsonPropertyOrder({ + ListConnectionGroupsResponse.JSON_PROPERTY_DATA, + ListConnectionGroupsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListConnectionGroupsResponse { + @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 ListConnectionGroupsResponseMeta meta; + + public ListConnectionGroupsResponse() {} + + @JsonCreator + public ListConnectionGroupsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public ListConnectionGroupsResponse data(List data) { + this.data = data; + for (ConnectionGroupDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ListConnectionGroupsResponse addDataItem(ConnectionGroupDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of connection groups. + * + * @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 ListConnectionGroupsResponse meta(ListConnectionGroupsResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for the list connection groups response. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ListConnectionGroupsResponseMeta getMeta() { + return meta; + } + + public void setMeta(ListConnectionGroupsResponseMeta 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 ListConnectionGroupsResponse + */ + @JsonAnySetter + public ListConnectionGroupsResponse 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 ListConnectionGroupsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListConnectionGroupsResponse listConnectionGroupsResponse = (ListConnectionGroupsResponse) o; + return Objects.equals(this.data, listConnectionGroupsResponse.data) + && Objects.equals(this.meta, listConnectionGroupsResponse.meta) + && Objects.equals( + this.additionalProperties, listConnectionGroupsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListConnectionGroupsResponse {\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/ListConnectionGroupsResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/ListConnectionGroupsResponseMeta.java new file mode 100644 index 00000000000..06f737c6904 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListConnectionGroupsResponseMeta.java @@ -0,0 +1,232 @@ +/* + * 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; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Metadata for the list connection groups response. */ +@JsonPropertyOrder({ + ListConnectionGroupsResponseMeta.JSON_PROPERTY_INTEGRATION_COUNTS, + ListConnectionGroupsResponseMeta.JSON_PROPERTY_TOTAL, + ListConnectionGroupsResponseMeta.JSON_PROPERTY_TOTAL_FILTERED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListConnectionGroupsResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INTEGRATION_COUNTS = "integration_counts"; + private JsonNullable> integrationCounts = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + private Long total; + + public static final String JSON_PROPERTY_TOTAL_FILTERED = "total_filtered"; + private Long totalFiltered; + + public ListConnectionGroupsResponseMeta() {} + + @JsonCreator + public ListConnectionGroupsResponseMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL) Long total, + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_FILTERED) Long totalFiltered) { + this.total = total; + this.totalFiltered = totalFiltered; + } + + public ListConnectionGroupsResponseMeta integrationCounts( + List integrationCounts) { + this.integrationCounts = JsonNullable.>of(integrationCounts); + return this; + } + + public ListConnectionGroupsResponseMeta addIntegrationCountsItem( + IntegrationCounts integrationCountsItem) { + if (this.integrationCounts == null || !this.integrationCounts.isPresent()) { + this.integrationCounts = JsonNullable.>of(new ArrayList<>()); + } + try { + this.integrationCounts.get().add(integrationCountsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Count of integrations by type. + * + * @return integrationCounts + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getIntegrationCounts() { + return integrationCounts.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_COUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getIntegrationCounts_JsonNullable() { + return integrationCounts; + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_COUNTS) + public void setIntegrationCounts_JsonNullable( + JsonNullable> integrationCounts) { + this.integrationCounts = integrationCounts; + } + + public void setIntegrationCounts(List integrationCounts) { + this.integrationCounts = JsonNullable.>of(integrationCounts); + } + + public ListConnectionGroupsResponseMeta total(Long total) { + this.total = total; + return this; + } + + /** + * The total number of connection groups. + * + * @return total + */ + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotal() { + return total; + } + + public void setTotal(Long total) { + this.total = total; + } + + public ListConnectionGroupsResponseMeta totalFiltered(Long totalFiltered) { + this.totalFiltered = totalFiltered; + return this; + } + + /** + * The total number of connection groups that match the specified filters. + * + * @return totalFiltered + */ + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalFiltered() { + return totalFiltered; + } + + public void setTotalFiltered(Long totalFiltered) { + this.totalFiltered = totalFiltered; + } + + /** + * 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 ListConnectionGroupsResponseMeta + */ + @JsonAnySetter + public ListConnectionGroupsResponseMeta 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 ListConnectionGroupsResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListConnectionGroupsResponseMeta listConnectionGroupsResponseMeta = + (ListConnectionGroupsResponseMeta) o; + return Objects.equals( + this.integrationCounts, listConnectionGroupsResponseMeta.integrationCounts) + && Objects.equals(this.total, listConnectionGroupsResponseMeta.total) + && Objects.equals(this.totalFiltered, listConnectionGroupsResponseMeta.totalFiltered) + && Objects.equals( + this.additionalProperties, listConnectionGroupsResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(integrationCounts, total, totalFiltered, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListConnectionGroupsResponseMeta {\n"); + sb.append(" integrationCounts: ").append(toIndentedString(integrationCounts)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" totalFiltered: ").append(toIndentedString(totalFiltered)).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/PrivateActionsRunner.java b/src/main/java/com/datadog/api/client/v2/model/PrivateActionsRunner.java new file mode 100644 index 00000000000..7429203cad2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PrivateActionsRunner.java @@ -0,0 +1,142 @@ +/* + * 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; + +/** Information about the private actions runner. */ +@JsonPropertyOrder({PrivateActionsRunner.JSON_PROPERTY_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PrivateActionsRunner { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public PrivateActionsRunner() {} + + @JsonCreator + public PrivateActionsRunner(@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) { + this.id = id; + } + + public PrivateActionsRunner id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the runner. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * 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 PrivateActionsRunner + */ + @JsonAnySetter + public PrivateActionsRunner 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 PrivateActionsRunner object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrivateActionsRunner privateActionsRunner = (PrivateActionsRunner) o; + return Objects.equals(this.id, privateActionsRunner.id) + && Objects.equals(this.additionalProperties, privateActionsRunner.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrivateActionsRunner {\n"); + sb.append(" id: ").append(toIndentedString(id)).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/UpdateConnectionGroupRequest.java b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionGroupRequest.java new file mode 100644 index 00000000000..cb71a63d014 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionGroupRequest.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 for updating a connection group. */ +@JsonPropertyOrder({UpdateConnectionGroupRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateConnectionGroupRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ConnectionGroupDataRequest data; + + public UpdateConnectionGroupRequest() {} + + @JsonCreator + public UpdateConnectionGroupRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ConnectionGroupDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public UpdateConnectionGroupRequest data(ConnectionGroupDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for updating a connection group. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectionGroupDataRequest getData() { + return data; + } + + public void setData(ConnectionGroupDataRequest 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 UpdateConnectionGroupRequest + */ + @JsonAnySetter + public UpdateConnectionGroupRequest 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 UpdateConnectionGroupRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionGroupRequest updateConnectionGroupRequest = (UpdateConnectionGroupRequest) o; + return Objects.equals(this.data, updateConnectionGroupRequest.data) + && Objects.equals( + this.additionalProperties, updateConnectionGroupRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionGroupRequest {\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/UpdateConnectionGroupResponse.java b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionGroupResponse.java new file mode 100644 index 00000000000..e0714695e22 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionGroupResponse.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; + +/** Response for updating a connection group. */ +@JsonPropertyOrder({UpdateConnectionGroupResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateConnectionGroupResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ConnectionGroupDataResponse data; + + public UpdateConnectionGroupResponse() {} + + @JsonCreator + public UpdateConnectionGroupResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ConnectionGroupDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public UpdateConnectionGroupResponse data(ConnectionGroupDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a connection group. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectionGroupDataResponse getData() { + return data; + } + + public void setData(ConnectionGroupDataResponse 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 UpdateConnectionGroupResponse + */ + @JsonAnySetter + public UpdateConnectionGroupResponse 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 UpdateConnectionGroupResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionGroupResponse updateConnectionGroupResponse = (UpdateConnectionGroupResponse) o; + return Objects.equals(this.data, updateConnectionGroupResponse.data) + && Objects.equals( + this.additionalProperties, updateConnectionGroupResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionGroupResponse {\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/test/resources/com/datadog/api/client/v2/api/action_connection.feature b/src/test/resources/com/datadog/api/client/v2/api/action_connection.feature index 759615a8fd6..1686cae1da8 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/action_connection.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/action_connection.feature @@ -97,6 +97,34 @@ Feature: Action Connection When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/action-platform + Scenario: List action connections returns "Bad Request" response + Given operation "ListActionConnections" enabled + And new "ListActionConnections" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: List action connections returns "OK" response + Given operation "ListActionConnections" enabled + And new "ListActionConnections" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/action-platform + Scenario: List connection groups returns "Bad Request" response + Given operation "ListConnectionGroups" enabled + And new "ListConnectionGroups" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: List connection groups returns "OK" response + Given operation "ListConnectionGroups" enabled + And new "ListConnectionGroups" request + When the request is sent + Then the response status is 200 OK + @team:DataDog/workflow-automation-dev Scenario: Register a new App Key returns "Bad request" response Given new "RegisterAppKey" request @@ -132,6 +160,33 @@ Feature: Action Connection When the request is sent Then the response status is 404 Not found + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "Bad Request" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "Not Found" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "OK" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/workflow-automation-dev Scenario: Update an existing Action Connection returns "Bad Request" response Given new "UpdateActionConnection" request 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 7e549784ee6..f514c71bb45 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 @@ -202,6 +202,12 @@ "type": "idempotent" } }, + "ListActionConnections": { + "tag": "Action Connection", + "undo": { + "type": "safe" + } + }, "CreateActionConnection": { "tag": "Action Connection", "undo": { @@ -215,6 +221,18 @@ "type": "unsafe" } }, + "ListConnectionGroups": { + "tag": "Action Connection", + "undo": { + "type": "safe" + } + }, + "UpdateConnectionGroup": { + "tag": "Action Connection", + "undo": { + "type": "idempotent" + } + }, "DeleteActionConnection": { "tag": "Action Connection", "undo": {