Skip to content

Commit 16be798

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 709b372 of spec repo (#4215)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 157df39 commit 16be798

20 files changed

Lines changed: 211 additions & 137 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ components:
15381538
example: "-created_at"
15391539
type: string
15401540
ProductName:
1541-
description: Name of the product to be deleted, either `logs` or `rum`.
1541+
description: Name of the product to be deleted. Only `logs` is supported.
15421542
in: path
15431543
name: product
15441544
required: true
@@ -24351,6 +24351,12 @@ components:
2435124351
CreateDataDeletionRequestBodyAttributes:
2435224352
description: Attributes for creating a data deletion request.
2435324353
properties:
24354+
displayed_total:
24355+
description: Total number of elements to be deleted as displayed to the user.
24356+
example: 100
24357+
format: int64
24358+
minimum: 1
24359+
type: integer
2435424360
from:
2435524361
description: Start of requested time window, milliseconds since Unix epoch.
2435624362
example: 1672527600000
@@ -24378,6 +24384,7 @@ components:
2437824384
- query
2437924385
- from
2438024386
- to
24387+
- displayed_total
2438124388
type: object
2438224389
CreateDataDeletionRequestBodyData:
2438324390
description: Data needed to create a data deletion request.
@@ -30968,6 +30975,19 @@ components:
3096830975
description: User who created the deletion request.
3096930976
example: "test.user@datadoghq.com"
3097030977
type: string
30978+
customer_message:
30979+
description: A message for the customer regarding the deletion request, if any.
30980+
example: "Your deletion request is being processed."
30981+
type: string
30982+
displayed_total:
30983+
description: Total number of elements to be deleted as displayed to the user.
30984+
example: 100
30985+
format: int64
30986+
type: integer
30987+
error_category:
30988+
description: The category of the error for the deletion request, if any.
30989+
example: "validation_error"
30990+
type: string
3097130991
from_time:
3097230992
description: Start of requested time window, milliseconds since Unix epoch.
3097330993
example: 1672527600000
@@ -31031,6 +31051,7 @@ components:
3103131051
- status
3103231052
- to_time
3103331053
- total_unrestricted
31054+
- displayed_total
3103431055
- updated_at
3103531056
type: object
3103631057
DataDeletionResponseMeta:
@@ -31041,7 +31062,7 @@ components:
3104131062
format: int64
3104231063
type: integer
3104331064
description: The total deletion requests created by product.
31044-
example: {"logs": 8, "rum": 7}
31065+
example: {"logs": 8}
3104531066
type: object
3104631067
count_status:
3104731068
additionalProperties:
@@ -143031,6 +143052,21 @@ paths:
143031143052
requestBody:
143032143053
content:
143033143054
application/json:
143055+
examples:
143056+
default:
143057+
value:
143058+
data:
143059+
attributes:
143060+
displayed_total: 100
143061+
from: 1672527600000
143062+
indexes:
143063+
- test-index
143064+
- test-index-2
143065+
query:
143066+
host: abc
143067+
service: xyz
143068+
to: 1704063600000
143069+
type: create_deletion_req
143034143070
schema:
143035143071
$ref: "#/components/schemas/CreateDataDeletionRequestBody"
143036143072
required: true
@@ -143045,6 +143081,7 @@ paths:
143045143081
attributes:
143046143082
created_at: "2024-01-01T00:00:00.000000Z"
143047143083
created_by: test@example.com
143084+
displayed_total: 100
143048143085
from_time: 1672527600000
143049143086
is_created: true
143050143087
org_id: 123
@@ -143090,11 +143127,7 @@ paths:
143090143127
x-permission:
143091143128
operator: OR
143092143129
permissions:
143093-
- rum_delete_data
143094143130
- logs_delete_data
143095-
x-unstable: |-
143096-
**Note**: This endpoint is in Preview. If you have any feedback,
143097-
contact [Datadog support](https://docs.datadoghq.com/help/).
143098143131
/api/v2/deletion/requests:
143099143132
get:
143100143133
description: Gets a list of data deletion requests based on several filter parameters.
@@ -143151,6 +143184,7 @@ paths:
143151143184
- attributes:
143152143185
created_at: "2024-01-01T00:00:00.000000Z"
143153143186
created_by: test@example.com
143187+
displayed_total: 100
143154143188
from_time: 1672527600000
143155143189
is_created: true
143156143190
org_id: 123
@@ -143190,11 +143224,7 @@ paths:
143190143224
x-permission:
143191143225
operator: OR
143192143226
permissions:
143193-
- rum_delete_data
143194143227
- logs_delete_data
143195-
x-unstable: |-
143196-
**Note**: This endpoint is in Preview. If you have any feedback,
143197-
contact [Datadog support](https://docs.datadoghq.com/help/).
143198143228
/api/v2/deletion/requests/{id}/cancel:
143199143229
put:
143200143230
description: Cancels a data deletion request by providing its ID.
@@ -143212,6 +143242,7 @@ paths:
143212143242
attributes:
143213143243
created_at: "2024-01-01T00:00:00.000000Z"
143214143244
created_by: test@example.com
143245+
displayed_total: 100
143215143246
from_time: 1672527600000
143216143247
is_created: true
143217143248
org_id: 123
@@ -143257,11 +143288,7 @@ paths:
143257143288
x-permission:
143258143289
operator: OR
143259143290
permissions:
143260-
- rum_delete_data
143261143291
- logs_delete_data
143262-
x-unstable: |-
143263-
**Note**: This endpoint is in Preview. If you have any feedback,
143264-
contact [Datadog support](https://docs.datadoghq.com/help/).
143265143292
/api/v2/deployment_gates:
143266143293
get:
143267143294
description: |-
@@ -218181,7 +218208,7 @@ tags:
218181218208
information.
218182218209
name: Dashboards
218183218210
- description: |-
218184-
The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively.
218211+
The Data Deletion API allows the user to target and delete data from the allowed products. It's enabled for Logs and depends on the `logs_delete_data` permission.
218185218212
name: Data Deletion
218186218213
- description: Manage and run data observability monitors.
218187218214
name: Data Observability

examples/v2/data-deletion/CancelDataDeletionRequest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
public class Example {
99
public static void main(String[] args) {
1010
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11-
defaultClient.setUnstableOperationEnabled("v2.cancelDataDeletionRequest", true);
1211
DataDeletionApi apiInstance = new DataDeletionApi(defaultClient);
1312

1413
// there is a valid "deletion_request" in the system

examples/v2/data-deletion/CreateDataDeletionRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
public class Example {
1515
public static void main(String[] args) {
1616
ApiClient defaultClient = ApiClient.getDefaultApiClient();
17-
defaultClient.setUnstableOperationEnabled("v2.createDataDeletionRequest", true);
1817
DataDeletionApi apiInstance = new DataDeletionApi(defaultClient);
1918

2019
CreateDataDeletionRequestBody body =
@@ -23,6 +22,7 @@ public static void main(String[] args) {
2322
new CreateDataDeletionRequestBodyData()
2423
.attributes(
2524
new CreateDataDeletionRequestBodyAttributes()
25+
.displayedTotal(100L)
2626
.from(1672527600000L)
2727
.indexes(Arrays.asList("test-index", "test-index-2"))
2828
.query(

examples/v2/data-deletion/GetDataDeletionRequests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
public class Example {
99
public static void main(String[] args) {
1010
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11-
defaultClient.setUnstableOperationEnabled("v2.getDataDeletionRequests", true);
1211
DataDeletionApi apiInstance = new DataDeletionApi(defaultClient);
1312

1413
try {

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,9 +1080,6 @@ public class ApiClient {
10801080
put("v2.getAllDatasets", false);
10811081
put("v2.getDataset", false);
10821082
put("v2.updateDataset", false);
1083-
put("v2.cancelDataDeletionRequest", false);
1084-
put("v2.createDataDeletionRequest", false);
1085-
put("v2.getDataDeletionRequests", false);
10861083
put("v2.createDeploymentGate", false);
10871084
put("v2.createDeploymentRule", false);
10881085
put("v2.deleteDeploymentGate", false);

src/main/java/com/datadog/api/client/v2/api/DataDeletionApi.java

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,6 @@ public CompletableFuture<CancelDataDeletionResponseBody> cancelDataDeletionReque
9797
*/
9898
public ApiResponse<CancelDataDeletionResponseBody> cancelDataDeletionRequestWithHttpInfo(
9999
String id) throws ApiException {
100-
// Check if unstable operation is enabled
101-
String operationId = "cancelDataDeletionRequest";
102-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
103-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
104-
} else {
105-
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
106-
}
107100
Object localVarPostBody = null;
108101

109102
// verify the required parameter 'id' is set
@@ -148,17 +141,6 @@ public ApiResponse<CancelDataDeletionResponseBody> cancelDataDeletionRequestWith
148141
*/
149142
public CompletableFuture<ApiResponse<CancelDataDeletionResponseBody>>
150143
cancelDataDeletionRequestWithHttpInfoAsync(String id) {
151-
// Check if unstable operation is enabled
152-
String operationId = "cancelDataDeletionRequest";
153-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
154-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
155-
} else {
156-
CompletableFuture<ApiResponse<CancelDataDeletionResponseBody>> result =
157-
new CompletableFuture<>();
158-
result.completeExceptionally(
159-
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
160-
return result;
161-
}
162144
Object localVarPostBody = null;
163145

164146
// verify the required parameter 'id' is set
@@ -210,7 +192,7 @@ public ApiResponse<CancelDataDeletionResponseBody> cancelDataDeletionRequestWith
210192
*
211193
* <p>See {@link #createDataDeletionRequestWithHttpInfo}.
212194
*
213-
* @param product Name of the product to be deleted, either <code>logs</code> or <code>rum</code>.
195+
* @param product Name of the product to be deleted. Only <code>logs</code> is supported.
214196
* (required)
215197
* @param body (required)
216198
* @return CreateDataDeletionResponseBody
@@ -226,7 +208,7 @@ public CreateDataDeletionResponseBody createDataDeletionRequest(
226208
*
227209
* <p>See {@link #createDataDeletionRequestWithHttpInfoAsync}.
228210
*
229-
* @param product Name of the product to be deleted, either <code>logs</code> or <code>rum</code>.
211+
* @param product Name of the product to be deleted. Only <code>logs</code> is supported.
230212
* (required)
231213
* @param body (required)
232214
* @return CompletableFuture&lt;CreateDataDeletionResponseBody&gt;
@@ -243,7 +225,7 @@ public CompletableFuture<CreateDataDeletionResponseBody> createDataDeletionReque
243225
/**
244226
* Creates a data deletion request by providing a query and a timeframe targeting the proper data.
245227
*
246-
* @param product Name of the product to be deleted, either <code>logs</code> or <code>rum</code>.
228+
* @param product Name of the product to be deleted. Only <code>logs</code> is supported.
247229
* (required)
248230
* @param body (required)
249231
* @return ApiResponse&lt;CreateDataDeletionResponseBody&gt;
@@ -262,13 +244,6 @@ public CompletableFuture<CreateDataDeletionResponseBody> createDataDeletionReque
262244
*/
263245
public ApiResponse<CreateDataDeletionResponseBody> createDataDeletionRequestWithHttpInfo(
264246
String product, CreateDataDeletionRequestBody body) throws ApiException {
265-
// Check if unstable operation is enabled
266-
String operationId = "createDataDeletionRequest";
267-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
268-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
269-
} else {
270-
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
271-
}
272247
Object localVarPostBody = body;
273248

274249
// verify the required parameter 'product' is set
@@ -314,25 +289,14 @@ public ApiResponse<CreateDataDeletionResponseBody> createDataDeletionRequestWith
314289
*
315290
* <p>See {@link #createDataDeletionRequestWithHttpInfo}.
316291
*
317-
* @param product Name of the product to be deleted, either <code>logs</code> or <code>rum</code>.
292+
* @param product Name of the product to be deleted. Only <code>logs</code> is supported.
318293
* (required)
319294
* @param body (required)
320295
* @return CompletableFuture&lt;ApiResponse&lt;CreateDataDeletionResponseBody&gt;&gt;
321296
*/
322297
public CompletableFuture<ApiResponse<CreateDataDeletionResponseBody>>
323298
createDataDeletionRequestWithHttpInfoAsync(
324299
String product, CreateDataDeletionRequestBody body) {
325-
// Check if unstable operation is enabled
326-
String operationId = "createDataDeletionRequest";
327-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
328-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
329-
} else {
330-
CompletableFuture<ApiResponse<CreateDataDeletionResponseBody>> result =
331-
new CompletableFuture<>();
332-
result.completeExceptionally(
333-
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
334-
return result;
335-
}
336300
Object localVarPostBody = body;
337301

338302
// verify the required parameter 'product' is set
@@ -533,13 +497,6 @@ public CompletableFuture<GetDataDeletionsResponseBody> getDataDeletionRequestsAs
533497
*/
534498
public ApiResponse<GetDataDeletionsResponseBody> getDataDeletionRequestsWithHttpInfo(
535499
GetDataDeletionRequestsOptionalParameters parameters) throws ApiException {
536-
// Check if unstable operation is enabled
537-
String operationId = "getDataDeletionRequests";
538-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
539-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
540-
} else {
541-
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
542-
}
543500
Object localVarPostBody = null;
544501
String nextPage = parameters.nextPage;
545502
String product = parameters.product;
@@ -589,17 +546,6 @@ public ApiResponse<GetDataDeletionsResponseBody> getDataDeletionRequestsWithHttp
589546
public CompletableFuture<ApiResponse<GetDataDeletionsResponseBody>>
590547
getDataDeletionRequestsWithHttpInfoAsync(
591548
GetDataDeletionRequestsOptionalParameters parameters) {
592-
// Check if unstable operation is enabled
593-
String operationId = "getDataDeletionRequests";
594-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
595-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
596-
} else {
597-
CompletableFuture<ApiResponse<GetDataDeletionsResponseBody>> result =
598-
new CompletableFuture<>();
599-
result.completeExceptionally(
600-
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
601-
return result;
602-
}
603549
Object localVarPostBody = null;
604550
String nextPage = parameters.nextPage;
605551
String product = parameters.product;

0 commit comments

Comments
 (0)