From 473dc3a15edaed85b62e89353383140dd17d5287 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 5 May 2026 18:19:53 +0000 Subject: [PATCH] Regenerate client from commit e10a6b3 of spec repo --- .generator/schemas/v1/openapi.yaml | 5 - .generator/schemas/v2/openapi.yaml | 154 ++++++++++++ .../UpdateAzureHostFilters.java | 1 - .../UpdateAzureIntegration.java | 1 - .../ListCustomAllocationRulesStatus.java | 25 ++ .../ListTagPipelinesRulesetsStatus.java | 25 ++ .../api/client/v1/model/AzureAccount.java | 31 --- .../client/v2/api/CloudCostManagementApi.java | 226 ++++++++++++++++++ .../ArbitraryRuleStatusResponseArray.java | 157 ++++++++++++ .../ArbitraryRuleStatusResponseData.java | 214 +++++++++++++++++ ...traryRuleStatusResponseDataAttributes.java | 148 ++++++++++++ .../ArbitraryRuleStatusResponseDataType.java | 59 +++++ .../v2/model/RulesetStatusRespArray.java | 154 ++++++++++++ .../v2/model/RulesetStatusRespData.java | 209 ++++++++++++++++ .../RulesetStatusRespDataAttributes.java | 146 +++++++++++ .../v2/model/RulesetStatusRespDataType.java | 57 +++++ ...ure_integration_returns_OK_response.freeze | 2 +- ...Azure_integration_returns_OK_response.json | 12 +- ...ure_integration_returns_OK_response.freeze | 2 +- ...Azure_integration_returns_OK_response.json | 12 +- .../client/v1/api/azure_integration.feature | 12 +- .../com/datadog/api/client/v1/api/given.json | 2 +- .../v2/api/cloud_cost_management.feature | 12 + .../com/datadog/api/client/v2/api/undo.json | 12 + 24 files changed, 1619 insertions(+), 59 deletions(-) create mode 100644 examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java create mode 100644 examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseArray.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespArray.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespDataType.java diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 620108cc5bf..4ac4cbb66ff 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -791,11 +791,6 @@ components: items: $ref: "#/components/schemas/ResourceProviderConfig" type: array - secretless_auth_enabled: - description: |- - (Preview) When enabled, Datadog authenticates with this app registration using federated workload identity credentials instead of a client secret. - example: true - type: boolean tenant_name: description: Your Azure Active Directory ID. example: "testc44-1234-5678-9101-cc00736ftest" diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 95a832b986b..45890314450 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -6369,6 +6369,62 @@ components: type: string x-enum-varnames: - ARBITRARY_RULE + ArbitraryRuleStatusResponseArray: + description: The definition of `ArbitraryRuleStatusResponseArray` object. + example: + data: + - attributes: + processing_status: processing + id: "123" + type: arbitrary_rule_status + - attributes: + processing_status: done + id: "456" + type: arbitrary_rule_status + properties: + data: + description: The `ArbitraryRuleStatusResponseArray` `data`. + items: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseData" + type: array + required: + - data + type: object + ArbitraryRuleStatusResponseData: + description: The definition of `ArbitraryRuleStatusResponseData` object. + properties: + attributes: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseDataAttributes" + id: + description: The unique identifier of the custom allocation rule. + example: "123" + type: string + type: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseDataType" + required: + - id + - type + - attributes + type: object + ArbitraryRuleStatusResponseDataAttributes: + description: The definition of `ArbitraryRuleStatusResponseDataAttributes` object. + properties: + processing_status: + description: The processing status of the custom allocation rule. + example: processing + type: string + required: + - processing_status + type: object + ArbitraryRuleStatusResponseDataType: + default: arbitrary_rule_status + description: Arbitrary rule status resource type. + enum: + - arbitrary_rule_status + example: arbitrary_rule_status + type: string + x-enum-varnames: + - ARBITRARY_RULE_STATUS Argument: description: A named argument for a custom static analysis rule. properties: @@ -60338,6 +60394,62 @@ components: type: string x-enum-varnames: - RULESET + RulesetStatusRespArray: + description: The definition of `RulesetStatusRespArray` object. + example: + data: + - attributes: + processing_status: processing + id: 55ef2385-9ae1-4410-90c4-5ac1b60fec10 + type: ruleset_status + - attributes: + processing_status: done + id: a7b8c9d0-1234-5678-9abc-def012345678 + type: ruleset_status + properties: + data: + description: The `RulesetStatusRespArray` `data`. + items: + $ref: "#/components/schemas/RulesetStatusRespData" + type: array + required: + - data + type: object + RulesetStatusRespData: + description: The definition of `RulesetStatusRespData` object. + properties: + attributes: + $ref: "#/components/schemas/RulesetStatusRespDataAttributes" + id: + description: The unique identifier of the ruleset. + example: 55ef2385-9ae1-4410-90c4-5ac1b60fec10 + type: string + type: + $ref: "#/components/schemas/RulesetStatusRespDataType" + required: + - id + - type + - attributes + type: object + RulesetStatusRespDataAttributes: + description: The definition of `RulesetStatusRespDataAttributes` object. + properties: + processing_status: + description: The processing status of the ruleset. + example: processing + type: string + required: + - processing_status + type: object + RulesetStatusRespDataType: + default: ruleset_status + description: Ruleset status resource type. + enum: + - ruleset_status + example: ruleset_status + type: string + x-enum-varnames: + - RULESET_STATUS RumCrossProductSampling: description: The configuration for cross-product retention filters. properties: @@ -92445,6 +92557,27 @@ paths: summary: Reorder custom allocation rules tags: - Cloud Cost Management + /api/v2/cost/arbitrary_rule/status: + get: + description: List the processing status of all custom allocation rules. Returns only the ID and processing status for each rule. + operationId: ListCustomAllocationRulesStatus + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List custom allocation rules status + tags: + - Cloud Cost Management /api/v2/cost/arbitrary_rule/{rule_id}: delete: description: Delete a custom allocation rule - Delete an existing custom allocation rule by its ID @@ -131002,6 +131135,27 @@ paths: summary: Reorder tag pipeline rulesets tags: - Cloud Cost Management + /api/v2/tags/enrichment/status: + get: + description: List the processing status of all tag pipeline rulesets. Returns only the ID and processing status for each ruleset. + operationId: ListTagPipelinesRulesetsStatus + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RulesetStatusRespArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List tag pipeline rulesets status + tags: + - Cloud Cost Management /api/v2/tags/enrichment/validate-query: post: description: Validate a tag pipeline query - Validate the syntax and structure of a tag pipeline query diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.java b/examples/v1/azure-integration/UpdateAzureHostFilters.java index 8b7334b6cf7..ff62057d0da 100644 --- a/examples/v1/azure-integration/UpdateAzureHostFilters.java +++ b/examples/v1/azure-integration/UpdateAzureHostFilters.java @@ -33,7 +33,6 @@ public static void main(String[] args) { new ResourceProviderConfig() .metricsEnabled(true) .namespace("Microsoft.Compute"))) - .secretlessAuthEnabled(true) .tenantName("testc44-1234-5678-9101-cc00736ftest") .usageMetricsEnabled(true); diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.java b/examples/v1/azure-integration/UpdateAzureIntegration.java index e7b6e0d6da8..ecc66cb37f0 100644 --- a/examples/v1/azure-integration/UpdateAzureIntegration.java +++ b/examples/v1/azure-integration/UpdateAzureIntegration.java @@ -25,7 +25,6 @@ public static void main(String[] args) { .newClientId("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") .newTenantName("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") .resourceCollectionEnabled(true) - .secretlessAuthEnabled(true) .tenantName("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"); try { diff --git a/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java new file mode 100644 index 00000000000..c413496e44d --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java @@ -0,0 +1,25 @@ +// List custom allocation rules status returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.ArbitraryRuleStatusResponseArray; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + ArbitraryRuleStatusResponseArray result = apiInstance.listCustomAllocationRulesStatus(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudCostManagementApi#listCustomAllocationRulesStatus"); + 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/cloud-cost-management/ListTagPipelinesRulesetsStatus.java b/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.java new file mode 100644 index 00000000000..5c38d3db3bf --- /dev/null +++ b/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.java @@ -0,0 +1,25 @@ +// List tag pipeline rulesets status returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.RulesetStatusRespArray; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + RulesetStatusRespArray result = apiInstance.listTagPipelinesRulesetsStatus(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudCostManagementApi#listTagPipelinesRulesetsStatus"); + 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/model/AzureAccount.java b/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java index 36df16823d3..9a0fe61c12f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java +++ b/src/main/java/com/datadog/api/client/v1/model/AzureAccount.java @@ -35,7 +35,6 @@ AzureAccount.JSON_PROPERTY_NEW_TENANT_NAME, AzureAccount.JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED, AzureAccount.JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS, - AzureAccount.JSON_PROPERTY_SECRETLESS_AUTH_ENABLED, AzureAccount.JSON_PROPERTY_TENANT_NAME, AzureAccount.JSON_PROPERTY_USAGE_METRICS_ENABLED }) @@ -89,9 +88,6 @@ public class AzureAccount { public static final String JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS = "resource_provider_configs"; private List resourceProviderConfigs = null; - public static final String JSON_PROPERTY_SECRETLESS_AUTH_ENABLED = "secretless_auth_enabled"; - private Boolean secretlessAuthEnabled; - public static final String JSON_PROPERTY_TENANT_NAME = "tenant_name"; private String tenantName; @@ -442,28 +438,6 @@ public void setResourceProviderConfigs(List resourceProv this.resourceProviderConfigs = resourceProviderConfigs; } - public AzureAccount secretlessAuthEnabled(Boolean secretlessAuthEnabled) { - this.secretlessAuthEnabled = secretlessAuthEnabled; - return this; - } - - /** - * (Preview) When enabled, Datadog authenticates with this app registration using federated - * workload identity credentials instead of a client secret. - * - * @return secretlessAuthEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SECRETLESS_AUTH_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSecretlessAuthEnabled() { - return secretlessAuthEnabled; - } - - public void setSecretlessAuthEnabled(Boolean secretlessAuthEnabled) { - this.secretlessAuthEnabled = secretlessAuthEnabled; - } - public AzureAccount tenantName(String tenantName) { this.tenantName = tenantName; return this; @@ -577,7 +551,6 @@ public boolean equals(Object o) { && Objects.equals(this.newTenantName, azureAccount.newTenantName) && Objects.equals(this.resourceCollectionEnabled, azureAccount.resourceCollectionEnabled) && Objects.equals(this.resourceProviderConfigs, azureAccount.resourceProviderConfigs) - && Objects.equals(this.secretlessAuthEnabled, azureAccount.secretlessAuthEnabled) && Objects.equals(this.tenantName, azureAccount.tenantName) && Objects.equals(this.usageMetricsEnabled, azureAccount.usageMetricsEnabled) && Objects.equals(this.additionalProperties, azureAccount.additionalProperties); @@ -601,7 +574,6 @@ public int hashCode() { newTenantName, resourceCollectionEnabled, resourceProviderConfigs, - secretlessAuthEnabled, tenantName, usageMetricsEnabled, additionalProperties); @@ -638,9 +610,6 @@ public String toString() { sb.append(" resourceProviderConfigs: ") .append(toIndentedString(resourceProviderConfigs)) .append("\n"); - sb.append(" secretlessAuthEnabled: ") - .append(toIndentedString(secretlessAuthEnabled)) - .append("\n"); sb.append(" tenantName: ").append(toIndentedString(tenantName)).append("\n"); sb.append(" usageMetricsEnabled: ") .append(toIndentedString(usageMetricsEnabled)) diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java index 7abd1e19f92..47e0e2e3748 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java @@ -7,6 +7,7 @@ import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequest; import com.datadog.api.client.v2.model.ArbitraryRuleResponse; import com.datadog.api.client.v2.model.ArbitraryRuleResponseArray; +import com.datadog.api.client.v2.model.ArbitraryRuleStatusResponseArray; import com.datadog.api.client.v2.model.AwsCURConfigPatchRequest; import com.datadog.api.client.v2.model.AwsCURConfigPostRequest; import com.datadog.api.client.v2.model.AwsCURConfigsResponse; @@ -36,6 +37,7 @@ import com.datadog.api.client.v2.model.RulesValidateQueryResponse; import com.datadog.api.client.v2.model.RulesetResp; import com.datadog.api.client.v2.model.RulesetRespArray; +import com.datadog.api.client.v2.model.RulesetStatusRespArray; import com.datadog.api.client.v2.model.UCConfigPair; import com.datadog.api.client.v2.model.UpdateRulesetRequest; import com.datadog.api.client.v2.model.ValidationResponse; @@ -3320,6 +3322,119 @@ public ApiResponse listCustomAllocationRulesWithHttp new GenericType() {}); } + /** + * List custom allocation rules status. + * + *

See {@link #listCustomAllocationRulesStatusWithHttpInfo}. + * + * @return ArbitraryRuleStatusResponseArray + * @throws ApiException if fails to make API call + */ + public ArbitraryRuleStatusResponseArray listCustomAllocationRulesStatus() throws ApiException { + return listCustomAllocationRulesStatusWithHttpInfo().getData(); + } + + /** + * List custom allocation rules status. + * + *

See {@link #listCustomAllocationRulesStatusWithHttpInfoAsync}. + * + * @return CompletableFuture<ArbitraryRuleStatusResponseArray> + */ + public CompletableFuture + listCustomAllocationRulesStatusAsync() { + return listCustomAllocationRulesStatusWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the processing status of all custom allocation rules. Returns only the ID and processing + * status for each rule. + * + * @return ApiResponse<ArbitraryRuleStatusResponseArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listCustomAllocationRulesStatusWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/arbitrary_rule/status"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCustomAllocationRulesStatus", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List custom allocation rules status. + * + *

See {@link #listCustomAllocationRulesStatusWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<ArbitraryRuleStatusResponseArray>> + */ + public CompletableFuture> + listCustomAllocationRulesStatusWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/arbitrary_rule/status"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCustomAllocationRulesStatus", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** Manage optional parameters to listCustomCostsFiles. */ public static class ListCustomCostsFilesOptionalParameters { private Long pageNumber; @@ -3682,6 +3797,117 @@ public ApiResponse listTagPipelinesRulesetsWithHttpInfo() thro new GenericType() {}); } + /** + * List tag pipeline rulesets status. + * + *

See {@link #listTagPipelinesRulesetsStatusWithHttpInfo}. + * + * @return RulesetStatusRespArray + * @throws ApiException if fails to make API call + */ + public RulesetStatusRespArray listTagPipelinesRulesetsStatus() throws ApiException { + return listTagPipelinesRulesetsStatusWithHttpInfo().getData(); + } + + /** + * List tag pipeline rulesets status. + * + *

See {@link #listTagPipelinesRulesetsStatusWithHttpInfoAsync}. + * + * @return CompletableFuture<RulesetStatusRespArray> + */ + public CompletableFuture listTagPipelinesRulesetsStatusAsync() { + return listTagPipelinesRulesetsStatusWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the processing status of all tag pipeline rulesets. Returns only the ID and processing + * status for each ruleset. + * + * @return ApiResponse<RulesetStatusRespArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listTagPipelinesRulesetsStatusWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/tags/enrichment/status"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listTagPipelinesRulesetsStatus", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List tag pipeline rulesets status. + * + *

See {@link #listTagPipelinesRulesetsStatusWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<RulesetStatusRespArray>> + */ + public CompletableFuture> + listTagPipelinesRulesetsStatusWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/tags/enrichment/status"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listTagPipelinesRulesetsStatus", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Reorder custom allocation rules. * diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseArray.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseArray.java new file mode 100644 index 00000000000..5ad3a4f9d8c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseArray.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryRuleStatusResponseArray object. */ +@JsonPropertyOrder({ArbitraryRuleStatusResponseArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleStatusResponseArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public ArbitraryRuleStatusResponseArray() {} + + @JsonCreator + public ArbitraryRuleStatusResponseArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public ArbitraryRuleStatusResponseArray data(List data) { + this.data = data; + for (ArbitraryRuleStatusResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryRuleStatusResponseArray addDataItem(ArbitraryRuleStatusResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The ArbitraryRuleStatusResponseArray data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleStatusResponseArray + */ + @JsonAnySetter + public ArbitraryRuleStatusResponseArray 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 ArbitraryRuleStatusResponseArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleStatusResponseArray arbitraryRuleStatusResponseArray = + (ArbitraryRuleStatusResponseArray) o; + return Objects.equals(this.data, arbitraryRuleStatusResponseArray.data) + && Objects.equals( + this.additionalProperties, arbitraryRuleStatusResponseArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleStatusResponseArray {\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/ArbitraryRuleStatusResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseData.java new file mode 100644 index 00000000000..b4b6fb95de7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseData.java @@ -0,0 +1,214 @@ +/* + * 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 definition of ArbitraryRuleStatusResponseData object. */ +@JsonPropertyOrder({ + ArbitraryRuleStatusResponseData.JSON_PROPERTY_ATTRIBUTES, + ArbitraryRuleStatusResponseData.JSON_PROPERTY_ID, + ArbitraryRuleStatusResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleStatusResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ArbitraryRuleStatusResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ArbitraryRuleStatusResponseDataType type = + ArbitraryRuleStatusResponseDataType.ARBITRARY_RULE_STATUS; + + public ArbitraryRuleStatusResponseData() {} + + @JsonCreator + public ArbitraryRuleStatusResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ArbitraryRuleStatusResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ArbitraryRuleStatusResponseDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ArbitraryRuleStatusResponseData attributes( + ArbitraryRuleStatusResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of ArbitraryRuleStatusResponseDataAttributes object. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ArbitraryRuleStatusResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ArbitraryRuleStatusResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public ArbitraryRuleStatusResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the custom allocation rule. + * + * @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 ArbitraryRuleStatusResponseData type(ArbitraryRuleStatusResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Arbitrary rule status resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ArbitraryRuleStatusResponseDataType getType() { + return type; + } + + public void setType(ArbitraryRuleStatusResponseDataType 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 ArbitraryRuleStatusResponseData + */ + @JsonAnySetter + public ArbitraryRuleStatusResponseData 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 ArbitraryRuleStatusResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleStatusResponseData arbitraryRuleStatusResponseData = + (ArbitraryRuleStatusResponseData) o; + return Objects.equals(this.attributes, arbitraryRuleStatusResponseData.attributes) + && Objects.equals(this.id, arbitraryRuleStatusResponseData.id) + && Objects.equals(this.type, arbitraryRuleStatusResponseData.type) + && Objects.equals( + this.additionalProperties, arbitraryRuleStatusResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleStatusResponseData {\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/ArbitraryRuleStatusResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseDataAttributes.java new file mode 100644 index 00000000000..974983a1584 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseDataAttributes.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryRuleStatusResponseDataAttributes object. */ +@JsonPropertyOrder({ArbitraryRuleStatusResponseDataAttributes.JSON_PROPERTY_PROCESSING_STATUS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleStatusResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PROCESSING_STATUS = "processing_status"; + private String processingStatus; + + public ArbitraryRuleStatusResponseDataAttributes() {} + + @JsonCreator + public ArbitraryRuleStatusResponseDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PROCESSING_STATUS) + String processingStatus) { + this.processingStatus = processingStatus; + } + + public ArbitraryRuleStatusResponseDataAttributes processingStatus(String processingStatus) { + this.processingStatus = processingStatus; + return this; + } + + /** + * The processing status of the custom allocation rule. + * + * @return processingStatus + */ + @JsonProperty(JSON_PROPERTY_PROCESSING_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProcessingStatus() { + return processingStatus; + } + + public void setProcessingStatus(String processingStatus) { + this.processingStatus = processingStatus; + } + + /** + * 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 ArbitraryRuleStatusResponseDataAttributes + */ + @JsonAnySetter + public ArbitraryRuleStatusResponseDataAttributes 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 ArbitraryRuleStatusResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleStatusResponseDataAttributes arbitraryRuleStatusResponseDataAttributes = + (ArbitraryRuleStatusResponseDataAttributes) o; + return Objects.equals( + this.processingStatus, arbitraryRuleStatusResponseDataAttributes.processingStatus) + && Objects.equals( + this.additionalProperties, + arbitraryRuleStatusResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(processingStatus, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleStatusResponseDataAttributes {\n"); + sb.append(" processingStatus: ").append(toIndentedString(processingStatus)).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/ArbitraryRuleStatusResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseDataType.java new file mode 100644 index 00000000000..4f1e11c3061 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleStatusResponseDataType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Arbitrary rule status resource type. */ +@JsonSerialize( + using = ArbitraryRuleStatusResponseDataType.ArbitraryRuleStatusResponseDataTypeSerializer.class) +public class ArbitraryRuleStatusResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("arbitrary_rule_status")); + + public static final ArbitraryRuleStatusResponseDataType ARBITRARY_RULE_STATUS = + new ArbitraryRuleStatusResponseDataType("arbitrary_rule_status"); + + ArbitraryRuleStatusResponseDataType(String value) { + super(value, allowedValues); + } + + public static class ArbitraryRuleStatusResponseDataTypeSerializer + extends StdSerializer { + public ArbitraryRuleStatusResponseDataTypeSerializer( + Class t) { + super(t); + } + + public ArbitraryRuleStatusResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ArbitraryRuleStatusResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ArbitraryRuleStatusResponseDataType fromValue(String value) { + return new ArbitraryRuleStatusResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespArray.java b/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespArray.java new file mode 100644 index 00000000000..dc10a7522cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespArray.java @@ -0,0 +1,154 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetStatusRespArray object. */ +@JsonPropertyOrder({RulesetStatusRespArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetStatusRespArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public RulesetStatusRespArray() {} + + @JsonCreator + public RulesetStatusRespArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public RulesetStatusRespArray data(List data) { + this.data = data; + for (RulesetStatusRespData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RulesetStatusRespArray addDataItem(RulesetStatusRespData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The RulesetStatusRespArray data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetStatusRespArray + */ + @JsonAnySetter + public RulesetStatusRespArray 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 RulesetStatusRespArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetStatusRespArray rulesetStatusRespArray = (RulesetStatusRespArray) o; + return Objects.equals(this.data, rulesetStatusRespArray.data) + && Objects.equals(this.additionalProperties, rulesetStatusRespArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetStatusRespArray {\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/RulesetStatusRespData.java b/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespData.java new file mode 100644 index 00000000000..95374f1dfb2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetStatusRespData object. */ +@JsonPropertyOrder({ + RulesetStatusRespData.JSON_PROPERTY_ATTRIBUTES, + RulesetStatusRespData.JSON_PROPERTY_ID, + RulesetStatusRespData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetStatusRespData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RulesetStatusRespDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RulesetStatusRespDataType type = RulesetStatusRespDataType.RULESET_STATUS; + + public RulesetStatusRespData() {} + + @JsonCreator + public RulesetStatusRespData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RulesetStatusRespDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RulesetStatusRespDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RulesetStatusRespData attributes(RulesetStatusRespDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of RulesetStatusRespDataAttributes object. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesetStatusRespDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RulesetStatusRespDataAttributes attributes) { + this.attributes = attributes; + } + + public RulesetStatusRespData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the ruleset. + * + * @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 RulesetStatusRespData type(RulesetStatusRespDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Ruleset status resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesetStatusRespDataType getType() { + return type; + } + + public void setType(RulesetStatusRespDataType 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 RulesetStatusRespData + */ + @JsonAnySetter + public RulesetStatusRespData 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 RulesetStatusRespData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetStatusRespData rulesetStatusRespData = (RulesetStatusRespData) o; + return Objects.equals(this.attributes, rulesetStatusRespData.attributes) + && Objects.equals(this.id, rulesetStatusRespData.id) + && Objects.equals(this.type, rulesetStatusRespData.type) + && Objects.equals(this.additionalProperties, rulesetStatusRespData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetStatusRespData {\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/RulesetStatusRespDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespDataAttributes.java new file mode 100644 index 00000000000..55778faf3b5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespDataAttributes.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetStatusRespDataAttributes object. */ +@JsonPropertyOrder({RulesetStatusRespDataAttributes.JSON_PROPERTY_PROCESSING_STATUS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetStatusRespDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PROCESSING_STATUS = "processing_status"; + private String processingStatus; + + public RulesetStatusRespDataAttributes() {} + + @JsonCreator + public RulesetStatusRespDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PROCESSING_STATUS) + String processingStatus) { + this.processingStatus = processingStatus; + } + + public RulesetStatusRespDataAttributes processingStatus(String processingStatus) { + this.processingStatus = processingStatus; + return this; + } + + /** + * The processing status of the ruleset. + * + * @return processingStatus + */ + @JsonProperty(JSON_PROPERTY_PROCESSING_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProcessingStatus() { + return processingStatus; + } + + public void setProcessingStatus(String processingStatus) { + this.processingStatus = processingStatus; + } + + /** + * 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 RulesetStatusRespDataAttributes + */ + @JsonAnySetter + public RulesetStatusRespDataAttributes 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 RulesetStatusRespDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetStatusRespDataAttributes rulesetStatusRespDataAttributes = + (RulesetStatusRespDataAttributes) o; + return Objects.equals(this.processingStatus, rulesetStatusRespDataAttributes.processingStatus) + && Objects.equals( + this.additionalProperties, rulesetStatusRespDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(processingStatus, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetStatusRespDataAttributes {\n"); + sb.append(" processingStatus: ").append(toIndentedString(processingStatus)).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/RulesetStatusRespDataType.java b/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespDataType.java new file mode 100644 index 00000000000..d4c2849b608 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetStatusRespDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Ruleset status resource type. */ +@JsonSerialize(using = RulesetStatusRespDataType.RulesetStatusRespDataTypeSerializer.class) +public class RulesetStatusRespDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ruleset_status")); + + public static final RulesetStatusRespDataType RULESET_STATUS = + new RulesetStatusRespDataType("ruleset_status"); + + RulesetStatusRespDataType(String value) { + super(value, allowedValues); + } + + public static class RulesetStatusRespDataTypeSerializer + extends StdSerializer { + public RulesetStatusRespDataTypeSerializer(Class t) { + super(t); + } + + public RulesetStatusRespDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RulesetStatusRespDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RulesetStatusRespDataType fromValue(String value) { + return new RulesetStatusRespDataType(value); + } +} diff --git a/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.freeze index fc085ae47b0..4cf590b2a0f 100644 --- a/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.freeze @@ -1 +1 @@ -2026-05-04T13:56:51.846Z \ No newline at end of file +2024-12-17T21:43:00.678Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.json index 184f124a1cf..2af4db53e78 100644 --- a/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Delete_an_Azure_integration_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17779030-0000-0000-0000-177790301100\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_enabled\":true,\"metrics_enabled_default\":true,\"new_client_id\":\"17779030-0000-0000-0000-177790301100\",\"new_tenant_name\":\"17779030-0000-0000-0000-177790301100\",\"resource_collection_enabled\":true,\"resource_provider_configs\":[{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Compute\"},{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Web\"}],\"secretless_auth_enabled\":false,\"tenant_name\":\"17779030-0000-0000-0000-177790301100\",\"usage_metrics_enabled\":true}" + "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17344717-0000-0000-0000-173447178000\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_enabled\":true,\"metrics_enabled_default\":true,\"new_client_id\":\"17344717-0000-0000-0000-173447178000\",\"new_tenant_name\":\"17344717-0000-0000-0000-173447178000\",\"resource_collection_enabled\":true,\"resource_provider_configs\":[{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Compute\"},{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Web\"}],\"tenant_name\":\"17344717-0000-0000-0000-173447178000\",\"usage_metrics_enabled\":true}" }, "headers": {}, "method": "POST", @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "5b0e587d-65f9-d856-930b-854130684f9e" + "id": "4e2e023b-b6c5-6332-0969-71d544522742" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"client_id\":\"17779030-0000-0000-0000-177790301100\",\"tenant_name\":\"17779030-0000-0000-0000-177790301100\"}" + "json": "{\"client_id\":\"17344717-0000-0000-0000-173447178000\",\"tenant_name\":\"17344717-0000-0000-0000-173447178000\"}" }, "headers": {}, "method": "DELETE", @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "2f452316-5b50-e116-03de-9353579d1f96" + "id": "18bf59b1-5d58-2ef7-1a8b-79afe390d743" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"client_id\":\"17779030-0000-0000-0000-177790301100\",\"tenant_name\":\"17779030-0000-0000-0000-177790301100\"}" + "json": "{\"client_id\":\"17344717-0000-0000-0000-173447178000\",\"tenant_name\":\"17344717-0000-0000-0000-173447178000\"}" }, "headers": {}, "method": "DELETE", @@ -87,6 +87,6 @@ "timeToLive": { "unlimited": true }, - "id": "2f452316-5b50-e116-03de-9353579d1f97" + "id": "18bf59b1-5d58-2ef7-1a8b-79afe390d744" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.freeze index 08d5b0bf6a3..d500dc214ee 100644 --- a/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.freeze @@ -1 +1 @@ -2026-05-04T13:56:52.686Z \ No newline at end of file +2024-12-17T21:43:01.129Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.json index 3012815225c..a14403baa9f 100644 --- a/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Update_an_Azure_integration_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17779030-0000-0000-0000-177790301200\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_enabled\":true,\"metrics_enabled_default\":true,\"new_client_id\":\"17779030-0000-0000-0000-177790301200\",\"new_tenant_name\":\"17779030-0000-0000-0000-177790301200\",\"resource_collection_enabled\":true,\"resource_provider_configs\":[{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Compute\"},{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Web\"}],\"secretless_auth_enabled\":false,\"tenant_name\":\"17779030-0000-0000-0000-177790301200\",\"usage_metrics_enabled\":true}" + "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17344717-0000-0000-0000-173447178100\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"metrics_enabled\":true,\"metrics_enabled_default\":true,\"new_client_id\":\"17344717-0000-0000-0000-173447178100\",\"new_tenant_name\":\"17344717-0000-0000-0000-173447178100\",\"resource_collection_enabled\":true,\"resource_provider_configs\":[{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Compute\"},{\"metrics_enabled\":false,\"namespace\":\"Microsoft.Web\"}],\"tenant_name\":\"17344717-0000-0000-0000-173447178100\",\"usage_metrics_enabled\":true}" }, "headers": {}, "method": "POST", @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "83288968-90a5-00af-afa2-381253802da5" + "id": "6ba1c834-178d-7fbd-05a9-8c57c5b3a59c" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17779030-0000-0000-0000-177790301200\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"new_client_id\":\"17779030-0000-0000-0000-177790301200\",\"new_tenant_name\":\"17779030-0000-0000-0000-177790301200\",\"resource_collection_enabled\":true,\"secretless_auth_enabled\":true,\"tenant_name\":\"17779030-0000-0000-0000-177790301200\"}" + "json": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17344717-0000-0000-0000-173447178100\",\"client_secret\":\"TestingRh2nx664kUy5dIApvM54T4AtO\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"new_client_id\":\"17344717-0000-0000-0000-173447178100\",\"new_tenant_name\":\"17344717-0000-0000-0000-173447178100\",\"resource_collection_enabled\":true,\"tenant_name\":\"17344717-0000-0000-0000-173447178100\"}" }, "headers": {}, "method": "PUT", @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "b3b0ff38-35d5-4672-3d69-3c128a1cc3df" + "id": "d21774b0-7473-079b-4c57-d1a122d1c43a" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"client_id\":\"17779030-0000-0000-0000-177790301200\",\"tenant_name\":\"17779030-0000-0000-0000-177790301200\"}" + "json": "{\"client_id\":\"17344717-0000-0000-0000-173447178100\",\"tenant_name\":\"17344717-0000-0000-0000-173447178100\"}" }, "headers": {}, "method": "DELETE", @@ -87,6 +87,6 @@ "timeToLive": { "unlimited": true }, - "id": "1e3bb8a0-dee7-9c9d-969e-5f72687ff090" + "id": "5f728266-9032-95f3-5a63-47b82c4cbe45" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v1/api/azure_integration.feature b/src/test/resources/com/datadog/api/client/v1/api/azure_integration.feature index 6ba40e91e5b..8d31237b5b6 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/azure_integration.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/azure_integration.feature @@ -12,7 +12,7 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "Bad Request" response Given new "CreateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -26,7 +26,7 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Delete an Azure integration returns "Bad Request" response Given new "DeleteAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -53,21 +53,21 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "Bad Request" response Given new "UpdateAzureHostFilters" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "OK" response Given new "UpdateAzureHostFilters" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/azure-integrations Scenario: Update an Azure integration returns "Bad Request" response Given new "UpdateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "secretless_auth_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_enabled": true, "metrics_enabled_default": true, "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "resource_provider_configs": [{"metrics_enabled": true, "namespace": "Microsoft.Compute"}], "tenant_name": "testc44-1234-5678-9101-cc00736ftest", "usage_metrics_enabled": true} When the request is sent Then the response status is 400 Bad Request @@ -75,6 +75,6 @@ Feature: Azure Integration Scenario: Update an Azure integration returns "OK" response Given there is a valid "azure_account" in the system And new "UpdateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "secretless_auth_enabled": true, "tenant_name": "{{ uuid }}"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v1/api/given.json b/src/test/resources/com/datadog/api/client/v1/api/given.json index 4415a28bc00..2606012caa1 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/given.json +++ b/src/test/resources/com/datadog/api/client/v1/api/given.json @@ -117,7 +117,7 @@ { "name": "body", "origin": "request", - "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"TestingRh2nx664kUy5dIApvM54T4AtO\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"metrics_enabled\": true,\n \"metrics_enabled_default\": true,\n \"new_client_id\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"resource_provider_configs\": [\n {\n \"namespace\": \"Microsoft.Compute\",\n \"metrics_enabled\": false\n },\n {\n \"namespace\": \"Microsoft.Web\",\n \"metrics_enabled\": false\n }\n ],\n \"secretless_auth_enabled\": false,\n \"tenant_name\": \"{{ uuid }}\",\n \"usage_metrics_enabled\": true\n}" + "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"TestingRh2nx664kUy5dIApvM54T4AtO\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"metrics_enabled\": true,\n \"metrics_enabled_default\": true,\n \"new_client_id\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"resource_provider_configs\": [\n {\n \"namespace\": \"Microsoft.Compute\",\n \"metrics_enabled\": false\n },\n {\n \"namespace\": \"Microsoft.Web\",\n \"metrics_enabled\": false\n }\n ],\n \"tenant_name\": \"{{ uuid }}\",\n \"usage_metrics_enabled\": true\n}" } ], "step": "there is a valid \"azure_account\" in the system", diff --git a/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature b/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature index c5fc0adc05d..5a2be1e25a4 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature @@ -358,6 +358,12 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule" + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List custom allocation rules status returns "OK" response + Given new "ListCustomAllocationRulesStatus" request + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: List tag pipeline rulesets returns "OK" response Given new "ListTagPipelinesRulesets" request @@ -365,6 +371,12 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.name" is equal to "New Ruleset" + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List tag pipeline rulesets status returns "OK" response + Given new "ListTagPipelinesRulesetsStatus" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management Scenario: Reorder custom allocation rules returns "Successfully reordered rules" response Given new "ReorderCustomAllocationRules" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 21d7896f03b..1acde7aa539 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 @@ -1283,6 +1283,12 @@ "type": "idempotent" } }, + "ListCustomAllocationRulesStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "DeleteCustomAllocationRule": { "tag": "Cloud Cost Management", "undo": { @@ -6691,6 +6697,12 @@ "type": "idempotent" } }, + "ListTagPipelinesRulesetsStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ValidateQuery": { "tag": "Cloud Cost Management", "undo": {