From 46416e2479aa68df09615ec9426aa67143dc1f4b Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 27 Aug 2025 13:51:42 +0000 Subject: [PATCH] Regenerate client from commit 2011bb0 of spec repo --- .generated-info | 4 +-- .generator/schemas/v2/openapi.yaml | 12 +++++++ .../CreateDataDeletionRequest.java | 1 + ...eateDataDeletionRequestBodyAttributes.java | 33 +++++++++++++++++-- .../DataDeletionResponseItemAttributes.java | 29 ++++++++++++++++ .../api/client/v2/api/data_deletion.feature | 6 ++-- .../com/datadog/api/client/v2/api/given.json | 2 +- 7 files changed, 79 insertions(+), 8 deletions(-) diff --git a/.generated-info b/.generated-info index 66145f566eb..4ee3666b043 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "98e3371", - "generated": "2025-08-27 08:46:33.176" + "spec_repo_commit": "2011bb0", + "generated": "2025-08-27 13:51:41.806" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7d9ee66a127..c1ff03f18c4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -10662,6 +10662,11 @@ components: CreateDataDeletionRequestBodyAttributes: description: Attributes for creating a data deletion request. properties: + displayed_total: + description: Total number of elements to be deleted according to the UI. + example: 25000 + format: int64 + type: integer from: description: Start of requested time window, milliseconds since Unix epoch. example: 1672527600000 @@ -10694,6 +10699,7 @@ components: - query - from - to + - displayed_total type: object CreateDataDeletionRequestBodyData: description: Data needed to create a data deletion request. @@ -12900,6 +12906,11 @@ components: description: User who created the deletion request. example: test.user@datadoghq.com type: string + displayed_total: + description: Total number of elements to be deleted according to the UI. + example: 25000 + format: int64 + type: integer from_time: description: Start of requested time window, milliseconds since Unix epoch. example: 1672527600000 @@ -12961,6 +12972,7 @@ components: required: - created_at - created_by + - displayed_total - from_time - is_created - org_id diff --git a/examples/v2/data-deletion/CreateDataDeletionRequest.java b/examples/v2/data-deletion/CreateDataDeletionRequest.java index 5956e6b610f..da6503df570 100644 --- a/examples/v2/data-deletion/CreateDataDeletionRequest.java +++ b/examples/v2/data-deletion/CreateDataDeletionRequest.java @@ -23,6 +23,7 @@ public static void main(String[] args) { new CreateDataDeletionRequestBodyData() .attributes( new CreateDataDeletionRequestBodyAttributes() + .displayedTotal(25000L) .from(1672527600000L) .indexes(Arrays.asList("test-index", "test-index-2")) .query( diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDataDeletionRequestBodyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateDataDeletionRequestBodyAttributes.java index 7a721d56beb..9361ccf11ea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateDataDeletionRequestBodyAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateDataDeletionRequestBodyAttributes.java @@ -21,6 +21,7 @@ /** Attributes for creating a data deletion request. */ @JsonPropertyOrder({ + CreateDataDeletionRequestBodyAttributes.JSON_PROPERTY_DISPLAYED_TOTAL, CreateDataDeletionRequestBodyAttributes.JSON_PROPERTY_FROM, CreateDataDeletionRequestBodyAttributes.JSON_PROPERTY_INDEXES, CreateDataDeletionRequestBodyAttributes.JSON_PROPERTY_QUERY, @@ -30,6 +31,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CreateDataDeletionRequestBodyAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISPLAYED_TOTAL = "displayed_total"; + private Long displayedTotal; + public static final String JSON_PROPERTY_FROM = "from"; private Long from; @@ -46,14 +50,36 @@ public CreateDataDeletionRequestBodyAttributes() {} @JsonCreator public CreateDataDeletionRequestBodyAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DISPLAYED_TOTAL) Long displayedTotal, @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) Map query, @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { + this.displayedTotal = displayedTotal; this.from = from; this.query = query; this.to = to; } + public CreateDataDeletionRequestBodyAttributes displayedTotal(Long displayedTotal) { + this.displayedTotal = displayedTotal; + return this; + } + + /** + * Total number of elements to be deleted according to the UI. + * + * @return displayedTotal + */ + @JsonProperty(JSON_PROPERTY_DISPLAYED_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getDisplayedTotal() { + return displayedTotal; + } + + public void setDisplayedTotal(Long displayedTotal) { + this.displayedTotal = displayedTotal; + } + public CreateDataDeletionRequestBodyAttributes from(Long from) { this.from = from; return this; @@ -205,7 +231,9 @@ public boolean equals(Object o) { } CreateDataDeletionRequestBodyAttributes createDataDeletionRequestBodyAttributes = (CreateDataDeletionRequestBodyAttributes) o; - return Objects.equals(this.from, createDataDeletionRequestBodyAttributes.from) + return Objects.equals( + this.displayedTotal, createDataDeletionRequestBodyAttributes.displayedTotal) + && Objects.equals(this.from, createDataDeletionRequestBodyAttributes.from) && Objects.equals(this.indexes, createDataDeletionRequestBodyAttributes.indexes) && Objects.equals(this.query, createDataDeletionRequestBodyAttributes.query) && Objects.equals(this.to, createDataDeletionRequestBodyAttributes.to) @@ -216,13 +244,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(from, indexes, query, to, additionalProperties); + return Objects.hash(displayedTotal, from, indexes, query, to, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateDataDeletionRequestBodyAttributes {\n"); + sb.append(" displayedTotal: ").append(toIndentedString(displayedTotal)).append("\n"); sb.append(" from: ").append(toIndentedString(from)).append("\n"); sb.append(" indexes: ").append(toIndentedString(indexes)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/DataDeletionResponseItemAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DataDeletionResponseItemAttributes.java index 3f988f3eae4..7a4535600d6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DataDeletionResponseItemAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/DataDeletionResponseItemAttributes.java @@ -23,6 +23,7 @@ @JsonPropertyOrder({ DataDeletionResponseItemAttributes.JSON_PROPERTY_CREATED_AT, DataDeletionResponseItemAttributes.JSON_PROPERTY_CREATED_BY, + DataDeletionResponseItemAttributes.JSON_PROPERTY_DISPLAYED_TOTAL, DataDeletionResponseItemAttributes.JSON_PROPERTY_FROM_TIME, DataDeletionResponseItemAttributes.JSON_PROPERTY_INDEXES, DataDeletionResponseItemAttributes.JSON_PROPERTY_IS_CREATED, @@ -45,6 +46,9 @@ public class DataDeletionResponseItemAttributes { public static final String JSON_PROPERTY_CREATED_BY = "created_by"; private String createdBy; + public static final String JSON_PROPERTY_DISPLAYED_TOTAL = "displayed_total"; + private Long displayedTotal; + public static final String JSON_PROPERTY_FROM_TIME = "from_time"; private Long fromTime; @@ -84,6 +88,7 @@ public DataDeletionResponseItemAttributes() {} public DataDeletionResponseItemAttributes( @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_DISPLAYED_TOTAL) Long displayedTotal, @JsonProperty(required = true, value = JSON_PROPERTY_FROM_TIME) Long fromTime, @JsonProperty(required = true, value = JSON_PROPERTY_IS_CREATED) Boolean isCreated, @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId, @@ -97,6 +102,7 @@ public DataDeletionResponseItemAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) String updatedAt) { this.createdAt = createdAt; this.createdBy = createdBy; + this.displayedTotal = displayedTotal; this.fromTime = fromTime; this.isCreated = isCreated; this.orgId = orgId; @@ -149,6 +155,26 @@ public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } + public DataDeletionResponseItemAttributes displayedTotal(Long displayedTotal) { + this.displayedTotal = displayedTotal; + return this; + } + + /** + * Total number of elements to be deleted according to the UI. + * + * @return displayedTotal + */ + @JsonProperty(JSON_PROPERTY_DISPLAYED_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getDisplayedTotal() { + return displayedTotal; + } + + public void setDisplayedTotal(Long displayedTotal) { + this.displayedTotal = displayedTotal; + } + public DataDeletionResponseItemAttributes fromTime(Long fromTime) { this.fromTime = fromTime; return this; @@ -439,6 +465,7 @@ public boolean equals(Object o) { (DataDeletionResponseItemAttributes) o; return Objects.equals(this.createdAt, dataDeletionResponseItemAttributes.createdAt) && Objects.equals(this.createdBy, dataDeletionResponseItemAttributes.createdBy) + && Objects.equals(this.displayedTotal, dataDeletionResponseItemAttributes.displayedTotal) && Objects.equals(this.fromTime, dataDeletionResponseItemAttributes.fromTime) && Objects.equals(this.indexes, dataDeletionResponseItemAttributes.indexes) && Objects.equals(this.isCreated, dataDeletionResponseItemAttributes.isCreated) @@ -460,6 +487,7 @@ public int hashCode() { return Objects.hash( createdAt, createdBy, + displayedTotal, fromTime, indexes, isCreated, @@ -480,6 +508,7 @@ public String toString() { sb.append("class DataDeletionResponseItemAttributes {\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" displayedTotal: ").append(toIndentedString(displayedTotal)).append("\n"); sb.append(" fromTime: ").append(toIndentedString(fromTime)).append("\n"); sb.append(" indexes: ").append(toIndentedString(indexes)).append("\n"); sb.append(" isCreated: ").append(toIndentedString(isCreated)).append("\n"); diff --git a/src/test/resources/com/datadog/api/client/v2/api/data_deletion.feature b/src/test/resources/com/datadog/api/client/v2/api/data_deletion.feature index 6bfc942e2a7..5543872e9f8 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/data_deletion.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/data_deletion.feature @@ -43,7 +43,7 @@ Feature: Data Deletion Given operation "CreateDataDeletionRequest" enabled And new "CreateDataDeletionRequest" request And request contains "product" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}} + And body with value {"data": {"attributes": {"displayed_total": 25000, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}} When the request is sent Then the response status is 400 Bad Request @@ -52,7 +52,7 @@ Feature: Data Deletion Given operation "CreateDataDeletionRequest" enabled And new "CreateDataDeletionRequest" request And request contains "product" parameter with value "logs" - And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}} + And body with value {"data": {"attributes": {"displayed_total": 25000, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "deletion_request" @@ -64,7 +64,7 @@ Feature: Data Deletion Given operation "CreateDataDeletionRequest" enabled And new "CreateDataDeletionRequest" request And request contains "product" parameter with value "logs" - And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {}, "to": 1704063600000}, "type": "create_deletion_req"}} + And body with value {"data": {"attributes": {"displayed_total": 25000, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {}, "to": 1704063600000}, "type": "create_deletion_req"}} When the request is sent Then the response status is 412 Precondition failed error diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index b6097093658..feb0664d09b 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -197,7 +197,7 @@ }, { "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"test-index\", \"test-index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"}\n },\n \"type\": \"create_deletion_req\"\n }\n}" + "value": "{\n \"data\": {\n \"attributes\": {\n \"displayed_total\": 25000,\n \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"test-index\", \"test-index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"}\n },\n \"type\": \"create_deletion_req\"\n }\n}" } ], "step": "there is a valid \"deletion_request\" in the system",