Skip to content

Commit f16473e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 07e3abbd of spec repo
1 parent 5648120 commit f16473e

16 files changed

+78
-42
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-01-15 09:47:01.573287",
8-
"spec_repo_commit": "21b02fc5"
7+
"regenerated": "2025-01-15 18:03:50.632727",
8+
"spec_repo_commit": "07e3abbd"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-15 09:47:01.588355",
13-
"spec_repo_commit": "21b02fc5"
12+
"regenerated": "2025-01-15 18:03:50.647536",
13+
"spec_repo_commit": "07e3abbd"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -7194,8 +7194,13 @@ components:
71947194
properties:
71957195
attributes:
71967196
$ref: '#/components/schemas/CreateDataDeletionRequestBodyAttributes'
7197+
type:
7198+
description: The deletion request type.
7199+
example: create_deletion_req
7200+
type: string
71977201
required:
71987202
- attributes
7203+
- type
71997204
type: object
72007205
CreateDataDeletionResponseBody:
72017206
description: The response from the create data deletion request endpoint.

examples/v2/data-deletion/CreateDataDeletionRequest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public static void main(String[] args) {
2727
.query(
2828
Map.ofEntries(
2929
Map.entry("host", "abc"), Map.entry("service", "xyz")))
30-
.to(1704063600000L)));
30+
.to(1704063600000L))
31+
.type("create_deletion_req"));
3132

3233
try {
3334
CreateDataDeletionResponseBody result = apiInstance.createDataDeletionRequest("logs", body);

src/main/java/com/datadog/api/client/v2/model/CreateDataDeletionRequestBodyData.java

+33-3
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,30 @@
1818
import java.util.Objects;
1919

2020
/** Data needed to create a data deletion request. */
21-
@JsonPropertyOrder({CreateDataDeletionRequestBodyData.JSON_PROPERTY_ATTRIBUTES})
21+
@JsonPropertyOrder({
22+
CreateDataDeletionRequestBodyData.JSON_PROPERTY_ATTRIBUTES,
23+
CreateDataDeletionRequestBodyData.JSON_PROPERTY_TYPE
24+
})
2225
@jakarta.annotation.Generated(
2326
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2427
public class CreateDataDeletionRequestBodyData {
2528
@JsonIgnore public boolean unparsed = false;
2629
public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
2730
private CreateDataDeletionRequestBodyAttributes attributes;
2831

32+
public static final String JSON_PROPERTY_TYPE = "type";
33+
private String type;
34+
2935
public CreateDataDeletionRequestBodyData() {}
3036

3137
@JsonCreator
3238
public CreateDataDeletionRequestBodyData(
3339
@JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
34-
CreateDataDeletionRequestBodyAttributes attributes) {
40+
CreateDataDeletionRequestBodyAttributes attributes,
41+
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) {
3542
this.attributes = attributes;
3643
this.unparsed |= attributes.unparsed;
44+
this.type = type;
3745
}
3846

3947
public CreateDataDeletionRequestBodyData attributes(
@@ -58,6 +66,26 @@ public void setAttributes(CreateDataDeletionRequestBodyAttributes attributes) {
5866
this.attributes = attributes;
5967
}
6068

69+
public CreateDataDeletionRequestBodyData type(String type) {
70+
this.type = type;
71+
return this;
72+
}
73+
74+
/**
75+
* The deletion request type.
76+
*
77+
* @return type
78+
*/
79+
@JsonProperty(JSON_PROPERTY_TYPE)
80+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
81+
public String getType() {
82+
return type;
83+
}
84+
85+
public void setType(String type) {
86+
this.type = type;
87+
}
88+
6189
/**
6290
* A container for additional, undeclared properties. This is a holder for any undeclared
6391
* properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -116,20 +144,22 @@ public boolean equals(Object o) {
116144
CreateDataDeletionRequestBodyData createDataDeletionRequestBodyData =
117145
(CreateDataDeletionRequestBodyData) o;
118146
return Objects.equals(this.attributes, createDataDeletionRequestBodyData.attributes)
147+
&& Objects.equals(this.type, createDataDeletionRequestBodyData.type)
119148
&& Objects.equals(
120149
this.additionalProperties, createDataDeletionRequestBodyData.additionalProperties);
121150
}
122151

123152
@Override
124153
public int hashCode() {
125-
return Objects.hash(attributes, additionalProperties);
154+
return Objects.hash(attributes, type, additionalProperties);
126155
}
127156

128157
@Override
129158
public String toString() {
130159
StringBuilder sb = new StringBuilder();
131160
sb.append("class CreateDataDeletionRequestBodyData {\n");
132161
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
162+
sb.append(" type: ").append(toIndentedString(type)).append("\n");
133163
sb.append(" additionalProperties: ")
134164
.append(toIndentedString(additionalProperties))
135165
.append("\n");
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:41.160Z
1+
2025-01-15T14:25:54.929Z
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:41.674Z
1+
2025-01-15T14:26:08.930Z

src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"httpRequest": {
44
"body": {
55
"type": "JSON",
6-
"json": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{\"host\":\"abc\",\"service\":\"xyz\"},\"to\":1704063600000}}}"
6+
"json": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{\"host\":\"abc\",\"service\":\"xyz\"},\"to\":1704063600000},\"type\":\"create_deletion_req\"}}"
77
},
88
"headers": {},
99
"method": "POST",
@@ -12,7 +12,7 @@
1212
"secure": true
1313
},
1414
"httpResponse": {
15-
"body": "{\"data\":{\"id\":\"523\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:42.016613164Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"pending\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:42.016613164Z\"}},\"meta\":{\"product\":\"logs\"}}",
15+
"body": "{\"data\":{\"id\":\"753\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:26:09.447960191Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"pending\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:26:09.447960191Z\"}},\"meta\":{\"product\":\"logs\"}}",
1616
"headers": {
1717
"Content-Type": [
1818
"application/vnd.api+json"
@@ -27,18 +27,18 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "599b5d26-fcc8-db18-1a6e-dfc958964915"
30+
"id": "516e2b97-25f6-b08c-4d4a-1da22948b32f"
3131
},
3232
{
3333
"httpRequest": {
3434
"headers": {},
3535
"method": "PUT",
36-
"path": "/api/v2/deletion/requests/523/cancel",
36+
"path": "/api/v2/deletion/requests/753/cancel",
3737
"keepAlive": false,
3838
"secure": true
3939
},
4040
"httpResponse": {
41-
"body": "{\"data\":{\"id\":\"523\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:42.016613Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:42.384299Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
41+
"body": "{\"data\":{\"id\":\"753\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:26:09.44796Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:26:10.016496Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
4242
"headers": {
4343
"Content-Type": [
4444
"application/vnd.api+json"
@@ -53,18 +53,18 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "ec6f7ff8-dba2-9b00-6429-8e9f391044e3"
56+
"id": "27d9e777-6874-6fc9-c5aa-33278aaaef7a"
5757
},
5858
{
5959
"httpRequest": {
6060
"headers": {},
6161
"method": "PUT",
62-
"path": "/api/v2/deletion/requests/523/cancel",
62+
"path": "/api/v2/deletion/requests/753/cancel",
6363
"keepAlive": false,
6464
"secure": true
6565
},
6666
"httpResponse": {
67-
"body": "{\"data\":{\"id\":\"523\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:42.016613Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:42.384299Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
67+
"body": "{\"data\":{\"id\":\"753\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:26:09.44796Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:26:10.016496Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
6868
"headers": {
6969
"Content-Type": [
7070
"application/vnd.api+json"
@@ -79,6 +79,6 @@
7979
"timeToLive": {
8080
"unlimited": true
8181
},
82-
"id": "ec6f7ff8-dba2-9b00-6429-8e9f391044e4"
82+
"id": "27d9e777-6874-6fc9-c5aa-33278aaaef7b"
8383
}
8484
]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:42.850Z
1+
2025-01-15T14:26:26.195Z
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:43.197Z
1+
2025-01-15T14:27:27.929Z

src/test/resources/cassettes/features/v2/Creates_a_data_deletion_request_returns_OK_response.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"httpRequest": {
44
"body": {
55
"type": "JSON",
6-
"json": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{\"host\":\"abc\",\"service\":\"xyz\"},\"to\":1704063600000}}}"
6+
"json": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{\"host\":\"abc\",\"service\":\"xyz\"},\"to\":1704063600000},\"type\":\"create_deletion_req\"}}"
77
},
88
"headers": {},
99
"method": "POST",
@@ -12,7 +12,7 @@
1212
"secure": true
1313
},
1414
"httpResponse": {
15-
"body": "{\"data\":{\"id\":\"524\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:43.527574137Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"pending\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:43.527574137Z\"}},\"meta\":{\"product\":\"logs\"}}",
15+
"body": "{\"data\":{\"id\":\"754\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:27:28.457837225Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"pending\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:27:28.457837225Z\"}},\"meta\":{\"product\":\"logs\"}}",
1616
"headers": {
1717
"Content-Type": [
1818
"application/vnd.api+json"
@@ -27,18 +27,18 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "599b5d26-fcc8-db18-1a6e-dfc958964914"
30+
"id": "516e2b97-25f6-b08c-4d4a-1da22948b32e"
3131
},
3232
{
3333
"httpRequest": {
3434
"headers": {},
3535
"method": "PUT",
36-
"path": "/api/v2/deletion/requests/524/cancel",
36+
"path": "/api/v2/deletion/requests/754/cancel",
3737
"keepAlive": false,
3838
"secure": true
3939
},
4040
"httpResponse": {
41-
"body": "{\"data\":{\"id\":\"524\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:43.527574Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:44.017414Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
41+
"body": "{\"data\":{\"id\":\"754\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:27:28.457837Z\",\"created_by\":\"frog@datadoghq.com\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:27:28.841156Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
4242
"headers": {
4343
"Content-Type": [
4444
"application/vnd.api+json"
@@ -53,6 +53,6 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "f7d7b19c-0391-4246-c87c-6d32dfeb6b9f"
56+
"id": "6adbfe70-fffd-8207-996f-3bc078e0ba2c"
5757
}
5858
]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:44.038Z
1+
2025-01-15T14:27:45.329Z

src/test/resources/cassettes/features/v2/Creates_a_data_deletion_request_returns_Precondition_failed_error_response.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"httpRequest": {
44
"body": {
55
"type": "JSON",
6-
"json": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{},\"to\":1704063600000}}}"
6+
"json": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{},\"to\":1704063600000},\"type\":\"create_deletion_req\"}}"
77
},
88
"headers": {},
99
"method": "POST",
@@ -27,6 +27,6 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "dfc8b718-20e3-903c-facc-d726d2607b48"
30+
"id": "85766018-9c75-0a95-ce16-8a08631ea4a9"
3131
}
3232
]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:44.395Z
1+
2025-01-15T14:28:03.053Z

src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json

+7-7
Large diffs are not rendered by default.

src/test/resources/com/datadog/api/client/v2/api/data_deletion.feature

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Feature: Data Deletion
4343
Given operation "CreateDataDeletionRequest" enabled
4444
And new "CreateDataDeletionRequest" request
4545
And request contains "product" parameter from "REPLACE.ME"
46-
And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}}}
46+
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"}}
4747
When the request is sent
4848
Then the response status is 400 Bad Request
4949

@@ -52,7 +52,7 @@ Feature: Data Deletion
5252
Given operation "CreateDataDeletionRequest" enabled
5353
And new "CreateDataDeletionRequest" request
5454
And request contains "product" parameter with value "logs"
55-
And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}}}
55+
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"}}
5656
When the request is sent
5757
Then the response status is 200 OK
5858
And the response "data.type" is equal to "deletion_request"
@@ -64,7 +64,7 @@ Feature: Data Deletion
6464
Given operation "CreateDataDeletionRequest" enabled
6565
And new "CreateDataDeletionRequest" request
6666
And request contains "product" parameter with value "logs"
67-
And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {}, "to": 1704063600000}}}
67+
And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {}, "to": 1704063600000}, "type": "create_deletion_req"}}
6868
When the request is sent
6969
Then the response status is 412 Precondition failed error
7070

src/test/resources/com/datadog/api/client/v2/api/given.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
},
149149
{
150150
"name": "body",
151-
"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 }\n}"
151+
"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}"
152152
}
153153
],
154154
"step": "there is a valid \"deletion_request\" in the system",

0 commit comments

Comments
 (0)