diff --git a/.generated-info b/.generated-info index 60618dc9b9..fbdb0de0ba 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "98e3371", - "generated": "2025-08-27 08:45:21.765" + "spec_repo_commit": "fb522ba", + "generated": "2025-08-27 10:19:43.054" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7d9ee66a12..15a0777a45 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -10662,6 +10662,12 @@ components: CreateDataDeletionRequestBodyAttributes: description: Attributes for creating a data deletion request. properties: + displayed_total: + description: The total number of elements to be deleted that the UI shows + to the user. + example: 25000 + format: int64 + type: integer from: description: Start of requested time window, milliseconds since Unix epoch. example: 1672527600000 @@ -10694,6 +10700,7 @@ components: - query - from - to + - displayed_total type: object CreateDataDeletionRequestBodyData: description: Data needed to create a data deletion request. @@ -12947,6 +12954,11 @@ components: example: 1704063600000 format: int64 type: integer + total_displayed: + description: Total number of elements to be deleted according to the UI. + example: 100 + format: int64 + type: integer total_unrestricted: description: Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will @@ -12969,6 +12981,7 @@ components: - starting_at - status - to_time + - total_displayed - total_unrestricted - updated_at type: object diff --git a/examples/v2/data-deletion/CreateDataDeletionRequest.py b/examples/v2/data-deletion/CreateDataDeletionRequest.py index 544f55cef1..3dcb0fa4d5 100644 --- a/examples/v2/data-deletion/CreateDataDeletionRequest.py +++ b/examples/v2/data-deletion/CreateDataDeletionRequest.py @@ -16,6 +16,7 @@ body = CreateDataDeletionRequestBody( data=CreateDataDeletionRequestBodyData( attributes=CreateDataDeletionRequestBodyAttributes( + displayed_total=25000, _from=1672527600000, indexes=[ "test-index", diff --git a/src/datadog_api_client/v2/model/create_data_deletion_request_body_attributes.py b/src/datadog_api_client/v2/model/create_data_deletion_request_body_attributes.py index 5d81a86ada..6a592bd7b4 100644 --- a/src/datadog_api_client/v2/model/create_data_deletion_request_body_attributes.py +++ b/src/datadog_api_client/v2/model/create_data_deletion_request_body_attributes.py @@ -17,6 +17,7 @@ class CreateDataDeletionRequestBodyAttributes(ModelNormal): @cached_property def openapi_types(_): return { + "displayed_total": (int,), "_from": (int,), "indexes": ([str],), "query": ({str: (str,)},), @@ -24,6 +25,7 @@ def openapi_types(_): } attribute_map = { + "displayed_total": "displayed_total", "_from": "from", "indexes": "indexes", "query": "query", @@ -31,11 +33,20 @@ def openapi_types(_): } def __init__( - self_, _from: int, query: Dict[str, str], to: int, indexes: Union[List[str], UnsetType] = unset, **kwargs + self_, + displayed_total: int, + _from: int, + query: Dict[str, str], + to: int, + indexes: Union[List[str], UnsetType] = unset, + **kwargs, ): """ Attributes for creating a data deletion request. + :param displayed_total: The total number of elements to be deleted that the UI shows to the user. + :type displayed_total: int + :param _from: Start of requested time window, milliseconds since Unix epoch. :type _from: int @@ -52,6 +63,7 @@ def __init__( kwargs["indexes"] = indexes super().__init__(kwargs) + self_.displayed_total = displayed_total self_._from = _from self_.query = query self_.to = to diff --git a/src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py b/src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py index 0af8401575..053d1b8bb5 100644 --- a/src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py +++ b/src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py @@ -28,6 +28,7 @@ def openapi_types(_): "starting_at": (str,), "status": (str,), "to_time": (int,), + "total_displayed": (int,), "total_unrestricted": (int,), "updated_at": (str,), } @@ -44,6 +45,7 @@ def openapi_types(_): "starting_at": "starting_at", "status": "status", "to_time": "to_time", + "total_displayed": "total_displayed", "total_unrestricted": "total_unrestricted", "updated_at": "updated_at", } @@ -60,6 +62,7 @@ def __init__( starting_at: str, status: str, to_time: int, + total_displayed: int, total_unrestricted: int, updated_at: str, indexes: Union[List[str], UnsetType] = unset, @@ -101,6 +104,9 @@ def __init__( :param to_time: End of requested time window, milliseconds since Unix epoch. :type to_time: int + :param total_displayed: Total number of elements to be deleted according to the UI. + :type total_displayed: int + :param total_unrestricted: Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted. :type total_unrestricted: int @@ -121,5 +127,6 @@ def __init__( self_.starting_at = starting_at self_.status = status self_.to_time = to_time + self_.total_displayed = total_displayed self_.total_unrestricted = total_unrestricted self_.updated_at = updated_at diff --git a/tests/v2/features/data_deletion.feature b/tests/v2/features/data_deletion.feature index 6bfc942e2a..5543872e9f 100644 --- a/tests/v2/features/data_deletion.feature +++ b/tests/v2/features/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/tests/v2/features/given.json b/tests/v2/features/given.json index b609709365..2e93184fb3 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/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 \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"test-index\", \"test-index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"},\n \"displayed_total\": 25000\n },\n \"type\": \"create_deletion_req\"\n }\n}" } ], "step": "there is a valid \"deletion_request\" in the system",