Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
19 changes: 16 additions & 3 deletions src/datadog_api_client/v2/model/table_row_resource_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -18761,6 +18762,7 @@
"TableResultV2DataAttributesSchemaFieldsItems",
"TableResultV2DataType",
"TableRowResourceArray",
"TableRowResourceArrayMeta",
"TableRowResourceData",
"TableRowResourceDataAttributes",
"TableRowResourceDataType",
Expand Down
Loading