Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -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"
}
12 changes: 12 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -10694,6 +10699,7 @@ components:
- query
- from
- to
- displayed_total
type: object
CreateDataDeletionRequestBodyData:
description: Data needed to create a data deletion request.
Expand Down Expand Up @@ -12900,6 +12906,11 @@ components:
description: User who created the deletion request.
example: [email protected]
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
Expand Down Expand Up @@ -12961,6 +12972,7 @@ components:
required:
- created_at
- created_by
- displayed_total
- from_time
- is_created
- org_id
Expand Down
1 change: 1 addition & 0 deletions examples/v2/data-deletion/CreateDataDeletionRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;

Expand All @@ -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<String, String> 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;
Expand Down Expand Up @@ -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)
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;

Expand Down Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand All @@ -460,6 +487,7 @@ public int hashCode() {
return Objects.hash(
createdAt,
createdBy,
displayedTotal,
fromTime,
indexes,
isCreated,
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading