diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6c5ab835071..8b2d7809001 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -6353,6 +6353,62 @@ components: type: string x-enum-varnames: - ARBITRARY_RULE + ArbitraryRuleStatusResponseArray: + description: Processing statuses for all custom allocation rules in the specified organization. + 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: Processing status for a custom allocation rule. + items: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseData" + type: array + required: + - data + type: object + ArbitraryRuleStatusResponseData: + description: Processing status for a custom allocation rule. + 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: Processing status for a custom allocation rule. + 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: Custom allocation 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: @@ -60251,6 +60307,62 @@ components: type: string x-enum-varnames: - RULESET + RulesetStatusRespArray: + description: Processing statuses for all tag pipeline rulesets in the specified organization. + 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: Processing status for a tag pipeline ruleset. + items: + $ref: "#/components/schemas/RulesetStatusRespData" + type: array + required: + - data + type: object + RulesetStatusRespData: + description: Processing status for a tag pipeline ruleset. + 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: Processing status for a tag pipeline ruleset. + 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: @@ -94692,6 +94804,39 @@ 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: + examples: + default: + value: + data: + - attributes: + processing_status: processing + id: "123" + type: arbitrary_rule_status + - attributes: + processing_status: done + id: "456" + type: arbitrary_rule_status + schema: + $ref: "#/components/schemas/ArbitraryRuleStatusResponseArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List custom allocation rule statuses + 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 @@ -140761,6 +140906,39 @@ 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: + examples: + default: + value: + 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 + schema: + $ref: "#/components/schemas/RulesetStatusRespArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List tag pipeline ruleset statuses + 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/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java new file mode 100644 index 00000000000..853c193bb78 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java @@ -0,0 +1,25 @@ +// List custom allocation rule statuses 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..18036098af3 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.java @@ -0,0 +1,25 @@ +// List tag pipeline ruleset statuses 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/v2/api/CloudCostManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java index 7abd1e19f92..38d25db131e 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 rule statuses. + * + *

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

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 rule statuses. + * + *

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 ruleset statuses. + * + *

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

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 ruleset statuses. + * + *

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..92a35b6c953 --- /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; + +/** Processing statuses for all custom allocation rules in the specified organization. */ +@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; + } + + /** + * Processing status for a custom allocation rule. + * + * @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..b3954252613 --- /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; + +/** Processing status for a custom allocation rule. */ +@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; + } + + /** + * Processing status for a custom allocation rule. + * + * @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; + } + + /** + * Custom allocation 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..09f5a23b23e --- /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; + +/** Processing status for a custom allocation rule. */ +@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..bbf2d714983 --- /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; + +/** Custom allocation 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..68387292e2b --- /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; + +/** Processing statuses for all tag pipeline rulesets in the specified organization. */ +@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; + } + + /** + * Processing status for a tag pipeline ruleset. + * + * @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..00eb08dafec --- /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; + +/** Processing status for a tag pipeline ruleset. */ +@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; + } + + /** + * Processing status for a tag pipeline ruleset. + * + * @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..c65d48b58ea --- /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; + +/** Processing status for a tag pipeline ruleset. */ +@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/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..1e9f5de20c2 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 @@ -351,6 +351,12 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List custom allocation rule statuses 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 custom allocation rules returns "OK" response Given new "ListCustomAllocationRules" request @@ -358,6 +364,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 tag pipeline ruleset statuses returns "OK" response + Given new "ListTagPipelinesRulesetsStatus" 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 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 a3e509a0bcb..edc87690791 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": { @@ -6703,6 +6709,12 @@ "type": "idempotent" } }, + "ListTagPipelinesRulesetsStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ValidateQuery": { "tag": "Cloud Cost Management", "undo": {