Skip to content

Commit d1b066b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 21ab312 of spec repo
1 parent 9c0f90b commit d1b066b

File tree

8 files changed

+167
-188
lines changed

8 files changed

+167
-188
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 80 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -13142,30 +13142,6 @@ components:
1314213142
CreateTableRequest:
1314313143
description: Request body for creating a new reference table from a local file
1314413144
or cloud storage.
13145-
example:
13146-
data:
13147-
attributes:
13148-
description: this is a cloud table generated via a cloud bucket sync
13149-
file_metadata:
13150-
access_details:
13151-
aws_detail:
13152-
aws_account_id: test-account-id
13153-
aws_bucket_name: test-bucket
13154-
file_path: test_rt.csv
13155-
sync_enabled: true
13156-
schema:
13157-
fields:
13158-
- name: name
13159-
type: STRING
13160-
- name: account_id
13161-
type: STRING
13162-
primary_keys:
13163-
- account_id
13164-
source: S3
13165-
table_name: test_reference_table
13166-
tags:
13167-
- test_tag
13168-
type: reference_table
1316913145
properties:
1317013146
data:
1317113147
$ref: '#/components/schemas/CreateTableRequestData'
@@ -13387,6 +13363,17 @@ components:
1338713363
CreateUploadRequest:
1338813364
description: Request to create an upload for a file to be ingested into a reference
1338913365
table.
13366+
example:
13367+
data:
13368+
attributes:
13369+
headers:
13370+
- product_id
13371+
- product_name
13372+
- price
13373+
part_count: 3
13374+
part_size: 10000000
13375+
table_name: my_products_table
13376+
type: upload
1339013377
properties:
1339113378
data:
1339213379
$ref: '#/components/schemas/CreateUploadRequestData'
@@ -51089,32 +51076,36 @@ components:
5108951076
type: string
5109051077
type: object
5109151078
TableResultV2DataAttributesFileMetadata:
51092-
description: Metadata specifying where and how to access the reference table's
51079+
description: 'Metadata specifying where and how to access the reference table''s
5109351080
data file.
51094-
oneOf:
51095-
- $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorage'
51096-
- $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataLocalFile'
51097-
TableResultV2DataAttributesFileMetadataCloudStorage:
51098-
additionalProperties: false
51099-
description: File metadata for reference tables created by cloud storage.
51081+
51082+
51083+
For cloud storage tables (S3/GCS/Azure): sync_enabled and access_details will
51084+
be present.
51085+
51086+
For local file tables: all fields are optional (typically only error fields
51087+
if present).'
5110051088
properties:
5110151089
access_details:
5110251090
$ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetails'
51091+
description: Cloud storage access configuration. Only present for cloud
51092+
storage sources (S3, GCS, Azure).
5110351093
error_message:
51104-
description: The error message returned from the sync.
51094+
description: The error message returned from the last operation (sync for
51095+
cloud storage, upload for local file).
5110551096
type: string
5110651097
error_row_count:
51107-
description: The number of rows that failed to sync.
51098+
description: The number of rows that failed to process.
5110851099
format: int64
5110951100
type: integer
5111051101
error_type:
5111151102
$ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorageErrorType'
51103+
description: The type of error that occurred during file processing. Only
51104+
applicable for cloud storage sources.
5111251105
sync_enabled:
51113-
description: Whether this table is synced automatically.
51106+
description: Whether this table is synced automatically from cloud storage.
51107+
Only applicable for cloud storage sources.
5111451108
type: boolean
51115-
required:
51116-
- access_details
51117-
title: CloudFileMetadataV2
5111851109
type: object
5111951110
TableResultV2DataAttributesFileMetadataCloudStorageErrorType:
5112051111
description: The type of error that occurred during file processing. This field
@@ -51141,21 +51132,6 @@ components:
5114151132
- STATE_ERROR
5114251133
- OPERATION_ERROR
5114351134
- SYSTEM_ERROR
51144-
TableResultV2DataAttributesFileMetadataLocalFile:
51145-
additionalProperties: false
51146-
description: File metadata for reference tables created by upload. Note that
51147-
upload_id is only returned in the immediate create/replace response and is
51148-
not available in subsequent GET requests.
51149-
properties:
51150-
error_message:
51151-
description: The error message returned from the creation/update.
51152-
type: string
51153-
error_row_count:
51154-
description: The number of rows that failed to create/update.
51155-
format: int64
51156-
type: integer
51157-
title: LocalFileMetadataV2
51158-
type: object
5115951135
TableResultV2DataAttributesFileMetadataOneOfAccessDetails:
5116051136
description: Cloud storage access configuration for the reference table data
5116151137
file.
@@ -73470,6 +73446,58 @@ paths:
7347073446
requestBody:
7347173447
content:
7347273448
application/json:
73449+
examples:
73450+
cloud_storage:
73451+
summary: Create table from cloud storage (S3)
73452+
value:
73453+
data:
73454+
attributes:
73455+
description: Customer reference data synced from S3
73456+
file_metadata:
73457+
access_details:
73458+
aws_detail:
73459+
aws_account_id: '924305315327'
73460+
aws_bucket_name: my-data-bucket
73461+
file_path: customers.csv
73462+
sync_enabled: true
73463+
schema:
73464+
fields:
73465+
- name: customer_id
73466+
type: STRING
73467+
- name: customer_name
73468+
type: STRING
73469+
- name: email
73470+
type: STRING
73471+
primary_keys:
73472+
- customer_id
73473+
source: S3
73474+
table_name: customer_reference_data
73475+
tags:
73476+
- team:data-platform
73477+
type: reference_table
73478+
local_file:
73479+
summary: Create table from local file upload
73480+
value:
73481+
data:
73482+
attributes:
73483+
description: Product catalog uploaded via local file
73484+
file_metadata:
73485+
upload_id: 00000000-0000-0000-0000-000000000000
73486+
schema:
73487+
fields:
73488+
- name: product_id
73489+
type: STRING
73490+
- name: product_name
73491+
type: STRING
73492+
- name: price
73493+
type: DOUBLE
73494+
primary_keys:
73495+
- product_id
73496+
source: LOCAL_FILE
73497+
table_name: product_catalog
73498+
tags:
73499+
- team:ecommerce
73500+
type: reference_table
7347373501
schema:
7347473502
$ref: '#/components/schemas/CreateTableRequest'
7347573503
required: true

features/v2/reference_tables.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ Feature: Reference Tables
1010
@generated @skip @team:DataDog/redapl-experiences
1111
Scenario: Create reference table returns "Bad Request" response
1212
Given new "CreateReferenceTable" request
13-
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}}
13+
And body with value {"data": {"attributes": {"file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "123456789000", "aws_bucket_name": "example-data-bucket", "file_path": "reference-tables/users.csv"}, "azure_detail": {"azure_client_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", "azure_container_name": "reference-data", "azure_storage_account_name": "examplestorageaccount", "azure_tenant_id": "cccccccc-4444-5555-6666-dddddddddddd", "file_path": "tables/users.csv"}, "gcp_detail": {"file_path": "data/reference_tables/users.csv", "gcp_bucket_name": "example-data-bucket", "gcp_project_id": "example-gcp-project-12345", "gcp_service_account_email": "example-service@example-gcp-project-12345.iam.gserviceaccount.com"}}, "sync_enabled": false}, "schema": {"fields": [{"name": "field_1", "type": "STRING"}], "primary_keys": ["field_1"]}, "source": "LOCAL_FILE", "table_name": "table_1", "tags": ["tag_1", "tag_2"]}, "type": "reference_table"}}
1414
When the request is sent
1515
Then the response status is 400 Bad Request
1616

1717
@generated @skip @team:DataDog/redapl-experiences
1818
Scenario: Create reference table returns "Created" response
1919
Given new "CreateReferenceTable" request
20-
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}}
20+
And body with value {"data": {"attributes": {"file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "123456789000", "aws_bucket_name": "example-data-bucket", "file_path": "reference-tables/users.csv"}, "azure_detail": {"azure_client_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", "azure_container_name": "reference-data", "azure_storage_account_name": "examplestorageaccount", "azure_tenant_id": "cccccccc-4444-5555-6666-dddddddddddd", "file_path": "tables/users.csv"}, "gcp_detail": {"file_path": "data/reference_tables/users.csv", "gcp_bucket_name": "example-data-bucket", "gcp_project_id": "example-gcp-project-12345", "gcp_service_account_email": "example-service@example-gcp-project-12345.iam.gserviceaccount.com"}}, "sync_enabled": false}, "schema": {"fields": [{"name": "field_1", "type": "STRING"}], "primary_keys": ["field_1"]}, "source": "LOCAL_FILE", "table_name": "table_1", "tags": ["tag_1", "tag_2"]}, "type": "reference_table"}}
2121
When the request is sent
2222
Then the response status is 201 Created
2323

2424
@generated @skip @team:DataDog/redapl-experiences
2525
Scenario: Create reference table upload returns "Bad Request" response
2626
Given new "CreateReferenceTableUpload" request
27-
And body with value {"data": {"attributes": {"headers": ["field_1", "field_2"], "part_count": 3, "part_size": 10000000, "table_name": ""}, "type": "upload"}}
27+
And body with value {"data": {"attributes": {"headers": ["product_id", "product_name", "price"], "part_count": 3, "part_size": 10000000, "table_name": "my_products_table"}, "type": "upload"}}
2828
When the request is sent
2929
Then the response status is 400 Bad Request
3030

services/reference_tables/src/v2/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ export { TableResultV2Array } from "./models/TableResultV2Array";
5353
export { TableResultV2Data } from "./models/TableResultV2Data";
5454
export { TableResultV2DataAttributes } from "./models/TableResultV2DataAttributes";
5555
export { TableResultV2DataAttributesFileMetadata } from "./models/TableResultV2DataAttributesFileMetadata";
56-
export { TableResultV2DataAttributesFileMetadataCloudStorage } from "./models/TableResultV2DataAttributesFileMetadataCloudStorage";
5756
export { TableResultV2DataAttributesFileMetadataCloudStorageErrorType } from "./models/TableResultV2DataAttributesFileMetadataCloudStorageErrorType";
58-
export { TableResultV2DataAttributesFileMetadataLocalFile } from "./models/TableResultV2DataAttributesFileMetadataLocalFile";
5957
export { TableResultV2DataAttributesFileMetadataOneOfAccessDetails } from "./models/TableResultV2DataAttributesFileMetadataOneOfAccessDetails";
6058
export { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail";
6159
export { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail";

services/reference_tables/src/v2/models/TableResultV2DataAttributes.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export class TableResultV2DataAttributes {
1818
"description"?: string;
1919
/**
2020
* Metadata specifying where and how to access the reference table's data file.
21+
*
22+
* For cloud storage tables (S3/GCS/Azure): sync_enabled and access_details will be present.
23+
* For local file tables: all fields are optional (typically only error fields if present).
2124
*/
2225
"fileMetadata"?: TableResultV2DataAttributesFileMetadata;
2326
/**
Lines changed: 78 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,83 @@
1-
import { UnparsedObject } from "@datadog/datadog-api-client";
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
22

3-
import { TableResultV2DataAttributesFileMetadataCloudStorage } from "./TableResultV2DataAttributesFileMetadataCloudStorage";
4-
import { TableResultV2DataAttributesFileMetadataLocalFile } from "./TableResultV2DataAttributesFileMetadataLocalFile";
3+
import { TableResultV2DataAttributesFileMetadataCloudStorageErrorType } from "./TableResultV2DataAttributesFileMetadataCloudStorageErrorType";
4+
import { TableResultV2DataAttributesFileMetadataOneOfAccessDetails } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetails";
55

66
/**
77
* Metadata specifying where and how to access the reference table's data file.
8+
*
9+
* For cloud storage tables (S3/GCS/Azure): sync_enabled and access_details will be present.
10+
* For local file tables: all fields are optional (typically only error fields if present).
811
*/
9-
export type TableResultV2DataAttributesFileMetadata =
10-
| TableResultV2DataAttributesFileMetadataCloudStorage
11-
| TableResultV2DataAttributesFileMetadataLocalFile
12-
| UnparsedObject;
12+
export class TableResultV2DataAttributesFileMetadata {
13+
/**
14+
* Cloud storage access configuration for the reference table data file.
15+
*/
16+
"accessDetails"?: TableResultV2DataAttributesFileMetadataOneOfAccessDetails;
17+
/**
18+
* The error message returned from the last operation (sync for cloud storage, upload for local file).
19+
*/
20+
"errorMessage"?: string;
21+
/**
22+
* The number of rows that failed to process.
23+
*/
24+
"errorRowCount"?: number;
25+
/**
26+
* The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors.
27+
*/
28+
"errorType"?: TableResultV2DataAttributesFileMetadataCloudStorageErrorType;
29+
/**
30+
* Whether this table is synced automatically from cloud storage. Only applicable for cloud storage sources.
31+
*/
32+
"syncEnabled"?: boolean;
33+
/**
34+
* A container for additional, undeclared properties.
35+
* This is a holder for any undeclared properties as specified with
36+
* the 'additionalProperties' keyword in the OAS document.
37+
*/
38+
"additionalProperties"?: { [key: string]: any };
39+
/**
40+
* @ignore
41+
*/
42+
"_unparsed"?: boolean;
43+
44+
/**
45+
* @ignore
46+
*/
47+
static readonly attributeTypeMap: AttributeTypeMap = {
48+
accessDetails: {
49+
baseName: "access_details",
50+
type: "TableResultV2DataAttributesFileMetadataOneOfAccessDetails",
51+
},
52+
errorMessage: {
53+
baseName: "error_message",
54+
type: "string",
55+
},
56+
errorRowCount: {
57+
baseName: "error_row_count",
58+
type: "number",
59+
format: "int64",
60+
},
61+
errorType: {
62+
baseName: "error_type",
63+
type: "TableResultV2DataAttributesFileMetadataCloudStorageErrorType",
64+
},
65+
syncEnabled: {
66+
baseName: "sync_enabled",
67+
type: "boolean",
68+
},
69+
additionalProperties: {
70+
baseName: "additionalProperties",
71+
type: "{ [key: string]: any; }",
72+
},
73+
};
74+
75+
/**
76+
* @ignore
77+
*/
78+
static getAttributeTypeMap(): AttributeTypeMap {
79+
return TableResultV2DataAttributesFileMetadata.attributeTypeMap;
80+
}
81+
82+
public constructor() {}
83+
}

services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataCloudStorage.ts

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)