Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -54004,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Expand All @@ -74,42 +70,21 @@ 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
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
13 changes: 12 additions & 1 deletion lib/datadog_api_client/v2/models/user_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -101,6 +106,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'last_login_time',
:'name',
:'title',
])
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 &&
Expand All @@ -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
Loading