Skip to content

Commit 7a8cf91

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cd4cfde of spec repo
1 parent 7b025f7 commit 7a8cf91

File tree

48 files changed

+365
-530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+365
-530
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 181 additions & 152 deletions
Large diffs are not rendered by default.

examples/v2/reference-tables/UpdateReferenceTable.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"test_tag",
3838
],
3939
}),
40-
id: "00000000-0000-0000-0000-000000000000",
4140
type: DatadogAPIClient::V2::PatchTableRequestDataType::REFERENCE_TABLE,
4241
}),
4342
})

features/v2/reference_tables.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Feature: Reference Tables
2424
@generated @skip @team:DataDog/redapl-experiences
2525
Scenario: Create reference table upload returns "Bad Request" response
2626
Given new "CreateReferenceTableUpload" request
27-
And body with value {"data": {"attributes": {"headers": [""], "part_count": 3, "part_size": 10000000, "table_name": ""}, "type": "upload"}}
27+
And body with value {"data": {"attributes": {"headers": ["field_1", "field_2"], "part_count": 3, "part_size": 10000000, "table_name": ""}, "type": "upload"}}
2828
When the request is sent
2929
Then the response status is 400 Bad Request
3030

@@ -108,14 +108,14 @@ Feature: Reference Tables
108108
Scenario: Update reference table returns "Bad Request" response
109109
Given new "UpdateReferenceTable" request
110110
And request contains "id" parameter from "REPLACE.ME"
111-
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}}
111+
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "type": "reference_table"}}
112112
When the request is sent
113113
Then the response status is 400 Bad Request
114114

115115
@generated @skip @team:DataDog/redapl-experiences
116116
Scenario: Update reference table returns "OK" response
117117
Given new "UpdateReferenceTable" request
118118
And request contains "id" parameter from "REPLACE.ME"
119-
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}}
119+
And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "type": "reference_table"}}
120120
When the request is sent
121121
Then the response status is 200 OK

lib/datadog_api_client/v2/api/reference_tables_api.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ def create_reference_table(body, opts = {})
3333

3434
# Create reference table.
3535
#
36-
# 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).
36+
# Creates a reference table. You can provide data in two ways:
37+
# 1. Call POST /api/v2/reference-tables/upload to get an upload ID. Then, PUT the CSV data
38+
# (not the file itself) in chunks to each URL in the request body. Finally, call this
39+
# POST endpoint with `upload_id` in `file_metadata`.
40+
# 2. Provide `access_details` in `file_metadata` pointing to a CSV file in cloud storage.
3741
#
3842
# @param body [CreateTableRequest]
3943
# @param opts [Hash] the optional parameters
@@ -169,7 +173,7 @@ def delete_table(id, opts = {})
169173
#
170174
# Delete a reference table by ID
171175
#
172-
# @param id [String] The ID of the reference table to delete
176+
# @param id [String] Unique identifier of the reference table to delete
173177
# @param opts [Hash] the optional parameters
174178
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
175179
def delete_table_with_http_info(id, opts = {})
@@ -234,7 +238,7 @@ def get_rows_by_id(id, row_id, opts = {})
234238
#
235239
# Get reference table rows by their primary key values.
236240
#
237-
# @param id [String] The ID of the reference table
241+
# @param id [String] Unique identifier of the reference table to get rows from
238242
# @param row_id [Array<String>] List of row IDs (primary key values) to retrieve from the reference table.
239243
# @param opts [Hash] the optional parameters
240244
# @return [Array<(TableRowResourceArray, Integer, Hash)>] TableRowResourceArray data, response status code and response headers
@@ -306,7 +310,7 @@ def get_table(id, opts = {})
306310
#
307311
# Get a reference table by ID
308312
#
309-
# @param id [String] The ID of the reference table to retrieve
313+
# @param id [String] Unique identifier of the reference table to retrieve
310314
# @param opts [Hash] the optional parameters
311315
# @return [Array<(TableResultV2, Integer, Hash)>] TableResultV2 data, response status code and response headers
312316
def get_table_with_http_info(id, opts = {})
@@ -374,7 +378,7 @@ def list_tables(opts = {})
374378
# @param opts [Hash] the optional parameters
375379
# @option opts [Integer] :page_limit Number of tables to return.
376380
# @option opts [Integer] :page_offset Number of tables to skip for pagination.
377-
# @option opts [ReferenceTableSortType] :sort Sort field and direction. Use field name for ascending, prefix with "-" for descending.
381+
# @option opts [ReferenceTableSortType] :sort Sort field and direction for the list of reference tables. Use field name for ascending, prefix with "-" for descending.
378382
# @option opts [String] :filter_status Filter by table status.
379383
# @option opts [String] :filter_table_name_exact Filter by exact table name match.
380384
# @option opts [String] :filter_table_name_contains Filter by table name containing substring.
@@ -456,7 +460,7 @@ def update_reference_table(id, body, opts = {})
456460
#
457461
# 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.
458462
#
459-
# @param id [String] The ID of the reference table to update
463+
# @param id [String] Unique identifier of the reference table to update
460464
# @param body [PatchTableRequest]
461465
# @param opts [Hash] the optional parameters
462466
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

lib/datadog_api_client/v2/models/create_table_request.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# The definition of `CreateTableRequest` object.
20+
# Request body for creating a new reference table from a local file or cloud storage.
2121
class CreateTableRequest
2222
include BaseGenericModel
2323

24-
# The definition of `CreateTableRequestData` object.
24+
# The data object containing the table definition.
2525
attr_accessor :data
2626

2727
attr_accessor :additional_properties

lib/datadog_api_client/v2/models/create_table_request_data.rb

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,21 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# The definition of `CreateTableRequestData` object.
20+
# The data object containing the table definition.
2121
class CreateTableRequestData
2222
include BaseGenericModel
2323

24-
# The definition of `CreateTableRequestDataAttributes` object.
24+
# Attributes that define the reference table's configuration and properties.
2525
attr_accessor :attributes
2626

27-
# The ID of the reference table.
28-
attr_accessor :id
29-
3027
# Reference table resource type.
3128
attr_reader :type
3229

33-
attr_accessor :additional_properties
34-
3530
# Attribute mapping from ruby-style variable name to JSON key.
3631
# @!visibility private
3732
def self.attribute_map
3833
{
3934
:'attributes' => :'attributes',
40-
:'id' => :'id',
4135
:'type' => :'type'
4236
}
4337
end
@@ -47,7 +41,6 @@ def self.attribute_map
4741
def self.openapi_types
4842
{
4943
:'attributes' => :'CreateTableRequestDataAttributes',
50-
:'id' => :'String',
5144
:'type' => :'CreateTableRequestDataType'
5245
}
5346
end
@@ -60,24 +53,18 @@ def initialize(attributes = {})
6053
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateTableRequestData` initialize method"
6154
end
6255

63-
self.additional_properties = {}
6456
# check to see if the attribute exists and convert string to symbol for hash key
6557
attributes = attributes.each_with_object({}) { |(k, v), h|
6658
if (!self.class.attribute_map.key?(k.to_sym))
67-
self.additional_properties[k.to_sym] = v
68-
else
69-
h[k.to_sym] = v
59+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateTableRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
7060
end
61+
h[k.to_sym] = v
7162
}
7263

7364
if attributes.key?(:'attributes')
7465
self.attributes = attributes[:'attributes']
7566
end
7667

77-
if attributes.key?(:'id')
78-
self.id = attributes[:'id']
79-
end
80-
8168
if attributes.key?(:'type')
8269
self.type = attributes[:'type']
8370
end
@@ -101,43 +88,21 @@ def type=(type)
10188
@type = type
10289
end
10390

104-
# Returns the object in the form of hash, with additionalProperties support.
105-
# @return [Hash] Returns the object in the form of hash
106-
# @!visibility private
107-
def to_hash
108-
hash = {}
109-
self.class.attribute_map.each_pair do |attr, param|
110-
value = self.send(attr)
111-
if value.nil?
112-
is_nullable = self.class.openapi_nullable.include?(attr)
113-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
114-
end
115-
116-
hash[param] = _to_hash(value)
117-
end
118-
self.additional_properties.each_pair do |attr, value|
119-
hash[attr] = value
120-
end
121-
hash
122-
end
123-
12491
# Checks equality by comparing each attribute.
12592
# @param o [Object] Object to be compared
12693
# @!visibility private
12794
def ==(o)
12895
return true if self.equal?(o)
12996
self.class == o.class &&
13097
attributes == o.attributes &&
131-
id == o.id &&
132-
type == o.type &&
133-
additional_properties == o.additional_properties
98+
type == o.type
13499
end
135100

136101
# Calculates hash code according to all attributes.
137102
# @return [Integer] Hash code
138103
# @!visibility private
139104
def hash
140-
[attributes, id, type, additional_properties].hash
105+
[attributes, type].hash
141106
end
142107
end
143108
end

lib/datadog_api_client/v2/models/create_table_request_data_attributes.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# The definition of `CreateTableRequestDataAttributes` object.
20+
# Attributes that define the reference table's configuration and properties.
2121
class CreateTableRequestDataAttributes
2222
include BaseGenericModel
2323

24-
# The description of the reference table.
24+
# Optional text describing the purpose or contents of this reference table.
2525
attr_accessor :description
2626

27-
# The definition of `CreateTableRequestDataAttributesFileMetadata` object.
27+
# Metadata specifying where and how to access the reference table's data file.
2828
attr_accessor :file_metadata
2929

30-
# The definition of `CreateTableRequestDataAttributesSchema` object.
30+
# Schema defining the structure and columns of the reference table.
3131
attr_reader :schema
3232

3333
# The source type for creating reference table data. Only these source types can be created through this API.
3434
attr_reader :source
3535

36-
# The name of the reference table.
36+
# Name to identify this reference table.
3737
attr_reader :table_name
3838

39-
# The tags of the reference table.
39+
# Tags for organizing and filtering reference tables.
4040
attr_accessor :tags
4141

4242
attr_accessor :additional_properties

lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# The definition of `CreateTableRequestDataAttributesFileMetadata` object.
20+
# Metadata specifying where and how to access the reference table's data file.
2121
module CreateTableRequestDataAttributesFileMetadata
2222
class << self
2323
include BaseOneOfModel

lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata_cloud_storage.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module DatadogAPIClient::V2
2121
class CreateTableRequestDataAttributesFileMetadataCloudStorage
2222
include BaseGenericModel
2323

24-
# The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` object.
24+
# Cloud storage access configuration for the reference table data file.
2525
attr_reader :access_details
2626

2727
# Whether this table is synced automatically.

lib/datadog_api_client/v2/models/create_table_request_data_attributes_file_metadata_one_of_access_details.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` object.
20+
# Cloud storage access configuration for the reference table data file.
2121
class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails
2222
include BaseGenericModel
2323

24-
# The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object.
24+
# Amazon Web Services S3 storage access configuration.
2525
attr_accessor :aws_detail
2626

27-
# The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object.
27+
# Azure Blob Storage access configuration.
2828
attr_accessor :azure_detail
2929

30-
# The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object.
30+
# Google Cloud Platform storage access configuration.
3131
attr_accessor :gcp_detail
3232

3333
attr_accessor :additional_properties

0 commit comments

Comments
 (0)