From fc528bd0d35bd60dd90aa6010efd93976d5531be Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 7 Nov 2025 21:13:12 +0000 Subject: [PATCH] Regenerate client from commit cd4cfde of spec repo --- .generator/schemas/v2/openapi.yaml | 333 ++++++++++-------- ...2_reference-tables_UpdateReferenceTable.rs | 80 ++--- src/datadogV2/api/api_reference_tables.rs | 16 +- .../model/model_create_table_request.rs | 4 +- .../model/model_create_table_request_data.rs | 43 +-- ...el_create_table_request_data_attributes.rs | 12 +- ...e_request_data_attributes_file_metadata.rs | 2 +- ..._attributes_file_metadata_cloud_storage.rs | 2 +- ...tes_file_metadata_one_of_access_details.rs | 8 +- ...tadata_one_of_access_details_aws_detail.rs | 6 +- ...data_one_of_access_details_azure_detail.rs | 10 +- ...tadata_one_of_access_details_gcp_detail.rs | 8 +- ...te_table_request_data_attributes_schema.rs | 4 +- ...est_data_attributes_schema_fields_items.rs | 2 +- .../model/model_create_upload_request.rs | 4 +- .../model/model_create_upload_request_data.rs | 43 +-- ...l_create_upload_request_data_attributes.rs | 10 +- .../model/model_create_upload_response.rs | 4 +- .../model_create_upload_response_data.rs | 28 +- ..._create_upload_response_data_attributes.rs | 4 +- .../model/model_patch_table_request.rs | 4 +- .../model/model_patch_table_request_data.rs | 43 +-- ...del_patch_table_request_data_attributes.rs | 10 +- ...e_request_data_attributes_file_metadata.rs | 2 +- ..._attributes_file_metadata_cloud_storage.rs | 2 +- ...tes_file_metadata_one_of_access_details.rs | 8 +- ...tadata_one_of_access_details_aws_detail.rs | 6 +- ...data_one_of_access_details_azure_detail.rs | 10 +- ...tadata_one_of_access_details_gcp_detail.rs | 8 +- ...ch_table_request_data_attributes_schema.rs | 6 +- ...est_data_attributes_schema_fields_items.rs | 2 +- src/datadogV2/model/model_table_result_v2.rs | 4 +- .../model/model_table_result_v2_array.rs | 2 +- .../model/model_table_result_v2_data.rs | 28 +- .../model_table_result_v2_data_attributes.rs | 16 +- ...result_v2_data_attributes_file_metadata.rs | 2 +- ..._attributes_file_metadata_cloud_storage.rs | 29 +- ...ata_attributes_file_metadata_local_file.rs | 19 +- ...tes_file_metadata_one_of_access_details.rs | 8 +- ...tadata_one_of_access_details_aws_detail.rs | 6 +- ...data_one_of_access_details_azure_detail.rs | 10 +- ...tadata_one_of_access_details_gcp_detail.rs | 8 +- ..._table_result_v2_data_attributes_schema.rs | 4 +- ..._v2_data_attributes_schema_fields_items.rs | 2 +- .../model/model_table_row_resource_array.rs | 2 +- .../model/model_table_row_resource_data.rs | 28 +- ...odel_table_row_resource_data_attributes.rs | 31 +- .../features/v2/reference_tables.feature | 6 +- 48 files changed, 385 insertions(+), 544 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6ed4b4236..eb8766d5c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -13066,7 +13066,8 @@ components: x-enum-varnames: - CREATE_RULESET CreateTableRequest: - description: The definition of `CreateTableRequest` object. + description: Request body for creating a new reference table from a local file + or cloud storage. example: data: attributes: @@ -13096,23 +13097,23 @@ components: $ref: '#/components/schemas/CreateTableRequestData' type: object CreateTableRequestData: - description: The definition of `CreateTableRequestData` object. + additionalProperties: false + description: The data object containing the table definition. properties: attributes: $ref: '#/components/schemas/CreateTableRequestDataAttributes' - id: - description: The ID of the reference table. - type: string type: $ref: '#/components/schemas/CreateTableRequestDataType' required: - type type: object CreateTableRequestDataAttributes: - description: The definition of `CreateTableRequestDataAttributes` object. + description: Attributes that define the reference table's configuration and + properties. properties: description: - description: The description of the reference table. + description: Optional text describing the purpose or contents of this reference + table. type: string file_metadata: $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadata' @@ -13121,11 +13122,14 @@ components: source: $ref: '#/components/schemas/ReferenceTableCreateSourceType' table_name: - description: The name of the reference table. - example: '' + description: Name to identify this reference table. + example: table_1 type: string tags: - description: The tags of the reference table. + description: Tags for organizing and filtering reference tables. + example: + - tag_1 + - tag_2 items: type: string type: array @@ -13135,8 +13139,8 @@ components: - source type: object CreateTableRequestDataAttributesFileMetadata: - description: The definition of `CreateTableRequestDataAttributesFileMetadata` - object. + description: Metadata specifying where and how to access the reference table's + data file. oneOf: - $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataCloudStorage' - $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataLocalFile' @@ -13162,15 +13166,15 @@ components: properties: upload_id: description: The upload ID. - example: '' + example: 00000000-0000-0000-0000-000000000000 type: string required: - upload_id title: LocalFileMetadataV2 type: object CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails: - description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` - object. + description: Cloud storage access configuration for the reference table data + file. properties: aws_detail: $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail' @@ -13180,15 +13184,14 @@ components: $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail' type: object CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail: - description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` - object. + description: Amazon Web Services S3 storage access configuration. properties: aws_account_id: - description: The ID of the AWS account. + description: AWS account ID where the S3 bucket is located. example: '123456789000' type: string aws_bucket_name: - description: The name of the Amazon S3 bucket. + description: S3 bucket containing the CSV file. example: example-data-bucket type: string file_path: @@ -13203,23 +13206,23 @@ components: x-oneOf-parent: - AwsDetail CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail: - description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` - object. + description: Azure Blob Storage access configuration. properties: azure_client_id: - description: The Azure client ID. + description: Azure service principal (application) client ID with permissions + to read from the container. example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb type: string azure_container_name: - description: The name of the Azure container. + description: Azure Blob Storage container containing the CSV file. example: reference-data type: string azure_storage_account_name: - description: The name of the Azure storage account. + description: Azure storage account where the container is located. example: examplestorageaccount type: string azure_tenant_id: - description: The ID of the Azure tenant. + description: Azure Active Directory tenant ID. example: cccccccc-4444-5555-6666-dddddddddddd type: string file_path: @@ -13237,8 +13240,7 @@ components: x-oneOf-parent: - AzureDetail CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail: - description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` - object. + description: Google Cloud Platform storage access configuration. properties: file_path: description: The relative file path from the GCS bucket root to the CSV @@ -13246,15 +13248,15 @@ components: example: data/reference_tables/users.csv type: string gcp_bucket_name: - description: The name of the GCP bucket. + description: GCP bucket containing the CSV file. example: example-data-bucket type: string gcp_project_id: - description: The ID of the GCP project. + description: GCP project ID where the bucket is located. example: example-gcp-project-12345 type: string gcp_service_account_email: - description: The email of the GCP service account. + description: Service account email with read permissions for the GCS bucket. example: example-service@example-gcp-project-12345.iam.gserviceaccount.com type: string required: @@ -13266,10 +13268,10 @@ components: x-oneOf-parent: - GcpDetail CreateTableRequestDataAttributesSchema: - description: The definition of `CreateTableRequestDataAttributesSchema` object. + description: Schema defining the structure and columns of the reference table. properties: fields: - description: The `schema` `fields`. + description: The schema fields. items: $ref: '#/components/schemas/CreateTableRequestDataAttributesSchemaFieldsItems' type: array @@ -13278,7 +13280,7 @@ components: Only one primary key is supported, and it is used as an ID to retrieve rows. example: - - '' + - field_1 items: type: string type: array @@ -13287,12 +13289,11 @@ components: - primary_keys type: object CreateTableRequestDataAttributesSchemaFieldsItems: - description: The definition of `CreateTableRequestDataAttributesSchemaFieldsItems` - object. + description: A single field (column) in the reference table schema to be created. properties: name: description: The field name. - example: '' + example: field_1 type: string type: $ref: '#/components/schemas/ReferenceTableSchemaFieldType' @@ -13310,50 +13311,51 @@ components: x-enum-varnames: - REFERENCE_TABLE CreateUploadRequest: - description: The definition of `CreateUploadRequest` object. + description: Request to create an upload for a file to be ingested into a reference + table. properties: data: $ref: '#/components/schemas/CreateUploadRequestData' type: object CreateUploadRequestData: - description: The definition of `CreateUploadRequestData` object. + additionalProperties: false + description: Request data for creating an upload for a file to be ingested into + a reference table. properties: attributes: $ref: '#/components/schemas/CreateUploadRequestDataAttributes' - id: - description: The ID of the upload. - type: string type: $ref: '#/components/schemas/CreateUploadRequestDataType' required: - type type: object CreateUploadRequestDataAttributes: - description: The definition of `CreateUploadRequestDataAttributes` object. + description: Upload configuration specifying how data is uploaded by the user, + and properties of the table to associate the upload with. properties: headers: - description: The headers of the file to upload. + description: The CSV file headers that define the schema fields, provided + in the same order as the columns in the uploaded file. example: - - '' + - field_1 + - field_2 items: type: string type: array part_count: - description: The number of parts in the upload. + description: Number of parts to split the file into for multipart upload. example: 3 format: int32 maximum: 20 type: integer part_size: - description: The size of each part in the upload in bytes. For multipart - uploads (part_count > 1), all parts except the last one must be at least - 5,000,000 bytes. For single-part uploads (part_count = 1), any size is - allowed. + description: The size of each part in the upload in bytes. All parts except + the last one must be at least 5,000,000 bytes. example: 10000000 format: int64 type: integer table_name: - description: The name of the reference table. + description: Name of the table to associate with this upload. example: '' type: string required: @@ -13372,18 +13374,21 @@ components: x-enum-varnames: - UPLOAD CreateUploadResponse: - description: The definition of `CreateUploadResponse` object. + description: Information about the upload created containing the upload ID and + pre-signed URLs to PUT chunks of the CSV file to. properties: data: $ref: '#/components/schemas/CreateUploadResponseData' type: object CreateUploadResponseData: - description: The definition of `CreateUploadResponseData` object. + additionalProperties: false + description: Upload ID and attributes of the created upload. properties: attributes: $ref: '#/components/schemas/CreateUploadResponseDataAttributes' id: - description: The ID of the upload. + description: Unique identifier for this upload. Use this ID when creating + the reference table. type: string type: $ref: '#/components/schemas/CreateUploadResponseDataType' @@ -13391,10 +13396,11 @@ components: - type type: object CreateUploadResponseDataAttributes: - description: The definition of `CreateUploadResponseDataAttributes` object. + description: Pre-signed URLs for uploading parts of the file. properties: part_urls: - description: The URLs of the parts in the upload. + description: The pre-signed URLs for uploading parts. These URLs expire + after 5 minutes. items: type: string type: array @@ -38129,7 +38135,7 @@ components: $ref: '#/components/schemas/Version' type: object PatchTableRequest: - description: The definition of `PatchTableRequest` object. + description: Request body for updating an existing reference table. example: data: attributes: @@ -38152,30 +38158,30 @@ components: sync_enabled: false tags: - test_tag - id: 00000000-0000-0000-0000-000000000000 type: reference_table properties: data: $ref: '#/components/schemas/PatchTableRequestData' type: object PatchTableRequestData: - description: The definition of `PatchTableRequestData` object. + additionalProperties: false + description: The data object containing the partial table definition updates. properties: attributes: $ref: '#/components/schemas/PatchTableRequestDataAttributes' - id: - description: The ID of the reference table. - type: string type: $ref: '#/components/schemas/PatchTableRequestDataType' required: - type type: object PatchTableRequestDataAttributes: - description: The definition of `PatchTableRequestDataAttributes` object. + description: Attributes that define the updates to the reference table's configuration + and properties. properties: description: - description: The description of the reference table. + description: Optional text describing the purpose or contents of this reference + table. + example: example description type: string file_metadata: $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadata' @@ -38183,16 +38189,20 @@ components: $ref: '#/components/schemas/PatchTableRequestDataAttributesSchema' sync_enabled: description: Whether this table is synced automatically. + example: false type: boolean tags: - description: The tags of the reference table. + description: Tags for organizing and filtering reference tables. + example: + - tag_1 + - tag_2 items: type: string type: array type: object PatchTableRequestDataAttributesFileMetadata: - description: The definition of `PatchTableRequestDataAttributesFileMetadata` - object. + description: Metadata specifying where and how to access the reference table's + data file. oneOf: - $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataCloudStorage' - $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataLocalFile' @@ -38215,15 +38225,15 @@ components: properties: upload_id: description: The upload ID. - example: '' + example: 00000000-0000-0000-0000-000000000000 type: string required: - upload_id title: LocalFileMetadataV2 type: object PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails: - description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails` - object. + description: Cloud storage access configuration for the reference table data + file. properties: aws_detail: $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail' @@ -38233,15 +38243,14 @@ components: $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail' type: object PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail: - description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` - object. + description: Amazon Web Services S3 storage access configuration. properties: aws_account_id: - description: The ID of the AWS account. + description: AWS account ID where the S3 bucket is located. example: '123456789000' type: string aws_bucket_name: - description: The name of the AWS bucket. + description: S3 bucket containing the CSV file. example: example-data-bucket type: string file_path: @@ -38252,23 +38261,23 @@ components: x-oneOf-parent: - AwsDetail PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail: - description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` - object. + description: Azure Blob Storage access configuration. properties: azure_client_id: - description: The Azure client ID. + description: Azure service principal (application) client ID with permissions + to read from the container. example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb type: string azure_container_name: - description: The name of the Azure container. + description: Azure Blob Storage container containing the CSV file. example: reference-data type: string azure_storage_account_name: - description: The name of the Azure storage account. + description: Azure storage account where the container is located. example: examplestorageaccount type: string azure_tenant_id: - description: The ID of the Azure tenant. + description: Azure Active Directory tenant ID. example: cccccccc-4444-5555-6666-dddddddddddd type: string file_path: @@ -38280,8 +38289,7 @@ components: x-oneOf-parent: - AzureDetail PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail: - description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` - object. + description: Google Cloud Platform storage access configuration. properties: file_path: description: The relative file path from the GCS bucket root to the CSV @@ -38289,34 +38297,35 @@ components: example: data/reference_tables/users.csv type: string gcp_bucket_name: - description: The name of the GCP bucket. + description: GCP bucket containing the CSV file. example: example-data-bucket type: string gcp_project_id: - description: The ID of the GCP project. + description: GCP project ID where the bucket is located. example: example-gcp-project-12345 type: string gcp_service_account_email: - description: The email of the GCP service account. + description: Service account email with read permissions for the GCS bucket. example: example-service@example-gcp-project-12345.iam.gserviceaccount.com type: string type: object x-oneOf-parent: - GcpDetail PatchTableRequestDataAttributesSchema: - description: The definition of `PatchTableRequestDataAttributesSchema` object. + description: Schema defining the updates to the structure and columns of the + reference table. Schema fields cannot be deleted or renamed. properties: fields: - description: The `schema` `fields`. + description: The schema fields. items: $ref: '#/components/schemas/PatchTableRequestDataAttributesSchemaFieldsItems' type: array primary_keys: description: List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve - rows. + rows. Primary keys cannot be changed after table creation. example: - - '' + - field_1 items: type: string type: array @@ -38325,12 +38334,12 @@ components: - primary_keys type: object PatchTableRequestDataAttributesSchemaFieldsItems: - description: The definition of `PatchTableRequestDataAttributesSchemaFieldsItems` - object. + description: A single field (column) in the reference table schema to be updated. + Schema fields cannot be deleted or renamed. properties: name: description: The field name. - example: '' + example: field_1 type: string type: $ref: '#/components/schemas/ReferenceTableSchemaFieldType' @@ -50806,16 +50815,21 @@ components: type: number type: object TableResultV2: - description: The definition of `TableResultV2` object. + description: A reference table resource containing its full configuration and + state. example: data: attributes: created_by: 00000000-0000-0000-0000-000000000000 description: example description file_metadata: - access_details: {} - upload_id: 00000000-0000-0000-0000-000000000000 - last_updated_by: '' + access_details: + aws_detail: + aws_account_id: '123456789000' + aws_bucket_name: my-bucket + file_path: path/to/file.csv + sync_enabled: true + last_updated_by: 00000000-0000-0000-0000-000000000000 row_count: 5 schema: fields: @@ -50825,7 +50839,7 @@ components: type: STRING primary_keys: - id - source: LOCAL_FILE + source: S3 status: DONE table_name: test_reference_table tags: @@ -50839,7 +50853,7 @@ components: $ref: '#/components/schemas/TableResultV2Data' type: object TableResultV2Array: - description: The definition of `TableResultV2Array` object. + description: List of reference tables. example: data: - attributes: @@ -50911,12 +50925,14 @@ components: - data type: object TableResultV2Data: - description: The definition of `TableResultV2Data` object. + additionalProperties: false + description: The data object containing the reference table configuration and + state. properties: attributes: $ref: '#/components/schemas/TableResultV2DataAttributes' id: - description: The ID of the reference table. + description: Unique identifier for the reference table. type: string type: $ref: '#/components/schemas/TableResultV2DataType' @@ -50924,22 +50940,28 @@ components: - type type: object TableResultV2DataAttributes: - description: The definition of `TableResultV2DataAttributes` object. + description: Attributes that define the reference table's configuration and + properties. properties: created_by: description: UUID of the user who created the reference table. + example: 00000000-0000-0000-0000-000000000000 type: string description: - description: The description of the reference table. + description: Optional text describing the purpose or contents of this reference + table. + example: example description type: string file_metadata: $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadata' last_updated_by: description: UUID of the user who last updated the reference table. + example: 00000000-0000-0000-0000-000000000000 type: string row_count: description: The number of successfully processed rows in the reference table. + example: 5 format: int64 type: integer schema: @@ -50947,23 +50969,30 @@ components: source: $ref: '#/components/schemas/ReferenceTableSourceType' status: - description: The status of the reference table. + description: The processing status of the table. + example: DONE type: string table_name: - description: The name of the reference table. + description: Unique name to identify this reference table. Used in enrichment + processors and API calls. + example: table_1 type: string tags: - description: The tags of the reference table. + description: Tags for organizing and filtering reference tables. + example: + - tag_1 + - tag_2 items: type: string type: array updated_at: - description: The timestamp of the last update to the reference table in - ISO 8601 format. + description: When the reference table was last updated, in ISO 8601 format. + example: '2000-01-01T01:00:00+00:00' type: string type: object TableResultV2DataAttributesFileMetadata: - description: The definition of `TableResultV2DataAttributesFileMetadata` object. + description: Metadata specifying where and how to access the reference table's + data file. oneOf: - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorage' - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataLocalFile' @@ -50984,6 +51013,8 @@ components: sync_enabled: description: Whether this table is synced automatically. type: boolean + required: + - access_details title: CloudFileMetadataV2 type: object TableResultV2DataAttributesFileMetadataCloudStorageErrorType: @@ -51012,7 +51043,9 @@ components: - OPERATION_ERROR - SYSTEM_ERROR TableResultV2DataAttributesFileMetadataLocalFile: - description: File metadata for reference tables created by upload. + description: File metadata for reference tables created by upload. Note that + upload_id is only returned in the immediate create/replace response and is + not available in subsequent GET requests. properties: error_message: description: The error message returned from the creation/update. @@ -51021,14 +51054,11 @@ components: description: The number of rows that failed to create/update. format: int64 type: integer - upload_id: - description: The upload ID that was used to create/update the table. - type: string title: LocalFileMetadataV2 type: object TableResultV2DataAttributesFileMetadataOneOfAccessDetails: - description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetails` - object. + description: Cloud storage access configuration for the reference table data + file. properties: aws_detail: $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail' @@ -51038,15 +51068,14 @@ components: $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail' type: object TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail: - description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail` - object. + description: Amazon Web Services S3 storage access configuration. properties: aws_account_id: - description: The ID of the AWS account. + description: AWS account ID where the S3 bucket is located. example: '123456789000' type: string aws_bucket_name: - description: The name of the AWS bucket. + description: S3 bucket containing the CSV file. example: example-data-bucket type: string file_path: @@ -51057,23 +51086,23 @@ components: x-oneOf-parent: - AwsDetail TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail: - description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail` - object. + description: Azure Blob Storage access configuration. properties: azure_client_id: - description: The Azure client ID. + description: Azure service principal (application) client ID with permissions + to read from the container. example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb type: string azure_container_name: - description: The name of the Azure container. + description: Azure Blob Storage container containing the CSV file. example: reference-data type: string azure_storage_account_name: - description: The name of the Azure storage account. + description: Azure storage account where the container is located. example: examplestorageaccount type: string azure_tenant_id: - description: The ID of the Azure tenant. + description: Azure Active Directory tenant ID. example: cccccccc-4444-5555-6666-dddddddddddd type: string file_path: @@ -51085,8 +51114,7 @@ components: x-oneOf-parent: - AzureDetail TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail: - description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail` - object. + description: Google Cloud Platform storage access configuration. properties: file_path: description: The relative file path from the GCS bucket root to the CSV @@ -51094,25 +51122,25 @@ components: example: data/reference_tables/users.csv type: string gcp_bucket_name: - description: The name of the GCP bucket. + description: GCP bucket containing the CSV file. example: example-data-bucket type: string gcp_project_id: - description: The ID of the GCP project. + description: GCP project ID where the bucket is located. example: example-gcp-project-12345 type: string gcp_service_account_email: - description: The email of the GCP service account. + description: Service account email with read permissions for the GCS bucket. example: example-service@example-gcp-project-12345.iam.gserviceaccount.com type: string type: object x-oneOf-parent: - GcpDetail TableResultV2DataAttributesSchema: - description: The definition of `TableResultV2DataAttributesSchema` object. + description: Schema defining the structure and columns of the reference table. properties: fields: - description: The `schema` `fields`. + description: The schema fields. items: $ref: '#/components/schemas/TableResultV2DataAttributesSchemaFieldsItems' type: array @@ -51121,7 +51149,7 @@ components: Only one primary key is supported, and it is used as an ID to retrieve rows. example: - - '' + - field_1 items: type: string type: array @@ -51130,12 +51158,11 @@ components: - primary_keys type: object TableResultV2DataAttributesSchemaFieldsItems: - description: The definition of `TableResultV2DataAttributesSchemaFieldsItems` - object. + description: A single field (column) in the reference table schema to be returned. properties: name: description: The field name. - example: '' + example: field_1 type: string type: $ref: '#/components/schemas/ReferenceTableSchemaFieldType' @@ -51153,7 +51180,7 @@ components: x-enum-varnames: - REFERENCE_TABLE TableRowResourceArray: - description: The definition of `TableRowResourceArray` object. + description: List of rows from a reference table query. properties: data: description: The rows. @@ -51164,12 +51191,13 @@ components: - data type: object TableRowResourceData: - description: The definition of `TableRowResourceData` object. + additionalProperties: false + description: The data object containing the row column names and values. properties: attributes: $ref: '#/components/schemas/TableRowResourceDataAttributes' id: - description: The ID of the row. + description: Row identifier, corresponding to the primary key value. type: string type: $ref: '#/components/schemas/TableRowResourceDataType' @@ -51177,11 +51205,12 @@ components: - type type: object TableRowResourceDataAttributes: - description: The definition of `TableRowResourceDataAttributes` object. + additionalProperties: false + description: Column values for this row in the reference table. properties: values: - additionalProperties: {} - description: The values of the row. + description: Key-value pairs representing the row data, where keys are field + names from the schema. type: object type: object TableRowResourceDataType: @@ -73141,8 +73170,8 @@ paths: format: int64 minimum: 0 type: integer - - description: Sort field and direction. Use field name for ascending, prefix - with "-" for descending. + - description: Sort field and direction for the list of reference tables. Use + field name for ascending, prefix with "-" for descending. example: -updated_at in: query name: sort @@ -73189,12 +73218,12 @@ paths: tags: - Reference Tables post: - description: 'Create a new reference table. You can provide data in two ways: - 1) Call POST api/v2/reference-tables/upload first to get an upload ID, then - PUT chunks of CSV data to each provided URL, and finally call this POST endpoint - with the upload_id in file_metadata, OR 2) Provide access_details in file_metadata - pointing to a CSV file in cloud storage (Amazon S3, Azure Blob Storage, or - GCP Cloud Storage).' + description: "Creates a reference table. You can provide data in two ways:\n1. + Call POST /api/v2/reference-tables/upload to get an upload ID. Then, PUT the + CSV data\n (not the file itself) in chunks to each URL in the request body. + Finally, call this\n POST endpoint with `upload_id` in `file_metadata`.\n2. + Provide `access_details` in `file_metadata` pointing to a CSV file in cloud + storage." operationId: CreateReferenceTable requestBody: content: @@ -73227,7 +73256,7 @@ paths: description: Delete a reference table by ID operationId: DeleteTable parameters: - - description: The ID of the reference table to delete + - description: Unique identifier of the reference table to delete in: path name: id required: true @@ -73253,7 +73282,7 @@ paths: description: Get a reference table by ID operationId: GetTable parameters: - - description: The ID of the reference table to retrieve + - description: Unique identifier of the reference table to retrieve in: path name: id required: true @@ -73290,7 +73319,7 @@ paths: pointing to a CSV file in the same type of cloud storage.' operationId: UpdateReferenceTable parameters: - - description: The ID of the reference table to update + - description: Unique identifier of the reference table to update in: path name: id required: true @@ -73323,7 +73352,7 @@ paths: description: Get reference table rows by their primary key values. operationId: GetRowsByID parameters: - - description: The ID of the reference table + - description: Unique identifier of the reference table to get rows from example: table-123 in: path name: id diff --git a/examples/v2_reference-tables_UpdateReferenceTable.rs b/examples/v2_reference-tables_UpdateReferenceTable.rs index 87101d59c..7311210ee 100644 --- a/examples/v2_reference-tables_UpdateReferenceTable.rs +++ b/examples/v2_reference-tables_UpdateReferenceTable.rs @@ -18,48 +18,48 @@ async fn main() { let body = PatchTableRequest ::new().data( - PatchTableRequestData::new(PatchTableRequestDataType::REFERENCE_TABLE) - .attributes( - PatchTableRequestDataAttributes::new() - .description("this is a cloud table generated via a cloud bucket sync".to_string()) - .file_metadata( - PatchTableRequestDataAttributesFileMetadata - ::PatchTableRequestDataAttributesFileMetadataCloudStorage( - Box::new( - PatchTableRequestDataAttributesFileMetadataCloudStorage::new() - .access_details( - PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails - ::new().aws_detail( - PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail - ::new() - .aws_account_id("test-account-id".to_string()) - .aws_bucket_name("test-bucket".to_string()) - .file_path("test_rt.csv".to_string()), - ), - ) - .sync_enabled(true), - ), - ), - ) - .schema( - PatchTableRequestDataAttributesSchema::new( - vec![ - PatchTableRequestDataAttributesSchemaFieldsItems::new( - "id".to_string(), - ReferenceTableSchemaFieldType::INT32, - ), - PatchTableRequestDataAttributesSchemaFieldsItems::new( - "name".to_string(), - ReferenceTableSchemaFieldType::STRING, + PatchTableRequestData::new( + PatchTableRequestDataType::REFERENCE_TABLE, + ).attributes( + PatchTableRequestDataAttributes::new() + .description("this is a cloud table generated via a cloud bucket sync".to_string()) + .file_metadata( + PatchTableRequestDataAttributesFileMetadata + ::PatchTableRequestDataAttributesFileMetadataCloudStorage( + Box::new( + PatchTableRequestDataAttributesFileMetadataCloudStorage::new() + .access_details( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails + ::new().aws_detail( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail + ::new() + .aws_account_id("test-account-id".to_string()) + .aws_bucket_name("test-bucket".to_string()) + .file_path("test_rt.csv".to_string()), + ), ) - ], - vec!["id".to_string()], + .sync_enabled(true), ), - ) - .sync_enabled(false) - .tags(vec!["test_tag".to_string()]), - ) - .id("00000000-0000-0000-0000-000000000000".to_string()), + ), + ) + .schema( + PatchTableRequestDataAttributesSchema::new( + vec![ + PatchTableRequestDataAttributesSchemaFieldsItems::new( + "id".to_string(), + ReferenceTableSchemaFieldType::INT32, + ), + PatchTableRequestDataAttributesSchemaFieldsItems::new( + "name".to_string(), + ReferenceTableSchemaFieldType::STRING, + ) + ], + vec!["id".to_string()], + ), + ) + .sync_enabled(false) + .tags(vec!["test_tag".to_string()]), + ), ); let configuration = datadog::Configuration::new(); let api = ReferenceTablesAPI::with_config(configuration); diff --git a/src/datadogV2/api/api_reference_tables.rs b/src/datadogV2/api/api_reference_tables.rs index 2d32f016b..52a90333b 100644 --- a/src/datadogV2/api/api_reference_tables.rs +++ b/src/datadogV2/api/api_reference_tables.rs @@ -18,7 +18,7 @@ pub struct ListTablesOptionalParams { pub page_limit: Option, /// Number of tables to skip for pagination. pub page_offset: Option, - /// Sort field and direction. Use field name for ascending, prefix with "-" for descending. + /// Sort field and direction for the list of reference tables. Use field name for ascending, prefix with "-" for descending. pub sort: Option, /// Filter by table status. pub filter_status: Option, @@ -39,7 +39,7 @@ impl ListTablesOptionalParams { self.page_offset = Some(value); self } - /// Sort field and direction. Use field name for ascending, prefix with "-" for descending. + /// Sort field and direction for the list of reference tables. Use field name for ascending, prefix with "-" for descending. pub fn sort(mut self, value: crate::datadogV2::model::ReferenceTableSortType) -> Self { self.sort = Some(value); self @@ -182,7 +182,11 @@ impl ReferenceTablesAPI { Self { config, client } } - /// Create a new reference table. You can provide data in two ways: 1) Call POST api/v2/reference-tables/upload first to get an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this POST endpoint with the upload_id in file_metadata, OR 2) Provide access_details in file_metadata pointing to a CSV file in cloud storage (Amazon S3, Azure Blob Storage, or GCP Cloud Storage). + /// Creates a reference table. You can provide data in two ways: + /// 1. Call POST /api/v2/reference-tables/upload to get an upload ID. Then, PUT the CSV data + /// (not the file itself) in chunks to each URL in the request body. Finally, call this + /// POST endpoint with `upload_id` in `file_metadata`. + /// 2. Provide `access_details` in `file_metadata` pointing to a CSV file in cloud storage. pub async fn create_reference_table( &self, body: crate::datadogV2::model::CreateTableRequest, @@ -202,7 +206,11 @@ impl ReferenceTablesAPI { } } - /// Create a new reference table. You can provide data in two ways: 1) Call POST api/v2/reference-tables/upload first to get an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this POST endpoint with the upload_id in file_metadata, OR 2) Provide access_details in file_metadata pointing to a CSV file in cloud storage (Amazon S3, Azure Blob Storage, or GCP Cloud Storage). + /// Creates a reference table. You can provide data in two ways: + /// 1. Call POST /api/v2/reference-tables/upload to get an upload ID. Then, PUT the CSV data + /// (not the file itself) in chunks to each URL in the request body. Finally, call this + /// POST endpoint with `upload_id` in `file_metadata`. + /// 2. Provide `access_details` in `file_metadata` pointing to a CSV file in cloud storage. pub async fn create_reference_table_with_http_info( &self, body: crate::datadogV2::model::CreateTableRequest, diff --git a/src/datadogV2/model/model_create_table_request.rs b/src/datadogV2/model/model_create_table_request.rs index 01abe9ffc..8b9af8273 100644 --- a/src/datadogV2/model/model_create_table_request.rs +++ b/src/datadogV2/model/model_create_table_request.rs @@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequest` object. +/// Request body for creating a new reference table from a local file or cloud storage. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateTableRequest { - /// The definition of `CreateTableRequestData` object. + /// The data object containing the table definition. #[serde(rename = "data")] pub data: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_create_table_request_data.rs b/src/datadogV2/model/model_create_table_request_data.rs index 12637227d..fcc813da7 100644 --- a/src/datadogV2/model/model_create_table_request_data.rs +++ b/src/datadogV2/model/model_create_table_request_data.rs @@ -6,22 +6,17 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequestData` object. +/// The data object containing the table definition. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateTableRequestData { - /// The definition of `CreateTableRequestDataAttributes` object. + /// Attributes that define the reference table's configuration and properties. #[serde(rename = "attributes")] pub attributes: Option, - /// The ID of the reference table. - #[serde(rename = "id")] - pub id: Option, /// Reference table resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::CreateTableRequestDataType, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, #[serde(skip)] #[serde(default)] pub(crate) _unparsed: bool, @@ -33,9 +28,7 @@ impl CreateTableRequestData { ) -> CreateTableRequestData { CreateTableRequestData { attributes: None, - id: None, type_, - additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } } @@ -47,19 +40,6 @@ impl CreateTableRequestData { self.attributes = Some(value); self } - - pub fn id(mut self, value: String) -> Self { - self.id = Some(value); - self - } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } } impl<'de> Deserialize<'de> for CreateTableRequestData { @@ -82,12 +62,7 @@ impl<'de> Deserialize<'de> for CreateTableRequestData { let mut attributes: Option< crate::datadogV2::model::CreateTableRequestDataAttributes, > = None; - let mut id: Option = None; let mut type_: Option = None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); let mut _unparsed = false; while let Some((k, v)) = map.next_entry::()? { @@ -98,12 +73,6 @@ impl<'de> Deserialize<'de> for CreateTableRequestData { } attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } - "id" => { - if v.is_null() { - continue; - } - id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } "type" => { type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?); if let Some(ref _type_) = type_ { @@ -116,9 +85,9 @@ impl<'de> Deserialize<'de> for CreateTableRequestData { } } &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } + return Err(serde::de::Error::custom( + "Additional properties not allowed", + )); } } } @@ -126,9 +95,7 @@ impl<'de> Deserialize<'de> for CreateTableRequestData { let content = CreateTableRequestData { attributes, - id, type_, - additional_properties, _unparsed, }; diff --git a/src/datadogV2/model/model_create_table_request_data_attributes.rs b/src/datadogV2/model/model_create_table_request_data_attributes.rs index 6ccfe9402..198606334 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes.rs @@ -6,28 +6,28 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequestDataAttributes` object. +/// Attributes that define the reference table's configuration and properties. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateTableRequestDataAttributes { - /// The description of the reference table. + /// Optional text describing the purpose or contents of this reference table. #[serde(rename = "description")] pub description: Option, - /// The definition of `CreateTableRequestDataAttributesFileMetadata` object. + /// Metadata specifying where and how to access the reference table's data file. #[serde(rename = "file_metadata")] pub file_metadata: Option, - /// The definition of `CreateTableRequestDataAttributesSchema` object. + /// Schema defining the structure and columns of the reference table. #[serde(rename = "schema")] pub schema: crate::datadogV2::model::CreateTableRequestDataAttributesSchema, /// The source type for creating reference table data. Only these source types can be created through this API. #[serde(rename = "source")] pub source: crate::datadogV2::model::ReferenceTableCreateSourceType, - /// The name of the reference table. + /// Name to identify this reference table. #[serde(rename = "table_name")] pub table_name: String, - /// The tags of the reference table. + /// Tags for organizing and filtering reference tables. #[serde(rename = "tags")] pub tags: Option>, #[serde(flatten)] diff --git a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata.rs b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata.rs index 997156c6e..c19245df3 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata.rs @@ -3,7 +3,7 @@ // Copyright 2019-Present Datadog, Inc. use serde::{Deserialize, Deserializer, Serialize}; -/// The definition of `CreateTableRequestDataAttributesFileMetadata` object. +/// Metadata specifying where and how to access the reference table's data file. #[non_exhaustive] #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(untagged)] diff --git a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_cloud_storage.rs b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_cloud_storage.rs index 6338ac840..250259e17 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_cloud_storage.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_cloud_storage.rs @@ -11,7 +11,7 @@ use std::fmt::{self, Formatter}; #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateTableRequestDataAttributesFileMetadataCloudStorage { - /// The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. + /// Cloud storage access configuration for the reference table data file. #[serde(rename = "access_details")] pub access_details: crate::datadogV2::model::CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails, diff --git a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details.rs b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details.rs index 22007923e..95778baf6 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details.rs @@ -6,18 +6,18 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. +/// Cloud storage access configuration for the reference table data file. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails { - /// The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + /// Amazon Web Services S3 storage access configuration. #[serde(rename = "aws_detail")] pub aws_detail: Option, - /// The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + /// Azure Blob Storage access configuration. #[serde(rename = "azure_detail")] pub azure_detail: Option, - /// The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + /// Google Cloud Platform storage access configuration. #[serde(rename = "gcp_detail")] pub gcp_detail: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rs b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rs index 3d6cdaa1f..31e7bc835 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rs @@ -6,15 +6,15 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. +/// Amazon Web Services S3 storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail { - /// The ID of the AWS account. + /// AWS account ID where the S3 bucket is located. #[serde(rename = "aws_account_id")] pub aws_account_id: String, - /// The name of the Amazon S3 bucket. + /// S3 bucket containing the CSV file. #[serde(rename = "aws_bucket_name")] pub aws_bucket_name: String, /// The relative file path from the S3 bucket root to the CSV file. diff --git a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rs b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rs index bcf344cbc..3fb2876de 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rs @@ -6,21 +6,21 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. +/// Azure Blob Storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail { - /// The Azure client ID. + /// Azure service principal (application) client ID with permissions to read from the container. #[serde(rename = "azure_client_id")] pub azure_client_id: String, - /// The name of the Azure container. + /// Azure Blob Storage container containing the CSV file. #[serde(rename = "azure_container_name")] pub azure_container_name: String, - /// The name of the Azure storage account. + /// Azure storage account where the container is located. #[serde(rename = "azure_storage_account_name")] pub azure_storage_account_name: String, - /// The ID of the Azure tenant. + /// Azure Active Directory tenant ID. #[serde(rename = "azure_tenant_id")] pub azure_tenant_id: String, /// The relative file path from the Azure container root to the CSV file. diff --git a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs index 4317f4308..a20bfbf26 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. +/// Google Cloud Platform storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] @@ -14,13 +14,13 @@ pub struct CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDeta /// The relative file path from the GCS bucket root to the CSV file. #[serde(rename = "file_path")] pub file_path: String, - /// The name of the GCP bucket. + /// GCP bucket containing the CSV file. #[serde(rename = "gcp_bucket_name")] pub gcp_bucket_name: String, - /// The ID of the GCP project. + /// GCP project ID where the bucket is located. #[serde(rename = "gcp_project_id")] pub gcp_project_id: String, - /// The email of the GCP service account. + /// Service account email with read permissions for the GCS bucket. #[serde(rename = "gcp_service_account_email")] pub gcp_service_account_email: String, #[serde(flatten)] diff --git a/src/datadogV2/model/model_create_table_request_data_attributes_schema.rs b/src/datadogV2/model/model_create_table_request_data_attributes_schema.rs index 5f084a4a3..0457e2b7f 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes_schema.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes_schema.rs @@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequestDataAttributesSchema` object. +/// Schema defining the structure and columns of the reference table. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateTableRequestDataAttributesSchema { - /// The `schema` `fields`. + /// The schema fields. #[serde(rename = "fields")] pub fields: Vec, /// List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. diff --git a/src/datadogV2/model/model_create_table_request_data_attributes_schema_fields_items.rs b/src/datadogV2/model/model_create_table_request_data_attributes_schema_fields_items.rs index fbb7aab00..2191ac42f 100644 --- a/src/datadogV2/model/model_create_table_request_data_attributes_schema_fields_items.rs +++ b/src/datadogV2/model/model_create_table_request_data_attributes_schema_fields_items.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateTableRequestDataAttributesSchemaFieldsItems` object. +/// A single field (column) in the reference table schema to be created. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] diff --git a/src/datadogV2/model/model_create_upload_request.rs b/src/datadogV2/model/model_create_upload_request.rs index e9c1d4278..dfea63b04 100644 --- a/src/datadogV2/model/model_create_upload_request.rs +++ b/src/datadogV2/model/model_create_upload_request.rs @@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateUploadRequest` object. +/// Request to create an upload for a file to be ingested into a reference table. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateUploadRequest { - /// The definition of `CreateUploadRequestData` object. + /// Request data for creating an upload for a file to be ingested into a reference table. #[serde(rename = "data")] pub data: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_create_upload_request_data.rs b/src/datadogV2/model/model_create_upload_request_data.rs index 6818d9e4d..6e3d42f9e 100644 --- a/src/datadogV2/model/model_create_upload_request_data.rs +++ b/src/datadogV2/model/model_create_upload_request_data.rs @@ -6,22 +6,17 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateUploadRequestData` object. +/// Request data for creating an upload for a file to be ingested into a reference table. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateUploadRequestData { - /// The definition of `CreateUploadRequestDataAttributes` object. + /// Upload configuration specifying how data is uploaded by the user, and properties of the table to associate the upload with. #[serde(rename = "attributes")] pub attributes: Option, - /// The ID of the upload. - #[serde(rename = "id")] - pub id: Option, /// Upload resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::CreateUploadRequestDataType, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, #[serde(skip)] #[serde(default)] pub(crate) _unparsed: bool, @@ -33,9 +28,7 @@ impl CreateUploadRequestData { ) -> CreateUploadRequestData { CreateUploadRequestData { attributes: None, - id: None, type_, - additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } } @@ -47,19 +40,6 @@ impl CreateUploadRequestData { self.attributes = Some(value); self } - - pub fn id(mut self, value: String) -> Self { - self.id = Some(value); - self - } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } } impl<'de> Deserialize<'de> for CreateUploadRequestData { @@ -82,12 +62,7 @@ impl<'de> Deserialize<'de> for CreateUploadRequestData { let mut attributes: Option< crate::datadogV2::model::CreateUploadRequestDataAttributes, > = None; - let mut id: Option = None; let mut type_: Option = None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); let mut _unparsed = false; while let Some((k, v)) = map.next_entry::()? { @@ -98,12 +73,6 @@ impl<'de> Deserialize<'de> for CreateUploadRequestData { } attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } - "id" => { - if v.is_null() { - continue; - } - id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } "type" => { type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?); if let Some(ref _type_) = type_ { @@ -116,9 +85,9 @@ impl<'de> Deserialize<'de> for CreateUploadRequestData { } } &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } + return Err(serde::de::Error::custom( + "Additional properties not allowed", + )); } } } @@ -126,9 +95,7 @@ impl<'de> Deserialize<'de> for CreateUploadRequestData { let content = CreateUploadRequestData { attributes, - id, type_, - additional_properties, _unparsed, }; diff --git a/src/datadogV2/model/model_create_upload_request_data_attributes.rs b/src/datadogV2/model/model_create_upload_request_data_attributes.rs index e6be5d37d..fd500a656 100644 --- a/src/datadogV2/model/model_create_upload_request_data_attributes.rs +++ b/src/datadogV2/model/model_create_upload_request_data_attributes.rs @@ -6,21 +6,21 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateUploadRequestDataAttributes` object. +/// Upload configuration specifying how data is uploaded by the user, and properties of the table to associate the upload with. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateUploadRequestDataAttributes { - /// The headers of the file to upload. + /// The CSV file headers that define the schema fields, provided in the same order as the columns in the uploaded file. #[serde(rename = "headers")] pub headers: Vec, - /// The number of parts in the upload. + /// Number of parts to split the file into for multipart upload. #[serde(rename = "part_count")] pub part_count: i32, - /// The size of each part in the upload in bytes. For multipart uploads (part_count > 1), all parts except the last one must be at least 5,000,000 bytes. For single-part uploads (part_count = 1), any size is allowed. + /// The size of each part in the upload in bytes. All parts except the last one must be at least 5,000,000 bytes. #[serde(rename = "part_size")] pub part_size: i64, - /// The name of the reference table. + /// Name of the table to associate with this upload. #[serde(rename = "table_name")] pub table_name: String, #[serde(flatten)] diff --git a/src/datadogV2/model/model_create_upload_response.rs b/src/datadogV2/model/model_create_upload_response.rs index 8016beafe..6fb095af0 100644 --- a/src/datadogV2/model/model_create_upload_response.rs +++ b/src/datadogV2/model/model_create_upload_response.rs @@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateUploadResponse` object. +/// Information about the upload created containing the upload ID and pre-signed URLs to PUT chunks of the CSV file to. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateUploadResponse { - /// The definition of `CreateUploadResponseData` object. + /// Upload ID and attributes of the created upload. #[serde(rename = "data")] pub data: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_create_upload_response_data.rs b/src/datadogV2/model/model_create_upload_response_data.rs index 9b3eeca23..5115ef759 100644 --- a/src/datadogV2/model/model_create_upload_response_data.rs +++ b/src/datadogV2/model/model_create_upload_response_data.rs @@ -6,22 +6,20 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateUploadResponseData` object. +/// Upload ID and attributes of the created upload. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateUploadResponseData { - /// The definition of `CreateUploadResponseDataAttributes` object. + /// Pre-signed URLs for uploading parts of the file. #[serde(rename = "attributes")] pub attributes: Option, - /// The ID of the upload. + /// Unique identifier for this upload. Use this ID when creating the reference table. #[serde(rename = "id")] pub id: Option, /// Upload resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::CreateUploadResponseDataType, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, #[serde(skip)] #[serde(default)] pub(crate) _unparsed: bool, @@ -35,7 +33,6 @@ impl CreateUploadResponseData { attributes: None, id: None, type_, - additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } } @@ -52,14 +49,6 @@ impl CreateUploadResponseData { self.id = Some(value); self } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } } impl<'de> Deserialize<'de> for CreateUploadResponseData { @@ -84,10 +73,6 @@ impl<'de> Deserialize<'de> for CreateUploadResponseData { > = None; let mut id: Option = None; let mut type_: Option = None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); let mut _unparsed = false; while let Some((k, v)) = map.next_entry::()? { @@ -116,9 +101,9 @@ impl<'de> Deserialize<'de> for CreateUploadResponseData { } } &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } + return Err(serde::de::Error::custom( + "Additional properties not allowed", + )); } } } @@ -128,7 +113,6 @@ impl<'de> Deserialize<'de> for CreateUploadResponseData { attributes, id, type_, - additional_properties, _unparsed, }; diff --git a/src/datadogV2/model/model_create_upload_response_data_attributes.rs b/src/datadogV2/model/model_create_upload_response_data_attributes.rs index eeff5f59e..04cd612af 100644 --- a/src/datadogV2/model/model_create_upload_response_data_attributes.rs +++ b/src/datadogV2/model/model_create_upload_response_data_attributes.rs @@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `CreateUploadResponseDataAttributes` object. +/// Pre-signed URLs for uploading parts of the file. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct CreateUploadResponseDataAttributes { - /// The URLs of the parts in the upload. + /// The pre-signed URLs for uploading parts. These URLs expire after 5 minutes. #[serde(rename = "part_urls")] pub part_urls: Option>, #[serde(flatten)] diff --git a/src/datadogV2/model/model_patch_table_request.rs b/src/datadogV2/model/model_patch_table_request.rs index 9e9790838..4820cf45f 100644 --- a/src/datadogV2/model/model_patch_table_request.rs +++ b/src/datadogV2/model/model_patch_table_request.rs @@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequest` object. +/// Request body for updating an existing reference table. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct PatchTableRequest { - /// The definition of `PatchTableRequestData` object. + /// The data object containing the partial table definition updates. #[serde(rename = "data")] pub data: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_patch_table_request_data.rs b/src/datadogV2/model/model_patch_table_request_data.rs index a64d8a5c7..b36e13439 100644 --- a/src/datadogV2/model/model_patch_table_request_data.rs +++ b/src/datadogV2/model/model_patch_table_request_data.rs @@ -6,22 +6,17 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequestData` object. +/// The data object containing the partial table definition updates. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct PatchTableRequestData { - /// The definition of `PatchTableRequestDataAttributes` object. + /// Attributes that define the updates to the reference table's configuration and properties. #[serde(rename = "attributes")] pub attributes: Option, - /// The ID of the reference table. - #[serde(rename = "id")] - pub id: Option, /// Reference table resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::PatchTableRequestDataType, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, #[serde(skip)] #[serde(default)] pub(crate) _unparsed: bool, @@ -31,9 +26,7 @@ impl PatchTableRequestData { pub fn new(type_: crate::datadogV2::model::PatchTableRequestDataType) -> PatchTableRequestData { PatchTableRequestData { attributes: None, - id: None, type_, - additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } } @@ -45,19 +38,6 @@ impl PatchTableRequestData { self.attributes = Some(value); self } - - pub fn id(mut self, value: String) -> Self { - self.id = Some(value); - self - } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } } impl<'de> Deserialize<'de> for PatchTableRequestData { @@ -80,12 +60,7 @@ impl<'de> Deserialize<'de> for PatchTableRequestData { let mut attributes: Option< crate::datadogV2::model::PatchTableRequestDataAttributes, > = None; - let mut id: Option = None; let mut type_: Option = None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); let mut _unparsed = false; while let Some((k, v)) = map.next_entry::()? { @@ -96,12 +71,6 @@ impl<'de> Deserialize<'de> for PatchTableRequestData { } attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } - "id" => { - if v.is_null() { - continue; - } - id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } "type" => { type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?); if let Some(ref _type_) = type_ { @@ -114,9 +83,9 @@ impl<'de> Deserialize<'de> for PatchTableRequestData { } } &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } + return Err(serde::de::Error::custom( + "Additional properties not allowed", + )); } } } @@ -124,9 +93,7 @@ impl<'de> Deserialize<'de> for PatchTableRequestData { let content = PatchTableRequestData { attributes, - id, type_, - additional_properties, _unparsed, }; diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes.rs b/src/datadogV2/model/model_patch_table_request_data_attributes.rs index 2790ae24f..1f18fdbe5 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes.rs @@ -6,24 +6,24 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequestDataAttributes` object. +/// Attributes that define the updates to the reference table's configuration and properties. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct PatchTableRequestDataAttributes { - /// The description of the reference table. + /// Optional text describing the purpose or contents of this reference table. #[serde(rename = "description")] pub description: Option, - /// The definition of `PatchTableRequestDataAttributesFileMetadata` object. + /// Metadata specifying where and how to access the reference table's data file. #[serde(rename = "file_metadata")] pub file_metadata: Option, - /// The definition of `PatchTableRequestDataAttributesSchema` object. + /// Schema defining the updates to the structure and columns of the reference table. Schema fields cannot be deleted or renamed. #[serde(rename = "schema")] pub schema: Option, /// Whether this table is synced automatically. #[serde(rename = "sync_enabled")] pub sync_enabled: Option, - /// The tags of the reference table. + /// Tags for organizing and filtering reference tables. #[serde(rename = "tags")] pub tags: Option>, #[serde(flatten)] diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata.rs b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata.rs index cc2be240c..47c115610 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata.rs @@ -3,7 +3,7 @@ // Copyright 2019-Present Datadog, Inc. use serde::{Deserialize, Deserializer, Serialize}; -/// The definition of `PatchTableRequestDataAttributesFileMetadata` object. +/// Metadata specifying where and how to access the reference table's data file. #[non_exhaustive] #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(untagged)] diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_cloud_storage.rs b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_cloud_storage.rs index 5bec977a9..acf47148a 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_cloud_storage.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_cloud_storage.rs @@ -11,7 +11,7 @@ use std::fmt::{self, Formatter}; #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct PatchTableRequestDataAttributesFileMetadataCloudStorage { - /// The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. + /// Cloud storage access configuration for the reference table data file. #[serde(rename = "access_details")] pub access_details: Option< crate::datadogV2::model::PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details.rs b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details.rs index f7ca169f2..7e54066d4 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details.rs @@ -6,18 +6,18 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. +/// Cloud storage access configuration for the reference table data file. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails { - /// The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + /// Amazon Web Services S3 storage access configuration. #[serde(rename = "aws_detail")] pub aws_detail: Option, - /// The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + /// Azure Blob Storage access configuration. #[serde(rename = "azure_detail")] pub azure_detail: Option, - /// The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + /// Google Cloud Platform storage access configuration. #[serde(rename = "gcp_detail")] pub gcp_detail: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rs b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rs index cf7a6c4da..5d209db7d 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.rs @@ -6,15 +6,15 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. +/// Amazon Web Services S3 storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail { - /// The ID of the AWS account. + /// AWS account ID where the S3 bucket is located. #[serde(rename = "aws_account_id")] pub aws_account_id: Option, - /// The name of the AWS bucket. + /// S3 bucket containing the CSV file. #[serde(rename = "aws_bucket_name")] pub aws_bucket_name: Option, /// The relative file path from the S3 bucket root to the CSV file. diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rs b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rs index 2c49304a7..7e3d5c1e3 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.rs @@ -6,21 +6,21 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. +/// Azure Blob Storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail { - /// The Azure client ID. + /// Azure service principal (application) client ID with permissions to read from the container. #[serde(rename = "azure_client_id")] pub azure_client_id: Option, - /// The name of the Azure container. + /// Azure Blob Storage container containing the CSV file. #[serde(rename = "azure_container_name")] pub azure_container_name: Option, - /// The name of the Azure storage account. + /// Azure storage account where the container is located. #[serde(rename = "azure_storage_account_name")] pub azure_storage_account_name: Option, - /// The ID of the Azure tenant. + /// Azure Active Directory tenant ID. #[serde(rename = "azure_tenant_id")] pub azure_tenant_id: Option, /// The relative file path from the Azure container root to the CSV file. diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs index 303846912..759557a4d 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. +/// Google Cloud Platform storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] @@ -14,13 +14,13 @@ pub struct PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetai /// The relative file path from the GCS bucket root to the CSV file. #[serde(rename = "file_path")] pub file_path: Option, - /// The name of the GCP bucket. + /// GCP bucket containing the CSV file. #[serde(rename = "gcp_bucket_name")] pub gcp_bucket_name: Option, - /// The ID of the GCP project. + /// GCP project ID where the bucket is located. #[serde(rename = "gcp_project_id")] pub gcp_project_id: Option, - /// The email of the GCP service account. + /// Service account email with read permissions for the GCS bucket. #[serde(rename = "gcp_service_account_email")] pub gcp_service_account_email: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes_schema.rs b/src/datadogV2/model/model_patch_table_request_data_attributes_schema.rs index baa161720..7b36fbebf 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes_schema.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes_schema.rs @@ -6,15 +6,15 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequestDataAttributesSchema` object. +/// Schema defining the updates to the structure and columns of the reference table. Schema fields cannot be deleted or renamed. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct PatchTableRequestDataAttributesSchema { - /// The `schema` `fields`. + /// The schema fields. #[serde(rename = "fields")] pub fields: Vec, - /// List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. + /// List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. Primary keys cannot be changed after table creation. #[serde(rename = "primary_keys")] pub primary_keys: Vec, #[serde(flatten)] diff --git a/src/datadogV2/model/model_patch_table_request_data_attributes_schema_fields_items.rs b/src/datadogV2/model/model_patch_table_request_data_attributes_schema_fields_items.rs index 620d999b7..da5ef2170 100644 --- a/src/datadogV2/model/model_patch_table_request_data_attributes_schema_fields_items.rs +++ b/src/datadogV2/model/model_patch_table_request_data_attributes_schema_fields_items.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `PatchTableRequestDataAttributesSchemaFieldsItems` object. +/// A single field (column) in the reference table schema to be updated. Schema fields cannot be deleted or renamed. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] diff --git a/src/datadogV2/model/model_table_result_v2.rs b/src/datadogV2/model/model_table_result_v2.rs index a8b1d50fd..d3f0e64d1 100644 --- a/src/datadogV2/model/model_table_result_v2.rs +++ b/src/datadogV2/model/model_table_result_v2.rs @@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2` object. +/// A reference table resource containing its full configuration and state. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableResultV2 { - /// The definition of `TableResultV2Data` object. + /// The data object containing the reference table configuration and state. #[serde(rename = "data")] pub data: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_table_result_v2_array.rs b/src/datadogV2/model/model_table_result_v2_array.rs index 5f2c015ca..eac321f90 100644 --- a/src/datadogV2/model/model_table_result_v2_array.rs +++ b/src/datadogV2/model/model_table_result_v2_array.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2Array` object. +/// List of reference tables. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] diff --git a/src/datadogV2/model/model_table_result_v2_data.rs b/src/datadogV2/model/model_table_result_v2_data.rs index 37b671141..8cc96529b 100644 --- a/src/datadogV2/model/model_table_result_v2_data.rs +++ b/src/datadogV2/model/model_table_result_v2_data.rs @@ -6,22 +6,20 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2Data` object. +/// The data object containing the reference table configuration and state. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableResultV2Data { - /// The definition of `TableResultV2DataAttributes` object. + /// Attributes that define the reference table's configuration and properties. #[serde(rename = "attributes")] pub attributes: Option, - /// The ID of the reference table. + /// Unique identifier for the reference table. #[serde(rename = "id")] pub id: Option, /// Reference table resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::TableResultV2DataType, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, #[serde(skip)] #[serde(default)] pub(crate) _unparsed: bool, @@ -33,7 +31,6 @@ impl TableResultV2Data { attributes: None, id: None, type_, - additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } } @@ -50,14 +47,6 @@ impl TableResultV2Data { self.id = Some(value); self } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } } impl<'de> Deserialize<'de> for TableResultV2Data { @@ -81,10 +70,6 @@ impl<'de> Deserialize<'de> for TableResultV2Data { None; let mut id: Option = None; let mut type_: Option = None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); let mut _unparsed = false; while let Some((k, v)) = map.next_entry::()? { @@ -113,9 +98,9 @@ impl<'de> Deserialize<'de> for TableResultV2Data { } } &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } + return Err(serde::de::Error::custom( + "Additional properties not allowed", + )); } } } @@ -125,7 +110,6 @@ impl<'de> Deserialize<'de> for TableResultV2Data { attributes, id, type_, - additional_properties, _unparsed, }; diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes.rs b/src/datadogV2/model/model_table_result_v2_data_attributes.rs index b53d53db9..612a3be31 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2DataAttributes` object. +/// Attributes that define the reference table's configuration and properties. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] @@ -14,10 +14,10 @@ pub struct TableResultV2DataAttributes { /// UUID of the user who created the reference table. #[serde(rename = "created_by")] pub created_by: Option, - /// The description of the reference table. + /// Optional text describing the purpose or contents of this reference table. #[serde(rename = "description")] pub description: Option, - /// The definition of `TableResultV2DataAttributesFileMetadata` object. + /// Metadata specifying where and how to access the reference table's data file. #[serde(rename = "file_metadata")] pub file_metadata: Option, /// UUID of the user who last updated the reference table. @@ -26,22 +26,22 @@ pub struct TableResultV2DataAttributes { /// The number of successfully processed rows in the reference table. #[serde(rename = "row_count")] pub row_count: Option, - /// The definition of `TableResultV2DataAttributesSchema` object. + /// Schema defining the structure and columns of the reference table. #[serde(rename = "schema")] pub schema: Option, /// The source type for reference table data. Includes all possible source types that can appear in responses. #[serde(rename = "source")] pub source: Option, - /// The status of the reference table. + /// The processing status of the table. #[serde(rename = "status")] pub status: Option, - /// The name of the reference table. + /// Unique name to identify this reference table. Used in enrichment processors and API calls. #[serde(rename = "table_name")] pub table_name: Option, - /// The tags of the reference table. + /// Tags for organizing and filtering reference tables. #[serde(rename = "tags")] pub tags: Option>, - /// The timestamp of the last update to the reference table in ISO 8601 format. + /// When the reference table was last updated, in ISO 8601 format. #[serde(rename = "updated_at")] pub updated_at: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata.rs index 2e34f3028..9f57f8172 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata.rs @@ -3,7 +3,7 @@ // Copyright 2019-Present Datadog, Inc. use serde::{Deserialize, Deserializer, Serialize}; -/// The definition of `TableResultV2DataAttributesFileMetadata` object. +/// Metadata specifying where and how to access the reference table's data file. #[non_exhaustive] #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(untagged)] diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_cloud_storage.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_cloud_storage.rs index c64dc9a44..f95e684ef 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_cloud_storage.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_cloud_storage.rs @@ -11,10 +11,10 @@ use std::fmt::{self, Formatter}; #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableResultV2DataAttributesFileMetadataCloudStorage { - /// The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetails` object. + /// Cloud storage access configuration for the reference table data file. #[serde(rename = "access_details")] pub access_details: - Option, + crate::datadogV2::model::TableResultV2DataAttributesFileMetadataOneOfAccessDetails, /// The error message returned from the sync. #[serde(rename = "error_message")] pub error_message: Option, @@ -37,9 +37,11 @@ pub struct TableResultV2DataAttributesFileMetadataCloudStorage { } impl TableResultV2DataAttributesFileMetadataCloudStorage { - pub fn new() -> TableResultV2DataAttributesFileMetadataCloudStorage { + pub fn new( + access_details: crate::datadogV2::model::TableResultV2DataAttributesFileMetadataOneOfAccessDetails, + ) -> TableResultV2DataAttributesFileMetadataCloudStorage { TableResultV2DataAttributesFileMetadataCloudStorage { - access_details: None, + access_details, error_message: None, error_row_count: None, error_type: None, @@ -49,14 +51,6 @@ impl TableResultV2DataAttributesFileMetadataCloudStorage { } } - pub fn access_details( - mut self, - value: crate::datadogV2::model::TableResultV2DataAttributesFileMetadataOneOfAccessDetails, - ) -> Self { - self.access_details = Some(value); - self - } - pub fn error_message(mut self, value: String) -> Self { self.error_message = Some(value); self @@ -89,12 +83,6 @@ impl TableResultV2DataAttributesFileMetadataCloudStorage { } } -impl Default for TableResultV2DataAttributesFileMetadataCloudStorage { - fn default() -> Self { - Self::new() - } -} - impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataCloudStorage { fn deserialize(deserializer: D) -> Result where @@ -126,9 +114,6 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataCloudStora while let Some((k, v)) = map.next_entry::()? { match k.as_str() { "access_details" => { - if v.is_null() { - continue; - } access_details = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } @@ -174,6 +159,8 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataCloudStora } } } + let access_details = + access_details.ok_or_else(|| M::Error::missing_field("access_details"))?; let content = TableResultV2DataAttributesFileMetadataCloudStorage { access_details, diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_local_file.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_local_file.rs index a226e77a1..20f24a769 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_local_file.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_local_file.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// File metadata for reference tables created by upload. +/// File metadata for reference tables created by upload. Note that upload_id is only returned in the immediate create/replace response and is not available in subsequent GET requests. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] @@ -17,9 +17,6 @@ pub struct TableResultV2DataAttributesFileMetadataLocalFile { /// The number of rows that failed to create/update. #[serde(rename = "error_row_count")] pub error_row_count: Option, - /// The upload ID that was used to create/update the table. - #[serde(rename = "upload_id")] - pub upload_id: Option, #[serde(flatten)] pub additional_properties: std::collections::BTreeMap, #[serde(skip)] @@ -32,7 +29,6 @@ impl TableResultV2DataAttributesFileMetadataLocalFile { TableResultV2DataAttributesFileMetadataLocalFile { error_message: None, error_row_count: None, - upload_id: None, additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } @@ -48,11 +44,6 @@ impl TableResultV2DataAttributesFileMetadataLocalFile { self } - pub fn upload_id(mut self, value: String) -> Self { - self.upload_id = Some(value); - self - } - pub fn additional_properties( mut self, value: std::collections::BTreeMap, @@ -87,7 +78,6 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataLocalFile { let mut error_message: Option = None; let mut error_row_count: Option = None; - let mut upload_id: Option = None; let mut additional_properties: std::collections::BTreeMap< String, serde_json::Value, @@ -110,12 +100,6 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataLocalFile error_row_count = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } - "upload_id" => { - if v.is_null() { - continue; - } - upload_id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); - } &_ => { if let Ok(value) = serde_json::from_value(v.clone()) { additional_properties.insert(k, value); @@ -127,7 +111,6 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataLocalFile let content = TableResultV2DataAttributesFileMetadataLocalFile { error_message, error_row_count, - upload_id, additional_properties, _unparsed, }; diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details.rs index 66b153403..8c63d8e4a 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details.rs @@ -6,18 +6,18 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetails` object. +/// Cloud storage access configuration for the reference table data file. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableResultV2DataAttributesFileMetadataOneOfAccessDetails { - /// The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + /// Amazon Web Services S3 storage access configuration. #[serde(rename = "aws_detail")] pub aws_detail: Option, - /// The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + /// Azure Blob Storage access configuration. #[serde(rename = "azure_detail")] pub azure_detail: Option, - /// The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + /// Google Cloud Platform storage access configuration. #[serde(rename = "gcp_detail")] pub gcp_detail: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail.rs index 3eaaf258f..a49968467 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail.rs @@ -6,15 +6,15 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. +/// Amazon Web Services S3 storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail { - /// The ID of the AWS account. + /// AWS account ID where the S3 bucket is located. #[serde(rename = "aws_account_id")] pub aws_account_id: Option, - /// The name of the AWS bucket. + /// S3 bucket containing the CSV file. #[serde(rename = "aws_bucket_name")] pub aws_bucket_name: Option, /// The relative file path from the S3 bucket root to the CSV file. diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail.rs index 83b841c6d..8ab1fc9a3 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail.rs @@ -6,21 +6,21 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. +/// Azure Blob Storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail { - /// The Azure client ID. + /// Azure service principal (application) client ID with permissions to read from the container. #[serde(rename = "azure_client_id")] pub azure_client_id: Option, - /// The name of the Azure container. + /// Azure Blob Storage container containing the CSV file. #[serde(rename = "azure_container_name")] pub azure_container_name: Option, - /// The name of the Azure storage account. + /// Azure storage account where the container is located. #[serde(rename = "azure_storage_account_name")] pub azure_storage_account_name: Option, - /// The ID of the Azure tenant. + /// Azure Active Directory tenant ID. #[serde(rename = "azure_tenant_id")] pub azure_tenant_id: Option, /// The relative file path from the Azure container root to the CSV file. diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs index b5a6681fc..367ff323d 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. +/// Google Cloud Platform storage access configuration. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] @@ -14,13 +14,13 @@ pub struct TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail { /// The relative file path from the GCS bucket root to the CSV file. #[serde(rename = "file_path")] pub file_path: Option, - /// The name of the GCP bucket. + /// GCP bucket containing the CSV file. #[serde(rename = "gcp_bucket_name")] pub gcp_bucket_name: Option, - /// The ID of the GCP project. + /// GCP project ID where the bucket is located. #[serde(rename = "gcp_project_id")] pub gcp_project_id: Option, - /// The email of the GCP service account. + /// Service account email with read permissions for the GCS bucket. #[serde(rename = "gcp_service_account_email")] pub gcp_service_account_email: Option, #[serde(flatten)] diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_schema.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_schema.rs index 9f31ffea6..6a79129a5 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_schema.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_schema.rs @@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2DataAttributesSchema` object. +/// Schema defining the structure and columns of the reference table. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableResultV2DataAttributesSchema { - /// The `schema` `fields`. + /// The schema fields. #[serde(rename = "fields")] pub fields: Vec, /// List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. diff --git a/src/datadogV2/model/model_table_result_v2_data_attributes_schema_fields_items.rs b/src/datadogV2/model/model_table_result_v2_data_attributes_schema_fields_items.rs index f37a2898e..e679c7121 100644 --- a/src/datadogV2/model/model_table_result_v2_data_attributes_schema_fields_items.rs +++ b/src/datadogV2/model/model_table_result_v2_data_attributes_schema_fields_items.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableResultV2DataAttributesSchemaFieldsItems` object. +/// A single field (column) in the reference table schema to be returned. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] diff --git a/src/datadogV2/model/model_table_row_resource_array.rs b/src/datadogV2/model/model_table_row_resource_array.rs index 84d3e2443..a99c321c4 100644 --- a/src/datadogV2/model/model_table_row_resource_array.rs +++ b/src/datadogV2/model/model_table_row_resource_array.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableRowResourceArray` object. +/// List of rows from a reference table query. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] diff --git a/src/datadogV2/model/model_table_row_resource_data.rs b/src/datadogV2/model/model_table_row_resource_data.rs index 8e6c62b97..eeaa7acc3 100644 --- a/src/datadogV2/model/model_table_row_resource_data.rs +++ b/src/datadogV2/model/model_table_row_resource_data.rs @@ -6,22 +6,20 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableRowResourceData` object. +/// The data object containing the row column names and values. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableRowResourceData { - /// The definition of `TableRowResourceDataAttributes` object. + /// Column values for this row in the reference table. #[serde(rename = "attributes")] pub attributes: Option, - /// The ID of the row. + /// Row identifier, corresponding to the primary key value. #[serde(rename = "id")] pub id: Option, /// Row resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::TableRowResourceDataType, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, #[serde(skip)] #[serde(default)] pub(crate) _unparsed: bool, @@ -33,7 +31,6 @@ impl TableRowResourceData { attributes: None, id: None, type_, - additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } } @@ -50,14 +47,6 @@ impl TableRowResourceData { self.id = Some(value); self } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } } impl<'de> Deserialize<'de> for TableRowResourceData { @@ -82,10 +71,6 @@ impl<'de> Deserialize<'de> for TableRowResourceData { > = None; let mut id: Option = None; let mut type_: Option = None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); let mut _unparsed = false; while let Some((k, v)) = map.next_entry::()? { @@ -114,9 +99,9 @@ impl<'de> Deserialize<'de> for TableRowResourceData { } } &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } + return Err(serde::de::Error::custom( + "Additional properties not allowed", + )); } } } @@ -126,7 +111,6 @@ impl<'de> Deserialize<'de> for TableRowResourceData { attributes, id, type_, - additional_properties, _unparsed, }; diff --git a/src/datadogV2/model/model_table_row_resource_data_attributes.rs b/src/datadogV2/model/model_table_row_resource_data_attributes.rs index a0905be5d..642433fde 100644 --- a/src/datadogV2/model/model_table_row_resource_data_attributes.rs +++ b/src/datadogV2/model/model_table_row_resource_data_attributes.rs @@ -6,16 +6,14 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// The definition of `TableRowResourceDataAttributes` object. +/// Column values for this row in the reference table. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct TableRowResourceDataAttributes { - /// The values of the row. + /// Key-value pairs representing the row data, where keys are field names from the schema. #[serde(rename = "values")] pub values: Option>, - #[serde(flatten)] - pub additional_properties: std::collections::BTreeMap, #[serde(skip)] #[serde(default)] pub(crate) _unparsed: bool, @@ -25,7 +23,6 @@ impl TableRowResourceDataAttributes { pub fn new() -> TableRowResourceDataAttributes { TableRowResourceDataAttributes { values: None, - additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } } @@ -34,14 +31,6 @@ impl TableRowResourceDataAttributes { self.values = Some(value); self } - - pub fn additional_properties( - mut self, - value: std::collections::BTreeMap, - ) -> Self { - self.additional_properties = value; - self - } } impl Default for TableRowResourceDataAttributes { @@ -69,10 +58,6 @@ impl<'de> Deserialize<'de> for TableRowResourceDataAttributes { { let mut values: Option> = None; - let mut additional_properties: std::collections::BTreeMap< - String, - serde_json::Value, - > = std::collections::BTreeMap::new(); let mut _unparsed = false; while let Some((k, v)) = map.next_entry::()? { @@ -84,18 +69,14 @@ impl<'de> Deserialize<'de> for TableRowResourceDataAttributes { values = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } &_ => { - if let Ok(value) = serde_json::from_value(v.clone()) { - additional_properties.insert(k, value); - } + return Err(serde::de::Error::custom( + "Additional properties not allowed", + )); } } } - let content = TableRowResourceDataAttributes { - values, - additional_properties, - _unparsed, - }; + let content = TableRowResourceDataAttributes { values, _unparsed }; Ok(content) } diff --git a/tests/scenarios/features/v2/reference_tables.feature b/tests/scenarios/features/v2/reference_tables.feature index 8a01298dc..6d4bc4b97 100644 --- a/tests/scenarios/features/v2/reference_tables.feature +++ b/tests/scenarios/features/v2/reference_tables.feature @@ -24,7 +24,7 @@ Feature: Reference Tables @generated @skip @team:DataDog/redapl-experiences Scenario: Create reference table upload returns "Bad Request" response Given new "CreateReferenceTableUpload" request - And body with value {"data": {"attributes": {"headers": [""], "part_count": 3, "part_size": 10000000, "table_name": ""}, "type": "upload"}} + And body with value {"data": {"attributes": {"headers": ["field_1", "field_2"], "part_count": 3, "part_size": 10000000, "table_name": ""}, "type": "upload"}} When the request is sent Then the response status is 400 Bad Request @@ -108,7 +108,7 @@ Feature: Reference Tables Scenario: Update reference table returns "Bad Request" response Given new "UpdateReferenceTable" request And request contains "id" parameter from "REPLACE.ME" - 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": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}} + 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": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "type": "reference_table"}} When the request is sent Then the response status is 400 Bad Request @@ -116,6 +116,6 @@ Feature: Reference Tables Scenario: Update reference table returns "OK" response Given new "UpdateReferenceTable" request And request contains "id" parameter from "REPLACE.ME" - 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": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}} + 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": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "type": "reference_table"}} When the request is sent Then the response status is 200 OK