diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 90e97c4cc9de..7857ca684aa3 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -119758,16 +119758,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. @@ -195763,6 +195791,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/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 99416833fc80..5450735008a7 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -9310,6 +9310,7 @@ export { TableResultV2DataAttributesSchema } from "./models/TableResultV2DataAtt export { TableResultV2DataAttributesSchemaFieldsItems } from "./models/TableResultV2DataAttributesSchemaFieldsItems"; export { TableResultV2DataType } from "./models/TableResultV2DataType"; export { TableRowResourceArray } from "./models/TableRowResourceArray"; +export { TableRowResourceArrayMeta } from "./models/TableRowResourceArrayMeta"; export { TableRowResourceData } from "./models/TableRowResourceData"; export { TableRowResourceDataAttributes } from "./models/TableRowResourceDataAttributes"; export { TableRowResourceDataType } from "./models/TableRowResourceDataType"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index c0096aa250a9..d66bc293c6e0 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -5604,6 +5604,7 @@ import { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail } fr import { TableResultV2DataAttributesSchema } from "./TableResultV2DataAttributesSchema"; import { TableResultV2DataAttributesSchemaFieldsItems } from "./TableResultV2DataAttributesSchemaFieldsItems"; import { TableRowResourceArray } from "./TableRowResourceArray"; +import { TableRowResourceArrayMeta } from "./TableRowResourceArrayMeta"; import { TableRowResourceData } from "./TableRowResourceData"; import { TableRowResourceDataAttributes } from "./TableRowResourceDataAttributes"; import { TableRowResourceIdentifier } from "./TableRowResourceIdentifier"; @@ -16504,6 +16505,7 @@ const typeMap: { [index: string]: any } = { TableResultV2DataAttributesSchemaFieldsItems: TableResultV2DataAttributesSchemaFieldsItems, TableRowResourceArray: TableRowResourceArray, + TableRowResourceArrayMeta: TableRowResourceArrayMeta, TableRowResourceData: TableRowResourceData, TableRowResourceDataAttributes: TableRowResourceDataAttributes, TableRowResourceIdentifier: TableRowResourceIdentifier, diff --git a/packages/datadog-api-client-v2/models/TableRowResourceArray.ts b/packages/datadog-api-client-v2/models/TableRowResourceArray.ts index 3995c29418d2..e5c8b83e6ab2 100644 --- a/packages/datadog-api-client-v2/models/TableRowResourceArray.ts +++ b/packages/datadog-api-client-v2/models/TableRowResourceArray.ts @@ -3,18 +3,23 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { TableRowResourceArrayMeta } from "./TableRowResourceArrayMeta"; import { TableRowResourceData } from "./TableRowResourceData"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * 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. */ export class TableRowResourceArray { /** * The rows. */ "data": Array; + /** + * Metadata about the rows requested, including which ones were not found. + */ + "meta"?: TableRowResourceArrayMeta; /** * A container for additional, undeclared properties. @@ -37,6 +42,10 @@ export class TableRowResourceArray { type: "Array", required: true, }, + meta: { + baseName: "meta", + type: "TableRowResourceArrayMeta", + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }", diff --git a/packages/datadog-api-client-v2/models/TableRowResourceArrayMeta.ts b/packages/datadog-api-client-v2/models/TableRowResourceArrayMeta.ts new file mode 100644 index 000000000000..fc7eaab7feaa --- /dev/null +++ b/packages/datadog-api-client-v2/models/TableRowResourceArrayMeta.ts @@ -0,0 +1,73 @@ +/** + * 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 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Metadata about the rows requested, including which ones were not found. + */ +export class TableRowResourceArrayMeta { + /** + * Number of requested rows that were found and returned in `data`. + */ + "foundCount": number; + /** + * Row IDs from the request that do not exist in the reference table. Empty when every requested row was found. + */ + "notFound": Array; + /** + * Number of row IDs supplied in the `row_id` query parameter. + */ + "requestedCount": number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + foundCount: { + baseName: "found_count", + type: "number", + required: true, + format: "int64", + }, + notFound: { + baseName: "not_found", + type: "Array", + required: true, + }, + requestedCount: { + baseName: "requested_count", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableRowResourceArrayMeta.attributeTypeMap; + } + + public constructor() {} +}