From 7db30fb50b78bcc686441ebbb788c7c23e3d4b8f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 7 May 2026 20:21:37 +0000 Subject: [PATCH] Regenerate client from commit 7147197 of spec repo --- .generator/schemas/v2/openapi.yaml | 492 +++++++++++++ .../GetCostAIPreferredTags.java | 25 + .../cloud-cost-management/GetCostSetting.java | 25 + .../ListCostTagPipelineActiveKeys.java | 26 + .../ListCustomAllocationRulesStatus.java | 26 + .../ListTagPipelinesRulesetsStatus.java | 26 + .../com/datadog/api/client/ApiClient.java | 5 + .../client/v2/api/CloudCostManagementApi.java | 679 ++++++++++++++++++ .../model/CostAIPreferredTagsAttributes.java | 182 +++++ .../v2/model/CostAIPreferredTagsData.java | 209 ++++++ .../v2/model/CostAIPreferredTagsResponse.java | 146 ++++ .../v2/model/CostAIPreferredTagsType.java | 57 ++ .../api/client/v2/model/CostSettingData.java | 209 ++++++ .../v2/model/CostSettingDataAttributes.java | 373 ++++++++++ .../client/v2/model/CostSettingResponse.java | 145 ++++ .../api/client/v2/model/CostSettingType.java | 53 ++ .../CostTagPipelineActiveKeyAttributes.java | 145 ++++ .../model/CostTagPipelineActiveKeyData.java | 211 ++++++ .../CostTagPipelineActiveKeyResponse.java | 157 ++++ .../model/CostTagPipelineActiveKeyType.java | 57 ++ .../CustomAllocationRuleStatusAttributes.java | 147 ++++ .../model/CustomAllocationRuleStatusData.java | 213 ++++++ .../CustomAllocationRuleStatusResponse.java | 157 ++++ .../model/CustomAllocationRuleStatusType.java | 58 ++ .../TagPipelinesRulesetStatusAttributes.java | 147 ++++ .../model/TagPipelinesRulesetStatusData.java | 211 ++++++ .../TagPipelinesRulesetStatusResponse.java | 157 ++++ .../model/TagPipelinesRulesetStatusType.java | 57 ++ .../v2/api/cloud_cost_management.feature | 52 ++ .../com/datadog/api/client/v2/api/undo.json | 30 + 30 files changed, 4477 insertions(+) create mode 100644 examples/v2/cloud-cost-management/GetCostAIPreferredTags.java create mode 100644 examples/v2/cloud-cost-management/GetCostSetting.java create mode 100644 examples/v2/cloud-cost-management/ListCostTagPipelineActiveKeys.java 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/CostAIPreferredTagsAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostSettingData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostSettingDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostSettingResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostSettingType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusType.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 440627d7e6b..ec3132be283 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1454,6 +1454,14 @@ components: schema: example: "my-service" type: string + SettingType: + description: The type of cost setting. + example: preferred_tags + in: path + name: setting_type + required: true + schema: + type: string SignalID: description: The ID of the signal. in: path @@ -15439,6 +15447,64 @@ components: data: $ref: "#/components/schemas/ConvertJobResultsToSignalsData" type: object + CostAIPreferredTagsAttributes: + description: Attributes for the preferred tags response. + properties: + message: + description: A contextual message about the preferred tags configuration. + example: No preferred tags are configured. + type: string + preferred_tags: + description: The list of preferred cost allocation tags. + example: + - "" + items: + description: A preferred tag key. + type: string + type: array + required: + - message + - preferred_tags + type: object + CostAIPreferredTagsData: + description: Preferred tags data object. + properties: + attributes: + $ref: "#/components/schemas/CostAIPreferredTagsAttributes" + id: + description: The unique identifier. + example: preferred_tags + type: string + type: + $ref: "#/components/schemas/CostAIPreferredTagsType" + required: + - id + - type + - attributes + type: object + CostAIPreferredTagsResponse: + description: Response containing preferred cost allocation tags for AI agents. + example: + data: + attributes: + message: No preferred tags are configured. + preferred_tags: [] + id: preferred_tags + type: preferred_tags + properties: + data: + $ref: "#/components/schemas/CostAIPreferredTagsData" + required: + - data + type: object + CostAIPreferredTagsType: + description: Preferred tags resource type. + enum: + - preferred_tags + example: preferred_tags + type: string + x-enum-varnames: + - PREFERRED_TAGS CostAggregationType: description: "Controls how costs are aggregated when using `start_date`. The `cumulative` option returns month-to-date running totals." enum: @@ -15556,6 +15622,148 @@ components: type: string x-enum-varnames: - COST_BY_ORG + CostSettingData: + description: Cost setting data object. + properties: + attributes: + $ref: "#/components/schemas/CostSettingDataAttributes" + id: + description: The unique identifier of the setting. + example: preferred_tags + type: string + type: + $ref: "#/components/schemas/CostSettingType" + required: + - id + - type + - attributes + type: object + CostSettingDataAttributes: + description: Attributes for a cost setting. + properties: + created_at: + description: The timestamp when the setting was created. + example: "" + type: string + created_by: + description: The UUID of the user who created the setting. + example: user-uuid + type: string + data: + additionalProperties: {} + description: The setting data as a flexible key-value map. + nullable: true + type: object + description: + description: A human-readable description of the setting. + example: User's preferred cost allocation tags. + type: string + last_modified_by: + description: The UUID of the user who last modified the setting. + example: user-uuid + type: string + setting_name: + description: The name of the setting. + example: preferred_tags + type: string + updated_at: + description: The timestamp when the setting was last updated. + example: "" + type: string + version: + description: The version of the setting. + example: "1" + type: string + required: + - created_at + - created_by + - description + - last_modified_by + - setting_name + - updated_at + - version + type: object + CostSettingResponse: + description: Response for a cost setting. + example: + data: + attributes: + created_at: "" + created_by: user-uuid + data: + description: User's preferred cost allocation tags. + last_modified_by: user-uuid + setting_name: preferred_tags + updated_at: "" + version: "1" + id: preferred_tags + type: setting + properties: + data: + $ref: "#/components/schemas/CostSettingData" + required: + - data + type: object + CostSettingType: + description: Cost setting resource type. + enum: + - setting + example: setting + type: string + x-enum-varnames: + - SETTING + CostTagPipelineActiveKeyAttributes: + description: Attributes for an active tag pipeline key. + properties: + rule_count: + description: The number of tag pipeline rules that set this tag key. + example: 3 + format: int64 + type: integer + required: + - rule_count + type: object + CostTagPipelineActiveKeyData: + description: Active tag key data object. + properties: + attributes: + $ref: "#/components/schemas/CostTagPipelineActiveKeyAttributes" + id: + description: The tag key name. + example: cost_center + type: string + type: + $ref: "#/components/schemas/CostTagPipelineActiveKeyType" + required: + - id + - type + - attributes + type: object + CostTagPipelineActiveKeyResponse: + description: List of tag keys actively set by tag pipeline rules. + example: + data: + - attributes: + rule_count: 3 + id: cost_center + type: active_tag_key + properties: + data: + description: List of active tag keys. + items: + $ref: "#/components/schemas/CostTagPipelineActiveKeyData" + type: array + required: + - data + type: object + CostTagPipelineActiveKeyType: + description: Active tag key resource type. + enum: + - active_tag_key + example: active_tag_key + type: string + x-enum-varnames: + - ACTIVE_TAG_KEY CoverageSummaryAttributes: description: Attributes object for code coverage summary response. properties: @@ -18348,6 +18556,57 @@ components: data: $ref: "#/components/schemas/CsmServerlessCoverageAnalysisData" type: object + CustomAllocationRuleStatusAttributes: + description: Attributes for a custom allocation rule status. + properties: + processing_status: + description: The processing status of the custom allocation rule. + example: done + type: string + required: + - processing_status + type: object + CustomAllocationRuleStatusData: + description: Custom allocation rule status data. + properties: + attributes: + $ref: "#/components/schemas/CustomAllocationRuleStatusAttributes" + id: + description: The unique identifier of the custom allocation rule. + example: "123" + type: string + type: + $ref: "#/components/schemas/CustomAllocationRuleStatusType" + required: + - id + - type + - attributes + type: object + CustomAllocationRuleStatusResponse: + description: List of custom allocation rule statuses. + example: + data: + - attributes: + processing_status: done + id: "123" + type: arbitrary_rule_status + properties: + data: + description: List of custom allocation rule statuses. + items: + $ref: "#/components/schemas/CustomAllocationRuleStatusData" + type: array + required: + - data + type: object + CustomAllocationRuleStatusType: + description: Custom allocation rule status resource type. + enum: + - arbitrary_rule_status + example: arbitrary_rule_status + type: string + x-enum-varnames: + - ARBITRARY_RULE_STATUS CustomAttributeConfig: description: The definition of `CustomAttributeConfig` object. properties: @@ -76454,6 +76713,57 @@ components: - type - id type: object + TagPipelinesRulesetStatusAttributes: + description: Attributes for a tag pipeline ruleset status. + properties: + processing_status: + description: The processing status of the ruleset. + example: pending + type: string + required: + - processing_status + type: object + TagPipelinesRulesetStatusData: + description: Tag pipeline ruleset status data. + properties: + attributes: + $ref: "#/components/schemas/TagPipelinesRulesetStatusAttributes" + id: + description: The unique identifier of the ruleset. + example: 55ef2385-9ae1-4410-90c4-5ac1b60fec10 + type: string + type: + $ref: "#/components/schemas/TagPipelinesRulesetStatusType" + required: + - id + - type + - attributes + type: object + TagPipelinesRulesetStatusResponse: + description: List of tag pipeline ruleset statuses. + example: + data: + - attributes: + processing_status: pending + id: blahblah + type: ruleset_status + properties: + data: + description: List of ruleset statuses. + items: + $ref: "#/components/schemas/TagPipelinesRulesetStatusData" + type: array + required: + - data + type: object + TagPipelinesRulesetStatusType: + description: Tag pipeline ruleset status resource type. + enum: + - ruleset_status + example: ruleset_status + type: string + x-enum-varnames: + - RULESET_STATUS TagsEventAttribute: description: Array of tags associated with your event. example: ["team:A"] @@ -94321,6 +94631,71 @@ paths: "x-permission": operator: OPEN permissions: [] + /api/v2/cost/ai/preferred_tags: + get: + description: Get the preferred cost allocation tags for AI agent use. Returns a simplified response with contextual messaging based on configuration status. + operationId: GetCostAIPreferredTags + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + message: No preferred tags are configured. + preferred_tags: [] + id: preferred_tags + type: preferred_tags + schema: + $ref: "#/components/schemas/CostAIPreferredTagsResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get preferred cost allocation tags + tags: + - Cloud Cost Management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/cost/ai/tag_pipelines/active_keys: + get: + description: List the tag keys that are actively set by tag pipeline rules, sorted by rule count in descending order. + operationId: ListCostTagPipelineActiveKeys + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + rule_count: 3 + id: cost_center + type: active_tag_key + schema: + $ref: "#/components/schemas/CostTagPipelineActiveKeyResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List active tag pipeline keys + tags: + - Cloud Cost Management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cost/arbitrary_rule: get: description: List all custom allocation rules - Retrieve a list of all custom allocation rules for the organization @@ -94513,6 +94888,38 @@ 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. + operationId: ListCustomAllocationRulesStatus + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + processing_status: done + id: "123" + type: arbitrary_rule_status + schema: + $ref: "#/components/schemas/CustomAllocationRuleStatusResponse" + 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 + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cost/arbitrary_rule/{rule_id}: delete: description: Delete a custom allocation rule - Delete an existing custom allocation rule by its ID @@ -96133,6 +96540,59 @@ paths: operator: OR permissions: - cloud_cost_management_read + /api/v2/cost/settings/{setting_type}: + get: + description: Get a specific cost management setting by type. + operationId: GetCostSetting + parameters: + - $ref: "#/components/parameters/SettingType" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "" + created_by: user-uuid + data: + description: User's preferred cost allocation tags. + last_modified_by: user-uuid + setting_name: preferred_tags + updated_at: "" + version: "1" + id: preferred_tags + type: setting + schema: + $ref: "#/components/schemas/CostSettingResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get cost setting + tags: + - Cloud Cost Management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cost_by_tag/active_billing_dimensions: get: description: |- @@ -140518,6 +140978,38 @@ 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. + operationId: ListTagPipelinesRulesetsStatus + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + processing_status: pending + id: blahblah + type: ruleset_status + schema: + $ref: "#/components/schemas/TagPipelinesRulesetStatusResponse" + 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 + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/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/GetCostAIPreferredTags.java b/examples/v2/cloud-cost-management/GetCostAIPreferredTags.java new file mode 100644 index 00000000000..2f274f0c04b --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostAIPreferredTags.java @@ -0,0 +1,25 @@ +// Get preferred cost allocation tags 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.CostAIPreferredTagsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getCostAIPreferredTags", true); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + CostAIPreferredTagsResponse result = apiInstance.getCostAIPreferredTags(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#getCostAIPreferredTags"); + 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/GetCostSetting.java b/examples/v2/cloud-cost-management/GetCostSetting.java new file mode 100644 index 00000000000..c343528c842 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostSetting.java @@ -0,0 +1,25 @@ +// Get cost setting 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.CostSettingResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getCostSetting", true); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + CostSettingResponse result = apiInstance.getCostSetting("preferred_tags"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#getCostSetting"); + 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/ListCostTagPipelineActiveKeys.java b/examples/v2/cloud-cost-management/ListCostTagPipelineActiveKeys.java new file mode 100644 index 00000000000..afe77160df2 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCostTagPipelineActiveKeys.java @@ -0,0 +1,26 @@ +// List active tag pipeline keys 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.CostTagPipelineActiveKeyResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listCostTagPipelineActiveKeys", true); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + CostTagPipelineActiveKeyResponse result = apiInstance.listCostTagPipelineActiveKeys(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling CloudCostManagementApi#listCostTagPipelineActiveKeys"); + 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/ListCustomAllocationRulesStatus.java b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java new file mode 100644 index 00000000000..9cb5422d2fa --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.java @@ -0,0 +1,26 @@ +// 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.CustomAllocationRuleStatusResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listCustomAllocationRulesStatus", true); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + CustomAllocationRuleStatusResponse 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..e93bab31c99 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.java @@ -0,0 +1,26 @@ +// 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.TagPipelinesRulesetStatusResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listTagPipelinesRulesetsStatus", true); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + TagPipelinesRulesetStatusResponse 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/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index e50cdd037c4..d8bbdb85ca2 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -859,6 +859,11 @@ public class ApiClient { put("v2.upsertSyncConfig", false); put("v2.getCodeCoverageBranchSummary", false); put("v2.getCodeCoverageCommitSummary", false); + put("v2.getCostAIPreferredTags", false); + put("v2.getCostSetting", false); + put("v2.listCostTagPipelineActiveKeys", false); + put("v2.listCustomAllocationRulesStatus", false); + put("v2.listTagPipelinesRulesetsStatus", false); put("v2.createDashboardSecureEmbed", false); put("v2.deleteDashboardSecureEmbed", false); put("v2.getDashboardSecureEmbed", false); 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..fba4dccdd0d 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 @@ -19,7 +19,11 @@ import com.datadog.api.client.v2.model.BudgetValidationRequest; import com.datadog.api.client.v2.model.BudgetValidationResponse; import com.datadog.api.client.v2.model.BudgetWithEntries; +import com.datadog.api.client.v2.model.CostAIPreferredTagsResponse; +import com.datadog.api.client.v2.model.CostSettingResponse; +import com.datadog.api.client.v2.model.CostTagPipelineActiveKeyResponse; import com.datadog.api.client.v2.model.CreateRulesetRequest; +import com.datadog.api.client.v2.model.CustomAllocationRuleStatusResponse; import com.datadog.api.client.v2.model.CustomCostsFileGetResponse; import com.datadog.api.client.v2.model.CustomCostsFileLineItem; import com.datadog.api.client.v2.model.CustomCostsFileListResponse; @@ -36,6 +40,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.TagPipelinesRulesetStatusResponse; import com.datadog.api.client.v2.model.UCConfigPair; import com.datadog.api.client.v2.model.UpdateRulesetRequest; import com.datadog.api.client.v2.model.ValidationResponse; @@ -1839,6 +1844,136 @@ public CompletableFuture> getBudgetWithHttpInfoAs new GenericType() {}); } + /** + * Get preferred cost allocation tags. + * + *

See {@link #getCostAIPreferredTagsWithHttpInfo}. + * + * @return CostAIPreferredTagsResponse + * @throws ApiException if fails to make API call + */ + public CostAIPreferredTagsResponse getCostAIPreferredTags() throws ApiException { + return getCostAIPreferredTagsWithHttpInfo().getData(); + } + + /** + * Get preferred cost allocation tags. + * + *

See {@link #getCostAIPreferredTagsWithHttpInfoAsync}. + * + * @return CompletableFuture<CostAIPreferredTagsResponse> + */ + public CompletableFuture getCostAIPreferredTagsAsync() { + return getCostAIPreferredTagsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the preferred cost allocation tags for AI agent use. Returns a simplified response with + * contextual messaging based on configuration status. + * + * @return ApiResponse<CostAIPreferredTagsResponse> + * @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 getCostAIPreferredTagsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getCostAIPreferredTags"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/ai/preferred_tags"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCostAIPreferredTags", + 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() {}); + } + + /** + * Get preferred cost allocation tags. + * + *

See {@link #getCostAIPreferredTagsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<CostAIPreferredTagsResponse>> + */ + public CompletableFuture> + getCostAIPreferredTagsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "getCostAIPreferredTags"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/ai/preferred_tags"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCostAIPreferredTags", + 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() {}); + } + /** * Get cost AWS CUR config. * @@ -2256,6 +2391,160 @@ public ApiResponse getCostGCPUsageCostConfigWithHttpInfo(Lo new GenericType() {}); } + /** + * Get cost setting. + * + *

See {@link #getCostSettingWithHttpInfo}. + * + * @param settingType The type of cost setting. (required) + * @return CostSettingResponse + * @throws ApiException if fails to make API call + */ + public CostSettingResponse getCostSetting(String settingType) throws ApiException { + return getCostSettingWithHttpInfo(settingType).getData(); + } + + /** + * Get cost setting. + * + *

See {@link #getCostSettingWithHttpInfoAsync}. + * + * @param settingType The type of cost setting. (required) + * @return CompletableFuture<CostSettingResponse> + */ + public CompletableFuture getCostSettingAsync(String settingType) { + return getCostSettingWithHttpInfoAsync(settingType) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a specific cost management setting by type. + * + * @param settingType The type of cost setting. (required) + * @return ApiResponse<CostSettingResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getCostSettingWithHttpInfo(String settingType) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getCostSetting"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'settingType' is set + if (settingType == null) { + throw new ApiException( + 400, "Missing the required parameter 'settingType' when calling getCostSetting"); + } + // create path and map variables + String localVarPath = + "/api/v2/cost/settings/{setting_type}" + .replaceAll( + "\\{" + "setting_type" + "\\}", apiClient.escapeString(settingType.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCostSetting", + 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() {}); + } + + /** + * Get cost setting. + * + *

See {@link #getCostSettingWithHttpInfo}. + * + * @param settingType The type of cost setting. (required) + * @return CompletableFuture<ApiResponse<CostSettingResponse>> + */ + public CompletableFuture> getCostSettingWithHttpInfoAsync( + String settingType) { + // Check if unstable operation is enabled + String operationId = "getCostSetting"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'settingType' is set + if (settingType == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'settingType' when calling getCostSetting")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cost/settings/{setting_type}" + .replaceAll( + "\\{" + "setting_type" + "\\}", apiClient.escapeString(settingType.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCostSetting", + 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() {}); + } + /** * Get custom allocation rule. * @@ -3209,6 +3498,136 @@ public CompletableFuture> listCostOCIConfigsWith new GenericType() {}); } + /** + * List active tag pipeline keys. + * + *

See {@link #listCostTagPipelineActiveKeysWithHttpInfo}. + * + * @return CostTagPipelineActiveKeyResponse + * @throws ApiException if fails to make API call + */ + public CostTagPipelineActiveKeyResponse listCostTagPipelineActiveKeys() throws ApiException { + return listCostTagPipelineActiveKeysWithHttpInfo().getData(); + } + + /** + * List active tag pipeline keys. + * + *

See {@link #listCostTagPipelineActiveKeysWithHttpInfoAsync}. + * + * @return CompletableFuture<CostTagPipelineActiveKeyResponse> + */ + public CompletableFuture listCostTagPipelineActiveKeysAsync() { + return listCostTagPipelineActiveKeysWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the tag keys that are actively set by tag pipeline rules, sorted by rule count in + * descending order. + * + * @return ApiResponse<CostTagPipelineActiveKeyResponse> + * @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 listCostTagPipelineActiveKeysWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listCostTagPipelineActiveKeys"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/ai/tag_pipelines/active_keys"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCostTagPipelineActiveKeys", + 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 active tag pipeline keys. + * + *

See {@link #listCostTagPipelineActiveKeysWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<CostTagPipelineActiveKeyResponse>> + */ + public CompletableFuture> + listCostTagPipelineActiveKeysWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listCostTagPipelineActiveKeys"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/ai/tag_pipelines/active_keys"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCostTagPipelineActiveKeys", + 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() {}); + } + /** * List custom allocation rules. * @@ -3320,6 +3739,136 @@ public ApiResponse listCustomAllocationRulesWithHttp new GenericType() {}); } + /** + * List custom allocation rule statuses. + * + *

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

See {@link #listCustomAllocationRulesStatusWithHttpInfoAsync}. + * + * @return CompletableFuture<CustomAllocationRuleStatusResponse> + */ + public CompletableFuture + listCustomAllocationRulesStatusAsync() { + return listCustomAllocationRulesStatusWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the processing status of all custom allocation rules. + * + * @return ApiResponse<CustomAllocationRuleStatusResponse> + * @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 { + // Check if unstable operation is enabled + String operationId = "listCustomAllocationRulesStatus"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // 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<CustomAllocationRuleStatusResponse>> + */ + public CompletableFuture> + listCustomAllocationRulesStatusWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listCustomAllocationRulesStatus"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // 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 +4231,136 @@ public ApiResponse listTagPipelinesRulesetsWithHttpInfo() thro new GenericType() {}); } + /** + * List tag pipeline ruleset statuses. + * + *

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

See {@link #listTagPipelinesRulesetsStatusWithHttpInfoAsync}. + * + * @return CompletableFuture<TagPipelinesRulesetStatusResponse> + */ + public CompletableFuture + listTagPipelinesRulesetsStatusAsync() { + return listTagPipelinesRulesetsStatusWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the processing status of all tag pipeline rulesets. + * + * @return ApiResponse<TagPipelinesRulesetStatusResponse> + * @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 { + // Check if unstable operation is enabled + String operationId = "listTagPipelinesRulesetsStatus"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // 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<TagPipelinesRulesetStatusResponse>> + */ + public CompletableFuture> + listTagPipelinesRulesetsStatusWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listTagPipelinesRulesetsStatus"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // 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/CostAIPreferredTagsAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsAttributes.java new file mode 100644 index 00000000000..6b34a90f280 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsAttributes.java @@ -0,0 +1,182 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Attributes for the preferred tags response. */ +@JsonPropertyOrder({ + CostAIPreferredTagsAttributes.JSON_PROPERTY_MESSAGE, + CostAIPreferredTagsAttributes.JSON_PROPERTY_PREFERRED_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostAIPreferredTagsAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_PREFERRED_TAGS = "preferred_tags"; + private List preferredTags = new ArrayList<>(); + + public CostAIPreferredTagsAttributes() {} + + @JsonCreator + public CostAIPreferredTagsAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(required = true, value = JSON_PROPERTY_PREFERRED_TAGS) + List preferredTags) { + this.message = message; + this.preferredTags = preferredTags; + } + + public CostAIPreferredTagsAttributes message(String message) { + this.message = message; + return this; + } + + /** + * A contextual message about the preferred tags configuration. + * + * @return message + */ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public CostAIPreferredTagsAttributes preferredTags(List preferredTags) { + this.preferredTags = preferredTags; + return this; + } + + public CostAIPreferredTagsAttributes addPreferredTagsItem(String preferredTagsItem) { + this.preferredTags.add(preferredTagsItem); + return this; + } + + /** + * The list of preferred cost allocation tags. + * + * @return preferredTags + */ + @JsonProperty(JSON_PROPERTY_PREFERRED_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPreferredTags() { + return preferredTags; + } + + public void setPreferredTags(List preferredTags) { + this.preferredTags = preferredTags; + } + + /** + * 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 CostAIPreferredTagsAttributes + */ + @JsonAnySetter + public CostAIPreferredTagsAttributes 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 CostAIPreferredTagsAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostAIPreferredTagsAttributes costAiPreferredTagsAttributes = (CostAIPreferredTagsAttributes) o; + return Objects.equals(this.message, costAiPreferredTagsAttributes.message) + && Objects.equals(this.preferredTags, costAiPreferredTagsAttributes.preferredTags) + && Objects.equals( + this.additionalProperties, costAiPreferredTagsAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(message, preferredTags, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostAIPreferredTagsAttributes {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" preferredTags: ").append(toIndentedString(preferredTags)).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/CostAIPreferredTagsData.java b/src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsData.java new file mode 100644 index 00000000000..762cce2b96c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsData.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; + +/** Preferred tags data object. */ +@JsonPropertyOrder({ + CostAIPreferredTagsData.JSON_PROPERTY_ATTRIBUTES, + CostAIPreferredTagsData.JSON_PROPERTY_ID, + CostAIPreferredTagsData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostAIPreferredTagsData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CostAIPreferredTagsAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CostAIPreferredTagsType type; + + public CostAIPreferredTagsData() {} + + @JsonCreator + public CostAIPreferredTagsData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CostAIPreferredTagsAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CostAIPreferredTagsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CostAIPreferredTagsData attributes(CostAIPreferredTagsAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for the preferred tags response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CostAIPreferredTagsAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CostAIPreferredTagsAttributes attributes) { + this.attributes = attributes; + } + + public CostAIPreferredTagsData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier. + * + * @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 CostAIPreferredTagsData type(CostAIPreferredTagsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Preferred tags resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CostAIPreferredTagsType getType() { + return type; + } + + public void setType(CostAIPreferredTagsType 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 CostAIPreferredTagsData + */ + @JsonAnySetter + public CostAIPreferredTagsData 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 CostAIPreferredTagsData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostAIPreferredTagsData costAiPreferredTagsData = (CostAIPreferredTagsData) o; + return Objects.equals(this.attributes, costAiPreferredTagsData.attributes) + && Objects.equals(this.id, costAiPreferredTagsData.id) + && Objects.equals(this.type, costAiPreferredTagsData.type) + && Objects.equals(this.additionalProperties, costAiPreferredTagsData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostAIPreferredTagsData {\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/CostAIPreferredTagsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsResponse.java new file mode 100644 index 00000000000..bd83d244f43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsResponse.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing preferred cost allocation tags for AI agents. */ +@JsonPropertyOrder({CostAIPreferredTagsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostAIPreferredTagsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CostAIPreferredTagsData data; + + public CostAIPreferredTagsResponse() {} + + @JsonCreator + public CostAIPreferredTagsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CostAIPreferredTagsData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CostAIPreferredTagsResponse data(CostAIPreferredTagsData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Preferred tags data object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CostAIPreferredTagsData getData() { + return data; + } + + public void setData(CostAIPreferredTagsData 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 CostAIPreferredTagsResponse + */ + @JsonAnySetter + public CostAIPreferredTagsResponse 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 CostAIPreferredTagsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostAIPreferredTagsResponse costAiPreferredTagsResponse = (CostAIPreferredTagsResponse) o; + return Objects.equals(this.data, costAiPreferredTagsResponse.data) + && Objects.equals( + this.additionalProperties, costAiPreferredTagsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostAIPreferredTagsResponse {\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/CostAIPreferredTagsType.java b/src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsType.java new file mode 100644 index 00000000000..adc06e027cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostAIPreferredTagsType.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; + +/** Preferred tags resource type. */ +@JsonSerialize(using = CostAIPreferredTagsType.CostAIPreferredTagsTypeSerializer.class) +public class CostAIPreferredTagsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("preferred_tags")); + + public static final CostAIPreferredTagsType PREFERRED_TAGS = + new CostAIPreferredTagsType("preferred_tags"); + + CostAIPreferredTagsType(String value) { + super(value, allowedValues); + } + + public static class CostAIPreferredTagsTypeSerializer + extends StdSerializer { + public CostAIPreferredTagsTypeSerializer(Class t) { + super(t); + } + + public CostAIPreferredTagsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CostAIPreferredTagsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CostAIPreferredTagsType fromValue(String value) { + return new CostAIPreferredTagsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CostSettingData.java b/src/main/java/com/datadog/api/client/v2/model/CostSettingData.java new file mode 100644 index 00000000000..097e9e44814 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostSettingData.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; + +/** Cost setting data object. */ +@JsonPropertyOrder({ + CostSettingData.JSON_PROPERTY_ATTRIBUTES, + CostSettingData.JSON_PROPERTY_ID, + CostSettingData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostSettingData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CostSettingDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CostSettingType type; + + public CostSettingData() {} + + @JsonCreator + public CostSettingData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CostSettingDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CostSettingType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CostSettingData attributes(CostSettingDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for a cost setting. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CostSettingDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CostSettingDataAttributes attributes) { + this.attributes = attributes; + } + + public CostSettingData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the setting. + * + * @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 CostSettingData type(CostSettingType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Cost setting resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CostSettingType getType() { + return type; + } + + public void setType(CostSettingType 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 CostSettingData + */ + @JsonAnySetter + public CostSettingData 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 CostSettingData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostSettingData costSettingData = (CostSettingData) o; + return Objects.equals(this.attributes, costSettingData.attributes) + && Objects.equals(this.id, costSettingData.id) + && Objects.equals(this.type, costSettingData.type) + && Objects.equals(this.additionalProperties, costSettingData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostSettingData {\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/CostSettingDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CostSettingDataAttributes.java new file mode 100644 index 00000000000..939f046c648 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostSettingDataAttributes.java @@ -0,0 +1,373 @@ +/* + * 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; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes for a cost setting. */ +@JsonPropertyOrder({ + CostSettingDataAttributes.JSON_PROPERTY_CREATED_AT, + CostSettingDataAttributes.JSON_PROPERTY_CREATED_BY, + CostSettingDataAttributes.JSON_PROPERTY_DATA, + CostSettingDataAttributes.JSON_PROPERTY_DESCRIPTION, + CostSettingDataAttributes.JSON_PROPERTY_LAST_MODIFIED_BY, + CostSettingDataAttributes.JSON_PROPERTY_SETTING_NAME, + CostSettingDataAttributes.JSON_PROPERTY_UPDATED_AT, + CostSettingDataAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostSettingDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private String createdBy; + + public static final String JSON_PROPERTY_DATA = "data"; + private JsonNullable> data = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY = "last_modified_by"; + private String lastModifiedBy; + + public static final String JSON_PROPERTY_SETTING_NAME = "setting_name"; + private String settingName; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public CostSettingDataAttributes() {} + + @JsonCreator + public CostSettingDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) String createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY) String createdBy, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_LAST_MODIFIED_BY) String lastModifiedBy, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTING_NAME) String settingName, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) String updatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) String version) { + this.createdAt = createdAt; + this.createdBy = createdBy; + this.description = description; + this.lastModifiedBy = lastModifiedBy; + this.settingName = settingName; + this.updatedAt = updatedAt; + this.version = version; + } + + public CostSettingDataAttributes createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the setting was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public CostSettingDataAttributes createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * The UUID of the user who created the setting. + * + * @return createdBy + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public CostSettingDataAttributes data(Map data) { + this.data = JsonNullable.>of(data); + return this; + } + + public CostSettingDataAttributes putDataItem(String key, Object dataItem) { + if (this.data == null || !this.data.isPresent()) { + this.data = JsonNullable.>of(new HashMap<>()); + } + try { + this.data.get().put(key, dataItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The setting data as a flexible key-value map. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Map getData() { + return data.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getData_JsonNullable() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + public void setData_JsonNullable(JsonNullable> data) { + this.data = data; + } + + public void setData(Map data) { + this.data = JsonNullable.>of(data); + } + + public CostSettingDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * A human-readable description of the setting. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public CostSettingDataAttributes lastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + * The UUID of the user who last modified the setting. + * + * @return lastModifiedBy + */ + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public CostSettingDataAttributes settingName(String settingName) { + this.settingName = settingName; + return this; + } + + /** + * The name of the setting. + * + * @return settingName + */ + @JsonProperty(JSON_PROPERTY_SETTING_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSettingName() { + return settingName; + } + + public void setSettingName(String settingName) { + this.settingName = settingName; + } + + public CostSettingDataAttributes updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The timestamp when the setting was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + public CostSettingDataAttributes version(String version) { + this.version = version; + return this; + } + + /** + * The version of the setting. + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * 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 CostSettingDataAttributes + */ + @JsonAnySetter + public CostSettingDataAttributes 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 CostSettingDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostSettingDataAttributes costSettingDataAttributes = (CostSettingDataAttributes) o; + return Objects.equals(this.createdAt, costSettingDataAttributes.createdAt) + && Objects.equals(this.createdBy, costSettingDataAttributes.createdBy) + && Objects.equals(this.data, costSettingDataAttributes.data) + && Objects.equals(this.description, costSettingDataAttributes.description) + && Objects.equals(this.lastModifiedBy, costSettingDataAttributes.lastModifiedBy) + && Objects.equals(this.settingName, costSettingDataAttributes.settingName) + && Objects.equals(this.updatedAt, costSettingDataAttributes.updatedAt) + && Objects.equals(this.version, costSettingDataAttributes.version) + && Objects.equals( + this.additionalProperties, costSettingDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdBy, + data, + description, + lastModifiedBy, + settingName, + updatedAt, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostSettingDataAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" lastModifiedBy: ").append(toIndentedString(lastModifiedBy)).append("\n"); + sb.append(" settingName: ").append(toIndentedString(settingName)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/CostSettingResponse.java b/src/main/java/com/datadog/api/client/v2/model/CostSettingResponse.java new file mode 100644 index 00000000000..f0c2da3a0c4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostSettingResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response for a cost setting. */ +@JsonPropertyOrder({CostSettingResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostSettingResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CostSettingData data; + + public CostSettingResponse() {} + + @JsonCreator + public CostSettingResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CostSettingData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CostSettingResponse data(CostSettingData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Cost setting data object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CostSettingData getData() { + return data; + } + + public void setData(CostSettingData 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 CostSettingResponse + */ + @JsonAnySetter + public CostSettingResponse 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 CostSettingResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostSettingResponse costSettingResponse = (CostSettingResponse) o; + return Objects.equals(this.data, costSettingResponse.data) + && Objects.equals(this.additionalProperties, costSettingResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostSettingResponse {\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/CostSettingType.java b/src/main/java/com/datadog/api/client/v2/model/CostSettingType.java new file mode 100644 index 00000000000..574d4f56572 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostSettingType.java @@ -0,0 +1,53 @@ +/* + * 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; + +/** Cost setting resource type. */ +@JsonSerialize(using = CostSettingType.CostSettingTypeSerializer.class) +public class CostSettingType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("setting")); + + public static final CostSettingType SETTING = new CostSettingType("setting"); + + CostSettingType(String value) { + super(value, allowedValues); + } + + public static class CostSettingTypeSerializer extends StdSerializer { + public CostSettingTypeSerializer(Class t) { + super(t); + } + + public CostSettingTypeSerializer() { + this(null); + } + + @Override + public void serialize(CostSettingType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CostSettingType fromValue(String value) { + return new CostSettingType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyAttributes.java new file mode 100644 index 00000000000..1bdcfef6cd1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyAttributes.java @@ -0,0 +1,145 @@ +/* + * 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 an active tag pipeline key. */ +@JsonPropertyOrder({CostTagPipelineActiveKeyAttributes.JSON_PROPERTY_RULE_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostTagPipelineActiveKeyAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RULE_COUNT = "rule_count"; + private Long ruleCount; + + public CostTagPipelineActiveKeyAttributes() {} + + @JsonCreator + public CostTagPipelineActiveKeyAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RULE_COUNT) Long ruleCount) { + this.ruleCount = ruleCount; + } + + public CostTagPipelineActiveKeyAttributes ruleCount(Long ruleCount) { + this.ruleCount = ruleCount; + return this; + } + + /** + * The number of tag pipeline rules that set this tag key. + * + * @return ruleCount + */ + @JsonProperty(JSON_PROPERTY_RULE_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getRuleCount() { + return ruleCount; + } + + public void setRuleCount(Long ruleCount) { + this.ruleCount = ruleCount; + } + + /** + * 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 CostTagPipelineActiveKeyAttributes + */ + @JsonAnySetter + public CostTagPipelineActiveKeyAttributes 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 CostTagPipelineActiveKeyAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostTagPipelineActiveKeyAttributes costTagPipelineActiveKeyAttributes = + (CostTagPipelineActiveKeyAttributes) o; + return Objects.equals(this.ruleCount, costTagPipelineActiveKeyAttributes.ruleCount) + && Objects.equals( + this.additionalProperties, costTagPipelineActiveKeyAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ruleCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostTagPipelineActiveKeyAttributes {\n"); + sb.append(" ruleCount: ").append(toIndentedString(ruleCount)).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/CostTagPipelineActiveKeyData.java b/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyData.java new file mode 100644 index 00000000000..ee078cd4b48 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyData.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Active tag key data object. */ +@JsonPropertyOrder({ + CostTagPipelineActiveKeyData.JSON_PROPERTY_ATTRIBUTES, + CostTagPipelineActiveKeyData.JSON_PROPERTY_ID, + CostTagPipelineActiveKeyData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostTagPipelineActiveKeyData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CostTagPipelineActiveKeyAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CostTagPipelineActiveKeyType type; + + public CostTagPipelineActiveKeyData() {} + + @JsonCreator + public CostTagPipelineActiveKeyData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CostTagPipelineActiveKeyAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + CostTagPipelineActiveKeyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CostTagPipelineActiveKeyData attributes(CostTagPipelineActiveKeyAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for an active tag pipeline key. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CostTagPipelineActiveKeyAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CostTagPipelineActiveKeyAttributes attributes) { + this.attributes = attributes; + } + + public CostTagPipelineActiveKeyData id(String id) { + this.id = id; + return this; + } + + /** + * The tag key name. + * + * @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 CostTagPipelineActiveKeyData type(CostTagPipelineActiveKeyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Active tag key resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CostTagPipelineActiveKeyType getType() { + return type; + } + + public void setType(CostTagPipelineActiveKeyType 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 CostTagPipelineActiveKeyData + */ + @JsonAnySetter + public CostTagPipelineActiveKeyData 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 CostTagPipelineActiveKeyData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostTagPipelineActiveKeyData costTagPipelineActiveKeyData = (CostTagPipelineActiveKeyData) o; + return Objects.equals(this.attributes, costTagPipelineActiveKeyData.attributes) + && Objects.equals(this.id, costTagPipelineActiveKeyData.id) + && Objects.equals(this.type, costTagPipelineActiveKeyData.type) + && Objects.equals( + this.additionalProperties, costTagPipelineActiveKeyData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostTagPipelineActiveKeyData {\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/CostTagPipelineActiveKeyResponse.java b/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyResponse.java new file mode 100644 index 00000000000..f3445355b8f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyResponse.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; + +/** List of tag keys actively set by tag pipeline rules. */ +@JsonPropertyOrder({CostTagPipelineActiveKeyResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CostTagPipelineActiveKeyResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public CostTagPipelineActiveKeyResponse() {} + + @JsonCreator + public CostTagPipelineActiveKeyResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public CostTagPipelineActiveKeyResponse data(List data) { + this.data = data; + for (CostTagPipelineActiveKeyData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CostTagPipelineActiveKeyResponse addDataItem(CostTagPipelineActiveKeyData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of active tag keys. + * + * @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 CostTagPipelineActiveKeyResponse + */ + @JsonAnySetter + public CostTagPipelineActiveKeyResponse 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 CostTagPipelineActiveKeyResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CostTagPipelineActiveKeyResponse costTagPipelineActiveKeyResponse = + (CostTagPipelineActiveKeyResponse) o; + return Objects.equals(this.data, costTagPipelineActiveKeyResponse.data) + && Objects.equals( + this.additionalProperties, costTagPipelineActiveKeyResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CostTagPipelineActiveKeyResponse {\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/CostTagPipelineActiveKeyType.java b/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyType.java new file mode 100644 index 00000000000..2779e80bee5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CostTagPipelineActiveKeyType.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; + +/** Active tag key resource type. */ +@JsonSerialize(using = CostTagPipelineActiveKeyType.CostTagPipelineActiveKeyTypeSerializer.class) +public class CostTagPipelineActiveKeyType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("active_tag_key")); + + public static final CostTagPipelineActiveKeyType ACTIVE_TAG_KEY = + new CostTagPipelineActiveKeyType("active_tag_key"); + + CostTagPipelineActiveKeyType(String value) { + super(value, allowedValues); + } + + public static class CostTagPipelineActiveKeyTypeSerializer + extends StdSerializer { + public CostTagPipelineActiveKeyTypeSerializer(Class t) { + super(t); + } + + public CostTagPipelineActiveKeyTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CostTagPipelineActiveKeyType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CostTagPipelineActiveKeyType fromValue(String value) { + return new CostTagPipelineActiveKeyType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusAttributes.java new file mode 100644 index 00000000000..0faa8886b79 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusAttributes.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for a custom allocation rule status. */ +@JsonPropertyOrder({CustomAllocationRuleStatusAttributes.JSON_PROPERTY_PROCESSING_STATUS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomAllocationRuleStatusAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PROCESSING_STATUS = "processing_status"; + private String processingStatus; + + public CustomAllocationRuleStatusAttributes() {} + + @JsonCreator + public CustomAllocationRuleStatusAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PROCESSING_STATUS) + String processingStatus) { + this.processingStatus = processingStatus; + } + + public CustomAllocationRuleStatusAttributes 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 CustomAllocationRuleStatusAttributes + */ + @JsonAnySetter + public CustomAllocationRuleStatusAttributes 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 CustomAllocationRuleStatusAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomAllocationRuleStatusAttributes customAllocationRuleStatusAttributes = + (CustomAllocationRuleStatusAttributes) o; + return Objects.equals( + this.processingStatus, customAllocationRuleStatusAttributes.processingStatus) + && Objects.equals( + this.additionalProperties, customAllocationRuleStatusAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(processingStatus, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomAllocationRuleStatusAttributes {\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/CustomAllocationRuleStatusData.java b/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusData.java new file mode 100644 index 00000000000..3932a8e38ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusData.java @@ -0,0 +1,213 @@ +/* + * 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; + +/** Custom allocation rule status data. */ +@JsonPropertyOrder({ + CustomAllocationRuleStatusData.JSON_PROPERTY_ATTRIBUTES, + CustomAllocationRuleStatusData.JSON_PROPERTY_ID, + CustomAllocationRuleStatusData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomAllocationRuleStatusData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CustomAllocationRuleStatusAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CustomAllocationRuleStatusType type; + + public CustomAllocationRuleStatusData() {} + + @JsonCreator + public CustomAllocationRuleStatusData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CustomAllocationRuleStatusAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + CustomAllocationRuleStatusType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CustomAllocationRuleStatusData attributes( + CustomAllocationRuleStatusAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for a custom allocation rule status. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomAllocationRuleStatusAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CustomAllocationRuleStatusAttributes attributes) { + this.attributes = attributes; + } + + public CustomAllocationRuleStatusData 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 CustomAllocationRuleStatusData type(CustomAllocationRuleStatusType 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 CustomAllocationRuleStatusType getType() { + return type; + } + + public void setType(CustomAllocationRuleStatusType 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 CustomAllocationRuleStatusData + */ + @JsonAnySetter + public CustomAllocationRuleStatusData 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 CustomAllocationRuleStatusData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomAllocationRuleStatusData customAllocationRuleStatusData = + (CustomAllocationRuleStatusData) o; + return Objects.equals(this.attributes, customAllocationRuleStatusData.attributes) + && Objects.equals(this.id, customAllocationRuleStatusData.id) + && Objects.equals(this.type, customAllocationRuleStatusData.type) + && Objects.equals( + this.additionalProperties, customAllocationRuleStatusData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomAllocationRuleStatusData {\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/CustomAllocationRuleStatusResponse.java b/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusResponse.java new file mode 100644 index 00000000000..614921d49ac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusResponse.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; + +/** List of custom allocation rule statuses. */ +@JsonPropertyOrder({CustomAllocationRuleStatusResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomAllocationRuleStatusResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public CustomAllocationRuleStatusResponse() {} + + @JsonCreator + public CustomAllocationRuleStatusResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public CustomAllocationRuleStatusResponse data(List data) { + this.data = data; + for (CustomAllocationRuleStatusData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CustomAllocationRuleStatusResponse addDataItem(CustomAllocationRuleStatusData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of custom allocation rule statuses. + * + * @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 CustomAllocationRuleStatusResponse + */ + @JsonAnySetter + public CustomAllocationRuleStatusResponse 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 CustomAllocationRuleStatusResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomAllocationRuleStatusResponse customAllocationRuleStatusResponse = + (CustomAllocationRuleStatusResponse) o; + return Objects.equals(this.data, customAllocationRuleStatusResponse.data) + && Objects.equals( + this.additionalProperties, customAllocationRuleStatusResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomAllocationRuleStatusResponse {\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/CustomAllocationRuleStatusType.java b/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusType.java new file mode 100644 index 00000000000..f601237859b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomAllocationRuleStatusType.java @@ -0,0 +1,58 @@ +/* + * 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 = CustomAllocationRuleStatusType.CustomAllocationRuleStatusTypeSerializer.class) +public class CustomAllocationRuleStatusType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("arbitrary_rule_status")); + + public static final CustomAllocationRuleStatusType ARBITRARY_RULE_STATUS = + new CustomAllocationRuleStatusType("arbitrary_rule_status"); + + CustomAllocationRuleStatusType(String value) { + super(value, allowedValues); + } + + public static class CustomAllocationRuleStatusTypeSerializer + extends StdSerializer { + public CustomAllocationRuleStatusTypeSerializer(Class t) { + super(t); + } + + public CustomAllocationRuleStatusTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CustomAllocationRuleStatusType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CustomAllocationRuleStatusType fromValue(String value) { + return new CustomAllocationRuleStatusType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusAttributes.java new file mode 100644 index 00000000000..4a12ea2d8e0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusAttributes.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for a tag pipeline ruleset status. */ +@JsonPropertyOrder({TagPipelinesRulesetStatusAttributes.JSON_PROPERTY_PROCESSING_STATUS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPipelinesRulesetStatusAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PROCESSING_STATUS = "processing_status"; + private String processingStatus; + + public TagPipelinesRulesetStatusAttributes() {} + + @JsonCreator + public TagPipelinesRulesetStatusAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PROCESSING_STATUS) + String processingStatus) { + this.processingStatus = processingStatus; + } + + public TagPipelinesRulesetStatusAttributes 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 TagPipelinesRulesetStatusAttributes + */ + @JsonAnySetter + public TagPipelinesRulesetStatusAttributes 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 TagPipelinesRulesetStatusAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPipelinesRulesetStatusAttributes tagPipelinesRulesetStatusAttributes = + (TagPipelinesRulesetStatusAttributes) o; + return Objects.equals( + this.processingStatus, tagPipelinesRulesetStatusAttributes.processingStatus) + && Objects.equals( + this.additionalProperties, tagPipelinesRulesetStatusAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(processingStatus, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPipelinesRulesetStatusAttributes {\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/TagPipelinesRulesetStatusData.java b/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusData.java new file mode 100644 index 00000000000..e1e3362d304 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusData.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Tag pipeline ruleset status data. */ +@JsonPropertyOrder({ + TagPipelinesRulesetStatusData.JSON_PROPERTY_ATTRIBUTES, + TagPipelinesRulesetStatusData.JSON_PROPERTY_ID, + TagPipelinesRulesetStatusData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPipelinesRulesetStatusData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagPipelinesRulesetStatusAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagPipelinesRulesetStatusType type; + + public TagPipelinesRulesetStatusData() {} + + @JsonCreator + public TagPipelinesRulesetStatusData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TagPipelinesRulesetStatusAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + TagPipelinesRulesetStatusType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagPipelinesRulesetStatusData attributes(TagPipelinesRulesetStatusAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for a tag pipeline ruleset status. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPipelinesRulesetStatusAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagPipelinesRulesetStatusAttributes attributes) { + this.attributes = attributes; + } + + public TagPipelinesRulesetStatusData 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 TagPipelinesRulesetStatusData type(TagPipelinesRulesetStatusType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Tag pipeline ruleset status resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPipelinesRulesetStatusType getType() { + return type; + } + + public void setType(TagPipelinesRulesetStatusType 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 TagPipelinesRulesetStatusData + */ + @JsonAnySetter + public TagPipelinesRulesetStatusData 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 TagPipelinesRulesetStatusData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPipelinesRulesetStatusData tagPipelinesRulesetStatusData = (TagPipelinesRulesetStatusData) o; + return Objects.equals(this.attributes, tagPipelinesRulesetStatusData.attributes) + && Objects.equals(this.id, tagPipelinesRulesetStatusData.id) + && Objects.equals(this.type, tagPipelinesRulesetStatusData.type) + && Objects.equals( + this.additionalProperties, tagPipelinesRulesetStatusData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPipelinesRulesetStatusData {\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/TagPipelinesRulesetStatusResponse.java b/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusResponse.java new file mode 100644 index 00000000000..8a34b326884 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusResponse.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; + +/** List of tag pipeline ruleset statuses. */ +@JsonPropertyOrder({TagPipelinesRulesetStatusResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPipelinesRulesetStatusResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public TagPipelinesRulesetStatusResponse() {} + + @JsonCreator + public TagPipelinesRulesetStatusResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public TagPipelinesRulesetStatusResponse data(List data) { + this.data = data; + for (TagPipelinesRulesetStatusData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public TagPipelinesRulesetStatusResponse addDataItem(TagPipelinesRulesetStatusData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of ruleset statuses. + * + * @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 TagPipelinesRulesetStatusResponse + */ + @JsonAnySetter + public TagPipelinesRulesetStatusResponse 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 TagPipelinesRulesetStatusResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPipelinesRulesetStatusResponse tagPipelinesRulesetStatusResponse = + (TagPipelinesRulesetStatusResponse) o; + return Objects.equals(this.data, tagPipelinesRulesetStatusResponse.data) + && Objects.equals( + this.additionalProperties, tagPipelinesRulesetStatusResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPipelinesRulesetStatusResponse {\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/TagPipelinesRulesetStatusType.java b/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusType.java new file mode 100644 index 00000000000..8b87ac3df5d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPipelinesRulesetStatusType.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; + +/** Tag pipeline ruleset status resource type. */ +@JsonSerialize(using = TagPipelinesRulesetStatusType.TagPipelinesRulesetStatusTypeSerializer.class) +public class TagPipelinesRulesetStatusType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ruleset_status")); + + public static final TagPipelinesRulesetStatusType RULESET_STATUS = + new TagPipelinesRulesetStatusType("ruleset_status"); + + TagPipelinesRulesetStatusType(String value) { + super(value, allowedValues); + } + + public static class TagPipelinesRulesetStatusTypeSerializer + extends StdSerializer { + public TagPipelinesRulesetStatusTypeSerializer(Class t) { + super(t); + } + + public TagPipelinesRulesetStatusTypeSerializer() { + this(null); + } + + @Override + public void serialize( + TagPipelinesRulesetStatusType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagPipelinesRulesetStatusType fromValue(String value) { + return new TagPipelinesRulesetStatusType(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..49cde4dfa22 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 @@ -292,6 +292,30 @@ Feature: Cloud Cost Management And the response "data.attributes.configs[0].dataset_type" is equal to "amortized" And the response "data.attributes.configs[1].dataset_type" is equal to "actual" + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get cost setting returns "Bad Request" response + Given operation "GetCostSetting" enabled + And new "GetCostSetting" request + And request contains "setting_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get cost setting returns "Not Found" response + Given operation "GetCostSetting" enabled + And new "GetCostSetting" request + And request contains "setting_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get cost setting returns "OK" response + Given operation "GetCostSetting" enabled + And new "GetCostSetting" request + And request contains "setting_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: Get custom allocation rule returns "OK" response Given new "GetCustomAllocationRule" request @@ -299,6 +323,13 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get preferred cost allocation tags returns "OK" response + Given operation "GetCostAIPreferredTags" enabled + And new "GetCostAIPreferredTags" request + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: List Cloud Cost Management AWS CUR configs returns "OK" response Given new "ListCostAWSCURConfigs" request @@ -345,12 +376,26 @@ 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 active tag pipeline keys returns "OK" response + Given operation "ListCostTagPipelineActiveKeys" enabled + And new "ListCostTagPipelineActiveKeys" request + When the request is sent + Then the response status is 200 OK + @team:DataDog/cloud-cost-management Scenario: List budgets returns "OK" response Given new "ListBudgets" request 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 operation "ListCustomAllocationRulesStatus" enabled + And 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 +403,13 @@ 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 operation "ListTagPipelinesRulesetsStatus" enabled + And 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 d5a8323e270..b1a5715ec67 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 @@ -1265,6 +1265,18 @@ "type": "safe" } }, + "GetCostAIPreferredTags": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "ListCostTagPipelineActiveKeys": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ListCustomAllocationRules": { "tag": "Cloud Cost Management", "undo": { @@ -1283,6 +1295,12 @@ "type": "idempotent" } }, + "ListCustomAllocationRulesStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "DeleteCustomAllocationRule": { "tag": "Cloud Cost Management", "undo": { @@ -1464,6 +1482,12 @@ "type": "safe" } }, + "GetCostSetting": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "GetActiveBillingDimensions": { "tag": "Usage Metering", "undo": { @@ -6697,6 +6721,12 @@ "type": "idempotent" } }, + "ListTagPipelinesRulesetsStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ValidateQuery": { "tag": "Cloud Cost Management", "undo": {