From ef670579da7eaf8ac51babe5043422e28e5e30cc Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 16:21:49 +0000 Subject: [PATCH 1/2] Reference Tables API spec: disallow additional properties from FileMetadata (#2771) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 2 ++ ..._attributes_file_metadata_cloud_storage.rb | 33 +++---------------- ...ata_attributes_file_metadata_local_file.rb | 33 +++---------------- 3 files changed, 10 insertions(+), 58 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d5ef9bfc5d3..83beef00d59 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -50997,6 +50997,7 @@ components: - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorage' - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataLocalFile' TableResultV2DataAttributesFileMetadataCloudStorage: + additionalProperties: false description: File metadata for reference tables created by cloud storage. properties: access_details: @@ -51043,6 +51044,7 @@ components: - OPERATION_ERROR - SYSTEM_ERROR TableResultV2DataAttributesFileMetadataLocalFile: + additionalProperties: false description: File metadata for reference tables created by upload. Note that upload_id is only returned in the immediate create/replace response and is not available in subsequent GET requests. diff --git a/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_cloud_storage.rb b/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_cloud_storage.rb index e949cb365f1..e3e3be612fd 100644 --- a/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_cloud_storage.rb +++ b/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_cloud_storage.rb @@ -36,8 +36,6 @@ class TableResultV2DataAttributesFileMetadataCloudStorage # Whether this table is synced automatically. attr_accessor :sync_enabled - attr_accessor :additional_properties - # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -70,14 +68,12 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TableResultV2DataAttributesFileMetadataCloudStorage` initialize method" end - self.additional_properties = {} # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TableResultV2DataAttributesFileMetadataCloudStorage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end + h[k.to_sym] = v } if attributes.key?(:'access_details') @@ -119,26 +115,6 @@ def access_details=(access_details) @access_details = access_details end - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - # Checks equality by comparing each attribute. # @param o [Object] Object to be compared # @!visibility private @@ -149,15 +125,14 @@ def ==(o) error_message == o.error_message && error_row_count == o.error_row_count && error_type == o.error_type && - sync_enabled == o.sync_enabled && - additional_properties == o.additional_properties + sync_enabled == o.sync_enabled end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [access_details, error_message, error_row_count, error_type, sync_enabled, additional_properties].hash + [access_details, error_message, error_row_count, error_type, sync_enabled].hash end end end diff --git a/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_local_file.rb b/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_local_file.rb index e8acd894328..df6fa923ce0 100644 --- a/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_local_file.rb +++ b/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_local_file.rb @@ -27,8 +27,6 @@ class TableResultV2DataAttributesFileMetadataLocalFile # The number of rows that failed to create/update. attr_accessor :error_row_count - attr_accessor :additional_properties - # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -55,14 +53,12 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TableResultV2DataAttributesFileMetadataLocalFile` initialize method" end - self.additional_properties = {} # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TableResultV2DataAttributesFileMetadataLocalFile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end + h[k.to_sym] = v } if attributes.key?(:'error_message') @@ -74,26 +70,6 @@ def initialize(attributes = {}) end end - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - # Checks equality by comparing each attribute. # @param o [Object] Object to be compared # @!visibility private @@ -101,15 +77,14 @@ def ==(o) return true if self.equal?(o) self.class == o.class && error_message == o.error_message && - error_row_count == o.error_row_count && - additional_properties == o.additional_properties + error_row_count == o.error_row_count end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [error_message, error_row_count, additional_properties].hash + [error_message, error_row_count].hash end end end From 0f05c18ab4100f2c808061cce021ed954fce94f7 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 18:58:07 +0000 Subject: [PATCH 2/2] Add last_login_time to Users v2 API (#2712) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 6 ++++++ lib/datadog_api_client/v2/models/user_attributes.rb | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 83beef00d59..6401afac969 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -54006,6 +54006,12 @@ components: icon: description: URL of the user's icon. type: string + last_login_time: + description: The last time the user logged in. + format: date-time + nullable: true + readOnly: true + type: string mfa_enabled: description: If user has MFA enabled. readOnly: true diff --git a/lib/datadog_api_client/v2/models/user_attributes.rb b/lib/datadog_api_client/v2/models/user_attributes.rb index 8e677ba6f65..a62ccc455ce 100644 --- a/lib/datadog_api_client/v2/models/user_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_attributes.rb @@ -36,6 +36,9 @@ class UserAttributes # URL of the user's icon. attr_accessor :icon + # The last time the user logged in. + attr_accessor :last_login_time + # If user has MFA enabled. attr_accessor :mfa_enabled @@ -68,6 +71,7 @@ def self.attribute_map :'email' => :'email', :'handle' => :'handle', :'icon' => :'icon', + :'last_login_time' => :'last_login_time', :'mfa_enabled' => :'mfa_enabled', :'modified_at' => :'modified_at', :'name' => :'name', @@ -87,6 +91,7 @@ def self.openapi_types :'email' => :'String', :'handle' => :'String', :'icon' => :'String', + :'last_login_time' => :'Time', :'mfa_enabled' => :'Boolean', :'modified_at' => :'Time', :'name' => :'String', @@ -101,6 +106,7 @@ def self.openapi_types # @!visibility private def self.openapi_nullable Set.new([ + :'last_login_time', :'name', :'title', ]) @@ -144,6 +150,10 @@ def initialize(attributes = {}) self.icon = attributes[:'icon'] end + if attributes.key?(:'last_login_time') + self.last_login_time = attributes[:'last_login_time'] + end + if attributes.key?(:'mfa_enabled') self.mfa_enabled = attributes[:'mfa_enabled'] end @@ -204,6 +214,7 @@ def ==(o) email == o.email && handle == o.handle && icon == o.icon && + last_login_time == o.last_login_time && mfa_enabled == o.mfa_enabled && modified_at == o.modified_at && name == o.name && @@ -218,7 +229,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_at, disabled, email, handle, icon, mfa_enabled, modified_at, name, service_account, status, title, verified, additional_properties].hash + [created_at, disabled, email, handle, icon, last_login_time, mfa_enabled, modified_at, name, service_account, status, title, verified, additional_properties].hash end end end