diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 42ec940d042..9a4d9f05ee8 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -27888,6 +27888,7 @@ paths: - aws_configuration_read /api/v1/integration/aws/event_bridge: delete: + deprecated: true description: Delete an Amazon EventBridge source. operationId: DeleteAWSEventBridgeSource requestBody: @@ -27928,6 +27929,7 @@ paths: permissions: - manage_integrations get: + deprecated: true description: Get all Amazon EventBridge sources. operationId: ListAWSEventBridgeSources parameters: [] @@ -27959,6 +27961,7 @@ paths: operator: OPEN permissions: [] post: + deprecated: true description: Create an Amazon EventBridge source. operationId: CreateAWSEventBridgeSource requestBody: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c31c76079af..e44adfced6e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1428,7 +1428,9 @@ components: AWSAccountConfigID: description: 'Unique Datadog ID of the AWS Account Integration Config. - To get the config ID for an account, use the [List all AWS integrations](https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations) + To get the config ID for an account, use the + + [List all AWS integrations](https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations) endpoint and query by AWS Account ID.' example: 00000000-abcd-0001-0000-000000000000 @@ -1486,6 +1488,7 @@ components: description: 'AWS partition your AWS account is scoped to. Defaults to `aws`. See [Partitions](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/partitions.html) + in the AWS documentation for more information.' enum: - aws @@ -1730,6 +1733,269 @@ components: description: The definition of `AWSCredentialsUpdate` object. oneOf: - $ref: '#/components/schemas/AWSAssumeRoleUpdate' + AWSEventBridgeAccountConfiguration: + description: The EventBridge configuration for one AWS account. + properties: + account_id: + description: Your AWS Account ID without dashes. + example: '123456789012' + type: string + event_hubs: + description: Array of AWS event sources associated with this account. + items: + $ref: '#/components/schemas/AWSEventBridgeSource' + type: array + tags: + description: 'Array of tags (in the form `key:value`) which are added to + all hosts + + and metrics reporting through the main AWS integration.' + example: + - $KEY:$VALUE + items: + description: The list of the host_tags. + type: string + type: array + type: object + AWSEventBridgeCreateRequest: + description: Amazon EventBridge create request body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeCreateRequestData' + required: + - data + type: object + AWSEventBridgeCreateRequestAttributes: + description: The EventBridge source to be created. + properties: + account_id: + $ref: '#/components/schemas/AWSAccountID' + create_event_bus: + description: 'Set to true if Datadog should create the event bus in addition + to the event + + source. Requires the `events:CreateEventBus` permission.' + example: true + type: boolean + event_generator_name: + description: 'The given part of the event source name, which is then combined + with an + + assigned suffix to form the full name.' + example: app-alerts + type: string + region: + description: 'The event source''s + + [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).' + example: us-east-1 + type: string + required: + - account_id + - event_generator_name + - region + type: object + AWSEventBridgeCreateRequestData: + description: Amazon EventBridge create request data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeCreateRequestAttributes' + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - type + type: object + AWSEventBridgeCreateResponse: + description: Amazon EventBridge create response body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeCreateResponseData' + required: + - data + type: object + AWSEventBridgeCreateResponseAttributes: + description: A created EventBridge source. + properties: + event_source_name: + description: The event source name. + example: app-alerts-zyxw3210 + type: string + has_bus: + description: True if the event bus was created in addition to the source. + example: true + type: boolean + region: + description: 'The event source''s + + [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).' + example: us-east-1 + type: string + status: + $ref: '#/components/schemas/AWSEventBridgeCreateStatus' + type: object + AWSEventBridgeCreateResponseData: + description: Amazon EventBridge create response data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeCreateResponseAttributes' + id: + default: create_event_bridge + description: The ID of the Amazon EventBridge create response data. + example: create_event_bridge + type: string + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - type + type: object + AWSEventBridgeCreateStatus: + description: The event source status "created". + enum: + - created + example: created + type: string + x-enum-varnames: + - CREATED + AWSEventBridgeDeleteRequest: + description: Amazon EventBridge delete request body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeDeleteRequestData' + required: + - data + type: object + AWSEventBridgeDeleteRequestAttributes: + description: The EventBridge source to be deleted. + properties: + account_id: + $ref: '#/components/schemas/AWSAccountID' + event_generator_name: + description: The event source name. + example: app-alerts-zyxw3210 + type: string + region: + description: 'The event source''s + + [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).' + example: us-east-1 + type: string + required: + - account_id + - event_generator_name + - region + type: object + AWSEventBridgeDeleteRequestData: + description: Amazon EventBridge delete request data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeDeleteRequestAttributes' + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - type + type: object + AWSEventBridgeDeleteResponse: + description: Amazon EventBridge delete response body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeDeleteResponseData' + required: + - data + type: object + AWSEventBridgeDeleteResponseAttributes: + description: The EventBridge source delete response attributes. + properties: + status: + $ref: '#/components/schemas/AWSEventBridgeDeleteStatus' + type: object + AWSEventBridgeDeleteResponseData: + description: Amazon EventBridge delete response data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeDeleteResponseAttributes' + id: + default: delete_event_bridge + description: The ID of the Amazon EventBridge list response data. + example: delete_event_bridge + type: string + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - type + type: object + AWSEventBridgeDeleteStatus: + description: The event source status "empty". + enum: + - empty + example: empty + type: string + x-enum-varnames: + - EMPTY + AWSEventBridgeListResponse: + description: Amazon EventBridge list response body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeListResponseData' + required: + - data + type: object + AWSEventBridgeListResponseAttributes: + description: An object describing the EventBridge configuration for multiple + accounts. + properties: + accounts: + description: List of accounts with their event sources. + items: + $ref: '#/components/schemas/AWSEventBridgeAccountConfiguration' + type: array + is_installed: + description: True if the EventBridge integration is enabled for your organization. + type: boolean + type: object + AWSEventBridgeListResponseData: + description: Amazon EventBridge list response data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeListResponseAttributes' + id: + default: get_event_bridge + description: The ID of the Amazon EventBridge list response data. + example: get_event_bridge + type: string + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - id + - type + type: object + AWSEventBridgeSource: + description: An EventBridge source. + properties: + name: + description: The event source name. + example: app-alerts-zyxw3210 + type: string + region: + description: 'The event source''s + + [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).' + example: us-east-1 + type: string + type: object + AWSEventBridgeType: + default: event_bridge + description: Amazon EventBridge resource type. + enum: + - event_bridge + example: event_bridge + type: string + x-enum-varnames: + - EVENT_BRIDGE AWSIntegration: description: The definition of `AWSIntegration` object. properties: @@ -1809,10 +2075,12 @@ components: type: object AWSLambdaForwarderConfig: description: 'Log Autosubscription configuration for Datadog Forwarder Lambda - functions. Automatically set up triggers for existing + functions. - and new logs for some services, ensuring no logs from new resources are missed - and saving time spent on manual configuration.' + Automatically set up triggers for existing and new logs for some services, + + ensuring no logs from new resources are missed and saving time spent on manual + configuration.' properties: lambdas: description: List of Datadog Lambda Log Forwarder ARNs in your AWS account. @@ -1825,9 +2093,11 @@ components: $ref: '#/components/schemas/AWSLambdaForwarderConfigLogSourceConfig' sources: description: 'List of service IDs set to enable automatic log collection. + Discover the list of available services with the [Get list of AWS log ready services](https://docs.datadoghq.com/api/latest/aws-logs-integration/#get-list-of-aws-log-ready-services) + endpoint.' items: example: s3 @@ -1847,14 +2117,20 @@ components: description: 'AWS log source tag filter list. Defaults to `[]`. Array of log source to AWS resource tag mappings. Each mapping contains a - log source and its associated AWS resource tags (in `key:value` format) used - to filter logs submitted to Datadog. + log source and its + + associated AWS resource tags (in `key:value` format) used to filter logs submitted + to Datadog. Tag filters are applied for tags on the AWS resource emitting logs; tags associated - with the log storage entity (such as a CloudWatch Log Group or S3 Bucket) - are not considered. + with the + + log storage entity (such as a CloudWatch Log Group or S3 Bucket) are not considered. + + For more information on resource tag filter syntax, + + [see AWS resource exclusion](https://docs.datadoghq.com/account_management/billing/aws/#aws-resource-exclusion) - For more information on resource tag filter syntax, [see AWS resource exclusion](https://docs.datadoghq.com/account_management/billing/aws/#aws-resource-exclusion) in the AWS integration billing page.' properties: source: @@ -1958,17 +2234,21 @@ components: - $ref: '#/components/schemas/AWSNamespaceFiltersExcludeOnly' - $ref: '#/components/schemas/AWSNamespaceFiltersIncludeOnly' AWSNamespaceFiltersExcludeOnly: - description: 'Exclude only these namespaces from metrics collection. Defaults - to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. + description: 'Exclude only these namespaces from metrics collection. + + Defaults to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default + to reduce your AWS CloudWatch costs from `GetMetricData` API calls.' properties: exclude_only: - description: 'Exclude only these namespaces from metrics collection. Defaults - to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. + description: 'Exclude only these namespaces from metrics collection. + + Defaults to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default + to reduce your AWS CloudWatch costs from `GetMetricData` API calls.' example: - AWS/SQS @@ -1999,15 +2279,18 @@ components: description: 'AWS Metrics Collection tag filters list. Defaults to `[]`. The array of custom AWS resource tags (in the form `key:value`) defines a - filter that Datadog uses when collecting metrics from a specified service. + filter that Datadog uses + + when collecting metrics from a specified service. Wildcards, such as `?` (match a single character) and `*` (match multiple - characters), and exclusion using `!` before the tag are supported. + characters), + + and exclusion using `!` before the tag are supported. - For EC2, only hosts that match one of the defined tags will be imported into - Datadog. The rest will be ignored. + For EC2, only hosts that match one of the defined tags are imported into Datadog. - For example, `env:production,instance-type:c?.*,!region:us-east-1`.' + The rest are ignored. For example, `env:production,instance-type:c?.*,!region:us-east-1`.' properties: namespace: description: The AWS service for which the tag filters defined in `tags` @@ -2147,15 +2430,19 @@ components: description: AWS Resources Collection config. properties: cloud_security_posture_management_collection: - description: Enable Cloud Security Management to scan AWS resources for - vulnerabilities, misconfigurations, identity risks, and compliance violations. - Defaults to `false`. Requires `extended_collection` to be set to `true`. + description: 'Enable Cloud Security Management to scan AWS resources for + vulnerabilities, misconfigurations, + + identity risks, and compliance violations. Defaults to `false`. + + Requires `extended_collection` to be set to `true`.' example: false type: boolean extended_collection: - description: Whether Datadog collects additional attributes and configuration - information about the resources in your AWS account. Defaults to `true`. - Required for `cloud_security_posture_management_collection`. + description: 'Whether Datadog collects additional attributes and configuration + information about the resources + + in your AWS account. Defaults to `true`. Required for `cloud_security_posture_management_collection`.' example: true type: boolean type: object @@ -63553,8 +63840,9 @@ paths: description: Get a list of AWS Account Integration Configs. operationId: ListAWSAccounts parameters: - - description: Optional query parameter to filter accounts by AWS Account ID. - If not provided, all accounts are returned. + - description: 'Optional query parameter to filter accounts by AWS Account ID. + + If not provided, all accounts are returned.' example: '123456789012' in: query name: aws_account_id @@ -63719,6 +64007,96 @@ paths: operator: OR permissions: - aws_configuration_read + /api/v2/integration/aws/event_bridge: + delete: + description: Delete an Amazon EventBridge source. + operationId: DeleteAWSEventBridgeSource + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeDeleteRequest' + description: Delete the Amazon EventBridge source with the given name, region, + and associated AWS account. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeDeleteResponse' + description: Amazon EventBridge source deleted. + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an Amazon EventBridge source + tags: + - AWS Integration + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - manage_integrations + get: + description: Get all Amazon EventBridge sources. + operationId: ListAWSEventBridgeSources + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeListResponse' + description: Amazon EventBridge sources list. + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all Amazon EventBridge sources + tags: + - AWS Integration + x-permission: + operator: OR + permissions: + - integrations_read + post: + description: Create an Amazon EventBridge source. + operationId: CreateAWSEventBridgeSource + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeCreateRequest' + description: Create an Amazon EventBridge source for an AWS account with a + given name and region. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeCreateResponse' + description: Amazon EventBridge source created. + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an Amazon EventBridge source + tags: + - AWS Integration + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - manage_integrations /api/v2/integration/aws/generate_new_external_id: post: description: Generate a new external ID for AWS role-based authentication. diff --git a/examples/v2/aws-integration/CreateAWSEventBridgeSource.java b/examples/v2/aws-integration/CreateAWSEventBridgeSource.java new file mode 100644 index 00000000000..9063d467647 --- /dev/null +++ b/examples/v2/aws-integration/CreateAWSEventBridgeSource.java @@ -0,0 +1,40 @@ +// Create an Amazon EventBridge source returns "Amazon EventBridge source created." response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AwsIntegrationApi; +import com.datadog.api.client.v2.model.AWSEventBridgeCreateRequest; +import com.datadog.api.client.v2.model.AWSEventBridgeCreateRequestAttributes; +import com.datadog.api.client.v2.model.AWSEventBridgeCreateRequestData; +import com.datadog.api.client.v2.model.AWSEventBridgeCreateResponse; +import com.datadog.api.client.v2.model.AWSEventBridgeType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); + + AWSEventBridgeCreateRequest body = + new AWSEventBridgeCreateRequest() + .data( + new AWSEventBridgeCreateRequestData() + .attributes( + new AWSEventBridgeCreateRequestAttributes() + .accountId("123456789012") + .createEventBus(true) + .eventGeneratorName("app-alerts") + .region("us-east-1")) + .type(AWSEventBridgeType.EVENT_BRIDGE)); + + try { + AWSEventBridgeCreateResponse result = apiInstance.createAWSEventBridgeSource(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AwsIntegrationApi#createAWSEventBridgeSource"); + 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/aws-integration/DeleteAWSEventBridgeSource.java b/examples/v2/aws-integration/DeleteAWSEventBridgeSource.java new file mode 100644 index 00000000000..d61128f4b8c --- /dev/null +++ b/examples/v2/aws-integration/DeleteAWSEventBridgeSource.java @@ -0,0 +1,39 @@ +// Delete an Amazon EventBridge source returns "Amazon EventBridge source deleted." response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AwsIntegrationApi; +import com.datadog.api.client.v2.model.AWSEventBridgeDeleteRequest; +import com.datadog.api.client.v2.model.AWSEventBridgeDeleteRequestAttributes; +import com.datadog.api.client.v2.model.AWSEventBridgeDeleteRequestData; +import com.datadog.api.client.v2.model.AWSEventBridgeDeleteResponse; +import com.datadog.api.client.v2.model.AWSEventBridgeType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); + + AWSEventBridgeDeleteRequest body = + new AWSEventBridgeDeleteRequest() + .data( + new AWSEventBridgeDeleteRequestData() + .attributes( + new AWSEventBridgeDeleteRequestAttributes() + .accountId("123456789012") + .eventGeneratorName("app-alerts-zyxw3210") + .region("us-east-1")) + .type(AWSEventBridgeType.EVENT_BRIDGE)); + + try { + AWSEventBridgeDeleteResponse result = apiInstance.deleteAWSEventBridgeSource(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AwsIntegrationApi#deleteAWSEventBridgeSource"); + 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/aws-integration/ListAWSEventBridgeSources.java b/examples/v2/aws-integration/ListAWSEventBridgeSources.java new file mode 100644 index 00000000000..b0bec54b910 --- /dev/null +++ b/examples/v2/aws-integration/ListAWSEventBridgeSources.java @@ -0,0 +1,24 @@ +// Get all Amazon EventBridge sources returns "Amazon EventBridge sources list." response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AwsIntegrationApi; +import com.datadog.api.client.v2.model.AWSEventBridgeListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); + + try { + AWSEventBridgeListResponse result = apiInstance.listAWSEventBridgeSources(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AwsIntegrationApi#listAWSEventBridgeSources"); + 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/v1/api/AwsIntegrationApi.java b/src/main/java/com/datadog/api/client/v1/api/AwsIntegrationApi.java index 21d3bacf08d..44752dc080c 100644 --- a/src/main/java/com/datadog/api/client/v1/api/AwsIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/AwsIntegrationApi.java @@ -207,7 +207,9 @@ public CompletableFuture> createAWSAccount * region. (required) * @return AWSEventBridgeCreateResponse * @throws ApiException if fails to make API call + * @deprecated */ + @Deprecated public AWSEventBridgeCreateResponse createAWSEventBridgeSource(AWSEventBridgeCreateRequest body) throws ApiException { return createAWSEventBridgeSourceWithHttpInfo(body).getData(); @@ -221,7 +223,9 @@ public AWSEventBridgeCreateResponse createAWSEventBridgeSource(AWSEventBridgeCre * @param body Create an Amazon EventBridge source for an AWS account with a given name and * region. (required) * @return CompletableFuture<AWSEventBridgeCreateResponse> + * @deprecated */ + @Deprecated public CompletableFuture createAWSEventBridgeSourceAsync( AWSEventBridgeCreateRequest body) { return createAWSEventBridgeSourceWithHttpInfoAsync(body) @@ -247,7 +251,10 @@ public CompletableFuture createAWSEventBridgeSourc * 403 Authentication Error - * 429 Too many requests - * + * + * @deprecated */ + @Deprecated public ApiResponse createAWSEventBridgeSourceWithHttpInfo( AWSEventBridgeCreateRequest body) throws ApiException { Object localVarPostBody = body; @@ -290,7 +297,9 @@ public ApiResponse createAWSEventBridgeSourceWithH * @param body Create an Amazon EventBridge source for an AWS account with a given name and * region. (required) * @return CompletableFuture<ApiResponse<AWSEventBridgeCreateResponse>> + * @deprecated */ + @Deprecated public CompletableFuture> createAWSEventBridgeSourceWithHttpInfoAsync(AWSEventBridgeCreateRequest body) { Object localVarPostBody = body; @@ -793,7 +802,9 @@ public CompletableFuture> deleteAWSAccountWithHttpInfoAsync( * AWS account. (required) * @return AWSEventBridgeDeleteResponse * @throws ApiException if fails to make API call + * @deprecated */ + @Deprecated public AWSEventBridgeDeleteResponse deleteAWSEventBridgeSource(AWSEventBridgeDeleteRequest body) throws ApiException { return deleteAWSEventBridgeSourceWithHttpInfo(body).getData(); @@ -807,7 +818,9 @@ public AWSEventBridgeDeleteResponse deleteAWSEventBridgeSource(AWSEventBridgeDel * @param body Delete the Amazon EventBridge source with the given name, region, and associated * AWS account. (required) * @return CompletableFuture<AWSEventBridgeDeleteResponse> + * @deprecated */ + @Deprecated public CompletableFuture deleteAWSEventBridgeSourceAsync( AWSEventBridgeDeleteRequest body) { return deleteAWSEventBridgeSourceWithHttpInfoAsync(body) @@ -833,7 +846,10 @@ public CompletableFuture deleteAWSEventBridgeSourc * 403 Authentication Error - * 429 Too many requests - * + * + * @deprecated */ + @Deprecated public ApiResponse deleteAWSEventBridgeSourceWithHttpInfo( AWSEventBridgeDeleteRequest body) throws ApiException { Object localVarPostBody = body; @@ -876,7 +892,9 @@ public ApiResponse deleteAWSEventBridgeSourceWithH * @param body Delete the Amazon EventBridge source with the given name, region, and associated * AWS account. (required) * @return CompletableFuture<ApiResponse<AWSEventBridgeDeleteResponse>> + * @deprecated */ + @Deprecated public CompletableFuture> deleteAWSEventBridgeSourceWithHttpInfoAsync(AWSEventBridgeDeleteRequest body) { Object localVarPostBody = body; @@ -1410,7 +1428,9 @@ public CompletableFuture> listAWSAccountsWit * * @return AWSEventBridgeListResponse * @throws ApiException if fails to make API call + * @deprecated */ + @Deprecated public AWSEventBridgeListResponse listAWSEventBridgeSources() throws ApiException { return listAWSEventBridgeSourcesWithHttpInfo().getData(); } @@ -1421,7 +1441,9 @@ public AWSEventBridgeListResponse listAWSEventBridgeSources() throws ApiExceptio *

See {@link #listAWSEventBridgeSourcesWithHttpInfoAsync}. * * @return CompletableFuture<AWSEventBridgeListResponse> + * @deprecated */ + @Deprecated public CompletableFuture listAWSEventBridgeSourcesAsync() { return listAWSEventBridgeSourcesWithHttpInfoAsync() .thenApply( @@ -1444,7 +1466,10 @@ public CompletableFuture listAWSEventBridgeSourcesAs * 403 Authentication Error - * 429 Too many requests - * + * + * @deprecated */ + @Deprecated public ApiResponse listAWSEventBridgeSourcesWithHttpInfo() throws ApiException { Object localVarPostBody = null; @@ -1479,7 +1504,9 @@ public ApiResponse listAWSEventBridgeSourcesWithHttp *

See {@link #listAWSEventBridgeSourcesWithHttpInfo}. * * @return CompletableFuture<ApiResponse<AWSEventBridgeListResponse>> + * @deprecated */ + @Deprecated public CompletableFuture> listAWSEventBridgeSourcesWithHttpInfoAsync() { Object localVarPostBody = null; diff --git a/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java index 409b70da41e..7445c3c15d7 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java @@ -8,6 +8,11 @@ import com.datadog.api.client.v2.model.AWSAccountResponse; import com.datadog.api.client.v2.model.AWSAccountUpdateRequest; import com.datadog.api.client.v2.model.AWSAccountsResponse; +import com.datadog.api.client.v2.model.AWSEventBridgeCreateRequest; +import com.datadog.api.client.v2.model.AWSEventBridgeCreateResponse; +import com.datadog.api.client.v2.model.AWSEventBridgeDeleteRequest; +import com.datadog.api.client.v2.model.AWSEventBridgeDeleteResponse; +import com.datadog.api.client.v2.model.AWSEventBridgeListResponse; import com.datadog.api.client.v2.model.AWSIntegrationIamPermissionsResponse; import com.datadog.api.client.v2.model.AWSNamespacesResponse; import com.datadog.api.client.v2.model.AWSNewExternalIDResponse; @@ -182,6 +187,147 @@ public CompletableFuture> createAWSAccountWithHt new GenericType() {}); } + /** + * Create an Amazon EventBridge source. + * + *

See {@link #createAWSEventBridgeSourceWithHttpInfo}. + * + * @param body Create an Amazon EventBridge source for an AWS account with a given name and + * region. (required) + * @return AWSEventBridgeCreateResponse + * @throws ApiException if fails to make API call + */ + public AWSEventBridgeCreateResponse createAWSEventBridgeSource(AWSEventBridgeCreateRequest body) + throws ApiException { + return createAWSEventBridgeSourceWithHttpInfo(body).getData(); + } + + /** + * Create an Amazon EventBridge source. + * + *

See {@link #createAWSEventBridgeSourceWithHttpInfoAsync}. + * + * @param body Create an Amazon EventBridge source for an AWS account with a given name and + * region. (required) + * @return CompletableFuture<AWSEventBridgeCreateResponse> + */ + public CompletableFuture createAWSEventBridgeSourceAsync( + AWSEventBridgeCreateRequest body) { + return createAWSEventBridgeSourceWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an Amazon EventBridge source. + * + * @param body Create an Amazon EventBridge source for an AWS account with a given name and + * region. (required) + * @return ApiResponse<AWSEventBridgeCreateResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Amazon EventBridge source created. -
400 Bad Request -
403 Forbidden -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createAWSEventBridgeSourceWithHttpInfo( + AWSEventBridgeCreateRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createAWSEventBridgeSource"); + } + // create path and map variables + String localVarPath = "/api/v2/integration/aws/event_bridge"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AwsIntegrationApi.createAWSEventBridgeSource", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an Amazon EventBridge source. + * + *

See {@link #createAWSEventBridgeSourceWithHttpInfo}. + * + * @param body Create an Amazon EventBridge source for an AWS account with a given name and + * region. (required) + * @return CompletableFuture<ApiResponse<AWSEventBridgeCreateResponse>> + */ + public CompletableFuture> + createAWSEventBridgeSourceWithHttpInfoAsync(AWSEventBridgeCreateRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling createAWSEventBridgeSource")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration/aws/event_bridge"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AwsIntegrationApi.createAWSEventBridgeSource", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Generate a new external ID. * @@ -445,6 +591,146 @@ public CompletableFuture> deleteAWSAccountWithHttpInfoAsync( null); } + /** + * Delete an Amazon EventBridge source. + * + *

See {@link #deleteAWSEventBridgeSourceWithHttpInfo}. + * + * @param body Delete the Amazon EventBridge source with the given name, region, and associated + * AWS account. (required) + * @return AWSEventBridgeDeleteResponse + * @throws ApiException if fails to make API call + */ + public AWSEventBridgeDeleteResponse deleteAWSEventBridgeSource(AWSEventBridgeDeleteRequest body) + throws ApiException { + return deleteAWSEventBridgeSourceWithHttpInfo(body).getData(); + } + + /** + * Delete an Amazon EventBridge source. + * + *

See {@link #deleteAWSEventBridgeSourceWithHttpInfoAsync}. + * + * @param body Delete the Amazon EventBridge source with the given name, region, and associated + * AWS account. (required) + * @return CompletableFuture<AWSEventBridgeDeleteResponse> + */ + public CompletableFuture deleteAWSEventBridgeSourceAsync( + AWSEventBridgeDeleteRequest body) { + return deleteAWSEventBridgeSourceWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an Amazon EventBridge source. + * + * @param body Delete the Amazon EventBridge source with the given name, region, and associated + * AWS account. (required) + * @return ApiResponse<AWSEventBridgeDeleteResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Amazon EventBridge source deleted. -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse deleteAWSEventBridgeSourceWithHttpInfo( + AWSEventBridgeDeleteRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling deleteAWSEventBridgeSource"); + } + // create path and map variables + String localVarPath = "/api/v2/integration/aws/event_bridge"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AwsIntegrationApi.deleteAWSEventBridgeSource", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete an Amazon EventBridge source. + * + *

See {@link #deleteAWSEventBridgeSourceWithHttpInfo}. + * + * @param body Delete the Amazon EventBridge source with the given name, region, and associated + * AWS account. (required) + * @return CompletableFuture<ApiResponse<AWSEventBridgeDeleteResponse>> + */ + public CompletableFuture> + deleteAWSEventBridgeSourceWithHttpInfoAsync(AWSEventBridgeDeleteRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling deleteAWSEventBridgeSource")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration/aws/event_bridge"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AwsIntegrationApi.deleteAWSEventBridgeSource", + 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( + "DELETE", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get an AWS integration by config ID. * @@ -1106,6 +1392,118 @@ public CompletableFuture> listAWSAccountsWithHt new GenericType() {}); } + /** + * Get all Amazon EventBridge sources. + * + *

See {@link #listAWSEventBridgeSourcesWithHttpInfo}. + * + * @return AWSEventBridgeListResponse + * @throws ApiException if fails to make API call + */ + public AWSEventBridgeListResponse listAWSEventBridgeSources() throws ApiException { + return listAWSEventBridgeSourcesWithHttpInfo().getData(); + } + + /** + * Get all Amazon EventBridge sources. + * + *

See {@link #listAWSEventBridgeSourcesWithHttpInfoAsync}. + * + * @return CompletableFuture<AWSEventBridgeListResponse> + */ + public CompletableFuture listAWSEventBridgeSourcesAsync() { + return listAWSEventBridgeSourcesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get all Amazon EventBridge sources. + * + * @return ApiResponse<AWSEventBridgeListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Amazon EventBridge sources list. -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listAWSEventBridgeSourcesWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/integration/aws/event_bridge"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AwsIntegrationApi.listAWSEventBridgeSources", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get all Amazon EventBridge sources. + * + *

See {@link #listAWSEventBridgeSourcesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AWSEventBridgeListResponse>> + */ + public CompletableFuture> + listAWSEventBridgeSourcesWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/integration/aws/event_bridge"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AwsIntegrationApi.listAWSEventBridgeSources", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * List available namespaces. * diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeAccountConfiguration.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeAccountConfiguration.java new file mode 100644 index 00000000000..d6e783846f7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeAccountConfiguration.java @@ -0,0 +1,216 @@ +/* + * 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; + +/** The EventBridge configuration for one AWS account. */ +@JsonPropertyOrder({ + AWSEventBridgeAccountConfiguration.JSON_PROPERTY_ACCOUNT_ID, + AWSEventBridgeAccountConfiguration.JSON_PROPERTY_EVENT_HUBS, + AWSEventBridgeAccountConfiguration.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeAccountConfiguration { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_EVENT_HUBS = "event_hubs"; + private List eventHubs = null; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public AWSEventBridgeAccountConfiguration accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Your AWS Account ID without dashes. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public AWSEventBridgeAccountConfiguration eventHubs(List eventHubs) { + this.eventHubs = eventHubs; + for (AWSEventBridgeSource item : eventHubs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AWSEventBridgeAccountConfiguration addEventHubsItem(AWSEventBridgeSource eventHubsItem) { + if (this.eventHubs == null) { + this.eventHubs = new ArrayList<>(); + } + this.eventHubs.add(eventHubsItem); + this.unparsed |= eventHubsItem.unparsed; + return this; + } + + /** + * Array of AWS event sources associated with this account. + * + * @return eventHubs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_HUBS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEventHubs() { + return eventHubs; + } + + public void setEventHubs(List eventHubs) { + this.eventHubs = eventHubs; + } + + public AWSEventBridgeAccountConfiguration tags(List tags) { + this.tags = tags; + return this; + } + + public AWSEventBridgeAccountConfiguration addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Array of tags (in the form key:value) which are added to all hosts and metrics + * reporting through the main AWS integration. + * + * @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 AWSEventBridgeAccountConfiguration + */ + @JsonAnySetter + public AWSEventBridgeAccountConfiguration 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 AWSEventBridgeAccountConfiguration object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeAccountConfiguration awsEventBridgeAccountConfiguration = + (AWSEventBridgeAccountConfiguration) o; + return Objects.equals(this.accountId, awsEventBridgeAccountConfiguration.accountId) + && Objects.equals(this.eventHubs, awsEventBridgeAccountConfiguration.eventHubs) + && Objects.equals(this.tags, awsEventBridgeAccountConfiguration.tags) + && Objects.equals( + this.additionalProperties, awsEventBridgeAccountConfiguration.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, eventHubs, tags, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeAccountConfiguration {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" eventHubs: ").append(toIndentedString(eventHubs)).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/AWSEventBridgeCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateRequest.java new file mode 100644 index 00000000000..b0b7f3dce58 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateRequest.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Amazon EventBridge create request body. */ +@JsonPropertyOrder({AWSEventBridgeCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AWSEventBridgeCreateRequestData data; + + public AWSEventBridgeCreateRequest() {} + + @JsonCreator + public AWSEventBridgeCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AWSEventBridgeCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AWSEventBridgeCreateRequest data(AWSEventBridgeCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Amazon EventBridge create request data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeCreateRequestData getData() { + return data; + } + + public void setData(AWSEventBridgeCreateRequestData 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 AWSEventBridgeCreateRequest + */ + @JsonAnySetter + public AWSEventBridgeCreateRequest 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 AWSEventBridgeCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeCreateRequest awsEventBridgeCreateRequest = (AWSEventBridgeCreateRequest) o; + return Objects.equals(this.data, awsEventBridgeCreateRequest.data) + && Objects.equals( + this.additionalProperties, awsEventBridgeCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeCreateRequest {\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/AWSEventBridgeCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateRequestAttributes.java new file mode 100644 index 00000000000..46c5133e760 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateRequestAttributes.java @@ -0,0 +1,237 @@ +/* + * 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; + +/** The EventBridge source to be created. */ +@JsonPropertyOrder({ + AWSEventBridgeCreateRequestAttributes.JSON_PROPERTY_ACCOUNT_ID, + AWSEventBridgeCreateRequestAttributes.JSON_PROPERTY_CREATE_EVENT_BUS, + AWSEventBridgeCreateRequestAttributes.JSON_PROPERTY_EVENT_GENERATOR_NAME, + AWSEventBridgeCreateRequestAttributes.JSON_PROPERTY_REGION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeCreateRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_CREATE_EVENT_BUS = "create_event_bus"; + private Boolean createEventBus; + + public static final String JSON_PROPERTY_EVENT_GENERATOR_NAME = "event_generator_name"; + private String eventGeneratorName; + + public static final String JSON_PROPERTY_REGION = "region"; + private String region; + + public AWSEventBridgeCreateRequestAttributes() {} + + @JsonCreator + public AWSEventBridgeCreateRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_EVENT_GENERATOR_NAME) + String eventGeneratorName, + @JsonProperty(required = true, value = JSON_PROPERTY_REGION) String region) { + this.accountId = accountId; + this.eventGeneratorName = eventGeneratorName; + this.region = region; + } + + public AWSEventBridgeCreateRequestAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * AWS Account ID. + * + * @return accountId + */ + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public AWSEventBridgeCreateRequestAttributes createEventBus(Boolean createEventBus) { + this.createEventBus = createEventBus; + return this; + } + + /** + * Set to true if Datadog should create the event bus in addition to the event source. Requires + * the events:CreateEventBus permission. + * + * @return createEventBus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATE_EVENT_BUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCreateEventBus() { + return createEventBus; + } + + public void setCreateEventBus(Boolean createEventBus) { + this.createEventBus = createEventBus; + } + + public AWSEventBridgeCreateRequestAttributes eventGeneratorName(String eventGeneratorName) { + this.eventGeneratorName = eventGeneratorName; + return this; + } + + /** + * The given part of the event source name, which is then combined with an assigned suffix to form + * the full name. + * + * @return eventGeneratorName + */ + @JsonProperty(JSON_PROPERTY_EVENT_GENERATOR_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEventGeneratorName() { + return eventGeneratorName; + } + + public void setEventGeneratorName(String eventGeneratorName) { + this.eventGeneratorName = eventGeneratorName; + } + + public AWSEventBridgeCreateRequestAttributes region(String region) { + this.region = region; + return this; + } + + /** + * The event source's AWS + * region. + * + * @return region + */ + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + /** + * 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 AWSEventBridgeCreateRequestAttributes + */ + @JsonAnySetter + public AWSEventBridgeCreateRequestAttributes 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 AWSEventBridgeCreateRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeCreateRequestAttributes awsEventBridgeCreateRequestAttributes = + (AWSEventBridgeCreateRequestAttributes) o; + return Objects.equals(this.accountId, awsEventBridgeCreateRequestAttributes.accountId) + && Objects.equals(this.createEventBus, awsEventBridgeCreateRequestAttributes.createEventBus) + && Objects.equals( + this.eventGeneratorName, awsEventBridgeCreateRequestAttributes.eventGeneratorName) + && Objects.equals(this.region, awsEventBridgeCreateRequestAttributes.region) + && Objects.equals( + this.additionalProperties, awsEventBridgeCreateRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, createEventBus, eventGeneratorName, region, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeCreateRequestAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" createEventBus: ").append(toIndentedString(createEventBus)).append("\n"); + sb.append(" eventGeneratorName: ").append(toIndentedString(eventGeneratorName)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).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/AWSEventBridgeCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateRequestData.java new file mode 100644 index 00000000000..70b76e87ede --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateRequestData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Amazon EventBridge create request data. */ +@JsonPropertyOrder({ + AWSEventBridgeCreateRequestData.JSON_PROPERTY_ATTRIBUTES, + AWSEventBridgeCreateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeCreateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AWSEventBridgeCreateRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AWSEventBridgeType type = AWSEventBridgeType.EVENT_BRIDGE; + + public AWSEventBridgeCreateRequestData() {} + + @JsonCreator + public AWSEventBridgeCreateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AWSEventBridgeCreateRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSEventBridgeType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AWSEventBridgeCreateRequestData attributes( + AWSEventBridgeCreateRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The EventBridge source to be created. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeCreateRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AWSEventBridgeCreateRequestAttributes attributes) { + this.attributes = attributes; + } + + public AWSEventBridgeCreateRequestData type(AWSEventBridgeType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Amazon EventBridge resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeType getType() { + return type; + } + + public void setType(AWSEventBridgeType 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 AWSEventBridgeCreateRequestData + */ + @JsonAnySetter + public AWSEventBridgeCreateRequestData 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 AWSEventBridgeCreateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeCreateRequestData awsEventBridgeCreateRequestData = + (AWSEventBridgeCreateRequestData) o; + return Objects.equals(this.attributes, awsEventBridgeCreateRequestData.attributes) + && Objects.equals(this.type, awsEventBridgeCreateRequestData.type) + && Objects.equals( + this.additionalProperties, awsEventBridgeCreateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeCreateRequestData {\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/AWSEventBridgeCreateResponse.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateResponse.java new file mode 100644 index 00000000000..ce8c7ca62b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateResponse.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Amazon EventBridge create response body. */ +@JsonPropertyOrder({AWSEventBridgeCreateResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeCreateResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AWSEventBridgeCreateResponseData data; + + public AWSEventBridgeCreateResponse() {} + + @JsonCreator + public AWSEventBridgeCreateResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AWSEventBridgeCreateResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AWSEventBridgeCreateResponse data(AWSEventBridgeCreateResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Amazon EventBridge create response data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeCreateResponseData getData() { + return data; + } + + public void setData(AWSEventBridgeCreateResponseData 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 AWSEventBridgeCreateResponse + */ + @JsonAnySetter + public AWSEventBridgeCreateResponse 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 AWSEventBridgeCreateResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeCreateResponse awsEventBridgeCreateResponse = (AWSEventBridgeCreateResponse) o; + return Objects.equals(this.data, awsEventBridgeCreateResponse.data) + && Objects.equals( + this.additionalProperties, awsEventBridgeCreateResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeCreateResponse {\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/AWSEventBridgeCreateResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateResponseAttributes.java new file mode 100644 index 00000000000..5829cf87e2b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateResponseAttributes.java @@ -0,0 +1,227 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A created EventBridge source. */ +@JsonPropertyOrder({ + AWSEventBridgeCreateResponseAttributes.JSON_PROPERTY_EVENT_SOURCE_NAME, + AWSEventBridgeCreateResponseAttributes.JSON_PROPERTY_HAS_BUS, + AWSEventBridgeCreateResponseAttributes.JSON_PROPERTY_REGION, + AWSEventBridgeCreateResponseAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeCreateResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENT_SOURCE_NAME = "event_source_name"; + private String eventSourceName; + + public static final String JSON_PROPERTY_HAS_BUS = "has_bus"; + private Boolean hasBus; + + public static final String JSON_PROPERTY_REGION = "region"; + private String region; + + public static final String JSON_PROPERTY_STATUS = "status"; + private AWSEventBridgeCreateStatus status; + + public AWSEventBridgeCreateResponseAttributes eventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + + /** + * The event source name. + * + * @return eventSourceName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_SOURCE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEventSourceName() { + return eventSourceName; + } + + public void setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + } + + public AWSEventBridgeCreateResponseAttributes hasBus(Boolean hasBus) { + this.hasBus = hasBus; + return this; + } + + /** + * True if the event bus was created in addition to the source. + * + * @return hasBus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_BUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasBus() { + return hasBus; + } + + public void setHasBus(Boolean hasBus) { + this.hasBus = hasBus; + } + + public AWSEventBridgeCreateResponseAttributes region(String region) { + this.region = region; + return this; + } + + /** + * The event source's AWS + * region. + * + * @return region + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public AWSEventBridgeCreateResponseAttributes status(AWSEventBridgeCreateStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The event source status "created". + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AWSEventBridgeCreateStatus getStatus() { + return status; + } + + public void setStatus(AWSEventBridgeCreateStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * 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 AWSEventBridgeCreateResponseAttributes + */ + @JsonAnySetter + public AWSEventBridgeCreateResponseAttributes 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 AWSEventBridgeCreateResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeCreateResponseAttributes awsEventBridgeCreateResponseAttributes = + (AWSEventBridgeCreateResponseAttributes) o; + return Objects.equals( + this.eventSourceName, awsEventBridgeCreateResponseAttributes.eventSourceName) + && Objects.equals(this.hasBus, awsEventBridgeCreateResponseAttributes.hasBus) + && Objects.equals(this.region, awsEventBridgeCreateResponseAttributes.region) + && Objects.equals(this.status, awsEventBridgeCreateResponseAttributes.status) + && Objects.equals( + this.additionalProperties, awsEventBridgeCreateResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(eventSourceName, hasBus, region, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeCreateResponseAttributes {\n"); + sb.append(" eventSourceName: ").append(toIndentedString(eventSourceName)).append("\n"); + sb.append(" hasBus: ").append(toIndentedString(hasBus)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/AWSEventBridgeCreateResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateResponseData.java new file mode 100644 index 00000000000..b32ae6f582b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateResponseData.java @@ -0,0 +1,211 @@ +/* + * 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; + +/** Amazon EventBridge create response data. */ +@JsonPropertyOrder({ + AWSEventBridgeCreateResponseData.JSON_PROPERTY_ATTRIBUTES, + AWSEventBridgeCreateResponseData.JSON_PROPERTY_ID, + AWSEventBridgeCreateResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeCreateResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AWSEventBridgeCreateResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id = "create_event_bridge"; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AWSEventBridgeType type = AWSEventBridgeType.EVENT_BRIDGE; + + public AWSEventBridgeCreateResponseData() {} + + @JsonCreator + public AWSEventBridgeCreateResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AWSEventBridgeCreateResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSEventBridgeType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AWSEventBridgeCreateResponseData attributes( + AWSEventBridgeCreateResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * A created EventBridge source. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeCreateResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AWSEventBridgeCreateResponseAttributes attributes) { + this.attributes = attributes; + } + + public AWSEventBridgeCreateResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the Amazon EventBridge create response data. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AWSEventBridgeCreateResponseData type(AWSEventBridgeType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Amazon EventBridge resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeType getType() { + return type; + } + + public void setType(AWSEventBridgeType 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 AWSEventBridgeCreateResponseData + */ + @JsonAnySetter + public AWSEventBridgeCreateResponseData 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 AWSEventBridgeCreateResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeCreateResponseData awsEventBridgeCreateResponseData = + (AWSEventBridgeCreateResponseData) o; + return Objects.equals(this.attributes, awsEventBridgeCreateResponseData.attributes) + && Objects.equals(this.id, awsEventBridgeCreateResponseData.id) + && Objects.equals(this.type, awsEventBridgeCreateResponseData.type) + && Objects.equals( + this.additionalProperties, awsEventBridgeCreateResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeCreateResponseData {\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/AWSEventBridgeCreateStatus.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateStatus.java new file mode 100644 index 00000000000..2ab3db8df47 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeCreateStatus.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 event source status "created". */ +@JsonSerialize(using = AWSEventBridgeCreateStatus.AWSEventBridgeCreateStatusSerializer.class) +public class AWSEventBridgeCreateStatus extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("created")); + + public static final AWSEventBridgeCreateStatus CREATED = + new AWSEventBridgeCreateStatus("created"); + + AWSEventBridgeCreateStatus(String value) { + super(value, allowedValues); + } + + public static class AWSEventBridgeCreateStatusSerializer + extends StdSerializer { + public AWSEventBridgeCreateStatusSerializer(Class t) { + super(t); + } + + public AWSEventBridgeCreateStatusSerializer() { + this(null); + } + + @Override + public void serialize( + AWSEventBridgeCreateStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AWSEventBridgeCreateStatus fromValue(String value) { + return new AWSEventBridgeCreateStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteRequest.java new file mode 100644 index 00000000000..75012b9e4d5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteRequest.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Amazon EventBridge delete request body. */ +@JsonPropertyOrder({AWSEventBridgeDeleteRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeDeleteRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AWSEventBridgeDeleteRequestData data; + + public AWSEventBridgeDeleteRequest() {} + + @JsonCreator + public AWSEventBridgeDeleteRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AWSEventBridgeDeleteRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AWSEventBridgeDeleteRequest data(AWSEventBridgeDeleteRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Amazon EventBridge delete request data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeDeleteRequestData getData() { + return data; + } + + public void setData(AWSEventBridgeDeleteRequestData 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 AWSEventBridgeDeleteRequest + */ + @JsonAnySetter + public AWSEventBridgeDeleteRequest 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 AWSEventBridgeDeleteRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeDeleteRequest awsEventBridgeDeleteRequest = (AWSEventBridgeDeleteRequest) o; + return Objects.equals(this.data, awsEventBridgeDeleteRequest.data) + && Objects.equals( + this.additionalProperties, awsEventBridgeDeleteRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeDeleteRequest {\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/AWSEventBridgeDeleteRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteRequestAttributes.java new file mode 100644 index 00000000000..3ec50c555ef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteRequestAttributes.java @@ -0,0 +1,207 @@ +/* + * 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; + +/** The EventBridge source to be deleted. */ +@JsonPropertyOrder({ + AWSEventBridgeDeleteRequestAttributes.JSON_PROPERTY_ACCOUNT_ID, + AWSEventBridgeDeleteRequestAttributes.JSON_PROPERTY_EVENT_GENERATOR_NAME, + AWSEventBridgeDeleteRequestAttributes.JSON_PROPERTY_REGION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeDeleteRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_EVENT_GENERATOR_NAME = "event_generator_name"; + private String eventGeneratorName; + + public static final String JSON_PROPERTY_REGION = "region"; + private String region; + + public AWSEventBridgeDeleteRequestAttributes() {} + + @JsonCreator + public AWSEventBridgeDeleteRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_EVENT_GENERATOR_NAME) + String eventGeneratorName, + @JsonProperty(required = true, value = JSON_PROPERTY_REGION) String region) { + this.accountId = accountId; + this.eventGeneratorName = eventGeneratorName; + this.region = region; + } + + public AWSEventBridgeDeleteRequestAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * AWS Account ID. + * + * @return accountId + */ + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public AWSEventBridgeDeleteRequestAttributes eventGeneratorName(String eventGeneratorName) { + this.eventGeneratorName = eventGeneratorName; + return this; + } + + /** + * The event source name. + * + * @return eventGeneratorName + */ + @JsonProperty(JSON_PROPERTY_EVENT_GENERATOR_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEventGeneratorName() { + return eventGeneratorName; + } + + public void setEventGeneratorName(String eventGeneratorName) { + this.eventGeneratorName = eventGeneratorName; + } + + public AWSEventBridgeDeleteRequestAttributes region(String region) { + this.region = region; + return this; + } + + /** + * The event source's AWS + * region. + * + * @return region + */ + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + /** + * 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 AWSEventBridgeDeleteRequestAttributes + */ + @JsonAnySetter + public AWSEventBridgeDeleteRequestAttributes 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 AWSEventBridgeDeleteRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeDeleteRequestAttributes awsEventBridgeDeleteRequestAttributes = + (AWSEventBridgeDeleteRequestAttributes) o; + return Objects.equals(this.accountId, awsEventBridgeDeleteRequestAttributes.accountId) + && Objects.equals( + this.eventGeneratorName, awsEventBridgeDeleteRequestAttributes.eventGeneratorName) + && Objects.equals(this.region, awsEventBridgeDeleteRequestAttributes.region) + && Objects.equals( + this.additionalProperties, awsEventBridgeDeleteRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, eventGeneratorName, region, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeDeleteRequestAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" eventGeneratorName: ").append(toIndentedString(eventGeneratorName)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).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/AWSEventBridgeDeleteRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteRequestData.java new file mode 100644 index 00000000000..4e7df8aebf0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteRequestData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Amazon EventBridge delete request data. */ +@JsonPropertyOrder({ + AWSEventBridgeDeleteRequestData.JSON_PROPERTY_ATTRIBUTES, + AWSEventBridgeDeleteRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeDeleteRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AWSEventBridgeDeleteRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AWSEventBridgeType type = AWSEventBridgeType.EVENT_BRIDGE; + + public AWSEventBridgeDeleteRequestData() {} + + @JsonCreator + public AWSEventBridgeDeleteRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AWSEventBridgeDeleteRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSEventBridgeType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AWSEventBridgeDeleteRequestData attributes( + AWSEventBridgeDeleteRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The EventBridge source to be deleted. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeDeleteRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AWSEventBridgeDeleteRequestAttributes attributes) { + this.attributes = attributes; + } + + public AWSEventBridgeDeleteRequestData type(AWSEventBridgeType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Amazon EventBridge resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeType getType() { + return type; + } + + public void setType(AWSEventBridgeType 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 AWSEventBridgeDeleteRequestData + */ + @JsonAnySetter + public AWSEventBridgeDeleteRequestData 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 AWSEventBridgeDeleteRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeDeleteRequestData awsEventBridgeDeleteRequestData = + (AWSEventBridgeDeleteRequestData) o; + return Objects.equals(this.attributes, awsEventBridgeDeleteRequestData.attributes) + && Objects.equals(this.type, awsEventBridgeDeleteRequestData.type) + && Objects.equals( + this.additionalProperties, awsEventBridgeDeleteRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeDeleteRequestData {\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/AWSEventBridgeDeleteResponse.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteResponse.java new file mode 100644 index 00000000000..b45e7790e1d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteResponse.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Amazon EventBridge delete response body. */ +@JsonPropertyOrder({AWSEventBridgeDeleteResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeDeleteResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AWSEventBridgeDeleteResponseData data; + + public AWSEventBridgeDeleteResponse() {} + + @JsonCreator + public AWSEventBridgeDeleteResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AWSEventBridgeDeleteResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AWSEventBridgeDeleteResponse data(AWSEventBridgeDeleteResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Amazon EventBridge delete response data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeDeleteResponseData getData() { + return data; + } + + public void setData(AWSEventBridgeDeleteResponseData 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 AWSEventBridgeDeleteResponse + */ + @JsonAnySetter + public AWSEventBridgeDeleteResponse 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 AWSEventBridgeDeleteResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeDeleteResponse awsEventBridgeDeleteResponse = (AWSEventBridgeDeleteResponse) o; + return Objects.equals(this.data, awsEventBridgeDeleteResponse.data) + && Objects.equals( + this.additionalProperties, awsEventBridgeDeleteResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeDeleteResponse {\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/AWSEventBridgeDeleteResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteResponseAttributes.java new file mode 100644 index 00000000000..db12ab01929 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteResponseAttributes.java @@ -0,0 +1,141 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The EventBridge source delete response attributes. */ +@JsonPropertyOrder({AWSEventBridgeDeleteResponseAttributes.JSON_PROPERTY_STATUS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeDeleteResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_STATUS = "status"; + private AWSEventBridgeDeleteStatus status; + + public AWSEventBridgeDeleteResponseAttributes status(AWSEventBridgeDeleteStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The event source status "empty". + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AWSEventBridgeDeleteStatus getStatus() { + return status; + } + + public void setStatus(AWSEventBridgeDeleteStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * 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 AWSEventBridgeDeleteResponseAttributes + */ + @JsonAnySetter + public AWSEventBridgeDeleteResponseAttributes 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 AWSEventBridgeDeleteResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeDeleteResponseAttributes awsEventBridgeDeleteResponseAttributes = + (AWSEventBridgeDeleteResponseAttributes) o; + return Objects.equals(this.status, awsEventBridgeDeleteResponseAttributes.status) + && Objects.equals( + this.additionalProperties, awsEventBridgeDeleteResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeDeleteResponseAttributes {\n"); + sb.append(" status: ").append(toIndentedString(status)).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/AWSEventBridgeDeleteResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteResponseData.java new file mode 100644 index 00000000000..44c2a284ef9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteResponseData.java @@ -0,0 +1,211 @@ +/* + * 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; + +/** Amazon EventBridge delete response data. */ +@JsonPropertyOrder({ + AWSEventBridgeDeleteResponseData.JSON_PROPERTY_ATTRIBUTES, + AWSEventBridgeDeleteResponseData.JSON_PROPERTY_ID, + AWSEventBridgeDeleteResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeDeleteResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AWSEventBridgeDeleteResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id = "delete_event_bridge"; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AWSEventBridgeType type = AWSEventBridgeType.EVENT_BRIDGE; + + public AWSEventBridgeDeleteResponseData() {} + + @JsonCreator + public AWSEventBridgeDeleteResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AWSEventBridgeDeleteResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSEventBridgeType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AWSEventBridgeDeleteResponseData attributes( + AWSEventBridgeDeleteResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The EventBridge source delete response attributes. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeDeleteResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AWSEventBridgeDeleteResponseAttributes attributes) { + this.attributes = attributes; + } + + public AWSEventBridgeDeleteResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the Amazon EventBridge list response data. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AWSEventBridgeDeleteResponseData type(AWSEventBridgeType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Amazon EventBridge resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeType getType() { + return type; + } + + public void setType(AWSEventBridgeType 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 AWSEventBridgeDeleteResponseData + */ + @JsonAnySetter + public AWSEventBridgeDeleteResponseData 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 AWSEventBridgeDeleteResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeDeleteResponseData awsEventBridgeDeleteResponseData = + (AWSEventBridgeDeleteResponseData) o; + return Objects.equals(this.attributes, awsEventBridgeDeleteResponseData.attributes) + && Objects.equals(this.id, awsEventBridgeDeleteResponseData.id) + && Objects.equals(this.type, awsEventBridgeDeleteResponseData.type) + && Objects.equals( + this.additionalProperties, awsEventBridgeDeleteResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeDeleteResponseData {\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/AWSEventBridgeDeleteStatus.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteStatus.java new file mode 100644 index 00000000000..cf64ff53d0d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeDeleteStatus.java @@ -0,0 +1,55 @@ +/* + * 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 event source status "empty". */ +@JsonSerialize(using = AWSEventBridgeDeleteStatus.AWSEventBridgeDeleteStatusSerializer.class) +public class AWSEventBridgeDeleteStatus extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("empty")); + + public static final AWSEventBridgeDeleteStatus EMPTY = new AWSEventBridgeDeleteStatus("empty"); + + AWSEventBridgeDeleteStatus(String value) { + super(value, allowedValues); + } + + public static class AWSEventBridgeDeleteStatusSerializer + extends StdSerializer { + public AWSEventBridgeDeleteStatusSerializer(Class t) { + super(t); + } + + public AWSEventBridgeDeleteStatusSerializer() { + this(null); + } + + @Override + public void serialize( + AWSEventBridgeDeleteStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AWSEventBridgeDeleteStatus fromValue(String value) { + return new AWSEventBridgeDeleteStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeListResponse.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeListResponse.java new file mode 100644 index 00000000000..e30b8b0e59a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeListResponse.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Amazon EventBridge list response body. */ +@JsonPropertyOrder({AWSEventBridgeListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AWSEventBridgeListResponseData data; + + public AWSEventBridgeListResponse() {} + + @JsonCreator + public AWSEventBridgeListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AWSEventBridgeListResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AWSEventBridgeListResponse data(AWSEventBridgeListResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Amazon EventBridge list response data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeListResponseData getData() { + return data; + } + + public void setData(AWSEventBridgeListResponseData 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 AWSEventBridgeListResponse + */ + @JsonAnySetter + public AWSEventBridgeListResponse 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 AWSEventBridgeListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeListResponse awsEventBridgeListResponse = (AWSEventBridgeListResponse) o; + return Objects.equals(this.data, awsEventBridgeListResponse.data) + && Objects.equals( + this.additionalProperties, awsEventBridgeListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeListResponse {\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/AWSEventBridgeListResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeListResponseAttributes.java new file mode 100644 index 00000000000..82acd9af910 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeListResponseAttributes.java @@ -0,0 +1,182 @@ +/* + * 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; + +/** An object describing the EventBridge configuration for multiple accounts. */ +@JsonPropertyOrder({ + AWSEventBridgeListResponseAttributes.JSON_PROPERTY_ACCOUNTS, + AWSEventBridgeListResponseAttributes.JSON_PROPERTY_IS_INSTALLED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeListResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + private List accounts = null; + + public static final String JSON_PROPERTY_IS_INSTALLED = "is_installed"; + private Boolean isInstalled; + + public AWSEventBridgeListResponseAttributes accounts( + List accounts) { + this.accounts = accounts; + for (AWSEventBridgeAccountConfiguration item : accounts) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AWSEventBridgeListResponseAttributes addAccountsItem( + AWSEventBridgeAccountConfiguration accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + this.unparsed |= accountsItem.unparsed; + return this; + } + + /** + * List of accounts with their event sources. + * + * @return accounts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAccounts() { + return accounts; + } + + public void setAccounts(List accounts) { + this.accounts = accounts; + } + + public AWSEventBridgeListResponseAttributes isInstalled(Boolean isInstalled) { + this.isInstalled = isInstalled; + return this; + } + + /** + * True if the EventBridge integration is enabled for your organization. + * + * @return isInstalled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_INSTALLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsInstalled() { + return isInstalled; + } + + public void setIsInstalled(Boolean isInstalled) { + this.isInstalled = isInstalled; + } + + /** + * 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 AWSEventBridgeListResponseAttributes + */ + @JsonAnySetter + public AWSEventBridgeListResponseAttributes 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 AWSEventBridgeListResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeListResponseAttributes awsEventBridgeListResponseAttributes = + (AWSEventBridgeListResponseAttributes) o; + return Objects.equals(this.accounts, awsEventBridgeListResponseAttributes.accounts) + && Objects.equals(this.isInstalled, awsEventBridgeListResponseAttributes.isInstalled) + && Objects.equals( + this.additionalProperties, awsEventBridgeListResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accounts, isInstalled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeListResponseAttributes {\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append(" isInstalled: ").append(toIndentedString(isInstalled)).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/AWSEventBridgeListResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeListResponseData.java new file mode 100644 index 00000000000..98b5ad38adc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeListResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Amazon EventBridge list response data. */ +@JsonPropertyOrder({ + AWSEventBridgeListResponseData.JSON_PROPERTY_ATTRIBUTES, + AWSEventBridgeListResponseData.JSON_PROPERTY_ID, + AWSEventBridgeListResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeListResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AWSEventBridgeListResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id = "get_event_bridge"; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AWSEventBridgeType type = AWSEventBridgeType.EVENT_BRIDGE; + + public AWSEventBridgeListResponseData() {} + + @JsonCreator + public AWSEventBridgeListResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AWSEventBridgeListResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSEventBridgeType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AWSEventBridgeListResponseData attributes( + AWSEventBridgeListResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * An object describing the EventBridge configuration for multiple accounts. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeListResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AWSEventBridgeListResponseAttributes attributes) { + this.attributes = attributes; + } + + public AWSEventBridgeListResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the Amazon EventBridge list response data. + * + * @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 AWSEventBridgeListResponseData type(AWSEventBridgeType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Amazon EventBridge resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSEventBridgeType getType() { + return type; + } + + public void setType(AWSEventBridgeType 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 AWSEventBridgeListResponseData + */ + @JsonAnySetter + public AWSEventBridgeListResponseData 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 AWSEventBridgeListResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeListResponseData awsEventBridgeListResponseData = + (AWSEventBridgeListResponseData) o; + return Objects.equals(this.attributes, awsEventBridgeListResponseData.attributes) + && Objects.equals(this.id, awsEventBridgeListResponseData.id) + && Objects.equals(this.type, awsEventBridgeListResponseData.type) + && Objects.equals( + this.additionalProperties, awsEventBridgeListResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeListResponseData {\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/AWSEventBridgeSource.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeSource.java new file mode 100644 index 00000000000..6b191f52c08 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeSource.java @@ -0,0 +1,166 @@ +/* + * 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; + +/** An EventBridge source. */ +@JsonPropertyOrder({ + AWSEventBridgeSource.JSON_PROPERTY_NAME, + AWSEventBridgeSource.JSON_PROPERTY_REGION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSEventBridgeSource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REGION = "region"; + private String region; + + public AWSEventBridgeSource name(String name) { + this.name = name; + return this; + } + + /** + * The event source name. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public AWSEventBridgeSource region(String region) { + this.region = region; + return this; + } + + /** + * The event source's AWS + * region. + * + * @return region + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + /** + * 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 AWSEventBridgeSource + */ + @JsonAnySetter + public AWSEventBridgeSource 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 AWSEventBridgeSource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSEventBridgeSource awsEventBridgeSource = (AWSEventBridgeSource) o; + return Objects.equals(this.name, awsEventBridgeSource.name) + && Objects.equals(this.region, awsEventBridgeSource.region) + && Objects.equals(this.additionalProperties, awsEventBridgeSource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, region, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSEventBridgeSource {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).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/AWSEventBridgeType.java b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeType.java new file mode 100644 index 00000000000..96ab3abcceb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSEventBridgeType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Amazon EventBridge resource type. */ +@JsonSerialize(using = AWSEventBridgeType.AWSEventBridgeTypeSerializer.class) +public class AWSEventBridgeType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("event_bridge")); + + public static final AWSEventBridgeType EVENT_BRIDGE = new AWSEventBridgeType("event_bridge"); + + AWSEventBridgeType(String value) { + super(value, allowedValues); + } + + public static class AWSEventBridgeTypeSerializer extends StdSerializer { + public AWSEventBridgeTypeSerializer(Class t) { + super(t); + } + + public AWSEventBridgeTypeSerializer() { + this(null); + } + + @Override + public void serialize(AWSEventBridgeType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AWSEventBridgeType fromValue(String value) { + return new AWSEventBridgeType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSNamespaceTagFilter.java b/src/main/java/com/datadog/api/client/v2/model/AWSNamespaceTagFilter.java index 08188d0893d..e44be9eb167 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AWSNamespaceTagFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/AWSNamespaceTagFilter.java @@ -24,8 +24,8 @@ * resource tags (in the form key:value) defines a filter that Datadog uses when * collecting metrics from a specified service. Wildcards, such as ? (match a single * character) and * (match multiple characters), and exclusion using ! - * before the tag are supported. For EC2, only hosts that match one of the defined tags will be - * imported into Datadog. The rest will be ignored. For example, + * before the tag are supported. For EC2, only hosts that match one of the defined tags are imported + * into Datadog. The rest are ignored. For example, * env:production,instance-type:c?.*,!region:us-east-1. */ @JsonPropertyOrder({ diff --git a/src/test/resources/com/datadog/api/client/v2/api/aws_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/aws_integration.feature index 16522a97cf5..30ded64d73f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/aws_integration.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/aws_integration.feature @@ -38,6 +38,27 @@ Feature: AWS Integration When the request is sent Then the response status is 409 Conflict + @generated @skip @team:DataDog/aws-integrations + Scenario: Create an Amazon EventBridge source returns "Amazon EventBridge source created." response + Given new "CreateAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 200 Amazon EventBridge source created. + + @generated @skip @team:DataDog/aws-integrations + Scenario: Create an Amazon EventBridge source returns "Bad Request" response + Given new "CreateAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aws-integrations + Scenario: Create an Amazon EventBridge source returns "Conflict" response + Given new "CreateAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 409 Conflict + @team:DataDog/aws-integrations Scenario: Delete an AWS integration returns "Bad Request" response Given new "DeleteAWSAccount" request @@ -61,6 +82,20 @@ Feature: AWS Integration When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/aws-integrations + Scenario: Delete an Amazon EventBridge source returns "Amazon EventBridge source deleted." response + Given new "DeleteAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "event_generator_name": "app-alerts-zyxw3210", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 200 Amazon EventBridge source deleted. + + @generated @skip @team:DataDog/aws-integrations + Scenario: Delete an Amazon EventBridge source returns "Bad Request" response + Given new "DeleteAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "event_generator_name": "app-alerts-zyxw3210", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 400 Bad Request + @team:DataDog/aws-integrations Scenario: Generate a new external ID returns "AWS External ID object" response Given new "CreateNewAWSExternalID" request @@ -91,6 +126,18 @@ Feature: AWS Integration When the request is sent Then the response status is 200 AWS integration standard IAM permissions. + @generated @skip @team:DataDog/aws-integrations + Scenario: Get all Amazon EventBridge sources returns "Amazon EventBridge sources list." response + Given new "ListAWSEventBridgeSources" request + When the request is sent + Then the response status is 200 Amazon EventBridge sources list. + + @generated @skip @team:DataDog/aws-integrations + Scenario: Get all Amazon EventBridge sources returns "Bad Request" response + Given new "ListAWSEventBridgeSources" request + When the request is sent + Then the response status is 400 Bad Request + @team:DataDog/aws-integrations Scenario: Get an AWS integration by config ID returns "AWS Account object" response Given there is a valid "aws_account_v2" in the system 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 eb1380ab6b8..ec7eca2cfdf 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 @@ -1712,6 +1712,26 @@ "type": "safe" } }, + "DeleteAWSEventBridgeSource": { + "tag": "AWS Integration", + "undo": { + "type": "idempotent" + } + }, + "ListAWSEventBridgeSources": { + "tag": "AWS Integration", + "undo": { + "type": "safe" + } + }, + "CreateAWSEventBridgeSource": { + "tag": "AWS Integration", + "undo": { + "operationId": "DeleteAWSEventBridgeSource", + "parameters": [], + "type": "unsafe" + } + }, "CreateNewAWSExternalID": { "tag": "AWS Integration", "undo": {