diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 79c3e338ffb..10a5a5875cd 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -12266,6 +12266,349 @@ components:
type: string
x-enum-varnames:
- CREATE_RULESET
+ CreateTableRequest:
+ description: The definition of `CreateTableRequest` object.
+ example:
+ data:
+ attributes:
+ description: this is a cloud table generated via a cloud bucket sync
+ file_metadata:
+ access_details:
+ aws_detail:
+ aws_account_id: test-account-id
+ aws_bucket_name: test-bucket
+ file_path: test_rt.csv
+ sync_enabled: true
+ schema:
+ fields:
+ - name: name
+ type: STRING
+ - name: account_id
+ type: STRING
+ primary_keys:
+ - account_id
+ source: S3
+ table_name: test_reference_table
+ tags:
+ - test_tag
+ type: reference_table
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateTableRequestData'
+ type: object
+ CreateTableRequestData:
+ description: The definition of `CreateTableRequestData` object.
+ 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.
+ properties:
+ description:
+ description: The description of the reference table.
+ type: string
+ file_metadata:
+ $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadata'
+ schema:
+ $ref: '#/components/schemas/CreateTableRequestDataAttributesSchema'
+ source:
+ $ref: '#/components/schemas/ReferenceTableCreateSourceType'
+ table_name:
+ description: The name of the reference table.
+ example: ''
+ type: string
+ tags:
+ description: The tags of the reference table.
+ items:
+ type: string
+ type: array
+ required:
+ - table_name
+ - schema
+ - source
+ type: object
+ CreateTableRequestDataAttributesFileMetadata:
+ description: The definition of `CreateTableRequestDataAttributesFileMetadata`
+ object.
+ oneOf:
+ - $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataCloudStorage'
+ - $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataLocalFile'
+ CreateTableRequestDataAttributesFileMetadataCloudStorage:
+ additionalProperties: false
+ description: Cloud storage file metadata for create requests. Both access_details
+ and sync_enabled are required.
+ properties:
+ access_details:
+ $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails'
+ sync_enabled:
+ description: Whether this table is synced automatically.
+ example: false
+ type: boolean
+ required:
+ - access_details
+ - sync_enabled
+ title: CloudFileMetadataV2
+ type: object
+ CreateTableRequestDataAttributesFileMetadataLocalFile:
+ additionalProperties: false
+ description: Local file metadata for create requests using the upload ID.
+ properties:
+ upload_id:
+ description: The upload ID.
+ example: ''
+ type: string
+ required:
+ - upload_id
+ title: LocalFileMetadataV2
+ type: object
+ CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails:
+ description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails`
+ object.
+ properties:
+ aws_detail:
+ $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail'
+ azure_detail:
+ $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail'
+ gcp_detail:
+ $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail'
+ type: object
+ CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail:
+ description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail`
+ object.
+ properties:
+ aws_account_id:
+ description: The ID of the AWS account.
+ example: '123456789000'
+ type: string
+ aws_bucket_name:
+ description: The name of the Amazon S3 bucket.
+ example: example-data-bucket
+ type: string
+ file_path:
+ description: The relative file path from the S3 bucket root to the CSV file.
+ example: reference-tables/users.csv
+ type: string
+ required:
+ - aws_account_id
+ - aws_bucket_name
+ - file_path
+ type: object
+ x-oneOf-parent:
+ - AwsDetail
+ CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail:
+ description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail`
+ object.
+ properties:
+ azure_client_id:
+ description: The Azure client ID.
+ example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb
+ type: string
+ azure_container_name:
+ description: The name of the Azure container.
+ example: reference-data
+ type: string
+ azure_storage_account_name:
+ description: The name of the Azure storage account.
+ example: examplestorageaccount
+ type: string
+ azure_tenant_id:
+ description: The ID of the Azure tenant.
+ example: cccccccc-4444-5555-6666-dddddddddddd
+ type: string
+ file_path:
+ description: The relative file path from the Azure container root to the
+ CSV file.
+ example: tables/users.csv
+ type: string
+ required:
+ - azure_client_id
+ - azure_container_name
+ - azure_storage_account_name
+ - azure_tenant_id
+ - file_path
+ type: object
+ x-oneOf-parent:
+ - AzureDetail
+ CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail:
+ description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail`
+ object.
+ properties:
+ file_path:
+ description: The relative file path from the GCS bucket root to the CSV
+ file.
+ example: data/reference_tables/users.csv
+ type: string
+ gcp_bucket_name:
+ description: The name of the GCP bucket.
+ example: example-data-bucket
+ type: string
+ gcp_project_id:
+ description: The ID of the GCP project.
+ example: example-gcp-project-12345
+ type: string
+ gcp_service_account_email:
+ description: The email of the GCP service account.
+ example: example-service@example-gcp-project-12345.iam.gserviceaccount.com
+ type: string
+ required:
+ - file_path
+ - gcp_bucket_name
+ - gcp_project_id
+ - gcp_service_account_email
+ type: object
+ x-oneOf-parent:
+ - GcpDetail
+ CreateTableRequestDataAttributesSchema:
+ description: The definition of `CreateTableRequestDataAttributesSchema` object.
+ properties:
+ fields:
+ description: The `schema` `fields`.
+ items:
+ $ref: '#/components/schemas/CreateTableRequestDataAttributesSchemaFieldsItems'
+ 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.
+ example:
+ - ''
+ items:
+ type: string
+ type: array
+ required:
+ - fields
+ - primary_keys
+ type: object
+ CreateTableRequestDataAttributesSchemaFieldsItems:
+ description: The definition of `CreateTableRequestDataAttributesSchemaFieldsItems`
+ object.
+ properties:
+ name:
+ description: The field name.
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/ReferenceTableSchemaFieldType'
+ required:
+ - name
+ - type
+ type: object
+ CreateTableRequestDataType:
+ default: reference_table
+ description: Reference table resource type.
+ enum:
+ - reference_table
+ example: reference_table
+ type: string
+ x-enum-varnames:
+ - REFERENCE_TABLE
+ CreateUploadRequest:
+ description: The definition of `CreateUploadRequest` object.
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateUploadRequestData'
+ type: object
+ CreateUploadRequestData:
+ description: The definition of `CreateUploadRequestData` object.
+ 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.
+ properties:
+ headers:
+ description: The headers of the file to upload.
+ example:
+ - ''
+ items:
+ type: string
+ type: array
+ part_count:
+ description: The number of parts in the 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.
+ example: 10000000
+ format: int64
+ type: integer
+ table_name:
+ description: The name of the reference table.
+ example: ''
+ type: string
+ required:
+ - headers
+ - table_name
+ - part_count
+ - part_size
+ type: object
+ CreateUploadRequestDataType:
+ default: upload
+ description: Upload resource type.
+ enum:
+ - upload
+ example: upload
+ type: string
+ x-enum-varnames:
+ - UPLOAD
+ CreateUploadResponse:
+ description: The definition of `CreateUploadResponse` object.
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateUploadResponseData'
+ type: object
+ CreateUploadResponseData:
+ description: The definition of `CreateUploadResponseData` object.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateUploadResponseDataAttributes'
+ id:
+ description: The ID of the upload.
+ type: string
+ type:
+ $ref: '#/components/schemas/CreateUploadResponseDataType'
+ required:
+ - type
+ type: object
+ CreateUploadResponseDataAttributes:
+ description: The definition of `CreateUploadResponseDataAttributes` object.
+ properties:
+ part_urls:
+ description: The URLs of the parts in the upload.
+ items:
+ type: string
+ type: array
+ type: object
+ CreateUploadResponseDataType:
+ default: upload
+ description: Upload resource type.
+ enum:
+ - upload
+ example: upload
+ type: string
+ x-enum-varnames:
+ - UPLOAD
CreateWorkflowRequest:
description: A request object for creating a new workflow.
example:
@@ -35482,6 +35825,225 @@ components:
version:
$ref: '#/components/schemas/Version'
type: object
+ PatchTableRequest:
+ description: The definition of `PatchTableRequest` object.
+ example:
+ 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
+ properties:
+ data:
+ $ref: '#/components/schemas/PatchTableRequestData'
+ type: object
+ PatchTableRequestData:
+ description: The definition of `PatchTableRequestData` object.
+ 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.
+ properties:
+ description:
+ description: The description of the reference table.
+ type: string
+ file_metadata:
+ $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadata'
+ schema:
+ $ref: '#/components/schemas/PatchTableRequestDataAttributesSchema'
+ sync_enabled:
+ description: Whether this table is synced automatically.
+ type: boolean
+ tags:
+ description: The tags of the reference table.
+ items:
+ type: string
+ type: array
+ type: object
+ PatchTableRequestDataAttributesFileMetadata:
+ description: The definition of `PatchTableRequestDataAttributesFileMetadata`
+ object.
+ oneOf:
+ - $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataCloudStorage'
+ - $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataLocalFile'
+ PatchTableRequestDataAttributesFileMetadataCloudStorage:
+ additionalProperties: false
+ description: Cloud storage file metadata for patch requests. Allows partial
+ updates of access_details and sync_enabled.
+ properties:
+ access_details:
+ $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails'
+ sync_enabled:
+ description: Whether this table is synced automatically.
+ example: false
+ type: boolean
+ title: CloudFileMetadataV2
+ type: object
+ PatchTableRequestDataAttributesFileMetadataLocalFile:
+ additionalProperties: false
+ description: Local file metadata for patch requests using upload ID.
+ properties:
+ upload_id:
+ description: The upload ID.
+ example: ''
+ type: string
+ required:
+ - upload_id
+ title: LocalFileMetadataV2
+ type: object
+ PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails:
+ description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails`
+ object.
+ properties:
+ aws_detail:
+ $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail'
+ azure_detail:
+ $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail'
+ gcp_detail:
+ $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail'
+ type: object
+ PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail:
+ description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail`
+ object.
+ properties:
+ aws_account_id:
+ description: The ID of the AWS account.
+ example: '123456789000'
+ type: string
+ aws_bucket_name:
+ description: The name of the AWS bucket.
+ example: example-data-bucket
+ type: string
+ file_path:
+ description: The relative file path from the S3 bucket root to the CSV file.
+ example: reference-tables/users.csv
+ type: string
+ type: object
+ x-oneOf-parent:
+ - AwsDetail
+ PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail:
+ description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail`
+ object.
+ properties:
+ azure_client_id:
+ description: The Azure client ID.
+ example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb
+ type: string
+ azure_container_name:
+ description: The name of the Azure container.
+ example: reference-data
+ type: string
+ azure_storage_account_name:
+ description: The name of the Azure storage account.
+ example: examplestorageaccount
+ type: string
+ azure_tenant_id:
+ description: The ID of the Azure tenant.
+ example: cccccccc-4444-5555-6666-dddddddddddd
+ type: string
+ file_path:
+ description: The relative file path from the Azure container root to the
+ CSV file.
+ example: tables/users.csv
+ type: string
+ type: object
+ x-oneOf-parent:
+ - AzureDetail
+ PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail:
+ description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail`
+ object.
+ properties:
+ file_path:
+ description: The relative file path from the GCS bucket root to the CSV
+ file.
+ example: data/reference_tables/users.csv
+ type: string
+ gcp_bucket_name:
+ description: The name of the GCP bucket.
+ example: example-data-bucket
+ type: string
+ gcp_project_id:
+ description: The ID of the GCP project.
+ example: example-gcp-project-12345
+ type: string
+ gcp_service_account_email:
+ description: The email of the GCP service account.
+ 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.
+ properties:
+ 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.
+ example:
+ - ''
+ items:
+ type: string
+ type: array
+ required:
+ - fields
+ - primary_keys
+ type: object
+ PatchTableRequestDataAttributesSchemaFieldsItems:
+ description: The definition of `PatchTableRequestDataAttributesSchemaFieldsItems`
+ object.
+ properties:
+ name:
+ description: The field name.
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/ReferenceTableSchemaFieldType'
+ required:
+ - name
+ - type
+ type: object
+ PatchTableRequestDataType:
+ default: reference_table
+ description: Reference table resource type.
+ enum:
+ - reference_table
+ example: reference_table
+ type: string
+ x-enum-varnames:
+ - REFERENCE_TABLE
Permission:
description: Permission object.
properties:
@@ -37099,6 +37661,73 @@ components:
type: string
x-enum-varnames:
- RECOMMENDATION
+ ReferenceTableCreateSourceType:
+ description: The source type for creating reference table data. Only these source
+ types can be created through this API.
+ enum:
+ - LOCAL_FILE
+ - S3
+ - GCS
+ - AZURE
+ example: LOCAL_FILE
+ type: string
+ x-enum-varnames:
+ - LOCAL_FILE
+ - S3
+ - GCS
+ - AZURE
+ ReferenceTableSchemaFieldType:
+ description: The field type for reference table schema fields.
+ enum:
+ - STRING
+ - INT32
+ example: STRING
+ type: string
+ x-enum-varnames:
+ - STRING
+ - INT32
+ ReferenceTableSortType:
+ default: -updated_at
+ description: Sort field and direction for reference tables. Use field name for
+ ascending, prefix with "-" for descending.
+ enum:
+ - updated_at
+ - table_name
+ - status
+ - -updated_at
+ - -table_name
+ - -status
+ type: string
+ x-enum-varnames:
+ - UPDATED_AT
+ - TABLE_NAME
+ - STATUS
+ - MINUS_UPDATED_AT
+ - MINUS_TABLE_NAME
+ - MINUS_STATUS
+ ReferenceTableSourceType:
+ description: The source type for reference table data. Includes all possible
+ source types that can appear in responses.
+ enum:
+ - LOCAL_FILE
+ - S3
+ - GCS
+ - AZURE
+ - SERVICENOW
+ - SALESFORCE
+ - DATABRICKS
+ - SNOWFLAKE
+ example: LOCAL_FILE
+ type: string
+ x-enum-varnames:
+ - LOCAL_FILE
+ - S3
+ - GCS
+ - AZURE
+ - SERVICENOW
+ - SALESFORCE
+ - DATABRICKS
+ - SNOWFLAKE
RegisterAppKeyResponse:
description: The response object after creating an app key registration.
properties:
@@ -47003,6 +47632,394 @@ components:
format: double
type: number
type: object
+ TableResultV2:
+ description: The definition of `TableResultV2` object.
+ 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: ''
+ row_count: 5
+ schema:
+ fields:
+ - name: id
+ type: INT32
+ - name: name
+ type: STRING
+ primary_keys:
+ - id
+ source: LOCAL_FILE
+ status: DONE
+ table_name: test_reference_table
+ tags:
+ - tag1
+ - tag2
+ updated_at: '2000-01-01T01:00:00+00:00'
+ id: 00000000-0000-0000-0000-000000000000
+ type: reference_table
+ properties:
+ data:
+ $ref: '#/components/schemas/TableResultV2Data'
+ type: object
+ TableResultV2Array:
+ description: The definition of `TableResultV2Array` object.
+ example:
+ data:
+ - attributes:
+ created_by: 00000000-0000-0000-0000-000000000000
+ description: example description
+ file_metadata:
+ access_details: {}
+ error_message: ''
+ error_row_count: 0
+ upload_id: 00000000-0000-0000-0000-000000000000
+ last_updated_by: ''
+ row_count: 5
+ schema:
+ fields:
+ - name: id
+ type: INT32
+ - name: name
+ type: STRING
+ primary_keys:
+ - id
+ source: LOCAL_FILE
+ status: DONE
+ table_name: test_reference_table
+ tags:
+ - tag1
+ - tag2
+ updated_at: '2000-01-01T01:00:00+00:00'
+ id: 00000000-0000-0000-0000-000000000000
+ type: reference_table
+ - attributes:
+ created_by: 00000000-0000-0000-0000-000000000000
+ description: example description
+ file_metadata:
+ access_details:
+ aws_detail:
+ aws_account_id: test-account-id
+ aws_bucket_name: test-bucket
+ file_path: test_rt.csv
+ error_message: ''
+ error_row_count: 0
+ sync_enabled: true
+ last_updated_by: 00000000-0000-0000-0000-000000000000
+ row_count: 5
+ schema:
+ fields:
+ - name: location
+ type: STRING
+ - name: file_name
+ type: STRING
+ primary_keys:
+ - location
+ source: S3
+ status: DONE
+ table_name: test_reference_table_2
+ tags:
+ - test_tag1
+ - tag2
+ - '3'
+ updated_at: '2000-01-01T01:00:00+00:00'
+ id: 00000000-0000-0000-0000-000000000000
+ type: reference_table
+ properties:
+ data:
+ description: The reference tables.
+ items:
+ $ref: '#/components/schemas/TableResultV2Data'
+ type: array
+ required:
+ - data
+ type: object
+ TableResultV2Data:
+ description: The definition of `TableResultV2Data` object.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/TableResultV2DataAttributes'
+ id:
+ description: The ID of the reference table.
+ type: string
+ type:
+ $ref: '#/components/schemas/TableResultV2DataType'
+ required:
+ - type
+ type: object
+ TableResultV2DataAttributes:
+ description: The definition of `TableResultV2DataAttributes` object.
+ properties:
+ created_by:
+ description: UUID of the user who created the reference table.
+ type: string
+ description:
+ description: The description of the reference table.
+ type: string
+ file_metadata:
+ $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadata'
+ last_updated_by:
+ description: UUID of the user who last updated the reference table.
+ type: string
+ row_count:
+ description: The number of successfully processed rows in the reference
+ table.
+ format: int64
+ type: integer
+ schema:
+ $ref: '#/components/schemas/TableResultV2DataAttributesSchema'
+ source:
+ $ref: '#/components/schemas/ReferenceTableSourceType'
+ status:
+ description: The status of the reference table.
+ type: string
+ table_name:
+ description: The name of the reference table.
+ type: string
+ tags:
+ description: The tags of the reference table.
+ items:
+ type: string
+ type: array
+ updated_at:
+ description: The timestamp of the last update to the reference table in
+ ISO 8601 format.
+ type: string
+ type: object
+ TableResultV2DataAttributesFileMetadata:
+ description: The definition of `TableResultV2DataAttributesFileMetadata` object.
+ oneOf:
+ - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorage'
+ - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataLocalFile'
+ TableResultV2DataAttributesFileMetadataCloudStorage:
+ description: File metadata for reference tables created by cloud storage.
+ properties:
+ access_details:
+ $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetails'
+ error_message:
+ description: The error message returned from the sync.
+ type: string
+ error_row_count:
+ description: The number of rows that failed to sync.
+ format: int64
+ type: integer
+ error_type:
+ $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorageErrorType'
+ sync_enabled:
+ description: Whether this table is synced automatically.
+ type: boolean
+ title: CloudFileMetadataV2
+ type: object
+ TableResultV2DataAttributesFileMetadataCloudStorageErrorType:
+ description: The type of error that occurred during file processing. This field
+ provides high-level error categories for easier troubleshooting and is only
+ present when there are errors.
+ enum:
+ - TABLE_SCHEMA_ERROR
+ - FILE_FORMAT_ERROR
+ - CONFIGURATION_ERROR
+ - QUOTA_EXCEEDED
+ - CONFLICT_ERROR
+ - VALIDATION_ERROR
+ - STATE_ERROR
+ - OPERATION_ERROR
+ - SYSTEM_ERROR
+ type: string
+ x-enum-varnames:
+ - TABLE_SCHEMA_ERROR
+ - FILE_FORMAT_ERROR
+ - CONFIGURATION_ERROR
+ - QUOTA_EXCEEDED
+ - CONFLICT_ERROR
+ - VALIDATION_ERROR
+ - STATE_ERROR
+ - OPERATION_ERROR
+ - SYSTEM_ERROR
+ TableResultV2DataAttributesFileMetadataLocalFile:
+ description: File metadata for reference tables created by upload.
+ properties:
+ error_message:
+ description: The error message returned from the creation/update.
+ type: string
+ error_row_count:
+ 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.
+ properties:
+ aws_detail:
+ $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail'
+ azure_detail:
+ $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail'
+ gcp_detail:
+ $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail'
+ type: object
+ TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail:
+ description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail`
+ object.
+ properties:
+ aws_account_id:
+ description: The ID of the AWS account.
+ example: '123456789000'
+ type: string
+ aws_bucket_name:
+ description: The name of the AWS bucket.
+ example: example-data-bucket
+ type: string
+ file_path:
+ description: The relative file path from the S3 bucket root to the CSV file.
+ example: reference-tables/users.csv
+ type: string
+ type: object
+ x-oneOf-parent:
+ - AwsDetail
+ TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail:
+ description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail`
+ object.
+ properties:
+ azure_client_id:
+ description: The Azure client ID.
+ example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb
+ type: string
+ azure_container_name:
+ description: The name of the Azure container.
+ example: reference-data
+ type: string
+ azure_storage_account_name:
+ description: The name of the Azure storage account.
+ example: examplestorageaccount
+ type: string
+ azure_tenant_id:
+ description: The ID of the Azure tenant.
+ example: cccccccc-4444-5555-6666-dddddddddddd
+ type: string
+ file_path:
+ description: The relative file path from the Azure container root to the
+ CSV file.
+ example: tables/users.csv
+ type: string
+ type: object
+ x-oneOf-parent:
+ - AzureDetail
+ TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail:
+ description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail`
+ object.
+ properties:
+ file_path:
+ description: The relative file path from the GCS bucket root to the CSV
+ file.
+ example: data/reference_tables/users.csv
+ type: string
+ gcp_bucket_name:
+ description: The name of the GCP bucket.
+ example: example-data-bucket
+ type: string
+ gcp_project_id:
+ description: The ID of the GCP project.
+ example: example-gcp-project-12345
+ type: string
+ gcp_service_account_email:
+ description: The email of the GCP service account.
+ 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.
+ properties:
+ fields:
+ description: The `schema` `fields`.
+ items:
+ $ref: '#/components/schemas/TableResultV2DataAttributesSchemaFieldsItems'
+ 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.
+ example:
+ - ''
+ items:
+ type: string
+ type: array
+ required:
+ - fields
+ - primary_keys
+ type: object
+ TableResultV2DataAttributesSchemaFieldsItems:
+ description: The definition of `TableResultV2DataAttributesSchemaFieldsItems`
+ object.
+ properties:
+ name:
+ description: The field name.
+ example: ''
+ type: string
+ type:
+ $ref: '#/components/schemas/ReferenceTableSchemaFieldType'
+ required:
+ - name
+ - type
+ type: object
+ TableResultV2DataType:
+ default: reference_table
+ description: Reference table resource type.
+ enum:
+ - reference_table
+ example: reference_table
+ type: string
+ x-enum-varnames:
+ - REFERENCE_TABLE
+ TableRowResourceArray:
+ description: The definition of `TableRowResourceArray` object.
+ properties:
+ data:
+ description: The rows.
+ items:
+ $ref: '#/components/schemas/TableRowResourceData'
+ type: array
+ required:
+ - data
+ type: object
+ TableRowResourceData:
+ description: The definition of `TableRowResourceData` object.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/TableRowResourceDataAttributes'
+ id:
+ description: The ID of the row.
+ type: string
+ type:
+ $ref: '#/components/schemas/TableRowResourceDataType'
+ required:
+ - type
+ type: object
+ TableRowResourceDataAttributes:
+ description: The definition of `TableRowResourceDataAttributes` object.
+ properties:
+ values:
+ additionalProperties: {}
+ description: The values of the row.
+ type: object
+ type: object
+ TableRowResourceDataType:
+ default: row
+ description: Row resource type.
+ enum:
+ - row
+ example: row
+ type: string
+ x-enum-varnames:
+ - ROW
TagFilter:
description: Tag filter for the budget's entries.
properties:
@@ -66728,6 +67745,284 @@ paths:
operator: OR
permissions:
- timeseries_query
+ /api/v2/reference-tables/tables:
+ get:
+ description: List all reference tables in this organization.
+ operationId: ListTables
+ parameters:
+ - description: Number of tables to return.
+ example: 15
+ in: query
+ name: limit
+ required: false
+ schema:
+ default: 15
+ format: int64
+ maximum: 100
+ minimum: 1
+ type: integer
+ - description: Number of tables to skip for pagination.
+ example: 0
+ in: query
+ name: offset
+ required: false
+ schema:
+ default: 0
+ format: int64
+ minimum: 0
+ type: integer
+ - description: Sort field and direction. Use field name for ascending, prefix
+ with "-" for descending.
+ example: -updated_at
+ in: query
+ name: sort
+ required: false
+ schema:
+ $ref: '#/components/schemas/ReferenceTableSortType'
+ - description: Filter by table status.
+ example: DONE
+ in: query
+ name: filter[status]
+ required: false
+ schema:
+ type: string
+ - description: Filter by exact table name match.
+ example: my_reference_table
+ in: query
+ name: filter[table_name][exact]
+ required: false
+ schema:
+ type: string
+ - description: Filter by table name containing substring.
+ example: user
+ in: query
+ name: filter[table_name][contains]
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TableResultV2Array'
+ description: OK
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: List tables
+ 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).'
+ operationId: CreateReferenceTable
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateTableRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TableResultV2'
+ description: Created
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Create reference table
+ tags:
+ - Reference Tables
+ /api/v2/reference-tables/tables/{id}:
+ delete:
+ description: Delete a reference table by ID
+ operationId: DeleteTable
+ parameters:
+ - description: The ID of the reference table to delete
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: OK
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Delete table
+ tags:
+ - Reference Tables
+ get:
+ description: Get a reference table by ID
+ operationId: GetTable
+ parameters:
+ - description: The ID of the reference table to retrieve
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TableResultV2'
+ description: OK
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Get table
+ tags:
+ - Reference Tables
+ patch:
+ description: 'Update a reference table by ID. You can update the table''s data,
+ description, and tags. Note: The source type cannot be changed after table
+ creation. For data updates: For existing tables of type `source:LOCAL_FILE`,
+ call POST api/v2/reference-tables/uploads first to get an upload ID, then
+ PUT chunks of CSV data to each provided URL, and finally call this PATCH endpoint
+ with the upload_id in file_metadata. For existing tables with `source:` types
+ of `S3`, `GCS`, or `AZURE`, provide updated access_details in file_metadata
+ pointing to a CSV file in the same type of cloud storage.'
+ operationId: UpdateReferenceTable
+ parameters:
+ - description: The ID of the reference table to update
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchTableRequest'
+ required: true
+ responses:
+ '200':
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Update reference table
+ tags:
+ - Reference Tables
+ /api/v2/reference-tables/tables/{id}/rows:
+ get:
+ description: Get reference table rows by their primary key values.
+ operationId: GetRowsByID
+ parameters:
+ - description: The ID of the reference table
+ example: table-123
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ - description: List of row IDs (primary key values) to retrieve from the reference
+ table.
+ example:
+ - row1
+ - row2
+ explode: true
+ in: query
+ name: row_id
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TableRowResourceArray'
+ description: Some or all requested rows were found.
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Get rows by id
+ tags:
+ - Reference Tables
+ /api/v2/reference-tables/uploads:
+ post:
+ description: Create a reference table upload for bulk data ingestion
+ operationId: CreateReferenceTableUpload
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateUploadRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateUploadResponse'
+ description: Created
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Create reference table upload
+ tags:
+ - Reference Tables
/api/v2/remote_config/products/asm/waf/custom_rules:
get:
description: Retrieve a list of WAF custom rule.
@@ -76923,6 +78218,8 @@ tags:
aggregate your RUM events over HTTP. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/)
for more information
name: RUM
+- description: Auto-generated tag Reference Tables
+ name: Reference Tables
- description: 'A restriction policy defines the access control rules for a resource,
mapping a set of relations
diff --git a/examples/v2/reference-tables/CreateReferenceTable.java b/examples/v2/reference-tables/CreateReferenceTable.java
new file mode 100644
index 00000000000..63288105cbc
--- /dev/null
+++ b/examples/v2/reference-tables/CreateReferenceTable.java
@@ -0,0 +1,72 @@
+// Create reference table returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ReferenceTablesApi;
+import com.datadog.api.client.v2.model.CreateTableRequest;
+import com.datadog.api.client.v2.model.CreateTableRequestData;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesFileMetadata;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesFileMetadataCloudStorage;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesSchema;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesSchemaFieldsItems;
+import com.datadog.api.client.v2.model.CreateTableRequestDataType;
+import com.datadog.api.client.v2.model.ReferenceTableCreateSourceType;
+import com.datadog.api.client.v2.model.ReferenceTableSchemaFieldType;
+import com.datadog.api.client.v2.model.TableResultV2;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
+
+ CreateTableRequest body =
+ new CreateTableRequest()
+ .data(
+ new CreateTableRequestData()
+ .attributes(
+ new CreateTableRequestDataAttributes()
+ .description("this is a cloud table generated via a cloud bucket sync")
+ .fileMetadata(
+ new CreateTableRequestDataAttributesFileMetadata(
+ new CreateTableRequestDataAttributesFileMetadataCloudStorage()
+ .accessDetails(
+ new CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails()
+ .awsDetail(
+ new CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail()
+ .awsAccountId("test-account-id")
+ .awsBucketName("test-bucket")
+ .filePath("test_rt.csv")))
+ .syncEnabled(true)))
+ .schema(
+ new CreateTableRequestDataAttributesSchema()
+ .fields(
+ Arrays.asList(
+ new CreateTableRequestDataAttributesSchemaFieldsItems()
+ .name("name")
+ .type(ReferenceTableSchemaFieldType.STRING),
+ new CreateTableRequestDataAttributesSchemaFieldsItems()
+ .name("account_id")
+ .type(ReferenceTableSchemaFieldType.STRING)))
+ .primaryKeys(Collections.singletonList("account_id")))
+ .source(ReferenceTableCreateSourceType.S3)
+ .tableName("test_reference_table")
+ .tags(Collections.singletonList("test_tag")))
+ .type(CreateTableRequestDataType.REFERENCE_TABLE));
+
+ try {
+ TableResultV2 result = apiInstance.createReferenceTable(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReferenceTablesApi#createReferenceTable");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/reference-tables/CreateReferenceTableUpload.java b/examples/v2/reference-tables/CreateReferenceTableUpload.java
new file mode 100644
index 00000000000..e487bad8994
--- /dev/null
+++ b/examples/v2/reference-tables/CreateReferenceTableUpload.java
@@ -0,0 +1,41 @@
+// Create reference table upload returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ReferenceTablesApi;
+import com.datadog.api.client.v2.model.CreateUploadRequest;
+import com.datadog.api.client.v2.model.CreateUploadRequestData;
+import com.datadog.api.client.v2.model.CreateUploadRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateUploadRequestDataType;
+import com.datadog.api.client.v2.model.CreateUploadResponse;
+import java.util.Arrays;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
+
+ CreateUploadRequest body =
+ new CreateUploadRequest()
+ .data(
+ new CreateUploadRequestData()
+ .attributes(
+ new CreateUploadRequestDataAttributes()
+ .headers(Arrays.asList("id", "name", "value"))
+ .tableName("test_upload_table_Example-Reference-Table")
+ .partCount(1)
+ .partSize(1024L))
+ .type(CreateUploadRequestDataType.UPLOAD));
+
+ try {
+ CreateUploadResponse result = apiInstance.createReferenceTableUpload(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReferenceTablesApi#createReferenceTableUpload");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/reference-tables/CreateReferenceTable_3196130987.java b/examples/v2/reference-tables/CreateReferenceTable_3196130987.java
new file mode 100644
index 00000000000..9aca3fabaf2
--- /dev/null
+++ b/examples/v2/reference-tables/CreateReferenceTable_3196130987.java
@@ -0,0 +1,67 @@
+// Create reference table with upload returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ReferenceTablesApi;
+import com.datadog.api.client.v2.model.CreateTableRequest;
+import com.datadog.api.client.v2.model.CreateTableRequestData;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesFileMetadata;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesFileMetadataLocalFile;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesSchema;
+import com.datadog.api.client.v2.model.CreateTableRequestDataAttributesSchemaFieldsItems;
+import com.datadog.api.client.v2.model.CreateTableRequestDataType;
+import com.datadog.api.client.v2.model.ReferenceTableCreateSourceType;
+import com.datadog.api.client.v2.model.ReferenceTableSchemaFieldType;
+import com.datadog.api.client.v2.model.TableResultV2;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
+
+ CreateTableRequest body =
+ new CreateTableRequest()
+ .data(
+ new CreateTableRequestData()
+ .attributes(
+ new CreateTableRequestDataAttributes()
+ .description(
+ "Test reference table created via BDD test Example-Reference-Table")
+ .source(ReferenceTableCreateSourceType.LOCAL_FILE)
+ .fileMetadata(
+ new CreateTableRequestDataAttributesFileMetadata(
+ new CreateTableRequestDataAttributesFileMetadataLocalFile()
+ .uploadId("test-upload-id-Example-Reference-Table")))
+ .schema(
+ new CreateTableRequestDataAttributesSchema()
+ .fields(
+ Arrays.asList(
+ new CreateTableRequestDataAttributesSchemaFieldsItems()
+ .name("id")
+ .type(ReferenceTableSchemaFieldType.STRING),
+ new CreateTableRequestDataAttributesSchemaFieldsItems()
+ .name("name")
+ .type(ReferenceTableSchemaFieldType.STRING),
+ new CreateTableRequestDataAttributesSchemaFieldsItems()
+ .name("value")
+ .type(ReferenceTableSchemaFieldType.INT32)))
+ .primaryKeys(Collections.singletonList("id")))
+ .tableName("test_reference_table_Example-Reference-Table")
+ .tags(Collections.singletonList("test_tag")))
+ .type(CreateTableRequestDataType.REFERENCE_TABLE));
+
+ try {
+ TableResultV2 result = apiInstance.createReferenceTable(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReferenceTablesApi#createReferenceTable");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/reference-tables/DeleteTable.java b/examples/v2/reference-tables/DeleteTable.java
new file mode 100644
index 00000000000..12e85b0ef6c
--- /dev/null
+++ b/examples/v2/reference-tables/DeleteTable.java
@@ -0,0 +1,22 @@
+// Delete table returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ReferenceTablesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
+
+ try {
+ apiInstance.deleteTable("id");
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReferenceTablesApi#deleteTable");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/reference-tables/GetRowsByID.java b/examples/v2/reference-tables/GetRowsByID.java
new file mode 100644
index 00000000000..c84ae7b7fcd
--- /dev/null
+++ b/examples/v2/reference-tables/GetRowsByID.java
@@ -0,0 +1,26 @@
+// Get rows by id returns "Some or all requested rows were found." response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ReferenceTablesApi;
+import com.datadog.api.client.v2.model.TableRowResourceArray;
+import java.util.Arrays;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
+
+ try {
+ TableRowResourceArray result =
+ apiInstance.getRowsByID("table-123", Arrays.asList("row1", "row2"));
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReferenceTablesApi#getRowsByID");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/reference-tables/GetTable.java b/examples/v2/reference-tables/GetTable.java
new file mode 100644
index 00000000000..346c88834ab
--- /dev/null
+++ b/examples/v2/reference-tables/GetTable.java
@@ -0,0 +1,24 @@
+// Get table returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ReferenceTablesApi;
+import com.datadog.api.client.v2.model.TableResultV2;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
+
+ try {
+ TableResultV2 result = apiInstance.getTable("id");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReferenceTablesApi#getTable");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/reference-tables/ListTables.java b/examples/v2/reference-tables/ListTables.java
new file mode 100644
index 00000000000..b8cc324e4bb
--- /dev/null
+++ b/examples/v2/reference-tables/ListTables.java
@@ -0,0 +1,24 @@
+// List tables returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ReferenceTablesApi;
+import com.datadog.api.client.v2.model.TableResultV2Array;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
+
+ try {
+ TableResultV2Array result = apiInstance.listTables();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReferenceTablesApi#listTables");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/reference-tables/UpdateReferenceTable.java b/examples/v2/reference-tables/UpdateReferenceTable.java
new file mode 100644
index 00000000000..ee79aef32de
--- /dev/null
+++ b/examples/v2/reference-tables/UpdateReferenceTable.java
@@ -0,0 +1,69 @@
+// Update reference table returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ReferenceTablesApi;
+import com.datadog.api.client.v2.model.PatchTableRequest;
+import com.datadog.api.client.v2.model.PatchTableRequestData;
+import com.datadog.api.client.v2.model.PatchTableRequestDataAttributes;
+import com.datadog.api.client.v2.model.PatchTableRequestDataAttributesFileMetadata;
+import com.datadog.api.client.v2.model.PatchTableRequestDataAttributesFileMetadataCloudStorage;
+import com.datadog.api.client.v2.model.PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails;
+import com.datadog.api.client.v2.model.PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail;
+import com.datadog.api.client.v2.model.PatchTableRequestDataAttributesSchema;
+import com.datadog.api.client.v2.model.PatchTableRequestDataAttributesSchemaFieldsItems;
+import com.datadog.api.client.v2.model.PatchTableRequestDataType;
+import com.datadog.api.client.v2.model.ReferenceTableSchemaFieldType;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
+
+ PatchTableRequest body =
+ new PatchTableRequest()
+ .data(
+ new PatchTableRequestData()
+ .attributes(
+ new PatchTableRequestDataAttributes()
+ .description("this is a cloud table generated via a cloud bucket sync")
+ .fileMetadata(
+ new PatchTableRequestDataAttributesFileMetadata(
+ new PatchTableRequestDataAttributesFileMetadataCloudStorage()
+ .accessDetails(
+ new PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails()
+ .awsDetail(
+ new PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail()
+ .awsAccountId("test-account-id")
+ .awsBucketName("test-bucket")
+ .filePath("test_rt.csv")))
+ .syncEnabled(true)))
+ .schema(
+ new PatchTableRequestDataAttributesSchema()
+ .fields(
+ Arrays.asList(
+ new PatchTableRequestDataAttributesSchemaFieldsItems()
+ .name("id")
+ .type(ReferenceTableSchemaFieldType.INT32),
+ new PatchTableRequestDataAttributesSchemaFieldsItems()
+ .name("name")
+ .type(ReferenceTableSchemaFieldType.STRING)))
+ .primaryKeys(Collections.singletonList("id")))
+ .syncEnabled(false)
+ .tags(Collections.singletonList("test_tag")))
+ .id("00000000-0000-0000-0000-000000000000")
+ .type(PatchTableRequestDataType.REFERENCE_TABLE));
+
+ try {
+ apiInstance.updateReferenceTable("id", body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReferenceTablesApi#updateReferenceTable");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/api/ReferenceTablesApi.java b/src/main/java/com/datadog/api/client/v2/api/ReferenceTablesApi.java
new file mode 100644
index 00000000000..1afdd5dd001
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/ReferenceTablesApi.java
@@ -0,0 +1,1156 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.CreateTableRequest;
+import com.datadog.api.client.v2.model.CreateUploadRequest;
+import com.datadog.api.client.v2.model.CreateUploadResponse;
+import com.datadog.api.client.v2.model.PatchTableRequest;
+import com.datadog.api.client.v2.model.ReferenceTableSortType;
+import com.datadog.api.client.v2.model.TableResultV2;
+import com.datadog.api.client.v2.model.TableResultV2Array;
+import com.datadog.api.client.v2.model.TableRowResourceArray;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ReferenceTablesApi {
+ private ApiClient apiClient;
+
+ public ReferenceTablesApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public ReferenceTablesApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create reference table.
+ *
+ *
See {@link #createReferenceTableWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return TableResultV2
+ * @throws ApiException if fails to make API call
+ */
+ public TableResultV2 createReferenceTable(CreateTableRequest body) throws ApiException {
+ return createReferenceTableWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create reference table.
+ *
+ *
See {@link #createReferenceTableWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<TableResultV2>
+ */
+ public CompletableFuture createReferenceTableAsync(CreateTableRequest body) {
+ return createReferenceTableWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * 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).
+ *
+ * @param body (required)
+ * @return ApiResponse<TableResultV2>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 201 | Created | - |
+ * 400 | Bad Request | - |
+ * 403 | Forbidden | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createReferenceTableWithHttpInfo(CreateTableRequest body)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createReferenceTable");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/reference-tables/tables";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.createReferenceTable",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create reference table.
+ *
+ * See {@link #createReferenceTableWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<TableResultV2>>
+ */
+ public CompletableFuture> createReferenceTableWithHttpInfoAsync(
+ CreateTableRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createReferenceTable"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/reference-tables/tables";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.createReferenceTable",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create reference table upload.
+ *
+ * See {@link #createReferenceTableUploadWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CreateUploadResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CreateUploadResponse createReferenceTableUpload(CreateUploadRequest body)
+ throws ApiException {
+ return createReferenceTableUploadWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create reference table upload.
+ *
+ *
See {@link #createReferenceTableUploadWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<CreateUploadResponse>
+ */
+ public CompletableFuture createReferenceTableUploadAsync(
+ CreateUploadRequest body) {
+ return createReferenceTableUploadWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a reference table upload for bulk data ingestion
+ *
+ * @param body (required)
+ * @return ApiResponse<CreateUploadResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 201 | Created | - |
+ * 400 | Bad Request | - |
+ * 403 | Forbidden | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createReferenceTableUploadWithHttpInfo(
+ CreateUploadRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createReferenceTableUpload");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/reference-tables/uploads";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.createReferenceTableUpload",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create reference table upload.
+ *
+ * See {@link #createReferenceTableUploadWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<CreateUploadResponse>>
+ */
+ public CompletableFuture>
+ createReferenceTableUploadWithHttpInfoAsync(CreateUploadRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling createReferenceTableUpload"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/reference-tables/uploads";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.createReferenceTableUpload",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete table.
+ *
+ * See {@link #deleteTableWithHttpInfo}.
+ *
+ * @param id The ID of the reference table to delete (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteTable(String id) throws ApiException {
+ deleteTableWithHttpInfo(id);
+ }
+
+ /**
+ * Delete table.
+ *
+ *
See {@link #deleteTableWithHttpInfoAsync}.
+ *
+ * @param id The ID of the reference table to delete (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteTableAsync(String id) {
+ return deleteTableWithHttpInfoAsync(id)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete a reference table by ID
+ *
+ * @param id The ID of the reference table to delete (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | OK | - |
+ * 403 | Forbidden | - |
+ * 404 | Not Found | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteTableWithHttpInfo(String id) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(400, "Missing the required parameter 'id' when calling deleteTable");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reference-tables/tables/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.deleteTable",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete table.
+ *
+ * See {@link #deleteTableWithHttpInfo}.
+ *
+ * @param id The ID of the reference table to delete (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteTableWithHttpInfoAsync(String id) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'id' when calling deleteTable"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reference-tables/tables/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.deleteTable",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Get rows by id.
+ *
+ * See {@link #getRowsByIDWithHttpInfo}.
+ *
+ * @param id The ID of the reference table (required)
+ * @param rowId List of row IDs (primary key values) to retrieve from the reference table.
+ * (required)
+ * @return TableRowResourceArray
+ * @throws ApiException if fails to make API call
+ */
+ public TableRowResourceArray getRowsByID(String id, List rowId) throws ApiException {
+ return getRowsByIDWithHttpInfo(id, rowId).getData();
+ }
+
+ /**
+ * Get rows by id.
+ *
+ * See {@link #getRowsByIDWithHttpInfoAsync}.
+ *
+ * @param id The ID of the reference table (required)
+ * @param rowId List of row IDs (primary key values) to retrieve from the reference table.
+ * (required)
+ * @return CompletableFuture<TableRowResourceArray>
+ */
+ public CompletableFuture getRowsByIDAsync(String id, List rowId) {
+ return getRowsByIDWithHttpInfoAsync(id, rowId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get reference table rows by their primary key values.
+ *
+ * @param id The ID of the reference table (required)
+ * @param rowId List of row IDs (primary key values) to retrieve from the reference table.
+ * (required)
+ * @return ApiResponse<TableRowResourceArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | Some or all requested rows were found. | - |
+ * 403 | Forbidden | - |
+ * 404 | Not Found | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getRowsByIDWithHttpInfo(String id, List rowId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(400, "Missing the required parameter 'id' when calling getRowsByID");
+ }
+
+ // verify the required parameter 'rowId' is set
+ if (rowId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'rowId' when calling getRowsByID");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reference-tables/tables/{id}/rows"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "row_id", rowId));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.getRowsByID",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get rows by id.
+ *
+ * See {@link #getRowsByIDWithHttpInfo}.
+ *
+ * @param id The ID of the reference table (required)
+ * @param rowId List of row IDs (primary key values) to retrieve from the reference table.
+ * (required)
+ * @return CompletableFuture<ApiResponse<TableRowResourceArray>>
+ */
+ public CompletableFuture> getRowsByIDWithHttpInfoAsync(
+ String id, List rowId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'id' when calling getRowsByID"));
+ return result;
+ }
+
+ // verify the required parameter 'rowId' is set
+ if (rowId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'rowId' when calling getRowsByID"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reference-tables/tables/{id}/rows"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "row_id", rowId));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.getRowsByID",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get table.
+ *
+ * See {@link #getTableWithHttpInfo}.
+ *
+ * @param id The ID of the reference table to retrieve (required)
+ * @return TableResultV2
+ * @throws ApiException if fails to make API call
+ */
+ public TableResultV2 getTable(String id) throws ApiException {
+ return getTableWithHttpInfo(id).getData();
+ }
+
+ /**
+ * Get table.
+ *
+ *
See {@link #getTableWithHttpInfoAsync}.
+ *
+ * @param id The ID of the reference table to retrieve (required)
+ * @return CompletableFuture<TableResultV2>
+ */
+ public CompletableFuture getTableAsync(String id) {
+ return getTableWithHttpInfoAsync(id)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a reference table by ID
+ *
+ * @param id The ID of the reference table to retrieve (required)
+ * @return ApiResponse<TableResultV2>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | OK | - |
+ * 403 | Forbidden | - |
+ * 404 | Not Found | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getTableWithHttpInfo(String id) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(400, "Missing the required parameter 'id' when calling getTable");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reference-tables/tables/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.getTable",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get table.
+ *
+ * See {@link #getTableWithHttpInfo}.
+ *
+ * @param id The ID of the reference table to retrieve (required)
+ * @return CompletableFuture<ApiResponse<TableResultV2>>
+ */
+ public CompletableFuture> getTableWithHttpInfoAsync(String id) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'id' when calling getTable"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reference-tables/tables/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.getTable",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to listTables. */
+ public static class ListTablesOptionalParameters {
+ private Long limit;
+ private Long offset;
+ private ReferenceTableSortType sort;
+ private String filterStatus;
+ private String filterTableNameExact;
+ private String filterTableNameContains;
+
+ /**
+ * Set limit.
+ *
+ * @param limit Number of tables to return. (optional, default to 15)
+ * @return ListTablesOptionalParameters
+ */
+ public ListTablesOptionalParameters limit(Long limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * Set offset.
+ *
+ * @param offset Number of tables to skip for pagination. (optional, default to 0)
+ * @return ListTablesOptionalParameters
+ */
+ public ListTablesOptionalParameters offset(Long offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ /**
+ * Set sort.
+ *
+ * @param sort Sort field and direction. Use field name for ascending, prefix with "-" for
+ * descending. (optional, default to "-updated_at")
+ * @return ListTablesOptionalParameters
+ */
+ public ListTablesOptionalParameters sort(ReferenceTableSortType sort) {
+ this.sort = sort;
+ return this;
+ }
+
+ /**
+ * Set filterStatus.
+ *
+ * @param filterStatus Filter by table status. (optional)
+ * @return ListTablesOptionalParameters
+ */
+ public ListTablesOptionalParameters filterStatus(String filterStatus) {
+ this.filterStatus = filterStatus;
+ return this;
+ }
+
+ /**
+ * Set filterTableNameExact.
+ *
+ * @param filterTableNameExact Filter by exact table name match. (optional)
+ * @return ListTablesOptionalParameters
+ */
+ public ListTablesOptionalParameters filterTableNameExact(String filterTableNameExact) {
+ this.filterTableNameExact = filterTableNameExact;
+ return this;
+ }
+
+ /**
+ * Set filterTableNameContains.
+ *
+ * @param filterTableNameContains Filter by table name containing substring. (optional)
+ * @return ListTablesOptionalParameters
+ */
+ public ListTablesOptionalParameters filterTableNameContains(String filterTableNameContains) {
+ this.filterTableNameContains = filterTableNameContains;
+ return this;
+ }
+ }
+
+ /**
+ * List tables.
+ *
+ * See {@link #listTablesWithHttpInfo}.
+ *
+ * @return TableResultV2Array
+ * @throws ApiException if fails to make API call
+ */
+ public TableResultV2Array listTables() throws ApiException {
+ return listTablesWithHttpInfo(new ListTablesOptionalParameters()).getData();
+ }
+
+ /**
+ * List tables.
+ *
+ *
See {@link #listTablesWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<TableResultV2Array>
+ */
+ public CompletableFuture listTablesAsync() {
+ return listTablesWithHttpInfoAsync(new ListTablesOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List tables.
+ *
+ * See {@link #listTablesWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return TableResultV2Array
+ * @throws ApiException if fails to make API call
+ */
+ public TableResultV2Array listTables(ListTablesOptionalParameters parameters)
+ throws ApiException {
+ return listTablesWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * List tables.
+ *
+ *
See {@link #listTablesWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<TableResultV2Array>
+ */
+ public CompletableFuture listTablesAsync(
+ ListTablesOptionalParameters parameters) {
+ return listTablesWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List all reference tables in this organization.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<TableResultV2Array>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | OK | - |
+ * 403 | Forbidden | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listTablesWithHttpInfo(
+ ListTablesOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+ Long limit = parameters.limit;
+ Long offset = parameters.offset;
+ ReferenceTableSortType sort = parameters.sort;
+ String filterStatus = parameters.filterStatus;
+ String filterTableNameExact = parameters.filterTableNameExact;
+ String filterTableNameContains = parameters.filterTableNameContains;
+ // create path and map variables
+ String localVarPath = "/api/v2/reference-tables/tables";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[table_name][exact]", filterTableNameExact));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[table_name][contains]", filterTableNameContains));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.listTables",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List tables.
+ *
+ * See {@link #listTablesWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<TableResultV2Array>>
+ */
+ public CompletableFuture> listTablesWithHttpInfoAsync(
+ ListTablesOptionalParameters parameters) {
+ Object localVarPostBody = null;
+ Long limit = parameters.limit;
+ Long offset = parameters.offset;
+ ReferenceTableSortType sort = parameters.sort;
+ String filterStatus = parameters.filterStatus;
+ String filterTableNameExact = parameters.filterTableNameExact;
+ String filterTableNameContains = parameters.filterTableNameContains;
+ // create path and map variables
+ String localVarPath = "/api/v2/reference-tables/tables";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[table_name][exact]", filterTableNameExact));
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "filter[table_name][contains]", filterTableNameContains));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.listTables",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update reference table.
+ *
+ * See {@link #updateReferenceTableWithHttpInfo}.
+ *
+ * @param id The ID of the reference table to update (required)
+ * @param body (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void updateReferenceTable(String id, PatchTableRequest body) throws ApiException {
+ updateReferenceTableWithHttpInfo(id, body);
+ }
+
+ /**
+ * Update reference table.
+ *
+ *
See {@link #updateReferenceTableWithHttpInfoAsync}.
+ *
+ * @param id The ID of the reference table to update (required)
+ * @param body (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture updateReferenceTableAsync(String id, PatchTableRequest body) {
+ return updateReferenceTableWithHttpInfoAsync(id, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update a reference table by ID. You can update the table's data, description, and tags. Note:
+ * The source type cannot be changed after table creation. For data updates: For existing tables
+ * of type source:LOCAL_FILE
, call POST api/v2/reference-tables/uploads first to get
+ * an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this PATCH
+ * endpoint with the upload_id in file_metadata. For existing tables with source:
+ * types of S3
, GCS
, or AZURE
, provide updated
+ * access_details in file_metadata pointing to a CSV file in the same type of cloud storage.
+ *
+ * @param id The ID of the reference table to update (required)
+ * @param body (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | OK | - |
+ * 400 | Bad Request | - |
+ * 403 | Forbidden | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateReferenceTableWithHttpInfo(String id, PatchTableRequest body)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'id' when calling updateReferenceTable");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateReferenceTable");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reference-tables/tables/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.updateReferenceTable",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Update reference table.
+ *
+ * See {@link #updateReferenceTableWithHttpInfo}.
+ *
+ * @param id The ID of the reference table to update (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> updateReferenceTableWithHttpInfoAsync(
+ String id, PatchTableRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'id' when calling updateReferenceTable"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateReferenceTable"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reference-tables/tables/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReferenceTablesApi.updateReferenceTable",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateTableRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateTableRequest.java
new file mode 100644
index 00000000000..7bab2eaa4ed
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateTableRequest.java
@@ -0,0 +1,136 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** The definition of CreateTableRequest
object. */
+@JsonPropertyOrder({CreateTableRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateTableRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private CreateTableRequestData data;
+
+ public CreateTableRequest data(CreateTableRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * The definition of CreateTableRequestData
object.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CreateTableRequestData getData() {
+ return data;
+ }
+
+ public void setData(CreateTableRequestData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateTableRequest
+ */
+ @JsonAnySetter
+ public CreateTableRequest putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateTableRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateTableRequest createTableRequest = (CreateTableRequest) o;
+ return Objects.equals(this.data, createTableRequest.data)
+ && Objects.equals(this.additionalProperties, createTableRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateTableRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestData.java
new file mode 100644
index 00000000000..f92254d450a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestData.java
@@ -0,0 +1,205 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** The definition of CreateTableRequestData
object. */
+@JsonPropertyOrder({
+ CreateTableRequestData.JSON_PROPERTY_ATTRIBUTES,
+ CreateTableRequestData.JSON_PROPERTY_ID,
+ CreateTableRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateTableRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private CreateTableRequestDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private CreateTableRequestDataType type = CreateTableRequestDataType.REFERENCE_TABLE;
+
+ public CreateTableRequestData() {}
+
+ @JsonCreator
+ public CreateTableRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CreateTableRequestDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public CreateTableRequestData attributes(CreateTableRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The definition of CreateTableRequestDataAttributes
object.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CreateTableRequestDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(CreateTableRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public CreateTableRequestData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The ID of the reference table.
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public CreateTableRequestData type(CreateTableRequestDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Reference table resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CreateTableRequestDataType getType() {
+ return type;
+ }
+
+ public void setType(CreateTableRequestDataType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateTableRequestData
+ */
+ @JsonAnySetter
+ public CreateTableRequestData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateTableRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateTableRequestData createTableRequestData = (CreateTableRequestData) o;
+ return Objects.equals(this.attributes, createTableRequestData.attributes)
+ && Objects.equals(this.id, createTableRequestData.id)
+ && Objects.equals(this.type, createTableRequestData.type)
+ && Objects.equals(this.additionalProperties, createTableRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateTableRequestData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestDataAttributes.java
new file mode 100644
index 00000000000..ad5fdb108e4
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestDataAttributes.java
@@ -0,0 +1,307 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** The definition of CreateTableRequestDataAttributes
object. */
+@JsonPropertyOrder({
+ CreateTableRequestDataAttributes.JSON_PROPERTY_DESCRIPTION,
+ CreateTableRequestDataAttributes.JSON_PROPERTY_FILE_METADATA,
+ CreateTableRequestDataAttributes.JSON_PROPERTY_SCHEMA,
+ CreateTableRequestDataAttributes.JSON_PROPERTY_SOURCE,
+ CreateTableRequestDataAttributes.JSON_PROPERTY_TABLE_NAME,
+ CreateTableRequestDataAttributes.JSON_PROPERTY_TAGS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateTableRequestDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DESCRIPTION = "description";
+ private String description;
+
+ public static final String JSON_PROPERTY_FILE_METADATA = "file_metadata";
+ private CreateTableRequestDataAttributesFileMetadata fileMetadata;
+
+ public static final String JSON_PROPERTY_SCHEMA = "schema";
+ private CreateTableRequestDataAttributesSchema schema;
+
+ public static final String JSON_PROPERTY_SOURCE = "source";
+ private ReferenceTableCreateSourceType source;
+
+ public static final String JSON_PROPERTY_TABLE_NAME = "table_name";
+ private String tableName;
+
+ public static final String JSON_PROPERTY_TAGS = "tags";
+ private List tags = null;
+
+ public CreateTableRequestDataAttributes() {}
+
+ @JsonCreator
+ public CreateTableRequestDataAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_SCHEMA)
+ CreateTableRequestDataAttributesSchema schema,
+ @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE)
+ ReferenceTableCreateSourceType source,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TABLE_NAME) String tableName) {
+ this.schema = schema;
+ this.unparsed |= schema.unparsed;
+ this.source = source;
+ this.unparsed |= !source.isValid();
+ this.tableName = tableName;
+ }
+
+ public CreateTableRequestDataAttributes description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the reference table.
+ *
+ * @return description
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DESCRIPTION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public CreateTableRequestDataAttributes fileMetadata(
+ CreateTableRequestDataAttributesFileMetadata fileMetadata) {
+ this.fileMetadata = fileMetadata;
+ this.unparsed |= fileMetadata.unparsed;
+ return this;
+ }
+
+ /**
+ * The definition of CreateTableRequestDataAttributesFileMetadata
object.
+ *
+ * @return fileMetadata
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_FILE_METADATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CreateTableRequestDataAttributesFileMetadata getFileMetadata() {
+ return fileMetadata;
+ }
+
+ public void setFileMetadata(CreateTableRequestDataAttributesFileMetadata fileMetadata) {
+ this.fileMetadata = fileMetadata;
+ }
+
+ public CreateTableRequestDataAttributes schema(CreateTableRequestDataAttributesSchema schema) {
+ this.schema = schema;
+ this.unparsed |= schema.unparsed;
+ return this;
+ }
+
+ /**
+ * The definition of CreateTableRequestDataAttributesSchema
object.
+ *
+ * @return schema
+ */
+ @JsonProperty(JSON_PROPERTY_SCHEMA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CreateTableRequestDataAttributesSchema getSchema() {
+ return schema;
+ }
+
+ public void setSchema(CreateTableRequestDataAttributesSchema schema) {
+ this.schema = schema;
+ }
+
+ public CreateTableRequestDataAttributes source(ReferenceTableCreateSourceType source) {
+ this.source = source;
+ this.unparsed |= !source.isValid();
+ return this;
+ }
+
+ /**
+ * The source type for creating reference table data. Only these source types can be created
+ * through this API.
+ *
+ * @return source
+ */
+ @JsonProperty(JSON_PROPERTY_SOURCE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ReferenceTableCreateSourceType getSource() {
+ return source;
+ }
+
+ public void setSource(ReferenceTableCreateSourceType source) {
+ if (!source.isValid()) {
+ this.unparsed = true;
+ }
+ this.source = source;
+ }
+
+ public CreateTableRequestDataAttributes tableName(String tableName) {
+ this.tableName = tableName;
+ return this;
+ }
+
+ /**
+ * The name of the reference table.
+ *
+ * @return tableName
+ */
+ @JsonProperty(JSON_PROPERTY_TABLE_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getTableName() {
+ return tableName;
+ }
+
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+
+ public CreateTableRequestDataAttributes tags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public CreateTableRequestDataAttributes addTagsItem(String tagsItem) {
+ if (this.tags == null) {
+ this.tags = new ArrayList<>();
+ }
+ this.tags.add(tagsItem);
+ return this;
+ }
+
+ /**
+ * The tags of the reference table.
+ *
+ * @return tags
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TAGS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getTags() {
+ return tags;
+ }
+
+ public void setTags(List tags) {
+ this.tags = tags;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateTableRequestDataAttributes
+ */
+ @JsonAnySetter
+ public CreateTableRequestDataAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateTableRequestDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateTableRequestDataAttributes createTableRequestDataAttributes =
+ (CreateTableRequestDataAttributes) o;
+ return Objects.equals(this.description, createTableRequestDataAttributes.description)
+ && Objects.equals(this.fileMetadata, createTableRequestDataAttributes.fileMetadata)
+ && Objects.equals(this.schema, createTableRequestDataAttributes.schema)
+ && Objects.equals(this.source, createTableRequestDataAttributes.source)
+ && Objects.equals(this.tableName, createTableRequestDataAttributes.tableName)
+ && Objects.equals(this.tags, createTableRequestDataAttributes.tags)
+ && Objects.equals(
+ this.additionalProperties, createTableRequestDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ description, fileMetadata, schema, source, tableName, tags, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateTableRequestDataAttributes {\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" fileMetadata: ").append(toIndentedString(fileMetadata)).append("\n");
+ sb.append(" schema: ").append(toIndentedString(schema)).append("\n");
+ sb.append(" source: ").append(toIndentedString(source)).append("\n");
+ sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestDataAttributesFileMetadata.java b/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestDataAttributesFileMetadata.java
new file mode 100644
index 00000000000..fc56f6237bb
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateTableRequestDataAttributesFileMetadata.java
@@ -0,0 +1,340 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.AbstractOpenApiSchema;
+import com.datadog.api.client.JSON;
+import com.datadog.api.client.UnparsedObject;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import jakarta.ws.rs.core.GenericType;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+@JsonDeserialize(
+ using =
+ CreateTableRequestDataAttributesFileMetadata
+ .CreateTableRequestDataAttributesFileMetadataDeserializer.class)
+@JsonSerialize(
+ using =
+ CreateTableRequestDataAttributesFileMetadata
+ .CreateTableRequestDataAttributesFileMetadataSerializer.class)
+public class CreateTableRequestDataAttributesFileMetadata extends AbstractOpenApiSchema {
+ private static final Logger log =
+ Logger.getLogger(CreateTableRequestDataAttributesFileMetadata.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class CreateTableRequestDataAttributesFileMetadataSerializer
+ extends StdSerializer {
+ public CreateTableRequestDataAttributesFileMetadataSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public CreateTableRequestDataAttributesFileMetadataSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ CreateTableRequestDataAttributesFileMetadata value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class CreateTableRequestDataAttributesFileMetadataDeserializer
+ extends StdDeserializer {
+ public CreateTableRequestDataAttributesFileMetadataDeserializer() {
+ this(CreateTableRequestDataAttributesFileMetadata.class);
+ }
+
+ public CreateTableRequestDataAttributesFileMetadataDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public CreateTableRequestDataAttributesFileMetadata deserialize(
+ JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
+ JsonNode tree = jp.readValueAsTree();
+ Object deserialized = null;
+ Object tmp = null;
+ boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
+ int match = 0;
+ JsonToken token = tree.traverse(jp.getCodec()).nextToken();
+ // deserialize CreateTableRequestDataAttributesFileMetadataCloudStorage
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(Integer.class)
+ || CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(Long.class)
+ || CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(Float.class)
+ || CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(Double.class)
+ || CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(Boolean.class)
+ || CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(
+ String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(
+ Integer.class)
+ || CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(
+ Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(Float.class)
+ || CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(
+ Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(
+ Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (CreateTableRequestDataAttributesFileMetadataCloudStorage.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp =
+ tree.traverse(jp.getCodec())
+ .readValueAs(CreateTableRequestDataAttributesFileMetadataCloudStorage.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((CreateTableRequestDataAttributesFileMetadataCloudStorage) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(
+ Level.FINER,
+ "Input data matches schema"
+ + " 'CreateTableRequestDataAttributesFileMetadataCloudStorage'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(
+ Level.FINER,
+ "Input data does not match schema"
+ + " 'CreateTableRequestDataAttributesFileMetadataCloudStorage'",
+ e);
+ }
+
+ // deserialize CreateTableRequestDataAttributesFileMetadataLocalFile
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(Integer.class)
+ || CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(Long.class)
+ || CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(Float.class)
+ || CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(Double.class)
+ || CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(Boolean.class)
+ || CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(Integer.class)
+ || CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(
+ Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(Float.class)
+ || CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(
+ Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (CreateTableRequestDataAttributesFileMetadataLocalFile.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp =
+ tree.traverse(jp.getCodec())
+ .readValueAs(CreateTableRequestDataAttributesFileMetadataLocalFile.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((CreateTableRequestDataAttributesFileMetadataLocalFile) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(
+ Level.FINER,
+ "Input data matches schema 'CreateTableRequestDataAttributesFileMetadataLocalFile'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(
+ Level.FINER,
+ "Input data does not match schema"
+ + " 'CreateTableRequestDataAttributesFileMetadataLocalFile'",
+ e);
+ }
+
+ CreateTableRequestDataAttributesFileMetadata ret =
+ new CreateTableRequestDataAttributesFileMetadata();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference