From 8c6a7cea98c785a73a44d514a6000528b75353a2 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 10 Dec 2024 14:45:34 +0000 Subject: [PATCH] Regenerate client from commit 408f0b84 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 68 ------- .../GetCloudCostActivity.java | 24 --- .../client/v2/api/CloudCostManagementApi.java | 121 ------------ .../client/v2/model/CloudCostActivity.java | 181 ------------------ .../v2/model/CloudCostActivityAttributes.java | 144 -------------- .../v2/model/CloudCostActivityResponse.java | 137 ------------- .../v2/model/CloudCostActivityType.java | 56 ------ .../v2/api/cloud_cost_management.feature | 6 - .../com/datadog/api/client/v2/api/undo.json | 6 - 10 files changed, 4 insertions(+), 747 deletions(-) delete mode 100644 examples/v2/cloud-cost-management/GetCloudCostActivity.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/CloudCostActivity.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/CloudCostActivityAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/CloudCostActivityResponse.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/CloudCostActivityType.java diff --git a/.apigentools-info b/.apigentools-info index f96e497c834..6009b24d105 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-10 13:52:27.205718", - "spec_repo_commit": "4f71be94" + "regenerated": "2024-12-10 14:43:54.934240", + "spec_repo_commit": "408f0b84" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-10 13:52:27.224743", - "spec_repo_commit": "4f71be94" + "regenerated": "2024-12-10 14:43:54.953306", + "spec_repo_commit": "408f0b84" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index af3105008c2..e7c715f38a1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4929,42 +4929,6 @@ components: type: string x-enum-varnames: - CLOUD_CONFIGURATION - CloudCostActivity: - description: Cloud Cost Activity. - properties: - attributes: - $ref: '#/components/schemas/CloudCostActivityAttributes' - type: - $ref: '#/components/schemas/CloudCostActivityType' - required: - - attributes - - type - type: object - CloudCostActivityAttributes: - description: Attributes for Cloud Cost activity. - properties: - is_enabled: - description: Whether or not the cloud account is enabled. - example: true - type: boolean - required: - - is_enabled - type: object - CloudCostActivityResponse: - description: Response for Cloud Cost activity. - properties: - data: - $ref: '#/components/schemas/CloudCostActivity' - type: object - CloudCostActivityType: - default: cloud_cost_activity - description: Type of Cloud Cost Activity. - enum: - - cloud_cost_activity - example: cloud_cost_activity - type: string - x-enum-varnames: - - CLOUD_COST_ACTIVITY CloudWorkloadSecurityAgentRuleAction: description: The action the rule can perform if triggered. properties: @@ -30572,38 +30536,6 @@ paths: summary: Get Custom Costs file tags: - Cloud Cost Management - /api/v2/cost/enabled: - get: - deprecated: true - description: Get the Cloud Cost Management activity. - operationId: GetCloudCostActivity - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CloudCostActivityResponse' - description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cloud_cost_management_read - summary: Cloud Cost Enabled - tags: - - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_read /api/v2/cost_by_tag/active_billing_dimensions: get: description: Get active billing dimensions for cost attribution. Cost data for diff --git a/examples/v2/cloud-cost-management/GetCloudCostActivity.java b/examples/v2/cloud-cost-management/GetCloudCostActivity.java deleted file mode 100644 index fe9414fe62a..00000000000 --- a/examples/v2/cloud-cost-management/GetCloudCostActivity.java +++ /dev/null @@ -1,24 +0,0 @@ -// Cloud Cost Enabled 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.CloudCostActivityResponse; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); - - try { - CloudCostActivityResponse result = apiInstance.getCloudCostActivity(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#getCloudCostActivity"); - 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 bf89254eb51..52ce60c61b3 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 @@ -12,7 +12,6 @@ import com.datadog.api.client.v2.model.AzureUCConfigPatchRequest; import com.datadog.api.client.v2.model.AzureUCConfigPostRequest; import com.datadog.api.client.v2.model.AzureUCConfigsResponse; -import com.datadog.api.client.v2.model.CloudCostActivityResponse; import com.datadog.api.client.v2.model.CustomCostsFileGetResponse; import com.datadog.api.client.v2.model.CustomCostsFileLineItem; import com.datadog.api.client.v2.model.CustomCostsFileListResponse; @@ -736,126 +735,6 @@ public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsy null); } - /** - * Cloud Cost Enabled. - * - *

See {@link #getCloudCostActivityWithHttpInfo}. - * - * @return CloudCostActivityResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public CloudCostActivityResponse getCloudCostActivity() throws ApiException { - return getCloudCostActivityWithHttpInfo().getData(); - } - - /** - * Cloud Cost Enabled. - * - *

See {@link #getCloudCostActivityWithHttpInfoAsync}. - * - * @return CompletableFuture<CloudCostActivityResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getCloudCostActivityAsync() { - return getCloudCostActivityWithHttpInfoAsync() - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get the Cloud Cost Management activity. - * - * @return ApiResponse<CloudCostActivityResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse getCloudCostActivityWithHttpInfo() - throws ApiException { - Object localVarPostBody = null; - // create path and map variables - String localVarPath = "/api/v2/cost/enabled"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudCostManagementApi.getCloudCostActivity", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Cloud Cost Enabled. - * - *

See {@link #getCloudCostActivityWithHttpInfo}. - * - * @return CompletableFuture<ApiResponse<CloudCostActivityResponse>> - * @deprecated - */ - @Deprecated - public CompletableFuture> - getCloudCostActivityWithHttpInfoAsync() { - Object localVarPostBody = null; - // create path and map variables - String localVarPath = "/api/v2/cost/enabled"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.CloudCostManagementApi.getCloudCostActivity", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - /** * Get Custom Costs file. * diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudCostActivity.java b/src/main/java/com/datadog/api/client/v2/model/CloudCostActivity.java deleted file mode 100644 index dd4e3786f97..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/CloudCostActivity.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * 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; - -/** Cloud Cost Activity. */ -@JsonPropertyOrder({ - CloudCostActivity.JSON_PROPERTY_ATTRIBUTES, - CloudCostActivity.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CloudCostActivity { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private CloudCostActivityAttributes attributes; - - public static final String JSON_PROPERTY_TYPE = "type"; - private CloudCostActivityType type = CloudCostActivityType.CLOUD_COST_ACTIVITY; - - public CloudCostActivity() {} - - @JsonCreator - public CloudCostActivity( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - CloudCostActivityAttributes attributes, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CloudCostActivityType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - this.type = type; - this.unparsed |= !type.isValid(); - } - - public CloudCostActivity attributes(CloudCostActivityAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - return this; - } - - /** - * Attributes for Cloud Cost activity. - * - * @return attributes - */ - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudCostActivityAttributes getAttributes() { - return attributes; - } - - public void setAttributes(CloudCostActivityAttributes attributes) { - this.attributes = attributes; - } - - public CloudCostActivity type(CloudCostActivityType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Type of Cloud Cost Activity. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CloudCostActivityType getType() { - return type; - } - - public void setType(CloudCostActivityType 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 CloudCostActivity - */ - @JsonAnySetter - public CloudCostActivity 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 CloudCostActivity object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CloudCostActivity cloudCostActivity = (CloudCostActivity) o; - return Objects.equals(this.attributes, cloudCostActivity.attributes) - && Objects.equals(this.type, cloudCostActivity.type) - && Objects.equals(this.additionalProperties, cloudCostActivity.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CloudCostActivity {\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudCostActivityAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloudCostActivityAttributes.java deleted file mode 100644 index 18ccc121834..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/CloudCostActivityAttributes.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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; - -/** Attributes for Cloud Cost activity. */ -@JsonPropertyOrder({CloudCostActivityAttributes.JSON_PROPERTY_IS_ENABLED}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CloudCostActivityAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; - private Boolean isEnabled; - - public CloudCostActivityAttributes() {} - - @JsonCreator - public CloudCostActivityAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_IS_ENABLED) Boolean isEnabled) { - this.isEnabled = isEnabled; - } - - public CloudCostActivityAttributes isEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Whether or not the cloud account is enabled. - * - * @return isEnabled - */ - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsEnabled() { - return isEnabled; - } - - public void setIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - } - - /** - * 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 CloudCostActivityAttributes - */ - @JsonAnySetter - public CloudCostActivityAttributes 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 CloudCostActivityAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CloudCostActivityAttributes cloudCostActivityAttributes = (CloudCostActivityAttributes) o; - return Objects.equals(this.isEnabled, cloudCostActivityAttributes.isEnabled) - && Objects.equals( - this.additionalProperties, cloudCostActivityAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(isEnabled, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CloudCostActivityAttributes {\n"); - sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).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/CloudCostActivityResponse.java b/src/main/java/com/datadog/api/client/v2/model/CloudCostActivityResponse.java deleted file mode 100644 index a18e59bbadf..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/CloudCostActivityResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Response for Cloud Cost activity. */ -@JsonPropertyOrder({CloudCostActivityResponse.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CloudCostActivityResponse { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private CloudCostActivity data; - - public CloudCostActivityResponse data(CloudCostActivity data) { - this.data = data; - this.unparsed |= data.unparsed; - return this; - } - - /** - * Cloud Cost Activity. - * - * @return data - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CloudCostActivity getData() { - return data; - } - - public void setData(CloudCostActivity 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 CloudCostActivityResponse - */ - @JsonAnySetter - public CloudCostActivityResponse 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 CloudCostActivityResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CloudCostActivityResponse cloudCostActivityResponse = (CloudCostActivityResponse) o; - return Objects.equals(this.data, cloudCostActivityResponse.data) - && Objects.equals( - this.additionalProperties, cloudCostActivityResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CloudCostActivityResponse {\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/CloudCostActivityType.java b/src/main/java/com/datadog/api/client/v2/model/CloudCostActivityType.java deleted file mode 100644 index 1d9b80ad772..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/CloudCostActivityType.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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; - -/** Type of Cloud Cost Activity. */ -@JsonSerialize(using = CloudCostActivityType.CloudCostActivityTypeSerializer.class) -public class CloudCostActivityType extends ModelEnum { - - private static final Set allowedValues = - new HashSet(Arrays.asList("cloud_cost_activity")); - - public static final CloudCostActivityType CLOUD_COST_ACTIVITY = - new CloudCostActivityType("cloud_cost_activity"); - - CloudCostActivityType(String value) { - super(value, allowedValues); - } - - public static class CloudCostActivityTypeSerializer extends StdSerializer { - public CloudCostActivityTypeSerializer(Class t) { - super(t); - } - - public CloudCostActivityTypeSerializer() { - this(null); - } - - @Override - public void serialize( - CloudCostActivityType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } - } - - @JsonCreator - public static CloudCostActivityType fromValue(String value) { - return new CloudCostActivityType(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 2b87e8fe98d..4bef351f25c 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 @@ -13,12 +13,6 @@ Feature: Cloud Cost Management And a valid "appKeyAuth" key in the system And an instance of "CloudCostManagement" API - @generated @skip @team:Datadog/cloud-cost-management - Scenario: Cloud Cost Enabled returns "OK" response - Given new "GetCloudCostActivity" request - When the request is sent - Then the response status is 200 OK - @generated @skip @team:Datadog/cloud-cost-management Scenario: Create Cloud Cost Management AWS CUR config returns "Bad Request" response Given new "CreateCostAWSCURConfig" 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 60803502275..9db842c40ad 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 @@ -462,12 +462,6 @@ "type": "safe" } }, - "GetCloudCostActivity": { - "tag": "Cloud Cost Management", - "undo": { - "type": "safe" - } - }, "GetActiveBillingDimensions": { "tag": "Usage Metering", "undo": {