diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4d2c9181be..43ea0843e6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -117851,16 +117851,44 @@ components: x-enum-varnames: - REFERENCE_TABLE TableRowResourceArray: - description: List of rows from a reference table query. + description: List of rows from a reference table query, along with metadata about rows that were requested but not found. properties: data: description: The rows. items: $ref: "#/components/schemas/TableRowResourceData" type: array + meta: + $ref: "#/components/schemas/TableRowResourceArrayMeta" required: - data type: object + TableRowResourceArrayMeta: + description: Metadata about the rows requested, including which ones were not found. + properties: + found_count: + description: Number of requested rows that were found and returned in `data`. + example: 1 + format: int64 + type: integer + not_found: + description: Row IDs from the request that do not exist in the reference table. Empty when every requested row was found. + example: + - row_id_2 + items: + description: Row identifier, corresponding to the primary key value. + type: string + type: array + requested_count: + description: Number of row IDs supplied in the `row_id` query parameter. + example: 2 + format: int64 + type: integer + required: + - requested_count + - found_count + - not_found + type: object TableRowResourceData: additionalProperties: false description: The data object containing the row column names and values. @@ -192798,6 +192826,11 @@ paths: name: Example Row id: row_id_1 type: row + meta: + found_count: 1 + not_found: + - row_id_2 + requested_count: 2 schema: $ref: "#/components/schemas/TableRowResourceArray" description: Some or all requested rows were found. diff --git a/src/datadog_api_client/v2/model/table_row_resource_array.py b/src/datadog_api_client/v2/model/table_row_resource_array.py index 0c0d1cf4c3..bac4195d78 100644 --- a/src/datadog_api_client/v2/model/table_row_resource_array.py +++ b/src/datadog_api_client/v2/model/table_row_resource_array.py @@ -3,38 +3,51 @@ # 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.table_row_resource_array_meta import TableRowResourceArrayMeta class TableRowResourceArray(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData + from datadog_api_client.v2.model.table_row_resource_array_meta import TableRowResourceArrayMeta return { "data": ([TableRowResourceData],), + "meta": (TableRowResourceArrayMeta,), } attribute_map = { "data": "data", + "meta": "meta", } - def __init__(self_, data: List[TableRowResourceData], **kwargs): + def __init__( + self_, data: List[TableRowResourceData], meta: Union[TableRowResourceArrayMeta, UnsetType] = unset, **kwargs + ): """ - List of rows from a reference table query. + List of rows from a reference table query, along with metadata about rows that were requested but not found. :param data: The rows. :type data: [TableRowResourceData] + + :param meta: Metadata about the rows requested, including which ones were not found. + :type meta: TableRowResourceArrayMeta, optional """ + if meta is not unset: + kwargs["meta"] = meta super().__init__(kwargs) self_.data = data diff --git a/src/datadog_api_client/v2/model/table_row_resource_array_meta.py b/src/datadog_api_client/v2/model/table_row_resource_array_meta.py new file mode 100644 index 0000000000..dc9f54ef1f --- /dev/null +++ b/src/datadog_api_client/v2/model/table_row_resource_array_meta.py @@ -0,0 +1,46 @@ +# 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 List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class TableRowResourceArrayMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "found_count": (int,), + "not_found": ([str],), + "requested_count": (int,), + } + + attribute_map = { + "found_count": "found_count", + "not_found": "not_found", + "requested_count": "requested_count", + } + + def __init__(self_, found_count: int, not_found: List[str], requested_count: int, **kwargs): + """ + Metadata about the rows requested, including which ones were not found. + + :param found_count: Number of requested rows that were found and returned in ``data``. + :type found_count: int + + :param not_found: Row IDs from the request that do not exist in the reference table. Empty when every requested row was found. + :type not_found: [str] + + :param requested_count: Number of row IDs supplied in the ``row_id`` query parameter. + :type requested_count: int + """ + super().__init__(kwargs) + + self_.found_count = found_count + self_.not_found = not_found + self_.requested_count = requested_count diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index cd9fb33034..1cb1f841cb 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -10463,6 +10463,7 @@ ) from datadog_api_client.v2.model.table_result_v2_data_type import TableResultV2DataType from datadog_api_client.v2.model.table_row_resource_array import TableRowResourceArray +from datadog_api_client.v2.model.table_row_resource_array_meta import TableRowResourceArrayMeta from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData from datadog_api_client.v2.model.table_row_resource_data_attributes import TableRowResourceDataAttributes from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType @@ -18761,6 +18762,7 @@ "TableResultV2DataAttributesSchemaFieldsItems", "TableResultV2DataType", "TableRowResourceArray", + "TableRowResourceArrayMeta", "TableRowResourceData", "TableRowResourceDataAttributes", "TableRowResourceDataType",