diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 1cc4bc550f8..6dd9ff7fdd0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -14146,7 +14146,9 @@ components: type: string id: description: The unique identifier for the unit. - type: string + example: 42 + format: int64 + type: integer name: description: The full name of the unit. type: string @@ -144312,7 +144314,7 @@ paths: costs_period_start: 1738281600000 costs_unit: family: currency - id: "1" + id: 42 name: dollar plural: dollars scale_factor: 1.0 diff --git a/examples/v2/cloud-cost-management/UpsertBudget.java b/examples/v2/cloud-cost-management/UpsertBudget.java index 30c5bde1a6b..a75d4e0f66a 100644 --- a/examples/v2/cloud-cost-management/UpsertBudget.java +++ b/examples/v2/cloud-cost-management/UpsertBudget.java @@ -30,7 +30,7 @@ public static void main(String[] args) { .amount(null) .forecast(null) .ootbForecast(null)) - .costsUnit(new BudgetAttributesCostsUnit()) + .costsUnit(new BudgetAttributesCostsUnit().id(42L)) .createdAt(1738258683590L) .createdBy("00000000-0a0a-0a0a-aaa0-00000000000a") .endMonth(202502L) diff --git a/src/main/java/com/datadog/api/client/v2/model/BudgetAttributesCostsUnit.java b/src/main/java/com/datadog/api/client/v2/model/BudgetAttributesCostsUnit.java index 04429537ea7..5b459926abd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/BudgetAttributesCostsUnit.java +++ b/src/main/java/com/datadog/api/client/v2/model/BudgetAttributesCostsUnit.java @@ -33,7 +33,7 @@ public class BudgetAttributesCostsUnit { private String family; public static final String JSON_PROPERTY_ID = "id"; - private String id; + private Long id; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -68,7 +68,7 @@ public void setFamily(String family) { this.family = family; } - public BudgetAttributesCostsUnit id(String id) { + public BudgetAttributesCostsUnit id(Long id) { this.id = id; return this; } @@ -81,11 +81,11 @@ public BudgetAttributesCostsUnit id(String id) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { + public Long getId() { return id; } - public void setId(String id) { + public void setId(Long id) { this.id = id; } 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 5ee6a17dce0..aa7365ed633 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 @@ -107,21 +107,21 @@ Feature: Cloud Cost Management @generated @skip @team:DataDog/cloud-cost-management Scenario: Create or update a budget returns "Bad Request" response Given new "UpsertBudget" request - And body with value {"data": {"attributes": {"costs": {"actual": null, "amount": null, "forecast": null, "ootb_forecast": null}, "costs_unit": {}, "created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"costs": {"actual": null, "amount": null, "custom_forecast": null, "forecast": null, "ootb_forecast": null}, "tag_filters": [{}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a", "type": ""}} + And body with value {"data": {"attributes": {"costs": {"actual": null, "amount": null, "forecast": null, "ootb_forecast": null}, "costs_unit": {"id": 42}, "created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"costs": {"actual": null, "amount": null, "custom_forecast": null, "forecast": null, "ootb_forecast": null}, "tag_filters": [{}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a", "type": ""}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/cloud-cost-management Scenario: Create or update a budget returns "Not Found" response Given new "UpsertBudget" request - And body with value {"data": {"attributes": {"costs": {"actual": null, "amount": null, "forecast": null, "ootb_forecast": null}, "costs_unit": {}, "created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"costs": {"actual": null, "amount": null, "custom_forecast": null, "forecast": null, "ootb_forecast": null}, "tag_filters": [{}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a", "type": ""}} + And body with value {"data": {"attributes": {"costs": {"actual": null, "amount": null, "forecast": null, "ootb_forecast": null}, "costs_unit": {"id": 42}, "created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"costs": {"actual": null, "amount": null, "custom_forecast": null, "forecast": null, "ootb_forecast": null}, "tag_filters": [{}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a", "type": ""}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/cloud-cost-management Scenario: Create or update a budget returns "OK" response Given new "UpsertBudget" request - And body with value {"data": {"attributes": {"costs": {"actual": null, "amount": null, "forecast": null, "ootb_forecast": null}, "costs_unit": {}, "created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"costs": {"actual": null, "amount": null, "custom_forecast": null, "forecast": null, "ootb_forecast": null}, "tag_filters": [{}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a", "type": ""}} + And body with value {"data": {"attributes": {"costs": {"actual": null, "amount": null, "forecast": null, "ootb_forecast": null}, "costs_unit": {"id": 42}, "created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"costs": {"actual": null, "amount": null, "custom_forecast": null, "forecast": null, "ootb_forecast": null}, "tag_filters": [{}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a", "type": ""}} When the request is sent Then the response status is 200 OK