diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e8790871ff..6794deb370 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -12763,9 +12763,25 @@ components: - id: row_id_2 type: row type: reference-tables-batch-rows-query + included: + - attributes: + values: + ip_address: 102.130.113.9 + id: row_id_1 + type: row + - attributes: + values: + ip_address: 102.130.113.10 + id: row_id_2 + type: row properties: data: $ref: "#/components/schemas/BatchRowsQueryResponseData" + included: + description: Full row resources matching the query, included alongside the relationship references in `data`. + items: + $ref: "#/components/schemas/TableRowResourceData" + type: array type: object BatchRowsQueryResponseData: description: Data object for a batch rows query response. @@ -56966,6 +56982,9 @@ components: links: first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100" self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100" + meta: + page: + next_continuation_token: eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ== properties: data: description: The rows. @@ -56974,6 +56993,8 @@ components: type: array links: $ref: "#/components/schemas/ListRowsResponseLinks" + meta: + $ref: "#/components/schemas/ListRowsResponseMeta" required: - data - links @@ -56997,6 +57018,20 @@ components: - self - first type: object + ListRowsResponseMeta: + description: Contains pagination details, including the continuation token for fetching additional rows. + properties: + page: + $ref: "#/components/schemas/ListRowsResponseMetaPage" + type: object + ListRowsResponseMetaPage: + description: Contains the continuation token for navigating to the next page of rows. + properties: + next_continuation_token: + description: Opaque token to pass as the `page[continuation_token]` query parameter to fetch the next page of results. Only present when more rows are available. + example: eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ== + type: string + type: object ListRulesResponse: description: Scorecard rules response. properties: diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 80b6a14730..a084de08b3 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -20836,6 +20836,20 @@ datadog\_api\_client.v2.model.list\_rows\_response\_links module :members: :show-inheritance: +datadog\_api\_client.v2.model.list\_rows\_response\_meta module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.list_rows_response_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.list\_rows\_response\_meta\_page module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.list_rows_response_meta_page + :members: + :show-inheritance: + datadog\_api\_client.v2.model.list\_rules\_response module ---------------------------------------------------------- diff --git a/src/datadog_api_client/v2/model/batch_rows_query_response.py b/src/datadog_api_client/v2/model/batch_rows_query_response.py index ab940cd107..a3b01d77e4 100644 --- a/src/datadog_api_client/v2/model/batch_rows_query_response.py +++ b/src/datadog_api_client/v2/model/batch_rows_query_response.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -15,28 +15,42 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.batch_rows_query_response_data import BatchRowsQueryResponseData + from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData class BatchRowsQueryResponse(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.batch_rows_query_response_data import BatchRowsQueryResponseData + from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData return { "data": (BatchRowsQueryResponseData,), + "included": ([TableRowResourceData],), } attribute_map = { "data": "data", + "included": "included", } - def __init__(self_, data: Union[BatchRowsQueryResponseData, UnsetType] = unset, **kwargs): + def __init__( + self_, + data: Union[BatchRowsQueryResponseData, UnsetType] = unset, + included: Union[List[TableRowResourceData], UnsetType] = unset, + **kwargs, + ): """ Response object for a batch rows query against a reference table. :param data: Data object for a batch rows query response. :type data: BatchRowsQueryResponseData, optional + + :param included: Full row resources matching the query, included alongside the relationship references in ``data``. + :type included: [TableRowResourceData], optional """ if data is not unset: kwargs["data"] = data + if included is not unset: + kwargs["included"] = included super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_rows_response.py b/src/datadog_api_client/v2/model/list_rows_response.py index 9c1ffaddf2..0028261206 100644 --- a/src/datadog_api_client/v2/model/list_rows_response.py +++ b/src/datadog_api_client/v2/model/list_rows_response.py @@ -3,17 +3,20 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, cached_property, + unset, + UnsetType, ) if TYPE_CHECKING: from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData from datadog_api_client.v2.model.list_rows_response_links import ListRowsResponseLinks + from datadog_api_client.v2.model.list_rows_response_meta import ListRowsResponseMeta class ListRowsResponse(ModelNormal): @@ -21,18 +24,27 @@ class ListRowsResponse(ModelNormal): def openapi_types(_): from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData from datadog_api_client.v2.model.list_rows_response_links import ListRowsResponseLinks + from datadog_api_client.v2.model.list_rows_response_meta import ListRowsResponseMeta return { "data": ([TableRowResourceData],), "links": (ListRowsResponseLinks,), + "meta": (ListRowsResponseMeta,), } attribute_map = { "data": "data", "links": "links", + "meta": "meta", } - def __init__(self_, data: List[TableRowResourceData], links: ListRowsResponseLinks, **kwargs): + def __init__( + self_, + data: List[TableRowResourceData], + links: ListRowsResponseLinks, + meta: Union[ListRowsResponseMeta, UnsetType] = unset, + **kwargs, + ): """ Paginated list of reference table rows. @@ -41,7 +53,12 @@ def __init__(self_, data: List[TableRowResourceData], links: ListRowsResponseLin :param links: Pagination links for the list rows response. :type links: ListRowsResponseLinks + + :param meta: Contains pagination details, including the continuation token for fetching additional rows. + :type meta: ListRowsResponseMeta, optional """ + if meta is not unset: + kwargs["meta"] = meta super().__init__(kwargs) self_.data = data diff --git a/src/datadog_api_client/v2/model/list_rows_response_meta.py b/src/datadog_api_client/v2/model/list_rows_response_meta.py new file mode 100644 index 0000000000..7e28a01e95 --- /dev/null +++ b/src/datadog_api_client/v2/model/list_rows_response_meta.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.list_rows_response_meta_page import ListRowsResponseMetaPage + + +class ListRowsResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.list_rows_response_meta_page import ListRowsResponseMetaPage + + return { + "page": (ListRowsResponseMetaPage,), + } + + attribute_map = { + "page": "page", + } + + def __init__(self_, page: Union[ListRowsResponseMetaPage, UnsetType] = unset, **kwargs): + """ + Contains pagination details, including the continuation token for fetching additional rows. + + :param page: Contains the continuation token for navigating to the next page of rows. + :type page: ListRowsResponseMetaPage, optional + """ + if page is not unset: + kwargs["page"] = page + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_rows_response_meta_page.py b/src/datadog_api_client/v2/model/list_rows_response_meta_page.py new file mode 100644 index 0000000000..c98ab8097e --- /dev/null +++ b/src/datadog_api_client/v2/model/list_rows_response_meta_page.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ListRowsResponseMetaPage(ModelNormal): + @cached_property + def openapi_types(_): + return { + "next_continuation_token": (str,), + } + + attribute_map = { + "next_continuation_token": "next_continuation_token", + } + + def __init__(self_, next_continuation_token: Union[str, UnsetType] = unset, **kwargs): + """ + Contains the continuation token for navigating to the next page of rows. + + :param next_continuation_token: Opaque token to pass as the ``page[continuation_token]`` query parameter to fetch the next page of results. Only present when more rows are available. + :type next_continuation_token: str, optional + """ + if next_continuation_token is not unset: + kwargs["next_continuation_token"] = next_continuation_token + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 9ae2c366d2..998d656dbd 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -4359,6 +4359,8 @@ from datadog_api_client.v2.model.list_relation_catalog_response_links import ListRelationCatalogResponseLinks from datadog_api_client.v2.model.list_rows_response import ListRowsResponse from datadog_api_client.v2.model.list_rows_response_links import ListRowsResponseLinks +from datadog_api_client.v2.model.list_rows_response_meta import ListRowsResponseMeta +from datadog_api_client.v2.model.list_rows_response_meta_page import ListRowsResponseMetaPage from datadog_api_client.v2.model.list_rules_response import ListRulesResponse from datadog_api_client.v2.model.list_rules_response_data_item import ListRulesResponseDataItem from datadog_api_client.v2.model.list_rules_response_links import ListRulesResponseLinks @@ -12850,6 +12852,8 @@ "ListRelationCatalogResponseLinks", "ListRowsResponse", "ListRowsResponseLinks", + "ListRowsResponseMeta", + "ListRowsResponseMetaPage", "ListRulesResponse", "ListRulesResponseDataItem", "ListRulesResponseLinks",