diff --git a/.generated-info b/.generated-info index 60618dc9b9..73aa406798 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": "2011bb0", + "generated": "2025-08-27 13:49:59.180" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7d9ee66a12..c1ff03f18c 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.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..e2054642e2 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: Total number of elements to be deleted according to the UI. + :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..8c0864cd7e 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 @@ -19,6 +19,7 @@ def openapi_types(_): return { "created_at": (str,), "created_by": (str,), + "displayed_total": (int,), "from_time": (int,), "indexes": ([str],), "is_created": (bool,), @@ -35,6 +36,7 @@ def openapi_types(_): attribute_map = { "created_at": "created_at", "created_by": "created_by", + "displayed_total": "displayed_total", "from_time": "from_time", "indexes": "indexes", "is_created": "is_created", @@ -52,6 +54,7 @@ def __init__( self_, created_at: str, created_by: str, + displayed_total: int, from_time: int, is_created: bool, org_id: int, @@ -74,6 +77,9 @@ def __init__( :param created_by: User who created the deletion request. :type created_by: str + :param displayed_total: Total number of elements to be deleted according to the UI. + :type displayed_total: int + :param from_time: Start of requested time window, milliseconds since Unix epoch. :type from_time: int @@ -113,6 +119,7 @@ def __init__( self_.created_at = created_at self_.created_by = created_by + self_.displayed_total = displayed_total self_.from_time = from_time self_.is_created = is_created self_.org_id = org_id 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..feb0664d09 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 \"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",