diff --git a/.generator/src/generator/formatter.py b/.generator/src/generator/formatter.py index d4b9233e9dd2..6bd73f03ab63 100644 --- a/.generator/src/generator/formatter.py +++ b/.generator/src/generator/formatter.py @@ -333,6 +333,9 @@ def format_data_with_schema_dict( missing = required_properties - set(data.keys()) if missing: raise ValueError(f"missing required properties: {missing}") + additionalProperties = set(data.keys()) - set(schema["properties"].keys()) + if schema.get("additionalProperties") == False and additionalProperties: + raise ValueError(f"additional properties not allowed: {additionalProperties}") for k, v in data.items(): if k not in schema["properties"]: diff --git a/.generator/src/generator/templates/model_base.j2 b/.generator/src/generator/templates/model_base.j2 index b9e8f8e20ebb..f3c59487988c 100644 --- a/.generator/src/generator/templates/model_base.j2 +++ b/.generator/src/generator/templates/model_base.j2 @@ -46,6 +46,11 @@ module {{ module_name }}::{{ version|upper }} # @!visibility private def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + unless self.respond_to?(:additional_properties) + unless attributes.keys.all? { |key| self.class.openapi_types.key?(key) } + raise SchemaMismatchError, "Additional properties are not allowed" + end + end self.class.openapi_types.each_pair do |key, type| if attributes.key?(self.class.attribute_map[key]) && attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/.generator/src/generator/templates/model_generic.j2 b/.generator/src/generator/templates/model_generic.j2 index 53b2922ffcf8..5782c91dd63a 100644 --- a/.generator/src/generator/templates/model_generic.j2 +++ b/.generator/src/generator/templates/model_generic.j2 @@ -23,7 +23,8 @@ attr_accessor :{{ attr|attribute_name }} {%- endif %} {%- endfor %} -{%- if model.get("additionalProperties") %} +{%- set additionalProperties = model.get("additionalProperties") %} +{%- if additionalProperties is not false %} attr_accessor :additional_properties {%- endif %} @@ -71,13 +72,13 @@ fail ArgumentError, "The input argument (attributes) must be a hash in `{{ module_name }}::{{ version|upper }}::{{ name }}` initialize method" end {# preserve blank line #} -{%- if model.get("additionalProperties") %} +{%- if additionalProperties is not false %} self.additional_properties = {} {%- endif %} # 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)) -{%- if model.get("additionalProperties") %} +{%- if additionalProperties is not false %} self.additional_properties[k.to_sym] = v else h[k.to_sym] = v @@ -240,7 +241,7 @@ end {%- endif %} {%- endfor %} -{%- if model.get("additionalProperties") %} +{%- if additionalProperties is not false %} # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash @@ -272,7 +273,7 @@ {%- for attr in model.properties %} {{ attr|attribute_name }} == o.{{ attr|attribute_name }}{% if not loop.last or model.get("additionalProperties") %} &&{% endif %} {%- endfor %} -{%- if model.get("additionalProperties") %} +{%- if additionalProperties is not false %} additional_properties == o.additional_properties {%- endif %} end diff --git a/lib/datadog_api_client/v1/model_base.rb b/lib/datadog_api_client/v1/model_base.rb index 1f35249da453..203568f08509 100644 --- a/lib/datadog_api_client/v1/model_base.rb +++ b/lib/datadog_api_client/v1/model_base.rb @@ -57,6 +57,11 @@ def eql?(o) # @!visibility private def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + unless self.respond_to?(:additional_properties) + unless attributes.keys.all? { |key| self.class.openapi_types.key?(key) } + raise SchemaMismatchError, "Additional properties are not allowed" + end + end self.class.openapi_types.each_pair do |key, type| if attributes.key?(self.class.attribute_map[key]) && attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/lib/datadog_api_client/v1/models/add_signal_to_incident_request.rb b/lib/datadog_api_client/v1/models/add_signal_to_incident_request.rb index edbe6730e2ef..108fa967c560 100644 --- a/lib/datadog_api_client/v1/models/add_signal_to_incident_request.rb +++ b/lib/datadog_api_client/v1/models/add_signal_to_incident_request.rb @@ -30,6 +30,8 @@ class AddSignalToIncidentRequest # Version of the updated signal. If server side version is higher, update will be rejected. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AddSignalToIncidentRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AddSignalToIncidentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'add_to_signal_timeline') @@ -97,6 +101,26 @@ def incident_id=(incident_id) @incident_id = incident_id 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 @@ -106,6 +130,7 @@ def ==(o) add_to_signal_timeline == o.add_to_signal_timeline && incident_id == o.incident_id && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb b/lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb index bda9bdbf6f79..e009b3dd440a 100644 --- a/lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb @@ -42,6 +42,8 @@ class AlertGraphWidgetDefinition # Whether to display the Alert Graph as a timeseries or a top list. attr_reader :viz_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AlertGraphWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AlertGraphWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'alert_id') @@ -155,6 +159,26 @@ def viz_type=(viz_type) @viz_type = viz_type 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 @@ -168,6 +192,7 @@ def ==(o) title_size == o.title_size && type == o.type && viz_type == o.viz_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/alert_value_widget_definition.rb b/lib/datadog_api_client/v1/models/alert_value_widget_definition.rb index b77710ad7a3d..60ab2fc33b67 100644 --- a/lib/datadog_api_client/v1/models/alert_value_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/alert_value_widget_definition.rb @@ -45,6 +45,8 @@ class AlertValueWidgetDefinition # Unit to display with the value. attr_accessor :unit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AlertValueWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AlertValueWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'alert_id') @@ -153,6 +157,26 @@ def type=(type) @type = type 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 @@ -167,6 +191,7 @@ def ==(o) title_size == o.title_size && type == o.type && unit == o.unit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/api_error_response.rb b/lib/datadog_api_client/v1/models/api_error_response.rb index 13a7281fad86..fef860614fc4 100644 --- a/lib/datadog_api_client/v1/models/api_error_response.rb +++ b/lib/datadog_api_client/v1/models/api_error_response.rb @@ -24,6 +24,8 @@ class APIErrorResponse # Array of errors returned by the API. attr_reader :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::APIErrorResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::APIErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'errors') @@ -81,6 +85,26 @@ def errors=(errors) @errors = errors 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/api_key.rb b/lib/datadog_api_client/v1/models/api_key.rb index 4ed73cf47e94..c1eda2c40345 100644 --- a/lib/datadog_api_client/v1/models/api_key.rb +++ b/lib/datadog_api_client/v1/models/api_key.rb @@ -33,6 +33,8 @@ class ApiKey # Name of your API key. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ApiKey` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ApiKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created') @@ -110,6 +114,26 @@ def key=(key) @key = key 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 @@ -120,6 +144,7 @@ def ==(o) created_by == o.created_by && key == o.key && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/api_key_list_response.rb b/lib/datadog_api_client/v1/models/api_key_list_response.rb index 460437168e5c..10c7034e51fc 100644 --- a/lib/datadog_api_client/v1/models/api_key_list_response.rb +++ b/lib/datadog_api_client/v1/models/api_key_list_response.rb @@ -24,6 +24,8 @@ class ApiKeyListResponse # Array of API keys. attr_accessor :api_keys + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ApiKeyListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ApiKeyListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_keys') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && api_keys == o.api_keys + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/api_key_response.rb b/lib/datadog_api_client/v1/models/api_key_response.rb index ac64769eddc2..e380a200d36f 100644 --- a/lib/datadog_api_client/v1/models/api_key_response.rb +++ b/lib/datadog_api_client/v1/models/api_key_response.rb @@ -24,6 +24,8 @@ class ApiKeyResponse # Datadog API key. attr_accessor :api_key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ApiKeyResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ApiKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && api_key == o.api_key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/apm_stats_query_column_type.rb b/lib/datadog_api_client/v1/models/apm_stats_query_column_type.rb index d1da7fbfff53..9d05bcadd665 100644 --- a/lib/datadog_api_client/v1/models/apm_stats_query_column_type.rb +++ b/lib/datadog_api_client/v1/models/apm_stats_query_column_type.rb @@ -33,6 +33,8 @@ class ApmStatsQueryColumnType # Widget sorting methods. attr_accessor :order + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ApmStatsQueryColumnType` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ApmStatsQueryColumnType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_alias') @@ -106,6 +110,26 @@ def name=(name) @name = name 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 @@ -116,6 +140,7 @@ def ==(o) cell_display_mode == o.cell_display_mode && name == o.name && order == o.order + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/apm_stats_query_definition.rb b/lib/datadog_api_client/v1/models/apm_stats_query_definition.rb index 6128affd70bd..98827cc38573 100644 --- a/lib/datadog_api_client/v1/models/apm_stats_query_definition.rb +++ b/lib/datadog_api_client/v1/models/apm_stats_query_definition.rb @@ -42,6 +42,8 @@ class ApmStatsQueryDefinition # Service name. attr_reader :service + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ApmStatsQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ApmStatsQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'columns') @@ -179,6 +183,26 @@ def service=(service) @service = service 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 @@ -192,6 +216,7 @@ def ==(o) resource == o.resource && row_type == o.row_type && service == o.service + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/application_key.rb b/lib/datadog_api_client/v1/models/application_key.rb index ed3c0d02d531..21b4ea6ad39a 100644 --- a/lib/datadog_api_client/v1/models/application_key.rb +++ b/lib/datadog_api_client/v1/models/application_key.rb @@ -30,6 +30,8 @@ class ApplicationKey # Owner of an application key. attr_accessor :owner + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ApplicationKey` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ApplicationKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_hash') @@ -101,6 +105,26 @@ def _hash=(_hash) @_hash = _hash 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 @@ -110,6 +134,7 @@ def ==(o) _hash == o._hash && name == o.name && owner == o.owner + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/application_key_list_response.rb b/lib/datadog_api_client/v1/models/application_key_list_response.rb index f89dff3a279f..af5706c0ea78 100644 --- a/lib/datadog_api_client/v1/models/application_key_list_response.rb +++ b/lib/datadog_api_client/v1/models/application_key_list_response.rb @@ -24,6 +24,8 @@ class ApplicationKeyListResponse # Array of application keys. attr_accessor :application_keys + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ApplicationKeyListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ApplicationKeyListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'application_keys') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && application_keys == o.application_keys + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/application_key_response.rb b/lib/datadog_api_client/v1/models/application_key_response.rb index 870b8d1cd392..821573536e2a 100644 --- a/lib/datadog_api_client/v1/models/application_key_response.rb +++ b/lib/datadog_api_client/v1/models/application_key_response.rb @@ -24,6 +24,8 @@ class ApplicationKeyResponse # An application key with its associated metadata. attr_accessor :application_key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ApplicationKeyResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ApplicationKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'application_key') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && application_key == o.application_key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/authentication_validation_response.rb b/lib/datadog_api_client/v1/models/authentication_validation_response.rb index 87f4f36c7c83..0baa0db35e6f 100644 --- a/lib/datadog_api_client/v1/models/authentication_validation_response.rb +++ b/lib/datadog_api_client/v1/models/authentication_validation_response.rb @@ -24,6 +24,8 @@ class AuthenticationValidationResponse # Return `true` if the authentication response is valid. attr_accessor :valid + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AuthenticationValidationResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AuthenticationValidationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'valid') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && valid == o.valid + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_account.rb b/lib/datadog_api_client/v1/models/aws_account.rb index 7a5f9030e49a..7d965eab6627 100644 --- a/lib/datadog_api_client/v1/models/aws_account.rb +++ b/lib/datadog_api_client/v1/models/aws_account.rb @@ -66,6 +66,8 @@ class AWSAccount # Your AWS secret access key. Only required if your AWS account is a GovCloud or China account. attr_accessor :secret_access_key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -112,12 +114,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSAccount` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'access_key_id') @@ -175,6 +179,26 @@ 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 @@ -193,6 +217,7 @@ def ==(o) resource_collection_enabled == o.resource_collection_enabled && role_name == o.role_name && secret_access_key == o.secret_access_key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_account_and_lambda_request.rb b/lib/datadog_api_client/v1/models/aws_account_and_lambda_request.rb index 8b2784aebbea..f3933795f22c 100644 --- a/lib/datadog_api_client/v1/models/aws_account_and_lambda_request.rb +++ b/lib/datadog_api_client/v1/models/aws_account_and_lambda_request.rb @@ -27,6 +27,8 @@ class AWSAccountAndLambdaRequest # ARN of the Datadog Lambda created during the Datadog-Amazon Web services Log collection setup. attr_reader :lambda_arn + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSAccountAndLambdaRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSAccountAndLambdaRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -99,6 +103,26 @@ def lambda_arn=(lambda_arn) @lambda_arn = lambda_arn 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && account_id == o.account_id && lambda_arn == o.lambda_arn + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_account_create_response.rb b/lib/datadog_api_client/v1/models/aws_account_create_response.rb index 7155d10004a5..c741aa3f62e0 100644 --- a/lib/datadog_api_client/v1/models/aws_account_create_response.rb +++ b/lib/datadog_api_client/v1/models/aws_account_create_response.rb @@ -24,6 +24,8 @@ class AWSAccountCreateResponse # AWS external_id. attr_accessor :external_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSAccountCreateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSAccountCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'external_id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && external_id == o.external_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_account_delete_request.rb b/lib/datadog_api_client/v1/models/aws_account_delete_request.rb index 345b8ac4bfcb..f5498bd75406 100644 --- a/lib/datadog_api_client/v1/models/aws_account_delete_request.rb +++ b/lib/datadog_api_client/v1/models/aws_account_delete_request.rb @@ -30,6 +30,8 @@ class AWSAccountDeleteRequest # Your Datadog role delegation name. attr_accessor :role_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSAccountDeleteRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSAccountDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'access_key_id') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) access_key_id == o.access_key_id && account_id == o.account_id && role_name == o.role_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_account_list_response.rb b/lib/datadog_api_client/v1/models/aws_account_list_response.rb index 9176d3a65a1f..60f4637d1b23 100644 --- a/lib/datadog_api_client/v1/models/aws_account_list_response.rb +++ b/lib/datadog_api_client/v1/models/aws_account_list_response.rb @@ -24,6 +24,8 @@ class AWSAccountListResponse # List of enabled AWS accounts. attr_accessor :accounts + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSAccountListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSAccountListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'accounts') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && accounts == o.accounts + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_event_bridge_account_configuration.rb b/lib/datadog_api_client/v1/models/aws_event_bridge_account_configuration.rb index 98687ba9075d..104249c6d615 100644 --- a/lib/datadog_api_client/v1/models/aws_event_bridge_account_configuration.rb +++ b/lib/datadog_api_client/v1/models/aws_event_bridge_account_configuration.rb @@ -31,6 +31,8 @@ class AWSEventBridgeAccountConfiguration # and metrics reporting through the main AWS integration. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSEventBridgeAccountConfiguration` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSEventBridgeAccountConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -84,6 +88,26 @@ 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 @@ -93,6 +117,7 @@ def ==(o) account_id == o.account_id && event_hubs == o.event_hubs && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_event_bridge_create_request.rb b/lib/datadog_api_client/v1/models/aws_event_bridge_create_request.rb index 1028ba578602..a7c5a97ec17b 100644 --- a/lib/datadog_api_client/v1/models/aws_event_bridge_create_request.rb +++ b/lib/datadog_api_client/v1/models/aws_event_bridge_create_request.rb @@ -35,6 +35,8 @@ class AWSEventBridgeCreateRequest # The event source's [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). attr_accessor :region + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -65,12 +67,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSEventBridgeCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSEventBridgeCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -90,6 +94,26 @@ 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 @@ -100,6 +124,7 @@ def ==(o) create_event_bus == o.create_event_bus && event_generator_name == o.event_generator_name && region == o.region + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_event_bridge_create_response.rb b/lib/datadog_api_client/v1/models/aws_event_bridge_create_response.rb index 911398838455..8db98d22f3d0 100644 --- a/lib/datadog_api_client/v1/models/aws_event_bridge_create_response.rb +++ b/lib/datadog_api_client/v1/models/aws_event_bridge_create_response.rb @@ -33,6 +33,8 @@ class AWSEventBridgeCreateResponse # The event source status "created". attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSEventBridgeCreateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSEventBridgeCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'event_source_name') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) has_bus == o.has_bus && region == o.region && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_event_bridge_delete_request.rb b/lib/datadog_api_client/v1/models/aws_event_bridge_delete_request.rb index 98c80eefcdde..3728a892a176 100644 --- a/lib/datadog_api_client/v1/models/aws_event_bridge_delete_request.rb +++ b/lib/datadog_api_client/v1/models/aws_event_bridge_delete_request.rb @@ -30,6 +30,8 @@ class AWSEventBridgeDeleteRequest # The event source's [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). attr_accessor :region + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSEventBridgeDeleteRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSEventBridgeDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) account_id == o.account_id && event_generator_name == o.event_generator_name && region == o.region + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_event_bridge_delete_response.rb b/lib/datadog_api_client/v1/models/aws_event_bridge_delete_response.rb index 067666b663cb..28202c33ecf7 100644 --- a/lib/datadog_api_client/v1/models/aws_event_bridge_delete_response.rb +++ b/lib/datadog_api_client/v1/models/aws_event_bridge_delete_response.rb @@ -24,6 +24,8 @@ class AWSEventBridgeDeleteResponse # The event source status "empty". attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSEventBridgeDeleteResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSEventBridgeDeleteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'status') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_event_bridge_list_response.rb b/lib/datadog_api_client/v1/models/aws_event_bridge_list_response.rb index ebd060be9b3b..705edb4c795f 100644 --- a/lib/datadog_api_client/v1/models/aws_event_bridge_list_response.rb +++ b/lib/datadog_api_client/v1/models/aws_event_bridge_list_response.rb @@ -27,6 +27,8 @@ class AWSEventBridgeListResponse # True if the EventBridge sub-integration is enabled for your organization. attr_accessor :is_installed + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSEventBridgeListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSEventBridgeListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'accounts') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && accounts == o.accounts && is_installed == o.is_installed + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_event_bridge_source.rb b/lib/datadog_api_client/v1/models/aws_event_bridge_source.rb index 3f9698dfa2d2..8c7a2d031ec6 100644 --- a/lib/datadog_api_client/v1/models/aws_event_bridge_source.rb +++ b/lib/datadog_api_client/v1/models/aws_event_bridge_source.rb @@ -27,6 +27,8 @@ class AWSEventBridgeSource # The event source's [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). attr_accessor :region + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSEventBridgeSource` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSEventBridgeSource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && name == o.name && region == o.region + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_logs_async_error.rb b/lib/datadog_api_client/v1/models/aws_logs_async_error.rb index 791c7f192f78..19c080766b0f 100644 --- a/lib/datadog_api_client/v1/models/aws_logs_async_error.rb +++ b/lib/datadog_api_client/v1/models/aws_logs_async_error.rb @@ -27,6 +27,8 @@ class AWSLogsAsyncError # Message content. attr_accessor :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSLogsAsyncError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSLogsAsyncError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && code == o.code && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_logs_async_response.rb b/lib/datadog_api_client/v1/models/aws_logs_async_response.rb index 7267522ed92c..0b865db0dbb4 100644 --- a/lib/datadog_api_client/v1/models/aws_logs_async_response.rb +++ b/lib/datadog_api_client/v1/models/aws_logs_async_response.rb @@ -27,6 +27,8 @@ class AWSLogsAsyncResponse # Status of the properties. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSLogsAsyncResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSLogsAsyncResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'errors') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && errors == o.errors && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_logs_lambda.rb b/lib/datadog_api_client/v1/models/aws_logs_lambda.rb index 68c7198081b3..4f05c96e1d4c 100644 --- a/lib/datadog_api_client/v1/models/aws_logs_lambda.rb +++ b/lib/datadog_api_client/v1/models/aws_logs_lambda.rb @@ -24,6 +24,8 @@ class AWSLogsLambda # Available ARN IDs. attr_accessor :arn + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSLogsLambda` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSLogsLambda`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'arn') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && arn == o.arn + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_logs_list_response.rb b/lib/datadog_api_client/v1/models/aws_logs_list_response.rb index 1f93b0ec3560..608a1baee641 100644 --- a/lib/datadog_api_client/v1/models/aws_logs_list_response.rb +++ b/lib/datadog_api_client/v1/models/aws_logs_list_response.rb @@ -30,6 +30,8 @@ class AWSLogsListResponse # Array of services IDs. attr_accessor :services + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSLogsListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSLogsListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) account_id == o.account_id && lambdas == o.lambdas && services == o.services + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_logs_list_services_response.rb b/lib/datadog_api_client/v1/models/aws_logs_list_services_response.rb index aee0c59aaa69..912c94a5b2bb 100644 --- a/lib/datadog_api_client/v1/models/aws_logs_list_services_response.rb +++ b/lib/datadog_api_client/v1/models/aws_logs_list_services_response.rb @@ -27,6 +27,8 @@ class AWSLogsListServicesResponse # Name of service available for configuration with Datadog logs. attr_accessor :label + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSLogsListServicesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSLogsListServicesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && label == o.label + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_logs_services_request.rb b/lib/datadog_api_client/v1/models/aws_logs_services_request.rb index e4d6ce80574b..0dee77c43f2b 100644 --- a/lib/datadog_api_client/v1/models/aws_logs_services_request.rb +++ b/lib/datadog_api_client/v1/models/aws_logs_services_request.rb @@ -27,6 +27,8 @@ class AWSLogsServicesRequest # Array of services IDs set to enable automatic log collection. Discover the list of available services with the get list of AWS log ready services API endpoint. attr_reader :services + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSLogsServicesRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSLogsServicesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -101,6 +105,26 @@ def services=(services) @services = services 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 @@ -109,6 +133,7 @@ def ==(o) self.class == o.class && account_id == o.account_id && services == o.services + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_tag_filter.rb b/lib/datadog_api_client/v1/models/aws_tag_filter.rb index 2e4328dfc1dc..727db1e7edd9 100644 --- a/lib/datadog_api_client/v1/models/aws_tag_filter.rb +++ b/lib/datadog_api_client/v1/models/aws_tag_filter.rb @@ -27,6 +27,8 @@ class AWSTagFilter # The tag filter string. attr_accessor :tag_filter_str + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSTagFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSTagFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'namespace') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && namespace == o.namespace && tag_filter_str == o.tag_filter_str + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_tag_filter_create_request.rb b/lib/datadog_api_client/v1/models/aws_tag_filter_create_request.rb index 1c45126542d0..213973762323 100644 --- a/lib/datadog_api_client/v1/models/aws_tag_filter_create_request.rb +++ b/lib/datadog_api_client/v1/models/aws_tag_filter_create_request.rb @@ -30,6 +30,8 @@ class AWSTagFilterCreateRequest # The tag filter string. attr_accessor :tag_filter_str + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSTagFilterCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSTagFilterCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) account_id == o.account_id && namespace == o.namespace && tag_filter_str == o.tag_filter_str + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_tag_filter_delete_request.rb b/lib/datadog_api_client/v1/models/aws_tag_filter_delete_request.rb index 6742a2f8d96a..0825c70e6656 100644 --- a/lib/datadog_api_client/v1/models/aws_tag_filter_delete_request.rb +++ b/lib/datadog_api_client/v1/models/aws_tag_filter_delete_request.rb @@ -27,6 +27,8 @@ class AWSTagFilterDeleteRequest # The namespace associated with the tag filter entry. attr_accessor :namespace + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSTagFilterDeleteRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSTagFilterDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && account_id == o.account_id && namespace == o.namespace + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/aws_tag_filter_list_response.rb b/lib/datadog_api_client/v1/models/aws_tag_filter_list_response.rb index 2c76548f09c1..5259978f0ed9 100644 --- a/lib/datadog_api_client/v1/models/aws_tag_filter_list_response.rb +++ b/lib/datadog_api_client/v1/models/aws_tag_filter_list_response.rb @@ -24,6 +24,8 @@ class AWSTagFilterListResponse # An array of tag filters. attr_accessor :filters + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AWSTagFilterListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AWSTagFilterListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filters') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && filters == o.filters + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/azure_account.rb b/lib/datadog_api_client/v1/models/azure_account.rb index a690de918477..1586bfd0f78f 100644 --- a/lib/datadog_api_client/v1/models/azure_account.rb +++ b/lib/datadog_api_client/v1/models/azure_account.rb @@ -70,6 +70,8 @@ class AzureAccount # Your Azure Active Directory ID. attr_accessor :tenant_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -120,12 +122,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AzureAccount` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AzureAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'app_service_plan_filters') @@ -187,6 +191,26 @@ 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 @@ -207,6 +231,7 @@ def ==(o) new_tenant_name == o.new_tenant_name && resource_collection_enabled == o.resource_collection_enabled && tenant_name == o.tenant_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/azure_account_metrics_config.rb b/lib/datadog_api_client/v1/models/azure_account_metrics_config.rb index a8f334c293c3..f754e97c2309 100644 --- a/lib/datadog_api_client/v1/models/azure_account_metrics_config.rb +++ b/lib/datadog_api_client/v1/models/azure_account_metrics_config.rb @@ -27,6 +27,8 @@ class AzureAccountMetricsConfig # List of Microsoft Azure Resource Providers to exclude from metric collection. attr_accessor :excluded_resource_providers + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -51,12 +53,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AzureAccountMetricsConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::AzureAccountMetricsConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'excluded_resource_providers') @@ -66,6 +70,26 @@ 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 @@ -73,6 +97,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && excluded_resource_providers == o.excluded_resource_providers + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/cancel_downtimes_by_scope_request.rb b/lib/datadog_api_client/v1/models/cancel_downtimes_by_scope_request.rb index 6d86883eb3a6..a1ee5793a945 100644 --- a/lib/datadog_api_client/v1/models/cancel_downtimes_by_scope_request.rb +++ b/lib/datadog_api_client/v1/models/cancel_downtimes_by_scope_request.rb @@ -26,6 +26,8 @@ class CancelDowntimesByScopeRequest # The resulting downtime applies to sources that matches ALL provided scopes (`env:dev` **AND** `env:prod`). attr_reader :scope + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -50,12 +52,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::CancelDowntimesByScopeRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CancelDowntimesByScopeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'scope') @@ -81,6 +85,26 @@ def scope=(scope) @scope = scope 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && scope == o.scope + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/canceled_downtimes_ids.rb b/lib/datadog_api_client/v1/models/canceled_downtimes_ids.rb index db1be8a88e48..40efe8b0bcdf 100644 --- a/lib/datadog_api_client/v1/models/canceled_downtimes_ids.rb +++ b/lib/datadog_api_client/v1/models/canceled_downtimes_ids.rb @@ -24,6 +24,8 @@ class CanceledDowntimesIds # ID of downtimes that were canceled. attr_accessor :cancelled_ids + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::CanceledDowntimesIds` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CanceledDowntimesIds`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cancelled_ids') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && cancelled_ids == o.cancelled_ids + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/change_widget_definition.rb b/lib/datadog_api_client/v1/models/change_widget_definition.rb index 525132ed3b67..0141923d6c86 100644 --- a/lib/datadog_api_client/v1/models/change_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/change_widget_definition.rb @@ -45,6 +45,8 @@ class ChangeWidgetDefinition # Type of the change widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ChangeWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ChangeWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -159,6 +163,26 @@ def type=(type) @type = type 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 @@ -172,6 +196,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/change_widget_request.rb b/lib/datadog_api_client/v1/models/change_widget_request.rb index aba191c2c715..cf43f748421a 100644 --- a/lib/datadog_api_client/v1/models/change_widget_request.rb +++ b/lib/datadog_api_client/v1/models/change_widget_request.rb @@ -75,6 +75,8 @@ class ChangeWidgetRequest # Whether to show the present value. attr_accessor :show_present + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -133,12 +135,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ChangeWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ChangeWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_query') @@ -218,6 +222,26 @@ 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 @@ -242,6 +266,7 @@ def ==(o) rum_query == o.rum_query && security_query == o.security_query && show_present == o.show_present + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/check_can_delete_monitor_response.rb b/lib/datadog_api_client/v1/models/check_can_delete_monitor_response.rb index a3cabff33081..c1353d1bffd0 100644 --- a/lib/datadog_api_client/v1/models/check_can_delete_monitor_response.rb +++ b/lib/datadog_api_client/v1/models/check_can_delete_monitor_response.rb @@ -27,6 +27,8 @@ class CheckCanDeleteMonitorResponse # A mapping of Monitor ID to strings denoting where it's used. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::CheckCanDeleteMonitorResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CheckCanDeleteMonitorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -96,6 +100,26 @@ def data=(data) @data = data 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 @@ -104,6 +128,7 @@ def ==(o) self.class == o.class && data == o.data && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/check_can_delete_monitor_response_data.rb b/lib/datadog_api_client/v1/models/check_can_delete_monitor_response_data.rb index 7a2896b86eb6..a7d69fd378d2 100644 --- a/lib/datadog_api_client/v1/models/check_can_delete_monitor_response_data.rb +++ b/lib/datadog_api_client/v1/models/check_can_delete_monitor_response_data.rb @@ -24,6 +24,8 @@ class CheckCanDeleteMonitorResponseData # An array of of Monitor IDs that can be safely deleted. attr_accessor :ok + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::CheckCanDeleteMonitorResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CheckCanDeleteMonitorResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'ok') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && ok == o.ok + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/check_can_delete_slo_response.rb b/lib/datadog_api_client/v1/models/check_can_delete_slo_response.rb index 619a90362839..7614aec6b0aa 100644 --- a/lib/datadog_api_client/v1/models/check_can_delete_slo_response.rb +++ b/lib/datadog_api_client/v1/models/check_can_delete_slo_response.rb @@ -27,6 +27,8 @@ class CheckCanDeleteSLOResponse # A mapping of SLO id to it's current usages. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::CheckCanDeleteSLOResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CheckCanDeleteSLOResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/check_can_delete_slo_response_data.rb b/lib/datadog_api_client/v1/models/check_can_delete_slo_response_data.rb index 67d12417ce74..18b1c7620d1d 100644 --- a/lib/datadog_api_client/v1/models/check_can_delete_slo_response_data.rb +++ b/lib/datadog_api_client/v1/models/check_can_delete_slo_response_data.rb @@ -24,6 +24,8 @@ class CheckCanDeleteSLOResponseData # An array of of SLO IDs that can be safely deleted. attr_accessor :ok + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::CheckCanDeleteSLOResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CheckCanDeleteSLOResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'ok') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && ok == o.ok + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/check_status_widget_definition.rb b/lib/datadog_api_client/v1/models/check_status_widget_definition.rb index e6a0a1b4d250..e216c396788f 100644 --- a/lib/datadog_api_client/v1/models/check_status_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/check_status_widget_definition.rb @@ -51,6 +51,8 @@ class CheckStatusWidgetDefinition # Type of the check status widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::CheckStatusWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CheckStatusWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'check') @@ -186,6 +190,26 @@ def type=(type) @type = type 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 @@ -202,6 +226,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/creator.rb b/lib/datadog_api_client/v1/models/creator.rb index a416e76f2008..aa3dfd120dea 100644 --- a/lib/datadog_api_client/v1/models/creator.rb +++ b/lib/datadog_api_client/v1/models/creator.rb @@ -30,6 +30,8 @@ class Creator # Name of the creator. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Creator` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Creator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -87,6 +91,26 @@ 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 @@ -96,6 +120,7 @@ def ==(o) email == o.email && handle == o.handle && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard.rb b/lib/datadog_api_client/v1/models/dashboard.rb index d4771996e133..f2654dd2ab69 100644 --- a/lib/datadog_api_client/v1/models/dashboard.rb +++ b/lib/datadog_api_client/v1/models/dashboard.rb @@ -79,6 +79,8 @@ class Dashboard # List of widgets to display on the dashboard. attr_reader :widgets + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -148,12 +150,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Dashboard` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Dashboard`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author_handle') @@ -288,6 +292,26 @@ def widgets=(widgets) @widgets = widgets 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 @@ -311,6 +335,7 @@ def ==(o) title == o.title && url == o.url && widgets == o.widgets + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_bulk_action_data.rb b/lib/datadog_api_client/v1/models/dashboard_bulk_action_data.rb index 9fcbb7bd4847..b1efd9915a23 100644 --- a/lib/datadog_api_client/v1/models/dashboard_bulk_action_data.rb +++ b/lib/datadog_api_client/v1/models/dashboard_bulk_action_data.rb @@ -27,6 +27,8 @@ class DashboardBulkActionData # Dashboard resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardBulkActionData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardBulkActionData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_bulk_delete_request.rb b/lib/datadog_api_client/v1/models/dashboard_bulk_delete_request.rb index 0f0c29a91b24..30930992d2ac 100644 --- a/lib/datadog_api_client/v1/models/dashboard_bulk_delete_request.rb +++ b/lib/datadog_api_client/v1/models/dashboard_bulk_delete_request.rb @@ -24,6 +24,8 @@ class DashboardBulkDeleteRequest # List of dashboard bulk action request data objects. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardBulkDeleteRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardBulkDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_delete_response.rb b/lib/datadog_api_client/v1/models/dashboard_delete_response.rb index d512db3d6d53..5186678e409b 100644 --- a/lib/datadog_api_client/v1/models/dashboard_delete_response.rb +++ b/lib/datadog_api_client/v1/models/dashboard_delete_response.rb @@ -24,6 +24,8 @@ class DashboardDeleteResponse # ID of the deleted dashboard. attr_accessor :deleted_dashboard_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardDeleteResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardDeleteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'deleted_dashboard_id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && deleted_dashboard_id == o.deleted_dashboard_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_global_time.rb b/lib/datadog_api_client/v1/models/dashboard_global_time.rb index b297ba16e2b4..2d815717796a 100644 --- a/lib/datadog_api_client/v1/models/dashboard_global_time.rb +++ b/lib/datadog_api_client/v1/models/dashboard_global_time.rb @@ -24,6 +24,8 @@ class DashboardGlobalTime # Dashboard global time live_span selection attr_accessor :live_span + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardGlobalTime` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardGlobalTime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'live_span') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && live_span == o.live_span + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_list.rb b/lib/datadog_api_client/v1/models/dashboard_list.rb index 0cb23fa818a4..3646242937b9 100644 --- a/lib/datadog_api_client/v1/models/dashboard_list.rb +++ b/lib/datadog_api_client/v1/models/dashboard_list.rb @@ -45,6 +45,8 @@ class DashboardList # The type of dashboard list. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardList` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author') @@ -142,6 +146,26 @@ def name=(name) @name = name 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 @@ -156,6 +180,7 @@ def ==(o) modified == o.modified && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_list_delete_response.rb b/lib/datadog_api_client/v1/models/dashboard_list_delete_response.rb index 8029d432f790..770baf631991 100644 --- a/lib/datadog_api_client/v1/models/dashboard_list_delete_response.rb +++ b/lib/datadog_api_client/v1/models/dashboard_list_delete_response.rb @@ -24,6 +24,8 @@ class DashboardListDeleteResponse # ID of the deleted dashboard list. attr_accessor :deleted_dashboard_list_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardListDeleteResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardListDeleteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'deleted_dashboard_list_id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && deleted_dashboard_list_id == o.deleted_dashboard_list_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_list_list_response.rb b/lib/datadog_api_client/v1/models/dashboard_list_list_response.rb index 31c5b57d596f..9f241a47ad6c 100644 --- a/lib/datadog_api_client/v1/models/dashboard_list_list_response.rb +++ b/lib/datadog_api_client/v1/models/dashboard_list_list_response.rb @@ -24,6 +24,8 @@ class DashboardListListResponse # List of all your dashboard lists. attr_accessor :dashboard_lists + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardListListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardListListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dashboard_lists') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && dashboard_lists == o.dashboard_lists + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_restore_request.rb b/lib/datadog_api_client/v1/models/dashboard_restore_request.rb index 4df1c564ef73..2ac46e950c2c 100644 --- a/lib/datadog_api_client/v1/models/dashboard_restore_request.rb +++ b/lib/datadog_api_client/v1/models/dashboard_restore_request.rb @@ -24,6 +24,8 @@ class DashboardRestoreRequest # List of dashboard bulk action request data objects. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardRestoreRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardRestoreRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_summary.rb b/lib/datadog_api_client/v1/models/dashboard_summary.rb index a6e104074489..0c081704dc7f 100644 --- a/lib/datadog_api_client/v1/models/dashboard_summary.rb +++ b/lib/datadog_api_client/v1/models/dashboard_summary.rb @@ -24,6 +24,8 @@ class DashboardSummary # List of dashboard definitions. attr_accessor :dashboards + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardSummary` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dashboards') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && dashboards == o.dashboards + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb b/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb index 782364a8ef59..57135f7c20fb 100644 --- a/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +++ b/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb @@ -50,6 +50,8 @@ class DashboardSummaryDefinition # URL of the dashboard. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardSummaryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardSummaryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author_handle') @@ -143,6 +147,26 @@ 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 @@ -158,6 +182,7 @@ def ==(o) modified_at == o.modified_at && title == o.title && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_template_variable.rb b/lib/datadog_api_client/v1/models/dashboard_template_variable.rb index 3b1b3ffd74c7..4f7dddca0821 100644 --- a/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +++ b/lib/datadog_api_client/v1/models/dashboard_template_variable.rb @@ -36,6 +36,8 @@ class DashboardTemplateVariable # The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down. attr_accessor :prefix + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardTemplateVariable` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardTemplateVariable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'available_values') @@ -129,6 +133,26 @@ def name=(name) @name = name 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 @@ -140,6 +164,7 @@ def ==(o) defaults == o.defaults && name == o.name && prefix == o.prefix + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_template_variable_preset.rb b/lib/datadog_api_client/v1/models/dashboard_template_variable_preset.rb index 72888eebd791..f0c085b8415d 100644 --- a/lib/datadog_api_client/v1/models/dashboard_template_variable_preset.rb +++ b/lib/datadog_api_client/v1/models/dashboard_template_variable_preset.rb @@ -27,6 +27,8 @@ class DashboardTemplateVariablePreset # List of variables. attr_accessor :template_variables + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardTemplateVariablePreset` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardTemplateVariablePreset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && name == o.name && template_variables == o.template_variables + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb b/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb index 914849c8e140..00d5a1a41fc3 100644 --- a/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +++ b/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb @@ -30,6 +30,8 @@ class DashboardTemplateVariablePresetValue # One or many template variable values within the saved view, which will be unioned together using `OR` if more than one is specified. Cannot be used in conjunction with `value`. attr_reader :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DashboardTemplateVariablePresetValue` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DashboardTemplateVariablePresetValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -99,6 +103,26 @@ def values=(values) @values = values 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 @@ -108,6 +132,7 @@ def ==(o) name == o.name && value == o.value && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/delete_shared_dashboard_response.rb b/lib/datadog_api_client/v1/models/delete_shared_dashboard_response.rb index ceb9648e14f7..1c413b9ae449 100644 --- a/lib/datadog_api_client/v1/models/delete_shared_dashboard_response.rb +++ b/lib/datadog_api_client/v1/models/delete_shared_dashboard_response.rb @@ -24,6 +24,8 @@ class DeleteSharedDashboardResponse # Token associated with the shared dashboard that was revoked. attr_accessor :deleted_public_dashboard_token + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DeleteSharedDashboardResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DeleteSharedDashboardResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'deleted_public_dashboard_token') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && deleted_public_dashboard_token == o.deleted_public_dashboard_token + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/deleted_monitor.rb b/lib/datadog_api_client/v1/models/deleted_monitor.rb index ed91e6d74e32..de5b6e36d33a 100644 --- a/lib/datadog_api_client/v1/models/deleted_monitor.rb +++ b/lib/datadog_api_client/v1/models/deleted_monitor.rb @@ -24,6 +24,8 @@ class DeletedMonitor # ID of the deleted monitor. attr_accessor :deleted_monitor_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DeletedMonitor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DeletedMonitor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'deleted_monitor_id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && deleted_monitor_id == o.deleted_monitor_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/distribution_points_payload.rb b/lib/datadog_api_client/v1/models/distribution_points_payload.rb index 0aa59c5ff878..6e965c38ad06 100644 --- a/lib/datadog_api_client/v1/models/distribution_points_payload.rb +++ b/lib/datadog_api_client/v1/models/distribution_points_payload.rb @@ -24,6 +24,8 @@ class DistributionPointsPayload # A list of distribution points series to submit to Datadog. attr_reader :series + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DistributionPointsPayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DistributionPointsPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'series') @@ -81,6 +85,26 @@ def series=(series) @series = series 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && series == o.series + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/distribution_points_series.rb b/lib/datadog_api_client/v1/models/distribution_points_series.rb index 66823cd5e87f..a1b225ea5a8b 100644 --- a/lib/datadog_api_client/v1/models/distribution_points_series.rb +++ b/lib/datadog_api_client/v1/models/distribution_points_series.rb @@ -36,6 +36,8 @@ class DistributionPointsSeries # The type of the distribution point. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DistributionPointsSeries` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DistributionPointsSeries`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'host') @@ -130,6 +134,26 @@ def points=(points) @points = points 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 @@ -141,6 +165,7 @@ def ==(o) points == o.points && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/distribution_widget_definition.rb b/lib/datadog_api_client/v1/models/distribution_widget_definition.rb index a1cf347f346f..a769952d2618 100644 --- a/lib/datadog_api_client/v1/models/distribution_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/distribution_widget_definition.rb @@ -62,6 +62,8 @@ class DistributionWidgetDefinition # Y Axis controls for the distribution widget. attr_accessor :yaxis + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -108,12 +110,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DistributionWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DistributionWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -208,6 +212,26 @@ def type=(type) @type = type 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 @@ -226,6 +250,7 @@ def ==(o) type == o.type && xaxis == o.xaxis && yaxis == o.yaxis + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/distribution_widget_request.rb b/lib/datadog_api_client/v1/models/distribution_widget_request.rb index f7ef741ede33..11dc47452614 100644 --- a/lib/datadog_api_client/v1/models/distribution_widget_request.rb +++ b/lib/datadog_api_client/v1/models/distribution_widget_request.rb @@ -60,6 +60,8 @@ class DistributionWidgetRequest # Widget style definition. attr_accessor :style + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -108,12 +110,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DistributionWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DistributionWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_query') @@ -169,6 +173,26 @@ 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 @@ -188,6 +212,7 @@ def ==(o) rum_query == o.rum_query && security_query == o.security_query && style == o.style + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/distribution_widget_x_axis.rb b/lib/datadog_api_client/v1/models/distribution_widget_x_axis.rb index 8d6c3d2c5202..fa1da16efee1 100644 --- a/lib/datadog_api_client/v1/models/distribution_widget_x_axis.rb +++ b/lib/datadog_api_client/v1/models/distribution_widget_x_axis.rb @@ -33,6 +33,8 @@ class DistributionWidgetXAxis # Specifies the scale type. Possible values are `linear`. attr_accessor :scale + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DistributionWidgetXAxis` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DistributionWidgetXAxis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'include_zero') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) max == o.max && min == o.min && scale == o.scale + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/distribution_widget_y_axis.rb b/lib/datadog_api_client/v1/models/distribution_widget_y_axis.rb index af95ab065054..1bac3496ab7d 100644 --- a/lib/datadog_api_client/v1/models/distribution_widget_y_axis.rb +++ b/lib/datadog_api_client/v1/models/distribution_widget_y_axis.rb @@ -36,6 +36,8 @@ class DistributionWidgetYAxis # Specifies the scale type. Possible values are `linear` or `log`. attr_accessor :scale + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DistributionWidgetYAxis` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DistributionWidgetYAxis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'include_zero') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) max == o.max && min == o.min && scale == o.scale + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/downtime.rb b/lib/datadog_api_client/v1/models/downtime.rb index ec8d67209f26..22974a916862 100644 --- a/lib/datadog_api_client/v1/models/downtime.rb +++ b/lib/datadog_api_client/v1/models/downtime.rb @@ -99,6 +99,8 @@ class Downtime # ID of the last user that updated the downtime. attr_reader :updater_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -176,12 +178,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Downtime` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Downtime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'active') @@ -313,6 +317,26 @@ def updater_id=(updater_id) @updater_id = updater_id 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 @@ -339,6 +363,7 @@ def ==(o) start == o.start && timezone == o.timezone && updater_id == o.updater_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/downtime_child.rb b/lib/datadog_api_client/v1/models/downtime_child.rb index 8d1715656906..6d6422c6ef55 100644 --- a/lib/datadog_api_client/v1/models/downtime_child.rb +++ b/lib/datadog_api_client/v1/models/downtime_child.rb @@ -93,6 +93,8 @@ class DowntimeChild # ID of the last user that updated the downtime. attr_reader :updater_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -167,12 +169,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DowntimeChild` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DowntimeChild`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'active') @@ -300,6 +304,26 @@ def updater_id=(updater_id) @updater_id = updater_id 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 @@ -325,6 +349,7 @@ def ==(o) start == o.start && timezone == o.timezone && updater_id == o.updater_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/downtime_recurrence.rb b/lib/datadog_api_client/v1/models/downtime_recurrence.rb index f83a7b57978b..2125423da4a0 100644 --- a/lib/datadog_api_client/v1/models/downtime_recurrence.rb +++ b/lib/datadog_api_client/v1/models/downtime_recurrence.rb @@ -48,6 +48,8 @@ class DowntimeRecurrence # Only applicable when type is weeks. First letter must be capitalized. attr_accessor :week_days + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -92,12 +94,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DowntimeRecurrence` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::DowntimeRecurrence`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'period') @@ -156,6 +160,26 @@ def until_occurrences=(until_occurrences) @until_occurrences = until_occurrences 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 @@ -168,6 +192,7 @@ def ==(o) until_date == o.until_date && until_occurrences == o.until_occurrences && week_days == o.week_days + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/event.rb b/lib/datadog_api_client/v1/models/event.rb index 5d6411769a84..b708f8471dc7 100644 --- a/lib/datadog_api_client/v1/models/event.rb +++ b/lib/datadog_api_client/v1/models/event.rb @@ -68,6 +68,8 @@ class Event # URL of the event. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -124,12 +126,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Event` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Event`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'alert_type') @@ -205,6 +209,26 @@ def text=(text) @text = text 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 @@ -224,6 +248,7 @@ def ==(o) text == o.text && title == o.title && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/event_create_request.rb b/lib/datadog_api_client/v1/models/event_create_request.rb index 49fd2d3fd60b..ade07c500e7f 100644 --- a/lib/datadog_api_client/v1/models/event_create_request.rb +++ b/lib/datadog_api_client/v1/models/event_create_request.rb @@ -62,6 +62,8 @@ class EventCreateRequest # The event title. attr_reader :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -114,12 +116,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::EventCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::EventCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation_key') @@ -213,6 +217,26 @@ def title=(title) @title = title 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 @@ -230,6 +254,7 @@ def ==(o) tags == o.tags && text == o.text && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/event_create_response.rb b/lib/datadog_api_client/v1/models/event_create_response.rb index b4c71ef16d16..bf2a43ec98c1 100644 --- a/lib/datadog_api_client/v1/models/event_create_response.rb +++ b/lib/datadog_api_client/v1/models/event_create_response.rb @@ -27,6 +27,8 @@ class EventCreateResponse # A status. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::EventCreateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::EventCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'event') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && event == o.event && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/event_list_response.rb b/lib/datadog_api_client/v1/models/event_list_response.rb index 9d9a5ee74b9d..5da4615aed40 100644 --- a/lib/datadog_api_client/v1/models/event_list_response.rb +++ b/lib/datadog_api_client/v1/models/event_list_response.rb @@ -27,6 +27,8 @@ class EventListResponse # A status. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::EventListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::EventListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'events') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && events == o.events && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/event_query_definition.rb b/lib/datadog_api_client/v1/models/event_query_definition.rb index 5cc2df771c19..9abf8cb44a85 100644 --- a/lib/datadog_api_client/v1/models/event_query_definition.rb +++ b/lib/datadog_api_client/v1/models/event_query_definition.rb @@ -27,6 +27,8 @@ class EventQueryDefinition # The execution method for multi-value filters. Can be either and or or. attr_reader :tags_execution + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::EventQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::EventQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'search') @@ -99,6 +103,26 @@ def tags_execution=(tags_execution) @tags_execution = tags_execution 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && search == o.search && tags_execution == o.tags_execution + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/event_response.rb b/lib/datadog_api_client/v1/models/event_response.rb index e510633d3de0..995b20b12033 100644 --- a/lib/datadog_api_client/v1/models/event_response.rb +++ b/lib/datadog_api_client/v1/models/event_response.rb @@ -27,6 +27,8 @@ class EventResponse # A status. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::EventResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::EventResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'event') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && event == o.event && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/event_stream_widget_definition.rb b/lib/datadog_api_client/v1/models/event_stream_widget_definition.rb index d78b02dba7ed..7f4e9ebc2d16 100644 --- a/lib/datadog_api_client/v1/models/event_stream_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/event_stream_widget_definition.rb @@ -46,6 +46,8 @@ class EventStreamWidgetDefinition # Type of the event stream widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -84,12 +86,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::EventStreamWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::EventStreamWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'event_size') @@ -154,6 +158,26 @@ def type=(type) @type = type 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 @@ -168,6 +192,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/event_timeline_widget_definition.rb b/lib/datadog_api_client/v1/models/event_timeline_widget_definition.rb index 277f2e166aa2..b0a110166707 100644 --- a/lib/datadog_api_client/v1/models/event_timeline_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/event_timeline_widget_definition.rb @@ -42,6 +42,8 @@ class EventTimelineWidgetDefinition # Type of the event timeline widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::EventTimelineWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::EventTimelineWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -144,6 +148,26 @@ def type=(type) @type = type 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 @@ -157,6 +181,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb index daa14cb4797f..df396cae702e 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb @@ -54,6 +54,8 @@ class FormulaAndFunctionApmDependencyStatsQueryDefinition # APM statistic. attr_reader :stat + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionApmDependencyStatsQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionApmDependencyStatsQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cross_org_uuids') @@ -248,6 +252,26 @@ def stat=(stat) @stat = stat 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 @@ -265,6 +289,7 @@ def ==(o) resource_name == o.resource_name && service == o.service && stat == o.stat + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb index 9291ae53822d..748a41871f75 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb @@ -54,6 +54,8 @@ class FormulaAndFunctionApmResourceStatsQueryDefinition # APM resource stat name. attr_reader :stat + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionApmResourceStatsQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionApmResourceStatsQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cross_org_uuids') @@ -228,6 +232,26 @@ def stat=(stat) @stat = stat 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 @@ -245,6 +269,7 @@ def ==(o) resource_name == o.resource_name && service == o.service && stat == o.stat + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb index 2d0b063a2977..0e90f9d67845 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb @@ -36,6 +36,8 @@ class FormulaAndFunctionCloudCostQueryDefinition # Query for Cloud Cost data. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionCloudCostQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionCloudCostQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregator') @@ -150,6 +154,26 @@ def query=(query) @query = query 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 @@ -161,6 +185,7 @@ def ==(o) data_source == o.data_source && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb index 3718c1fc76d5..bcdd73690ca9 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb @@ -45,6 +45,8 @@ class FormulaAndFunctionEventQueryDefinition # Option for storage location. Feature in Private Beta. attr_accessor :storage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -181,6 +185,26 @@ def name=(name) @name = name 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 @@ -195,6 +219,7 @@ def ==(o) name == o.name && search == o.search && storage == o.storage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition_compute.rb b/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition_compute.rb index c7b16a5078de..db6712e1cc02 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition_compute.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition_compute.rb @@ -30,6 +30,8 @@ class FormulaAndFunctionEventQueryDefinitionCompute # Measurable attribute to compute. attr_accessor :metric + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -97,6 +101,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -106,6 +130,7 @@ def ==(o) aggregation == o.aggregation && interval == o.interval && metric == o.metric + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition_search.rb b/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition_search.rb index ab11a61deed8..de6acaffbbda 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition_search.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition_search.rb @@ -24,6 +24,8 @@ class FormulaAndFunctionEventQueryDefinitionSearch # Events search string. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionSearch` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionSearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -79,6 +83,26 @@ def query=(query) @query = query 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_event_query_group_by.rb b/lib/datadog_api_client/v1/models/formula_and_function_event_query_group_by.rb index cd01356674fb..adce09c48205 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_event_query_group_by.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_event_query_group_by.rb @@ -30,6 +30,8 @@ class FormulaAndFunctionEventQueryGroupBy # Options for sorting group by results. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -97,6 +101,26 @@ def facet=(facet) @facet = facet 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 @@ -106,6 +130,7 @@ def ==(o) facet == o.facet && limit == o.limit && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_event_query_group_by_sort.rb b/lib/datadog_api_client/v1/models/formula_and_function_event_query_group_by_sort.rb index 6f9557f87db8..8e688abb571f 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_event_query_group_by_sort.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_event_query_group_by_sort.rb @@ -30,6 +30,8 @@ class FormulaAndFunctionEventQueryGroupBySort # Direction of sort. attr_accessor :order + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryGroupBySort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionEventQueryGroupBySort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -97,6 +101,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -106,6 +130,7 @@ def ==(o) aggregation == o.aggregation && metric == o.metric && order == o.order + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb index fe5dc245bda0..555188b911a2 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb @@ -36,6 +36,8 @@ class FormulaAndFunctionMetricQueryDefinition # Metrics query definition. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregator') @@ -150,6 +154,26 @@ def query=(query) @query = query 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 @@ -161,6 +185,7 @@ def ==(o) data_source == o.data_source && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb index 0554174ff519..ce27a9a0d415 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb @@ -51,6 +51,8 @@ class FormulaAndFunctionProcessQueryDefinition # Text to use as filter. attr_accessor :text_filter + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionProcessQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionProcessQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregator') @@ -197,6 +201,26 @@ def name=(name) @name = name 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 @@ -213,6 +237,7 @@ def ==(o) sort == o.sort && tag_filters == o.tag_filters && text_filter == o.text_filter + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb index 744219bd86b9..097f786d229a 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb @@ -45,6 +45,8 @@ class FormulaAndFunctionSLOQueryDefinition # Name of the query for use in formulas. attr_accessor :slo_query_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FormulaAndFunctionSLOQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FormulaAndFunctionSLOQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'additional_query_filters') @@ -177,6 +181,26 @@ def slo_id=(slo_id) @slo_id = slo_id 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 @@ -191,6 +215,7 @@ def ==(o) name == o.name && slo_id == o.slo_id && slo_query_type == o.slo_query_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/free_text_widget_definition.rb b/lib/datadog_api_client/v1/models/free_text_widget_definition.rb index adc2636339e1..081df5835297 100644 --- a/lib/datadog_api_client/v1/models/free_text_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/free_text_widget_definition.rb @@ -36,6 +36,8 @@ class FreeTextWidgetDefinition # Type of the free text widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FreeTextWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FreeTextWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'color') @@ -126,6 +130,26 @@ def type=(type) @type = type 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 @@ -137,6 +161,7 @@ def ==(o) text == o.text && text_align == o.text_align && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/funnel_query.rb b/lib/datadog_api_client/v1/models/funnel_query.rb index 2a650d78a872..d4a2323b64f6 100644 --- a/lib/datadog_api_client/v1/models/funnel_query.rb +++ b/lib/datadog_api_client/v1/models/funnel_query.rb @@ -30,6 +30,8 @@ class FunnelQuery # List of funnel steps. attr_reader :steps + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FunnelQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FunnelQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data_source') @@ -121,6 +125,26 @@ def steps=(steps) @steps = steps 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 @@ -130,6 +154,7 @@ def ==(o) data_source == o.data_source && query_string == o.query_string && steps == o.steps + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/funnel_step.rb b/lib/datadog_api_client/v1/models/funnel_step.rb index 641fa1fe6e1c..10c8c3ab002f 100644 --- a/lib/datadog_api_client/v1/models/funnel_step.rb +++ b/lib/datadog_api_client/v1/models/funnel_step.rb @@ -27,6 +27,8 @@ class FunnelStep # The value of the step. attr_reader :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FunnelStep` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FunnelStep`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -99,6 +103,26 @@ def value=(value) @value = value 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && facet == o.facet && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/funnel_widget_definition.rb b/lib/datadog_api_client/v1/models/funnel_widget_definition.rb index f56b40586477..e8ff761a9db7 100644 --- a/lib/datadog_api_client/v1/models/funnel_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/funnel_widget_definition.rb @@ -39,6 +39,8 @@ class FunnelWidgetDefinition # Type of funnel widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FunnelWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FunnelWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'requests') @@ -145,6 +149,26 @@ def type=(type) @type = type 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 @@ -157,6 +181,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/funnel_widget_request.rb b/lib/datadog_api_client/v1/models/funnel_widget_request.rb index 78de57a085a9..9edb99665d0c 100644 --- a/lib/datadog_api_client/v1/models/funnel_widget_request.rb +++ b/lib/datadog_api_client/v1/models/funnel_widget_request.rb @@ -27,6 +27,8 @@ class FunnelWidgetRequest # Widget request type. attr_reader :request_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FunnelWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FunnelWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -99,6 +103,26 @@ def request_type=(request_type) @request_type = request_type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && query == o.query && request_type == o.request_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/gcp_account.rb b/lib/datadog_api_client/v1/models/gcp_account.rb index 36a4c2de71cb..74c97b48da37 100644 --- a/lib/datadog_api_client/v1/models/gcp_account.rb +++ b/lib/datadog_api_client/v1/models/gcp_account.rb @@ -75,6 +75,8 @@ class GCPAccount # The value for service_account found in your JSON service account key. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -131,12 +133,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GCPAccount` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GCPAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'auth_provider_x509_cert_url') @@ -212,6 +216,26 @@ 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 @@ -235,6 +259,7 @@ def ==(o) resource_collection_enabled == o.resource_collection_enabled && token_uri == o.token_uri && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/geomap_widget_definition.rb b/lib/datadog_api_client/v1/models/geomap_widget_definition.rb index 04494d82e9d8..765fd5a220ab 100644 --- a/lib/datadog_api_client/v1/models/geomap_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/geomap_widget_definition.rb @@ -51,6 +51,8 @@ class GeomapWidgetDefinition # The view of the world that the map should render. attr_reader :view + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -91,12 +93,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GeomapWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -199,6 +203,26 @@ def view=(view) @view = view 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 @@ -214,6 +238,7 @@ def ==(o) title_size == o.title_size && type == o.type && view == o.view + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/geomap_widget_definition_style.rb b/lib/datadog_api_client/v1/models/geomap_widget_definition_style.rb index 687b5bd98d50..3db6edbacae0 100644 --- a/lib/datadog_api_client/v1/models/geomap_widget_definition_style.rb +++ b/lib/datadog_api_client/v1/models/geomap_widget_definition_style.rb @@ -27,6 +27,8 @@ class GeomapWidgetDefinitionStyle # Whether to flip the palette tones. attr_reader :palette_flip + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetDefinitionStyle` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GeomapWidgetDefinitionStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'palette') @@ -99,6 +103,26 @@ def palette_flip=(palette_flip) @palette_flip = palette_flip 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && palette == o.palette && palette_flip == o.palette_flip + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb b/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb index acd66b81e792..101907f2e4aa 100644 --- a/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb +++ b/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb @@ -24,6 +24,8 @@ class GeomapWidgetDefinitionView # The 2-letter ISO code of a country to focus the map on. Or `WORLD`. attr_reader :focus + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetDefinitionView` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GeomapWidgetDefinitionView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'focus') @@ -79,6 +83,26 @@ def focus=(focus) @focus = focus 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && focus == o.focus + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/geomap_widget_request.rb b/lib/datadog_api_client/v1/models/geomap_widget_request.rb index be83daff2cd1..13f4dcf8aae7 100644 --- a/lib/datadog_api_client/v1/models/geomap_widget_request.rb +++ b/lib/datadog_api_client/v1/models/geomap_widget_request.rb @@ -51,6 +51,8 @@ class GeomapWidgetRequest # The controls for sorting the widget. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GeomapWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'columns') @@ -148,6 +152,26 @@ 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 @@ -164,6 +188,7 @@ def ==(o) rum_query == o.rum_query && security_query == o.security_query && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/graph_snapshot.rb b/lib/datadog_api_client/v1/models/graph_snapshot.rb index 56705d1c582e..6ecd5476bfa3 100644 --- a/lib/datadog_api_client/v1/models/graph_snapshot.rb +++ b/lib/datadog_api_client/v1/models/graph_snapshot.rb @@ -32,6 +32,8 @@ class GraphSnapshot # URL of your [graph snapshot](https://docs.datadoghq.com/metrics/explorer/#snapshot). attr_accessor :snapshot_url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -60,12 +62,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GraphSnapshot` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GraphSnapshot`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'graph_def') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) graph_def == o.graph_def && metric_query == o.metric_query && snapshot_url == o.snapshot_url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/group_widget_definition.rb b/lib/datadog_api_client/v1/models/group_widget_definition.rb index 09974107144f..522b73bebf86 100644 --- a/lib/datadog_api_client/v1/models/group_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/group_widget_definition.rb @@ -45,6 +45,8 @@ class GroupWidgetDefinition # List of widget groups. attr_reader :widgets + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GroupWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GroupWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'background_color') @@ -166,6 +170,26 @@ def widgets=(widgets) @widgets = widgets 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 @@ -180,6 +204,7 @@ def ==(o) title_align == o.title_align && type == o.type && widgets == o.widgets + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/heat_map_widget_definition.rb b/lib/datadog_api_client/v1/models/heat_map_widget_definition.rb index a2877422dfe1..30a962b68784 100644 --- a/lib/datadog_api_client/v1/models/heat_map_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/heat_map_widget_definition.rb @@ -54,6 +54,8 @@ class HeatMapWidgetDefinition # Axis controls for the widget. attr_accessor :yaxis + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HeatMapWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HeatMapWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -194,6 +198,26 @@ def type=(type) @type = type 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 @@ -211,6 +235,7 @@ def ==(o) title_size == o.title_size && type == o.type && yaxis == o.yaxis + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/heat_map_widget_request.rb b/lib/datadog_api_client/v1/models/heat_map_widget_request.rb index dcfdddde91fd..00abd8033dff 100644 --- a/lib/datadog_api_client/v1/models/heat_map_widget_request.rb +++ b/lib/datadog_api_client/v1/models/heat_map_widget_request.rb @@ -60,6 +60,8 @@ class HeatMapWidgetRequest # Widget style definition. attr_accessor :style + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -108,12 +110,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HeatMapWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HeatMapWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_query') @@ -173,6 +177,26 @@ 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 @@ -192,6 +216,7 @@ def ==(o) rum_query == o.rum_query && security_query == o.security_query && style == o.style + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host.rb b/lib/datadog_api_client/v1/models/host.rb index 0adfc3314625..3abc20c59769 100644 --- a/lib/datadog_api_client/v1/models/host.rb +++ b/lib/datadog_api_client/v1/models/host.rb @@ -63,6 +63,8 @@ class Host # Displays UP when the expected metrics are received and displays `???` if no metrics are received. attr_accessor :up + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -121,12 +123,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Host` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Host`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aliases') @@ -192,6 +196,26 @@ 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 @@ -212,6 +236,7 @@ def ==(o) sources == o.sources && tags_by_source == o.tags_by_source && up == o.up + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_list_response.rb b/lib/datadog_api_client/v1/models/host_list_response.rb index 9e6f070c009b..4ae54c173767 100644 --- a/lib/datadog_api_client/v1/models/host_list_response.rb +++ b/lib/datadog_api_client/v1/models/host_list_response.rb @@ -30,6 +30,8 @@ class HostListResponse # Number of host returned. attr_accessor :total_returned + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'host_list') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) host_list == o.host_list && total_matching == o.total_matching && total_returned == o.total_returned + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_map_request.rb b/lib/datadog_api_client/v1/models/host_map_request.rb index dd8c182206c9..e095cb4b2a0d 100644 --- a/lib/datadog_api_client/v1/models/host_map_request.rb +++ b/lib/datadog_api_client/v1/models/host_map_request.rb @@ -48,6 +48,8 @@ class HostMapRequest # The log query. attr_accessor :security_query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMapRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMapRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_query') @@ -133,6 +137,26 @@ 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 @@ -148,6 +172,7 @@ def ==(o) q == o.q && rum_query == o.rum_query && security_query == o.security_query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_map_widget_definition.rb b/lib/datadog_api_client/v1/models/host_map_widget_definition.rb index 925e7d1f6eb5..02cf3eb59586 100644 --- a/lib/datadog_api_client/v1/models/host_map_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/host_map_widget_definition.rb @@ -60,6 +60,8 @@ class HostMapWidgetDefinition # Type of the host map widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -108,12 +110,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMapWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMapWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -204,6 +208,26 @@ def type=(type) @type = type 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 @@ -223,6 +247,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_map_widget_definition_requests.rb b/lib/datadog_api_client/v1/models/host_map_widget_definition_requests.rb index 2b9375631f5b..6d44fafbb08c 100644 --- a/lib/datadog_api_client/v1/models/host_map_widget_definition_requests.rb +++ b/lib/datadog_api_client/v1/models/host_map_widget_definition_requests.rb @@ -27,6 +27,8 @@ class HostMapWidgetDefinitionRequests # Updated host map. attr_accessor :size + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMapWidgetDefinitionRequests` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMapWidgetDefinitionRequests`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'fill') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && fill == o.fill && size == o.size + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_map_widget_definition_style.rb b/lib/datadog_api_client/v1/models/host_map_widget_definition_style.rb index eb52b7743876..05e28a109537 100644 --- a/lib/datadog_api_client/v1/models/host_map_widget_definition_style.rb +++ b/lib/datadog_api_client/v1/models/host_map_widget_definition_style.rb @@ -33,6 +33,8 @@ class HostMapWidgetDefinitionStyle # Whether to flip the palette tones. attr_accessor :palette_flip + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMapWidgetDefinitionStyle` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMapWidgetDefinitionStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'fill_max') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) fill_min == o.fill_min && palette == o.palette && palette_flip == o.palette_flip + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_meta.rb b/lib/datadog_api_client/v1/models/host_meta.rb index cd1e8cb01dc5..589045becdf2 100644 --- a/lib/datadog_api_client/v1/models/host_meta.rb +++ b/lib/datadog_api_client/v1/models/host_meta.rb @@ -66,6 +66,8 @@ class HostMeta # An array of Windows versions. attr_accessor :win_v + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -118,12 +120,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'agent_checks') @@ -197,6 +201,26 @@ 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 @@ -218,6 +242,7 @@ def ==(o) socket_fqdn == o.socket_fqdn && socket_hostname == o.socket_hostname && win_v == o.win_v + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_meta_install_method.rb b/lib/datadog_api_client/v1/models/host_meta_install_method.rb index 4066b9ab8495..6f240983a633 100644 --- a/lib/datadog_api_client/v1/models/host_meta_install_method.rb +++ b/lib/datadog_api_client/v1/models/host_meta_install_method.rb @@ -30,6 +30,8 @@ class HostMetaInstallMethod # The tool version. attr_accessor :tool_version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMetaInstallMethod` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMetaInstallMethod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'installer_version') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) installer_version == o.installer_version && tool == o.tool && tool_version == o.tool_version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_metrics.rb b/lib/datadog_api_client/v1/models/host_metrics.rb index ae964932d50f..47323d810a1e 100644 --- a/lib/datadog_api_client/v1/models/host_metrics.rb +++ b/lib/datadog_api_client/v1/models/host_metrics.rb @@ -30,6 +30,8 @@ class HostMetrics # The system load over the last 15 minutes. attr_accessor :load + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMetrics` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMetrics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cpu') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) cpu == o.cpu && iowait == o.iowait && load == o.load + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_mute_response.rb b/lib/datadog_api_client/v1/models/host_mute_response.rb index da11cb0880b1..3d84817669c9 100644 --- a/lib/datadog_api_client/v1/models/host_mute_response.rb +++ b/lib/datadog_api_client/v1/models/host_mute_response.rb @@ -33,6 +33,8 @@ class HostMuteResponse # Message associated with the mute. attr_accessor :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMuteResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMuteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'action') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) _end == o._end && hostname == o.hostname && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_mute_settings.rb b/lib/datadog_api_client/v1/models/host_mute_settings.rb index 79c8c25074cc..8ce781ea6e6c 100644 --- a/lib/datadog_api_client/v1/models/host_mute_settings.rb +++ b/lib/datadog_api_client/v1/models/host_mute_settings.rb @@ -30,6 +30,8 @@ class HostMuteSettings # If true and the host is already muted, replaces existing host mute settings. attr_accessor :override + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostMuteSettings` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostMuteSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) _end == o._end && message == o.message && override == o.override + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_tags.rb b/lib/datadog_api_client/v1/models/host_tags.rb index 1869cebf5a9a..9d2a8806aba1 100644 --- a/lib/datadog_api_client/v1/models/host_tags.rb +++ b/lib/datadog_api_client/v1/models/host_tags.rb @@ -27,6 +27,8 @@ class HostTags # A list of tags to apply to the host. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostTags` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostTags`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'host') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && host == o.host && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/host_totals.rb b/lib/datadog_api_client/v1/models/host_totals.rb index 7b2d189d35e8..54905dd26aff 100644 --- a/lib/datadog_api_client/v1/models/host_totals.rb +++ b/lib/datadog_api_client/v1/models/host_totals.rb @@ -27,6 +27,8 @@ class HostTotals # Number of host that are UP and reporting to Datadog. attr_accessor :total_up + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HostTotals` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HostTotals`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_active') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && total_active == o.total_active && total_up == o.total_up + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb b/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb index 95c89718ff00..44aa85c98158 100644 --- a/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +++ b/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb @@ -52,6 +52,8 @@ class HourlyUsageAttributionBody # Supported products for hourly usage attribution requests. attr_accessor :usage_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -100,12 +102,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HourlyUsageAttributionBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HourlyUsageAttributionBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -145,6 +149,26 @@ 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 @@ -160,6 +184,7 @@ def ==(o) total_usage_sum == o.total_usage_sum && updated_at == o.updated_at && usage_type == o.usage_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/hourly_usage_attribution_metadata.rb b/lib/datadog_api_client/v1/models/hourly_usage_attribution_metadata.rb index e546a4c99aec..cddfa75b16f0 100644 --- a/lib/datadog_api_client/v1/models/hourly_usage_attribution_metadata.rb +++ b/lib/datadog_api_client/v1/models/hourly_usage_attribution_metadata.rb @@ -24,6 +24,8 @@ class HourlyUsageAttributionMetadata # The metadata for the current pagination. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HourlyUsageAttributionMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HourlyUsageAttributionMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/hourly_usage_attribution_pagination.rb b/lib/datadog_api_client/v1/models/hourly_usage_attribution_pagination.rb index b63a54b2d16c..fb645474bd6d 100644 --- a/lib/datadog_api_client/v1/models/hourly_usage_attribution_pagination.rb +++ b/lib/datadog_api_client/v1/models/hourly_usage_attribution_pagination.rb @@ -24,6 +24,8 @@ class HourlyUsageAttributionPagination # The cursor to get the next results (if any). To make the next request, use the same parameters and add `next_record_id`. attr_accessor :next_record_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HourlyUsageAttributionPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HourlyUsageAttributionPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'next_record_id') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && next_record_id == o.next_record_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/hourly_usage_attribution_response.rb b/lib/datadog_api_client/v1/models/hourly_usage_attribution_response.rb index 7f5ebca49802..5fab07b0e455 100644 --- a/lib/datadog_api_client/v1/models/hourly_usage_attribution_response.rb +++ b/lib/datadog_api_client/v1/models/hourly_usage_attribution_response.rb @@ -27,6 +27,8 @@ class HourlyUsageAttributionResponse # Get the hourly usage attribution by tag(s). attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HourlyUsageAttributionResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HourlyUsageAttributionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'metadata') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && metadata == o.metadata && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/http_log_error.rb b/lib/datadog_api_client/v1/models/http_log_error.rb index 3d4bb09f9f78..b6e4ea116df8 100644 --- a/lib/datadog_api_client/v1/models/http_log_error.rb +++ b/lib/datadog_api_client/v1/models/http_log_error.rb @@ -27,6 +27,8 @@ class HTTPLogError # Error message. attr_reader :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::HTTPLogError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::HTTPLogError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -103,6 +107,26 @@ def message=(message) @message = message 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 @@ -111,6 +135,7 @@ def ==(o) self.class == o.class && code == o.code && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/i_frame_widget_definition.rb b/lib/datadog_api_client/v1/models/i_frame_widget_definition.rb index 2c18515c19ab..561c79874b63 100644 --- a/lib/datadog_api_client/v1/models/i_frame_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/i_frame_widget_definition.rb @@ -27,6 +27,8 @@ class IFrameWidgetDefinition # URL of the iframe. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IFrameWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IFrameWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -99,6 +103,26 @@ def url=(url) @url = url 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && type == o.type && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/idp_form_data.rb b/lib/datadog_api_client/v1/models/idp_form_data.rb index 60c5c35bf5a9..a2e7ce7b141c 100644 --- a/lib/datadog_api_client/v1/models/idp_form_data.rb +++ b/lib/datadog_api_client/v1/models/idp_form_data.rb @@ -24,6 +24,8 @@ class IdpFormData # The path to the XML metadata file you wish to upload. attr_reader :idp_file + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IdpFormData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IdpFormData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'idp_file') @@ -79,6 +83,26 @@ def idp_file=(idp_file) @idp_file = idp_file 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && idp_file == o.idp_file + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/idp_response.rb b/lib/datadog_api_client/v1/models/idp_response.rb index 74ea8ddd07fe..ef87dc4ff1f1 100644 --- a/lib/datadog_api_client/v1/models/idp_response.rb +++ b/lib/datadog_api_client/v1/models/idp_response.rb @@ -24,6 +24,8 @@ class IdpResponse # Identity provider response. attr_reader :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IdpResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IdpResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'message') @@ -79,6 +83,26 @@ def message=(message) @message = message 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/image_widget_definition.rb b/lib/datadog_api_client/v1/models/image_widget_definition.rb index b03ac7b77187..614555c1950d 100644 --- a/lib/datadog_api_client/v1/models/image_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/image_widget_definition.rb @@ -50,6 +50,8 @@ class ImageWidgetDefinition # Vertical alignment. attr_accessor :vertical_align + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -90,12 +92,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ImageWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ImageWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'has_background') @@ -164,6 +168,26 @@ def url=(url) @url = url 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 @@ -179,6 +203,7 @@ def ==(o) url == o.url && url_dark_theme == o.url_dark_theme && vertical_align == o.vertical_align + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/intake_payload_accepted.rb b/lib/datadog_api_client/v1/models/intake_payload_accepted.rb index 01833228a60b..57a485e6d67f 100644 --- a/lib/datadog_api_client/v1/models/intake_payload_accepted.rb +++ b/lib/datadog_api_client/v1/models/intake_payload_accepted.rb @@ -24,6 +24,8 @@ class IntakePayloadAccepted # The status of the intake payload. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IntakePayloadAccepted` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IntakePayloadAccepted`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'status') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_agents.rb b/lib/datadog_api_client/v1/models/ip_prefixes_agents.rb index 614367ae874a..07d7c5237620 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_agents.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_agents.rb @@ -27,6 +27,8 @@ class IPPrefixesAgents # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesAgents` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesAgents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_api.rb b/lib/datadog_api_client/v1/models/ip_prefixes_api.rb index af318f30bf57..bce7c4405a0c 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_api.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_api.rb @@ -27,6 +27,8 @@ class IPPrefixesAPI # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesAPI` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesAPI`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_apm.rb b/lib/datadog_api_client/v1/models/ip_prefixes_apm.rb index be1dbfc3648c..d1b286d417eb 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_apm.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_apm.rb @@ -27,6 +27,8 @@ class IPPrefixesAPM # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesAPM` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesAPM`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_global.rb b/lib/datadog_api_client/v1/models/ip_prefixes_global.rb index e57f07864f9a..1d8121d169cf 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_global.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_global.rb @@ -27,6 +27,8 @@ class IPPrefixesGlobal # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesGlobal` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesGlobal`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_logs.rb b/lib/datadog_api_client/v1/models/ip_prefixes_logs.rb index 3bac4c94fc41..720e8a615e50 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_logs.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_logs.rb @@ -27,6 +27,8 @@ class IPPrefixesLogs # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesLogs` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesLogs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_orchestrator.rb b/lib/datadog_api_client/v1/models/ip_prefixes_orchestrator.rb index e6b3727c489b..d71219513bd2 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_orchestrator.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_orchestrator.rb @@ -27,6 +27,8 @@ class IPPrefixesOrchestrator # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesOrchestrator` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesOrchestrator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_process.rb b/lib/datadog_api_client/v1/models/ip_prefixes_process.rb index f1756adc2164..859947b2d3ac 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_process.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_process.rb @@ -27,6 +27,8 @@ class IPPrefixesProcess # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesProcess` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesProcess`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_remote_configuration.rb b/lib/datadog_api_client/v1/models/ip_prefixes_remote_configuration.rb index d13a51c4ba8d..c7a50b387d09 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_remote_configuration.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_remote_configuration.rb @@ -27,6 +27,8 @@ class IPPrefixesRemoteConfiguration # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesRemoteConfiguration` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesRemoteConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_synthetics.rb b/lib/datadog_api_client/v1/models/ip_prefixes_synthetics.rb index 3c9ef4ae4fe4..4cba41597f79 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_synthetics.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_synthetics.rb @@ -33,6 +33,8 @@ class IPPrefixesSynthetics # List of IPv6 prefixes by location. attr_accessor :prefixes_ipv6_by_location + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesSynthetics` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesSynthetics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -92,6 +96,26 @@ 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 @@ -102,6 +126,7 @@ def ==(o) prefixes_ipv4_by_location == o.prefixes_ipv4_by_location && prefixes_ipv6 == o.prefixes_ipv6 && prefixes_ipv6_by_location == o.prefixes_ipv6_by_location + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_synthetics_private_locations.rb b/lib/datadog_api_client/v1/models/ip_prefixes_synthetics_private_locations.rb index 96d847f0de90..1030e1aafcea 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_synthetics_private_locations.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_synthetics_private_locations.rb @@ -27,6 +27,8 @@ class IPPrefixesSyntheticsPrivateLocations # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesSyntheticsPrivateLocations` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesSyntheticsPrivateLocations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_prefixes_webhooks.rb b/lib/datadog_api_client/v1/models/ip_prefixes_webhooks.rb index 374973d96bf6..b59468b7a29b 100644 --- a/lib/datadog_api_client/v1/models/ip_prefixes_webhooks.rb +++ b/lib/datadog_api_client/v1/models/ip_prefixes_webhooks.rb @@ -27,6 +27,8 @@ class IPPrefixesWebhooks # List of IPv6 prefixes. attr_accessor :prefixes_ipv6 + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesWebhooks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesWebhooks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'prefixes_ipv4') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && prefixes_ipv4 == o.prefixes_ipv4 && prefixes_ipv6 == o.prefixes_ipv6 + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/ip_ranges.rb b/lib/datadog_api_client/v1/models/ip_ranges.rb index 1c2bbaebc898..f624d6b97d4c 100644 --- a/lib/datadog_api_client/v1/models/ip_ranges.rb +++ b/lib/datadog_api_client/v1/models/ip_ranges.rb @@ -60,6 +60,8 @@ class IPRanges # Available prefix information for the Webhook endpoints. attr_accessor :webhooks + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -108,12 +110,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPRanges` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPRanges`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'agents') @@ -169,6 +173,26 @@ 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 @@ -188,6 +212,7 @@ def ==(o) synthetics_private_locations == o.synthetics_private_locations && version == o.version && webhooks == o.webhooks + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/list_stream_column.rb b/lib/datadog_api_client/v1/models/list_stream_column.rb index f0ff05a35f37..3b6b75de166a 100644 --- a/lib/datadog_api_client/v1/models/list_stream_column.rb +++ b/lib/datadog_api_client/v1/models/list_stream_column.rb @@ -27,6 +27,8 @@ class ListStreamColumn # Widget column width. attr_reader :width + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ListStreamColumn` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ListStreamColumn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'field') @@ -99,6 +103,26 @@ def width=(width) @width = width 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && field == o.field && width == o.width + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/list_stream_compute_items.rb b/lib/datadog_api_client/v1/models/list_stream_compute_items.rb index 1937de69111f..a20ce22c3c74 100644 --- a/lib/datadog_api_client/v1/models/list_stream_compute_items.rb +++ b/lib/datadog_api_client/v1/models/list_stream_compute_items.rb @@ -27,6 +27,8 @@ class ListStreamComputeItems # Facet name. attr_accessor :facet + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ListStreamComputeItems` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ListStreamComputeItems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -88,6 +92,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && aggregation == o.aggregation && facet == o.facet + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb b/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb index c2289ce27555..b12ba4993139 100644 --- a/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb +++ b/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb @@ -24,6 +24,8 @@ class ListStreamGroupByItems # Facet name. attr_reader :facet + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ListStreamGroupByItems` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ListStreamGroupByItems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -79,6 +83,26 @@ def facet=(facet) @facet = facet 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && facet == o.facet + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/list_stream_query.rb b/lib/datadog_api_client/v1/models/list_stream_query.rb index c15336adcc37..ca577a2b83f4 100644 --- a/lib/datadog_api_client/v1/models/list_stream_query.rb +++ b/lib/datadog_api_client/v1/models/list_stream_query.rb @@ -45,6 +45,8 @@ class ListStreamQuery # Option for storage location. Feature in Private Beta. attr_accessor :storage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ListStreamQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ListStreamQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -185,6 +189,26 @@ def query_string=(query_string) @query_string = query_string 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 @@ -199,6 +223,7 @@ def ==(o) query_string == o.query_string && sort == o.sort && storage == o.storage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/list_stream_widget_definition.rb b/lib/datadog_api_client/v1/models/list_stream_widget_definition.rb index 07b6034a1946..66d5a8beb4de 100644 --- a/lib/datadog_api_client/v1/models/list_stream_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/list_stream_widget_definition.rb @@ -46,6 +46,8 @@ class ListStreamWidgetDefinition # Type of the list stream widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -84,12 +86,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ListStreamWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ListStreamWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'legend_size') @@ -164,6 +168,26 @@ def type=(type) @type = type 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 @@ -178,6 +202,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/list_stream_widget_request.rb b/lib/datadog_api_client/v1/models/list_stream_widget_request.rb index 8c53c9d7fe4f..d19a0d9dba43 100644 --- a/lib/datadog_api_client/v1/models/list_stream_widget_request.rb +++ b/lib/datadog_api_client/v1/models/list_stream_widget_request.rb @@ -30,6 +30,8 @@ class ListStreamWidgetRequest # Widget response format. attr_reader :response_format + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ListStreamWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ListStreamWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'columns') @@ -121,6 +125,26 @@ def response_format=(response_format) @response_format = response_format 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 @@ -130,6 +154,7 @@ def ==(o) columns == o.columns && query == o.query && response_format == o.response_format + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/log.rb b/lib/datadog_api_client/v1/models/log.rb index f299e06a45ba..c8f2550dbab1 100644 --- a/lib/datadog_api_client/v1/models/log.rb +++ b/lib/datadog_api_client/v1/models/log.rb @@ -27,6 +27,8 @@ class Log # ID of the Log. attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Log` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Log`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'content') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && content == o.content && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/log_content.rb b/lib/datadog_api_client/v1/models/log_content.rb index f46a9285aa6f..1e9229b27e2e 100644 --- a/lib/datadog_api_client/v1/models/log_content.rb +++ b/lib/datadog_api_client/v1/models/log_content.rb @@ -43,6 +43,8 @@ class LogContent # Timestamp of your log. attr_accessor :timestamp + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -77,12 +79,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogContent` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -112,6 +116,26 @@ 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 @@ -124,6 +148,7 @@ def ==(o) service == o.service && tags == o.tags && timestamp == o.timestamp + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/log_query_definition.rb b/lib/datadog_api_client/v1/models/log_query_definition.rb index edd12fb801f0..78723d373e43 100644 --- a/lib/datadog_api_client/v1/models/log_query_definition.rb +++ b/lib/datadog_api_client/v1/models/log_query_definition.rb @@ -36,6 +36,8 @@ class LogQueryDefinition # The query being made on the logs. attr_accessor :search + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -101,6 +105,26 @@ 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 @@ -112,6 +136,7 @@ def ==(o) index == o.index && multi_compute == o.multi_compute && search == o.search + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/log_query_definition_group_by.rb b/lib/datadog_api_client/v1/models/log_query_definition_group_by.rb index 4df5891a0092..2c3e61fae435 100644 --- a/lib/datadog_api_client/v1/models/log_query_definition_group_by.rb +++ b/lib/datadog_api_client/v1/models/log_query_definition_group_by.rb @@ -30,6 +30,8 @@ class LogQueryDefinitionGroupBy # Define a sorting method. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogQueryDefinitionGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogQueryDefinitionGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -97,6 +101,26 @@ def facet=(facet) @facet = facet 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 @@ -106,6 +130,7 @@ def ==(o) facet == o.facet && limit == o.limit && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/log_query_definition_group_by_sort.rb b/lib/datadog_api_client/v1/models/log_query_definition_group_by_sort.rb index f7a26197c792..aefbea213a35 100644 --- a/lib/datadog_api_client/v1/models/log_query_definition_group_by_sort.rb +++ b/lib/datadog_api_client/v1/models/log_query_definition_group_by_sort.rb @@ -30,6 +30,8 @@ class LogQueryDefinitionGroupBySort # Widget sorting methods. attr_reader :order + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogQueryDefinitionGroupBySort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogQueryDefinitionGroupBySort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -108,6 +112,26 @@ def order=(order) @order = order 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 @@ -117,6 +141,7 @@ def ==(o) aggregation == o.aggregation && facet == o.facet && order == o.order + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/log_query_definition_search.rb b/lib/datadog_api_client/v1/models/log_query_definition_search.rb index a3e642dd0217..2153510b93fd 100644 --- a/lib/datadog_api_client/v1/models/log_query_definition_search.rb +++ b/lib/datadog_api_client/v1/models/log_query_definition_search.rb @@ -24,6 +24,8 @@ class LogQueryDefinitionSearch # Search value to apply. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogQueryDefinitionSearch` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogQueryDefinitionSearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -79,6 +83,26 @@ def query=(query) @query = query 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/log_stream_widget_definition.rb b/lib/datadog_api_client/v1/models/log_stream_widget_definition.rb index 0072b7d3e22c..96cf59ec4bc1 100644 --- a/lib/datadog_api_client/v1/models/log_stream_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/log_stream_widget_definition.rb @@ -60,6 +60,8 @@ class LogStreamWidgetDefinition # Type of the log stream widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -108,12 +110,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogStreamWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogStreamWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'columns') @@ -191,6 +195,26 @@ def type=(type) @type = type 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 @@ -210,6 +234,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_api_error.rb b/lib/datadog_api_client/v1/models/logs_api_error.rb index 2d6c33243dee..a00f848cdbcf 100644 --- a/lib/datadog_api_client/v1/models/logs_api_error.rb +++ b/lib/datadog_api_client/v1/models/logs_api_error.rb @@ -30,6 +30,8 @@ class LogsAPIError # Error message attr_accessor :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsAPIError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsAPIError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) code == o.code && details == o.details && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_api_error_response.rb b/lib/datadog_api_client/v1/models/logs_api_error_response.rb index c0e44b13dfce..5f788492a16e 100644 --- a/lib/datadog_api_client/v1/models/logs_api_error_response.rb +++ b/lib/datadog_api_client/v1/models/logs_api_error_response.rb @@ -24,6 +24,8 @@ class LogsAPIErrorResponse # Error returned by the Logs API attr_accessor :error + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsAPIErrorResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsAPIErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'error') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && error == o.error + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb b/lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb index c69b41c40d5b..4595b28663fa 100644 --- a/lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb +++ b/lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb @@ -60,6 +60,8 @@ class LogsArithmeticProcessor # Type of logs arithmetic processor. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -94,12 +96,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsArithmeticProcessor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsArithmeticProcessor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'expression') @@ -167,6 +171,26 @@ def type=(type) @type = type 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 @@ -179,6 +203,7 @@ def ==(o) name == o.name && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_attribute_remapper.rb b/lib/datadog_api_client/v1/models/logs_attribute_remapper.rb index 7e7c50635d17..c029abb9e49f 100644 --- a/lib/datadog_api_client/v1/models/logs_attribute_remapper.rb +++ b/lib/datadog_api_client/v1/models/logs_attribute_remapper.rb @@ -55,6 +55,8 @@ class LogsAttributeRemapper # Type of logs attribute remapper. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -97,12 +99,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsAttributeRemapper` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsAttributeRemapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -188,6 +192,26 @@ def type=(type) @type = type 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 @@ -204,6 +228,7 @@ def ==(o) target_format == o.target_format && target_type == o.target_type && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_by_retention.rb b/lib/datadog_api_client/v1/models/logs_by_retention.rb index 2e56441a1026..02e1b6d44969 100644 --- a/lib/datadog_api_client/v1/models/logs_by_retention.rb +++ b/lib/datadog_api_client/v1/models/logs_by_retention.rb @@ -30,6 +30,8 @@ class LogsByRetention # Object containing a summary of indexed logs usage by retention period for a single month. attr_accessor :usage_by_month + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsByRetention` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsByRetention`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'orgs') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) orgs == o.orgs && usage == o.usage && usage_by_month == o.usage_by_month + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_by_retention_monthly_usage.rb b/lib/datadog_api_client/v1/models/logs_by_retention_monthly_usage.rb index e66e246b9671..725e6aa57f58 100644 --- a/lib/datadog_api_client/v1/models/logs_by_retention_monthly_usage.rb +++ b/lib/datadog_api_client/v1/models/logs_by_retention_monthly_usage.rb @@ -27,6 +27,8 @@ class LogsByRetentionMonthlyUsage # Indexed logs usage for each active retention for the month. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsByRetentionMonthlyUsage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsByRetentionMonthlyUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'date') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && date == o.date && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_by_retention_org_usage.rb b/lib/datadog_api_client/v1/models/logs_by_retention_org_usage.rb index c18fe90fe123..4476a1823261 100644 --- a/lib/datadog_api_client/v1/models/logs_by_retention_org_usage.rb +++ b/lib/datadog_api_client/v1/models/logs_by_retention_org_usage.rb @@ -24,6 +24,8 @@ class LogsByRetentionOrgUsage # Indexed logs usage for each active retention for the organization. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsByRetentionOrgUsage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsByRetentionOrgUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_by_retention_orgs.rb b/lib/datadog_api_client/v1/models/logs_by_retention_orgs.rb index bc5e511df93d..53a8060db3bf 100644 --- a/lib/datadog_api_client/v1/models/logs_by_retention_orgs.rb +++ b/lib/datadog_api_client/v1/models/logs_by_retention_orgs.rb @@ -24,6 +24,8 @@ class LogsByRetentionOrgs # Indexed logs usage summary for each organization. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsByRetentionOrgs` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsByRetentionOrgs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_category_processor.rb b/lib/datadog_api_client/v1/models/logs_category_processor.rb index d42dba9ebcd3..77b4c3d91b38 100644 --- a/lib/datadog_api_client/v1/models/logs_category_processor.rb +++ b/lib/datadog_api_client/v1/models/logs_category_processor.rb @@ -49,6 +49,8 @@ class LogsCategoryProcessor # Type of logs category processor. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsCategoryProcessor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsCategoryProcessor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'categories') @@ -152,6 +156,26 @@ def type=(type) @type = type 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 @@ -163,6 +187,7 @@ def ==(o) name == o.name && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_category_processor_category.rb b/lib/datadog_api_client/v1/models/logs_category_processor_category.rb index de3beec5ff98..abd1343d272e 100644 --- a/lib/datadog_api_client/v1/models/logs_category_processor_category.rb +++ b/lib/datadog_api_client/v1/models/logs_category_processor_category.rb @@ -27,6 +27,8 @@ class LogsCategoryProcessorCategory # Value to assign to the target attribute. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsCategoryProcessorCategory` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsCategoryProcessorCategory`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && filter == o.filter && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb b/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb index 8525bdffbaed..5cf3d60e76d6 100644 --- a/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb +++ b/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb @@ -27,6 +27,8 @@ class LogsDailyLimitReset # String in `(-|+)HH:00` format representing the UTC offset to apply to the given reset time. The hours must be between -12 and +14 (inclusive). attr_accessor :reset_utc_offset + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsDailyLimitReset` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsDailyLimitReset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'reset_time') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && reset_time == o.reset_time && reset_utc_offset == o.reset_utc_offset + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_date_remapper.rb b/lib/datadog_api_client/v1/models/logs_date_remapper.rb index 4ed525083043..60438974aff9 100644 --- a/lib/datadog_api_client/v1/models/logs_date_remapper.rb +++ b/lib/datadog_api_client/v1/models/logs_date_remapper.rb @@ -51,6 +51,8 @@ class LogsDateRemapper # Type of logs date remapper. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsDateRemapper` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsDateRemapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -137,6 +141,26 @@ def type=(type) @type = type 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 @@ -147,6 +171,7 @@ def ==(o) name == o.name && sources == o.sources && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_exclusion.rb b/lib/datadog_api_client/v1/models/logs_exclusion.rb index e7cf8f773d36..455a6404fcdf 100644 --- a/lib/datadog_api_client/v1/models/logs_exclusion.rb +++ b/lib/datadog_api_client/v1/models/logs_exclusion.rb @@ -30,6 +30,8 @@ class LogsExclusion # Name of the index exclusion filter. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsExclusion` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsExclusion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -97,6 +101,26 @@ def name=(name) @name = name 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 @@ -106,6 +130,7 @@ def ==(o) filter == o.filter && is_enabled == o.is_enabled && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_exclusion_filter.rb b/lib/datadog_api_client/v1/models/logs_exclusion_filter.rb index f7bc665dbc55..a845c14eaa3c 100644 --- a/lib/datadog_api_client/v1/models/logs_exclusion_filter.rb +++ b/lib/datadog_api_client/v1/models/logs_exclusion_filter.rb @@ -29,6 +29,8 @@ class LogsExclusionFilter # a value of 1.0 excludes all logs matching the query. attr_reader :sample_rate + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -55,12 +57,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsExclusionFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsExclusionFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -90,6 +94,26 @@ def sample_rate=(sample_rate) @sample_rate = sample_rate 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && query == o.query && sample_rate == o.sample_rate + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_filter.rb b/lib/datadog_api_client/v1/models/logs_filter.rb index b5ba2a939621..97fc5f2438ad 100644 --- a/lib/datadog_api_client/v1/models/logs_filter.rb +++ b/lib/datadog_api_client/v1/models/logs_filter.rb @@ -24,6 +24,8 @@ class LogsFilter # The filter query. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_geo_ip_parser.rb b/lib/datadog_api_client/v1/models/logs_geo_ip_parser.rb index d9e4df2666c7..214b31bc0000 100644 --- a/lib/datadog_api_client/v1/models/logs_geo_ip_parser.rb +++ b/lib/datadog_api_client/v1/models/logs_geo_ip_parser.rb @@ -37,6 +37,8 @@ class LogsGeoIPParser # Type of GeoIP parser. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsGeoIPParser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsGeoIPParser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -140,6 +144,26 @@ def type=(type) @type = type 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 @@ -151,6 +175,7 @@ def ==(o) sources == o.sources && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_grok_parser.rb b/lib/datadog_api_client/v1/models/logs_grok_parser.rb index e948998b4c68..e434ecbf3f71 100644 --- a/lib/datadog_api_client/v1/models/logs_grok_parser.rb +++ b/lib/datadog_api_client/v1/models/logs_grok_parser.rb @@ -40,6 +40,8 @@ class LogsGrokParser # Type of logs grok parser. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -74,12 +76,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsGrokParser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsGrokParser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'grok') @@ -160,6 +164,26 @@ def type=(type) @type = type 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 @@ -172,6 +196,7 @@ def ==(o) samples == o.samples && source == o.source && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_grok_parser_rules.rb b/lib/datadog_api_client/v1/models/logs_grok_parser_rules.rb index e10407a98d16..9ae7c16fce73 100644 --- a/lib/datadog_api_client/v1/models/logs_grok_parser_rules.rb +++ b/lib/datadog_api_client/v1/models/logs_grok_parser_rules.rb @@ -27,6 +27,8 @@ class LogsGrokParserRules # List of support rules for the grok parser, separated by a new line. attr_accessor :support_rules + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsGrokParserRules` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsGrokParserRules`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'match_rules') @@ -88,6 +92,26 @@ def match_rules=(match_rules) @match_rules = match_rules 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && match_rules == o.match_rules && support_rules == o.support_rules + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_index.rb b/lib/datadog_api_client/v1/models/logs_index.rb index 759ef329d785..00f1bd645270 100644 --- a/lib/datadog_api_client/v1/models/logs_index.rb +++ b/lib/datadog_api_client/v1/models/logs_index.rb @@ -49,6 +49,8 @@ class LogsIndex # retention plans specified in your organization's contract/subscriptions. attr_accessor :num_retention_days + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -87,12 +89,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsIndex` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsIndex`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'daily_limit') @@ -174,6 +178,26 @@ def name=(name) @name = name 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 @@ -188,6 +212,7 @@ def ==(o) is_rate_limited == o.is_rate_limited && name == o.name && num_retention_days == o.num_retention_days + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_index_list_response.rb b/lib/datadog_api_client/v1/models/logs_index_list_response.rb index 378dcf9190f6..cf79b55547b8 100644 --- a/lib/datadog_api_client/v1/models/logs_index_list_response.rb +++ b/lib/datadog_api_client/v1/models/logs_index_list_response.rb @@ -24,6 +24,8 @@ class LogsIndexListResponse # Array of Log index configurations. attr_accessor :indexes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsIndexListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsIndexListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'indexes') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && indexes == o.indexes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_index_update_request.rb b/lib/datadog_api_client/v1/models/logs_index_update_request.rb index c674a94722e9..da5bd8a89338 100644 --- a/lib/datadog_api_client/v1/models/logs_index_update_request.rb +++ b/lib/datadog_api_client/v1/models/logs_index_update_request.rb @@ -50,6 +50,8 @@ class LogsIndexUpdateRequest # already in this index. It may also affect billing. attr_accessor :num_retention_days + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -86,12 +88,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsIndexUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsIndexUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'daily_limit') @@ -158,6 +162,26 @@ def filter=(filter) @filter = filter 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 @@ -171,6 +195,7 @@ def ==(o) exclusion_filters == o.exclusion_filters && filter == o.filter && num_retention_days == o.num_retention_days + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_indexes_order.rb b/lib/datadog_api_client/v1/models/logs_indexes_order.rb index 43c0b6db29d3..7ee65b175664 100644 --- a/lib/datadog_api_client/v1/models/logs_indexes_order.rb +++ b/lib/datadog_api_client/v1/models/logs_indexes_order.rb @@ -26,6 +26,8 @@ class LogsIndexesOrder # Logs are eventually stored in the first matching index. attr_reader :index_names + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -50,12 +52,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsIndexesOrder` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsIndexesOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'index_names') @@ -83,6 +87,26 @@ def index_names=(index_names) @index_names = index_names 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 @@ -90,6 +114,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && index_names == o.index_names + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_list_request.rb b/lib/datadog_api_client/v1/models/logs_list_request.rb index b6a63a971c99..24a4fcc6e66e 100644 --- a/lib/datadog_api_client/v1/models/logs_list_request.rb +++ b/lib/datadog_api_client/v1/models/logs_list_request.rb @@ -44,6 +44,8 @@ class LogsListRequest # Timeframe to retrieve the log from. attr_reader :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsListRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'index') @@ -140,6 +144,26 @@ def time=(time) @time = time 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 @@ -152,6 +176,7 @@ def ==(o) sort == o.sort && start_at == o.start_at && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_list_request_time.rb b/lib/datadog_api_client/v1/models/logs_list_request_time.rb index 269969d65c85..5ca63a0f07f9 100644 --- a/lib/datadog_api_client/v1/models/logs_list_request_time.rb +++ b/lib/datadog_api_client/v1/models/logs_list_request_time.rb @@ -31,6 +31,8 @@ class LogsListRequestTime # Maximum timestamp for requested logs. attr_reader :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsListRequestTime` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsListRequestTime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -109,6 +113,26 @@ def to=(to) @to = to 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 @@ -118,6 +142,7 @@ def ==(o) from == o.from && timezone == o.timezone && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_list_response.rb b/lib/datadog_api_client/v1/models/logs_list_response.rb index 921459f09c30..b26ed61c5336 100644 --- a/lib/datadog_api_client/v1/models/logs_list_response.rb +++ b/lib/datadog_api_client/v1/models/logs_list_response.rb @@ -31,6 +31,8 @@ class LogsListResponse # Status of the response. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -67,12 +69,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'logs') @@ -90,6 +94,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) logs == o.logs && next_log_id == o.next_log_id && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_lookup_processor.rb b/lib/datadog_api_client/v1/models/logs_lookup_processor.rb index 050ac72da192..d7ab1c7eccd8 100644 --- a/lib/datadog_api_client/v1/models/logs_lookup_processor.rb +++ b/lib/datadog_api_client/v1/models/logs_lookup_processor.rb @@ -49,6 +49,8 @@ class LogsLookupProcessor # Type of logs lookup processor. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -85,12 +87,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsLookupProcessor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsLookupProcessor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'default_lookup') @@ -175,6 +179,26 @@ def type=(type) @type = type 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 @@ -188,6 +212,7 @@ def ==(o) source == o.source && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_message_remapper.rb b/lib/datadog_api_client/v1/models/logs_message_remapper.rb index d19ed99348bc..f03a0fbcbc2e 100644 --- a/lib/datadog_api_client/v1/models/logs_message_remapper.rb +++ b/lib/datadog_api_client/v1/models/logs_message_remapper.rb @@ -38,6 +38,8 @@ class LogsMessageRemapper # Type of logs message remapper. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsMessageRemapper` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsMessageRemapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -124,6 +128,26 @@ def type=(type) @type = type 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 @@ -134,6 +158,7 @@ def ==(o) name == o.name && sources == o.sources && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_pipeline.rb b/lib/datadog_api_client/v1/models/logs_pipeline.rb index 25cc87571ac6..21b4311aa9c9 100644 --- a/lib/datadog_api_client/v1/models/logs_pipeline.rb +++ b/lib/datadog_api_client/v1/models/logs_pipeline.rb @@ -46,6 +46,8 @@ class LogsPipeline # Type of pipeline. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -82,12 +84,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsPipeline` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsPipeline`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -139,6 +143,26 @@ def name=(name) @name = name 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 @@ -152,6 +176,7 @@ def ==(o) name == o.name && processors == o.processors && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_pipeline_processor.rb b/lib/datadog_api_client/v1/models/logs_pipeline_processor.rb index 3fb914e4f293..1eb5a9d5cf6f 100644 --- a/lib/datadog_api_client/v1/models/logs_pipeline_processor.rb +++ b/lib/datadog_api_client/v1/models/logs_pipeline_processor.rb @@ -40,6 +40,8 @@ class LogsPipelineProcessor # Type of logs pipeline processor. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -72,12 +74,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsPipelineProcessor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsPipelineProcessor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -121,6 +125,26 @@ def type=(type) @type = type 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 @@ -132,6 +156,7 @@ def ==(o) name == o.name && processors == o.processors && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_pipelines_order.rb b/lib/datadog_api_client/v1/models/logs_pipelines_order.rb index fd8a58358d32..5b46bf9f3539 100644 --- a/lib/datadog_api_client/v1/models/logs_pipelines_order.rb +++ b/lib/datadog_api_client/v1/models/logs_pipelines_order.rb @@ -25,6 +25,8 @@ class LogsPipelinesOrder # define the overall Pipelines order for Datadog. attr_reader :pipeline_ids + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsPipelinesOrder` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsPipelinesOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pipeline_ids') @@ -82,6 +86,26 @@ def pipeline_ids=(pipeline_ids) @pipeline_ids = pipeline_ids 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 @@ -89,6 +113,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pipeline_ids == o.pipeline_ids + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_query_compute.rb b/lib/datadog_api_client/v1/models/logs_query_compute.rb index 8f23c5df9e3d..5794bebf2bbf 100644 --- a/lib/datadog_api_client/v1/models/logs_query_compute.rb +++ b/lib/datadog_api_client/v1/models/logs_query_compute.rb @@ -30,6 +30,8 @@ class LogsQueryCompute # Define a time interval in seconds. attr_accessor :interval + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsQueryCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsQueryCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -97,6 +101,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -106,6 +130,7 @@ def ==(o) aggregation == o.aggregation && facet == o.facet && interval == o.interval + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_retention_agg_sum_usage.rb b/lib/datadog_api_client/v1/models/logs_retention_agg_sum_usage.rb index 7ae3473af9fe..0462e7773ea6 100644 --- a/lib/datadog_api_client/v1/models/logs_retention_agg_sum_usage.rb +++ b/lib/datadog_api_client/v1/models/logs_retention_agg_sum_usage.rb @@ -33,6 +33,8 @@ class LogsRetentionAggSumUsage # The retention period in days or "custom" for all custom retention periods. attr_accessor :retention + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsRetentionAggSumUsage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsRetentionAggSumUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'logs_indexed_logs_usage_agg_sum') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) logs_live_indexed_logs_usage_agg_sum == o.logs_live_indexed_logs_usage_agg_sum && logs_rehydrated_indexed_logs_usage_agg_sum == o.logs_rehydrated_indexed_logs_usage_agg_sum && retention == o.retention + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_retention_sum_usage.rb b/lib/datadog_api_client/v1/models/logs_retention_sum_usage.rb index 53dc75953506..e785659998cb 100644 --- a/lib/datadog_api_client/v1/models/logs_retention_sum_usage.rb +++ b/lib/datadog_api_client/v1/models/logs_retention_sum_usage.rb @@ -33,6 +33,8 @@ class LogsRetentionSumUsage # The retention period in days or "custom" for all custom retention periods. attr_accessor :retention + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsRetentionSumUsage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsRetentionSumUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'logs_indexed_logs_usage_sum') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) logs_live_indexed_logs_usage_sum == o.logs_live_indexed_logs_usage_sum && logs_rehydrated_indexed_logs_usage_sum == o.logs_rehydrated_indexed_logs_usage_sum && retention == o.retention + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_service_remapper.rb b/lib/datadog_api_client/v1/models/logs_service_remapper.rb index a5f794eba20c..e6e01309c240 100644 --- a/lib/datadog_api_client/v1/models/logs_service_remapper.rb +++ b/lib/datadog_api_client/v1/models/logs_service_remapper.rb @@ -36,6 +36,8 @@ class LogsServiceRemapper # Type of logs service remapper. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsServiceRemapper` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsServiceRemapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -122,6 +126,26 @@ def type=(type) @type = type 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 @@ -132,6 +156,7 @@ def ==(o) name == o.name && sources == o.sources && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_status_remapper.rb b/lib/datadog_api_client/v1/models/logs_status_remapper.rb index 416b65964260..4b5f17b3a424 100644 --- a/lib/datadog_api_client/v1/models/logs_status_remapper.rb +++ b/lib/datadog_api_client/v1/models/logs_status_remapper.rb @@ -50,6 +50,8 @@ class LogsStatusRemapper # Type of logs status remapper. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -80,12 +82,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsStatusRemapper` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsStatusRemapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -136,6 +140,26 @@ def type=(type) @type = type 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 @@ -146,6 +170,7 @@ def ==(o) name == o.name && sources == o.sources && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_string_builder_processor.rb b/lib/datadog_api_client/v1/models/logs_string_builder_processor.rb index d49a8839ed91..14111a87b3ac 100644 --- a/lib/datadog_api_client/v1/models/logs_string_builder_processor.rb +++ b/lib/datadog_api_client/v1/models/logs_string_builder_processor.rb @@ -52,6 +52,8 @@ class LogsStringBuilderProcessor # Type of logs string builder processor. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -86,12 +88,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsStringBuilderProcessor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsStringBuilderProcessor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -159,6 +163,26 @@ def type=(type) @type = type 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 @@ -171,6 +195,7 @@ def ==(o) target == o.target && template == o.template && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_trace_remapper.rb b/lib/datadog_api_client/v1/models/logs_trace_remapper.rb index 710a07247a1e..b0f7eabac385 100644 --- a/lib/datadog_api_client/v1/models/logs_trace_remapper.rb +++ b/lib/datadog_api_client/v1/models/logs_trace_remapper.rb @@ -38,6 +38,8 @@ class LogsTraceRemapper # Type of logs trace remapper. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsTraceRemapper` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsTraceRemapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -113,6 +117,26 @@ def type=(type) @type = type 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 @@ -123,6 +147,7 @@ def ==(o) name == o.name && sources == o.sources && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_url_parser.rb b/lib/datadog_api_client/v1/models/logs_url_parser.rb index 8bdb05e51ae4..8cd713bbc4b8 100644 --- a/lib/datadog_api_client/v1/models/logs_url_parser.rb +++ b/lib/datadog_api_client/v1/models/logs_url_parser.rb @@ -39,6 +39,8 @@ class LogsURLParser # Type of logs URL parser. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsURLParser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsURLParser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -156,6 +160,26 @@ def type=(type) @type = type 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 @@ -168,6 +192,7 @@ def ==(o) sources == o.sources && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/logs_user_agent_parser.rb b/lib/datadog_api_client/v1/models/logs_user_agent_parser.rb index 0db58c6c4d69..ac3bfa804553 100644 --- a/lib/datadog_api_client/v1/models/logs_user_agent_parser.rb +++ b/lib/datadog_api_client/v1/models/logs_user_agent_parser.rb @@ -40,6 +40,8 @@ class LogsUserAgentParser # Type of logs User-Agent parser. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -74,12 +76,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsUserAgentParser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsUserAgentParser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -149,6 +153,26 @@ def type=(type) @type = type 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 @@ -161,6 +185,7 @@ def ==(o) sources == o.sources && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/matching_downtime.rb b/lib/datadog_api_client/v1/models/matching_downtime.rb index 6bf6b774a91d..bcde14a8a9e8 100644 --- a/lib/datadog_api_client/v1/models/matching_downtime.rb +++ b/lib/datadog_api_client/v1/models/matching_downtime.rb @@ -35,6 +35,8 @@ class MatchingDowntime # POSIX timestamp to start the downtime. attr_accessor :start + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MatchingDowntime` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MatchingDowntime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -118,6 +122,26 @@ def id=(id) @id = id 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 @@ -128,6 +152,7 @@ def ==(o) id == o.id && scope == o.scope && start == o.start + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/metric_metadata.rb b/lib/datadog_api_client/v1/models/metric_metadata.rb index 3277e2a486ab..f898083b548b 100644 --- a/lib/datadog_api_client/v1/models/metric_metadata.rb +++ b/lib/datadog_api_client/v1/models/metric_metadata.rb @@ -42,6 +42,8 @@ class MetricMetadata # Primary unit of the metric such as `byte` or `operation`. attr_accessor :unit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -115,6 +119,26 @@ 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 @@ -128,6 +152,7 @@ def ==(o) statsd_interval == o.statsd_interval && type == o.type && unit == o.unit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/metric_search_response.rb b/lib/datadog_api_client/v1/models/metric_search_response.rb index 453a2aea90d2..9330396e70e2 100644 --- a/lib/datadog_api_client/v1/models/metric_search_response.rb +++ b/lib/datadog_api_client/v1/models/metric_search_response.rb @@ -24,6 +24,8 @@ class MetricSearchResponse # Search result. attr_accessor :results + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricSearchResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'results') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && results == o.results + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/metric_search_response_results.rb b/lib/datadog_api_client/v1/models/metric_search_response_results.rb index 609b469d7ccb..afc6d3460e75 100644 --- a/lib/datadog_api_client/v1/models/metric_search_response_results.rb +++ b/lib/datadog_api_client/v1/models/metric_search_response_results.rb @@ -24,6 +24,8 @@ class MetricSearchResponseResults # List of metrics that match the search query. attr_accessor :metrics + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricSearchResponseResults` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricSearchResponseResults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'metrics') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && metrics == o.metrics + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/metrics_list_response.rb b/lib/datadog_api_client/v1/models/metrics_list_response.rb index 6105eb9d6846..88377716ce1e 100644 --- a/lib/datadog_api_client/v1/models/metrics_list_response.rb +++ b/lib/datadog_api_client/v1/models/metrics_list_response.rb @@ -27,6 +27,8 @@ class MetricsListResponse # List of metric names. attr_accessor :metrics + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricsListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricsListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && from == o.from && metrics == o.metrics + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/metrics_payload.rb b/lib/datadog_api_client/v1/models/metrics_payload.rb index f72c190518da..28a86f73dd57 100644 --- a/lib/datadog_api_client/v1/models/metrics_payload.rb +++ b/lib/datadog_api_client/v1/models/metrics_payload.rb @@ -24,6 +24,8 @@ class MetricsPayload # A list of timeseries to submit to Datadog. attr_reader :series + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricsPayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricsPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'series') @@ -81,6 +85,26 @@ def series=(series) @series = series 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && series == o.series + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/metrics_query_metadata.rb b/lib/datadog_api_client/v1/models/metrics_query_metadata.rb index f29d1286ed65..7d036e0804e1 100644 --- a/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +++ b/lib/datadog_api_client/v1/models/metrics_query_metadata.rb @@ -63,6 +63,8 @@ class MetricsQueryMetadata # If the second element is not present, the API returns null. attr_reader :unit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -119,12 +121,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricsQueryMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricsQueryMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggr') @@ -208,6 +212,26 @@ def unit=(unit) @unit = unit 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 @@ -227,6 +251,7 @@ def ==(o) start == o.start && tag_set == o.tag_set && unit == o.unit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/metrics_query_response.rb b/lib/datadog_api_client/v1/models/metrics_query_response.rb index 42b4203ebf29..5aec21038ca1 100644 --- a/lib/datadog_api_client/v1/models/metrics_query_response.rb +++ b/lib/datadog_api_client/v1/models/metrics_query_response.rb @@ -48,6 +48,8 @@ class MetricsQueryResponse # End of requested time window, milliseconds since Unix epoch. attr_accessor :to_date + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricsQueryResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricsQueryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'error') @@ -137,6 +141,26 @@ 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 @@ -152,6 +176,7 @@ def ==(o) series == o.series && status == o.status && to_date == o.to_date + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/metrics_query_unit.rb b/lib/datadog_api_client/v1/models/metrics_query_unit.rb index d2ed5ba1b6e1..29784e3cbf20 100644 --- a/lib/datadog_api_client/v1/models/metrics_query_unit.rb +++ b/lib/datadog_api_client/v1/models/metrics_query_unit.rb @@ -36,6 +36,8 @@ class MetricsQueryUnit # Abbreviation of the unit. attr_accessor :short_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricsQueryUnit` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricsQueryUnit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'family') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) plural == o.plural && scale_factor == o.scale_factor && short_name == o.short_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor.rb b/lib/datadog_api_client/v1/models/monitor.rb index d5b7f41038dc..8a107eb46412 100644 --- a/lib/datadog_api_client/v1/models/monitor.rb +++ b/lib/datadog_api_client/v1/models/monitor.rb @@ -72,6 +72,8 @@ class Monitor # The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -138,12 +140,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Monitor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Monitor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created') @@ -250,6 +254,26 @@ def type=(type) @type = type 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 @@ -273,6 +297,7 @@ def ==(o) state == o.state && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition.rb index 0d0df4d2bfb6..1efd9089b4ec 100644 --- a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition.rb +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition.rb @@ -39,6 +39,8 @@ class MonitorFormulaAndFunctionEventQueryDefinition # Search options. attr_accessor :search + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -150,6 +154,26 @@ def name=(name) @name = name 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 @@ -162,6 +186,7 @@ def ==(o) indexes == o.indexes && name == o.name && search == o.search + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_compute.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_compute.rb index 01ca686aa47e..84502792ae91 100644 --- a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_compute.rb +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_compute.rb @@ -30,6 +30,8 @@ class MonitorFormulaAndFunctionEventQueryDefinitionCompute # Measurable attribute to compute. attr_accessor :metric + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinitionCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinitionCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -97,6 +101,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -106,6 +130,7 @@ def ==(o) aggregation == o.aggregation && interval == o.interval && metric == o.metric + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_search.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_search.rb index 3b285736821c..bd4f9bbbad1e 100644 --- a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_search.rb +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_search.rb @@ -24,6 +24,8 @@ class MonitorFormulaAndFunctionEventQueryDefinitionSearch # Events search string. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinitionSearch` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryDefinitionSearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -79,6 +83,26 @@ def query=(query) @query = query 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by.rb index b0a13d74d746..6a3e77b4a52c 100644 --- a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by.rb +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by.rb @@ -30,6 +30,8 @@ class MonitorFormulaAndFunctionEventQueryGroupBy # Options for sorting group by results. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -97,6 +101,26 @@ def facet=(facet) @facet = facet 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 @@ -106,6 +130,7 @@ def ==(o) facet == o.facet && limit == o.limit && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by_sort.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by_sort.rb index bfc3bb4f4a3e..e08dcd07c1d8 100644 --- a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by_sort.rb +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by_sort.rb @@ -30,6 +30,8 @@ class MonitorFormulaAndFunctionEventQueryGroupBySort # Direction of sort. attr_accessor :order + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryGroupBySort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorFormulaAndFunctionEventQueryGroupBySort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -97,6 +101,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -106,6 +130,7 @@ def ==(o) aggregation == o.aggregation && metric == o.metric && order == o.order + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_group_search_response.rb b/lib/datadog_api_client/v1/models/monitor_group_search_response.rb index bcba7c8ec46b..1cf7d54c17d6 100644 --- a/lib/datadog_api_client/v1/models/monitor_group_search_response.rb +++ b/lib/datadog_api_client/v1/models/monitor_group_search_response.rb @@ -30,6 +30,8 @@ class MonitorGroupSearchResponse # Metadata about the response. attr_accessor :metadata + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorGroupSearchResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorGroupSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'counts') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) counts == o.counts && groups == o.groups && metadata == o.metadata + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_group_search_response_counts.rb b/lib/datadog_api_client/v1/models/monitor_group_search_response_counts.rb index fced71d74846..240110b309a9 100644 --- a/lib/datadog_api_client/v1/models/monitor_group_search_response_counts.rb +++ b/lib/datadog_api_client/v1/models/monitor_group_search_response_counts.rb @@ -27,6 +27,8 @@ class MonitorGroupSearchResponseCounts # Search facets. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorGroupSearchResponseCounts` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorGroupSearchResponseCounts`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'status') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && status == o.status && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_group_search_result.rb b/lib/datadog_api_client/v1/models/monitor_group_search_result.rb index 8f8d4fa7b40d..4923680a1082 100644 --- a/lib/datadog_api_client/v1/models/monitor_group_search_result.rb +++ b/lib/datadog_api_client/v1/models/monitor_group_search_result.rb @@ -42,6 +42,8 @@ class MonitorGroupSearchResult # The different states your monitor can be in. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -86,12 +88,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorGroupSearchResult` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorGroupSearchResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'group') @@ -125,6 +129,26 @@ 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 @@ -138,6 +162,7 @@ def ==(o) monitor_id == o.monitor_id && monitor_name == o.monitor_name && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_options.rb b/lib/datadog_api_client/v1/models/monitor_options.rb index fe7ae9646f94..11ce78b2e636 100644 --- a/lib/datadog_api_client/v1/models/monitor_options.rb +++ b/lib/datadog_api_client/v1/models/monitor_options.rb @@ -153,6 +153,8 @@ class MonitorOptions # List of requests that can be used in the monitor query. **This feature is currently in beta.** attr_accessor :variables + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -255,12 +257,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -418,6 +422,26 @@ def min_failure_duration=(min_failure_duration) @min_failure_duration = min_failure_duration 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 @@ -455,6 +479,7 @@ def ==(o) thresholds == o.thresholds && timeout_h == o.timeout_h && variables == o.variables + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_options_aggregation.rb b/lib/datadog_api_client/v1/models/monitor_options_aggregation.rb index b3f0e8be033b..ef2aaec72b1a 100644 --- a/lib/datadog_api_client/v1/models/monitor_options_aggregation.rb +++ b/lib/datadog_api_client/v1/models/monitor_options_aggregation.rb @@ -30,6 +30,8 @@ class MonitorOptionsAggregation # Metric type used in the monitor. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorOptionsAggregation` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorOptionsAggregation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'group_by') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) group_by == o.group_by && metric == o.metric && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb b/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb index 9d46f33b5329..545ea649b482 100644 --- a/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb +++ b/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb @@ -24,6 +24,8 @@ class MonitorOptionsCustomSchedule # Array of custom schedule recurrences. attr_accessor :recurrences + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorOptionsCustomSchedule` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorOptionsCustomSchedule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'recurrences') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && recurrences == o.recurrences + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb b/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb index c1b01785f536..182d0b85d583 100644 --- a/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb +++ b/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb @@ -30,6 +30,8 @@ class MonitorOptionsCustomScheduleRecurrence # Defines the timezone the schedule runs on. attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorOptionsCustomScheduleRecurrence` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorOptionsCustomScheduleRecurrence`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'rrule') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) rrule == o.rrule && start == o.start && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb b/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb index 2fc1699dec53..d10cd516eb87 100644 --- a/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb +++ b/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb @@ -27,6 +27,8 @@ class MonitorOptionsSchedulingOptions # Configuration options for the evaluation window. If `hour_starts` is set, no other fields may be set. Otherwise, `day_starts` and `month_starts` must be set together. attr_accessor :evaluation_window + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorOptionsSchedulingOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorOptionsSchedulingOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_schedule') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && custom_schedule == o.custom_schedule && evaluation_window == o.evaluation_window + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_options_scheduling_options_evaluation_window.rb b/lib/datadog_api_client/v1/models/monitor_options_scheduling_options_evaluation_window.rb index fcba4cff366d..cc4477875af2 100644 --- a/lib/datadog_api_client/v1/models/monitor_options_scheduling_options_evaluation_window.rb +++ b/lib/datadog_api_client/v1/models/monitor_options_scheduling_options_evaluation_window.rb @@ -30,6 +30,8 @@ class MonitorOptionsSchedulingOptionsEvaluationWindow # The day of the month at which a one month cumulative evaluation window starts. attr_reader :month_starts + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorOptionsSchedulingOptionsEvaluationWindow` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorOptionsSchedulingOptionsEvaluationWindow`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'day_starts') @@ -116,6 +120,26 @@ def month_starts=(month_starts) @month_starts = month_starts 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 @@ -125,6 +149,7 @@ def ==(o) day_starts == o.day_starts && hour_starts == o.hour_starts && month_starts == o.month_starts + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_search_count_item.rb b/lib/datadog_api_client/v1/models/monitor_search_count_item.rb index ee0b2bd9c7c8..dc04012b9802 100644 --- a/lib/datadog_api_client/v1/models/monitor_search_count_item.rb +++ b/lib/datadog_api_client/v1/models/monitor_search_count_item.rb @@ -27,6 +27,8 @@ class MonitorSearchCountItem # The facet value. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorSearchCountItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorSearchCountItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && count == o.count && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_search_response.rb b/lib/datadog_api_client/v1/models/monitor_search_response.rb index 62e75068a6cf..4b2a302e7455 100644 --- a/lib/datadog_api_client/v1/models/monitor_search_response.rb +++ b/lib/datadog_api_client/v1/models/monitor_search_response.rb @@ -30,6 +30,8 @@ class MonitorSearchResponse # The list of found monitors. attr_accessor :monitors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorSearchResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'counts') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) counts == o.counts && metadata == o.metadata && monitors == o.monitors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_search_response_counts.rb b/lib/datadog_api_client/v1/models/monitor_search_response_counts.rb index 2c81bbcf5181..b89010b79dec 100644 --- a/lib/datadog_api_client/v1/models/monitor_search_response_counts.rb +++ b/lib/datadog_api_client/v1/models/monitor_search_response_counts.rb @@ -33,6 +33,8 @@ class MonitorSearchResponseCounts # Search facets. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorSearchResponseCounts` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorSearchResponseCounts`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'muted') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) status == o.status && tag == o.tag && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_search_response_metadata.rb b/lib/datadog_api_client/v1/models/monitor_search_response_metadata.rb index 22f35c3d78f5..a6bda902a44f 100644 --- a/lib/datadog_api_client/v1/models/monitor_search_response_metadata.rb +++ b/lib/datadog_api_client/v1/models/monitor_search_response_metadata.rb @@ -33,6 +33,8 @@ class MonitorSearchResponseMetadata # The total number of monitors. attr_accessor :total_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorSearchResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorSearchResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) page_count == o.page_count && per_page == o.per_page && total_count == o.total_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_search_result.rb b/lib/datadog_api_client/v1/models/monitor_search_result.rb index d9abd830960d..634f233ca93f 100644 --- a/lib/datadog_api_client/v1/models/monitor_search_result.rb +++ b/lib/datadog_api_client/v1/models/monitor_search_result.rb @@ -63,6 +63,8 @@ class MonitorSearchResult # The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -119,12 +121,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorSearchResult` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorSearchResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'classification') @@ -188,6 +192,26 @@ 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 @@ -207,6 +231,7 @@ def ==(o) status == o.status && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_search_result_notification.rb b/lib/datadog_api_client/v1/models/monitor_search_result_notification.rb index 21bbd751e7b5..e5bf322893b7 100644 --- a/lib/datadog_api_client/v1/models/monitor_search_result_notification.rb +++ b/lib/datadog_api_client/v1/models/monitor_search_result_notification.rb @@ -27,6 +27,8 @@ class MonitorSearchResultNotification # The username receiving the notification attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorSearchResultNotification` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorSearchResultNotification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'handle') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && handle == o.handle && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_state.rb b/lib/datadog_api_client/v1/models/monitor_state.rb index daec7316dbfc..3a49976ef046 100644 --- a/lib/datadog_api_client/v1/models/monitor_state.rb +++ b/lib/datadog_api_client/v1/models/monitor_state.rb @@ -25,6 +25,8 @@ class MonitorState # the list of groups your monitor is broken down on. attr_accessor :groups + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorState` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorState`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'groups') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && groups == o.groups + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_state_group.rb b/lib/datadog_api_client/v1/models/monitor_state_group.rb index c6e5f34b2391..19fb68b80235 100644 --- a/lib/datadog_api_client/v1/models/monitor_state_group.rb +++ b/lib/datadog_api_client/v1/models/monitor_state_group.rb @@ -39,6 +39,8 @@ class MonitorStateGroup # The different states your monitor can be in. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorStateGroup` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorStateGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'last_nodata_ts') @@ -106,6 +110,26 @@ 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 @@ -118,6 +142,7 @@ def ==(o) last_triggered_ts == o.last_triggered_ts && name == o.name && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb b/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb index 85bf36c70f37..53177a3f1654 100644 --- a/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb @@ -63,6 +63,8 @@ class MonitorSummaryWidgetDefinition # Type of the monitor summary widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -113,12 +115,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorSummaryWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorSummaryWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'color_preference') @@ -207,6 +211,26 @@ def type=(type) @type = type 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 @@ -227,6 +251,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_threshold_window_options.rb b/lib/datadog_api_client/v1/models/monitor_threshold_window_options.rb index 400d93b7ea91..a921c11fdbed 100644 --- a/lib/datadog_api_client/v1/models/monitor_threshold_window_options.rb +++ b/lib/datadog_api_client/v1/models/monitor_threshold_window_options.rb @@ -27,6 +27,8 @@ class MonitorThresholdWindowOptions # Describes how long a metric must be anomalous before an alert triggers. attr_accessor :trigger_window + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -62,12 +64,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorThresholdWindowOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorThresholdWindowOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'recovery_window') @@ -79,6 +83,26 @@ 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 @@ -87,6 +111,7 @@ def ==(o) self.class == o.class && recovery_window == o.recovery_window && trigger_window == o.trigger_window + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_thresholds.rb b/lib/datadog_api_client/v1/models/monitor_thresholds.rb index cdfd7aca9aa9..4e77aa643992 100644 --- a/lib/datadog_api_client/v1/models/monitor_thresholds.rb +++ b/lib/datadog_api_client/v1/models/monitor_thresholds.rb @@ -39,6 +39,8 @@ class MonitorThresholds # The monitor `WARNING` recovery threshold. attr_accessor :warning_recovery + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -85,12 +87,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorThresholds` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorThresholds`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'critical') @@ -118,6 +122,26 @@ 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 @@ -130,6 +154,7 @@ def ==(o) unknown == o.unknown && warning == o.warning && warning_recovery == o.warning_recovery + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monitor_update_request.rb b/lib/datadog_api_client/v1/models/monitor_update_request.rb index e58ddc3a3bc8..6cc10e3a79ab 100644 --- a/lib/datadog_api_client/v1/models/monitor_update_request.rb +++ b/lib/datadog_api_client/v1/models/monitor_update_request.rb @@ -69,6 +69,8 @@ class MonitorUpdateRequest # The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -133,12 +135,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created') @@ -210,6 +214,26 @@ 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 @@ -232,6 +256,7 @@ def ==(o) state == o.state && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb index 764bc34a2e25..42297d5ea7dd 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb @@ -49,6 +49,8 @@ class MonthlyUsageAttributionBody # Fields in Usage Summary by tag(s). attr_accessor :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -95,12 +97,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonthlyUsageAttributionBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonthlyUsageAttributionBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'month') @@ -136,6 +140,26 @@ 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 @@ -150,6 +174,7 @@ def ==(o) tags == o.tags && updated_at == o.updated_at && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_metadata.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_metadata.rb index aea8f4a18beb..486cd8ea0fec 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_metadata.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_metadata.rb @@ -27,6 +27,8 @@ class MonthlyUsageAttributionMetadata # The metadata for the current pagination. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonthlyUsageAttributionMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonthlyUsageAttributionMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregates') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && aggregates == o.aggregates && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_pagination.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_pagination.rb index 72f338b518c5..f970777ab4a3 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_pagination.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_pagination.rb @@ -24,6 +24,8 @@ class MonthlyUsageAttributionPagination # The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of the `next_record_id`. attr_accessor :next_record_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonthlyUsageAttributionPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonthlyUsageAttributionPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'next_record_id') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && next_record_id == o.next_record_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_response.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_response.rb index 850cc06a2d77..07e6b58d496d 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_response.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_response.rb @@ -27,6 +27,8 @@ class MonthlyUsageAttributionResponse # Get usage summary by tag(s). attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonthlyUsageAttributionResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonthlyUsageAttributionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'metadata') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && metadata == o.metadata && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb index 770d2f8974b6..f30d4f79fc0a 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb @@ -435,6 +435,8 @@ class MonthlyUsageAttributionValues # The total workflow executions usage by tag(s). attr_accessor :workflow_executions_usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -733,12 +735,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonthlyUsageAttributionValues` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonthlyUsageAttributionValues`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_percentage') @@ -1294,6 +1298,26 @@ 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 @@ -1438,6 +1462,7 @@ def ==(o) vuln_management_hosts_usage == o.vuln_management_hosts_usage && workflow_executions_percentage == o.workflow_executions_percentage && workflow_executions_usage == o.workflow_executions_usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/note_widget_definition.rb b/lib/datadog_api_client/v1/models/note_widget_definition.rb index 18fead98480d..087a443dde75 100644 --- a/lib/datadog_api_client/v1/models/note_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/note_widget_definition.rb @@ -51,6 +51,8 @@ class NoteWidgetDefinition # Vertical alignment. attr_accessor :vertical_align + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NoteWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NoteWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'background_color') @@ -171,6 +175,26 @@ def type=(type) @type = type 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 @@ -187,6 +211,7 @@ def ==(o) tick_pos == o.tick_pos && type == o.type && vertical_align == o.vertical_align + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_absolute_time.rb b/lib/datadog_api_client/v1/models/notebook_absolute_time.rb index f2022f70424c..40334df47d22 100644 --- a/lib/datadog_api_client/v1/models/notebook_absolute_time.rb +++ b/lib/datadog_api_client/v1/models/notebook_absolute_time.rb @@ -30,6 +30,8 @@ class NotebookAbsoluteTime # The start time. attr_reader :start + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookAbsoluteTime` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookAbsoluteTime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -108,6 +112,26 @@ def start=(start) @start = start 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 @@ -117,6 +141,7 @@ def ==(o) _end == o._end && live == o.live && start == o.start + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_author.rb b/lib/datadog_api_client/v1/models/notebook_author.rb index 865d46fa23f3..dc432f17d805 100644 --- a/lib/datadog_api_client/v1/models/notebook_author.rb +++ b/lib/datadog_api_client/v1/models/notebook_author.rb @@ -48,6 +48,8 @@ class NotebookAuthor # Whether the user is verified. attr_accessor :verified + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -97,12 +99,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookAuthor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookAuthor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -142,6 +146,26 @@ 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 @@ -157,6 +181,7 @@ def ==(o) status == o.status && title == o.title && verified == o.verified + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_cell_response.rb b/lib/datadog_api_client/v1/models/notebook_cell_response.rb index e93ce47a18d2..244917cdd3fa 100644 --- a/lib/datadog_api_client/v1/models/notebook_cell_response.rb +++ b/lib/datadog_api_client/v1/models/notebook_cell_response.rb @@ -31,6 +31,8 @@ class NotebookCellResponse # Type of the Notebook Cell resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookCellResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookCellResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -120,6 +124,26 @@ def type=(type) @type = type 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 @@ -129,6 +153,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_cell_update_request.rb b/lib/datadog_api_client/v1/models/notebook_cell_update_request.rb index f530aab1083b..fbf2711b1e1e 100644 --- a/lib/datadog_api_client/v1/models/notebook_cell_update_request.rb +++ b/lib/datadog_api_client/v1/models/notebook_cell_update_request.rb @@ -31,6 +31,8 @@ class NotebookCellUpdateRequest # Type of the Notebook Cell resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookCellUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookCellUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -120,6 +124,26 @@ def type=(type) @type = type 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 @@ -129,6 +153,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_create_data.rb b/lib/datadog_api_client/v1/models/notebook_create_data.rb index b1fffe46fdd0..4d8bd5736d14 100644 --- a/lib/datadog_api_client/v1/models/notebook_create_data.rb +++ b/lib/datadog_api_client/v1/models/notebook_create_data.rb @@ -27,6 +27,8 @@ class NotebookCreateData # Type of the Notebook resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb b/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb index b5791328cc54..b08e69fff4a3 100644 --- a/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb @@ -36,6 +36,8 @@ class NotebookCreateDataAttributes # Notebook global timeframe. attr_reader :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookCreateDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookCreateDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cells') @@ -147,6 +151,26 @@ def time=(time) @time = time 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 @@ -158,6 +182,7 @@ def ==(o) name == o.name && status == o.status && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_create_request.rb b/lib/datadog_api_client/v1/models/notebook_create_request.rb index 5021fb966d91..dceb8be3eac1 100644 --- a/lib/datadog_api_client/v1/models/notebook_create_request.rb +++ b/lib/datadog_api_client/v1/models/notebook_create_request.rb @@ -24,6 +24,8 @@ class NotebookCreateRequest # The data for a notebook create request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_distribution_cell_attributes.rb b/lib/datadog_api_client/v1/models/notebook_distribution_cell_attributes.rb index e1e775904b97..dd5887d54832 100644 --- a/lib/datadog_api_client/v1/models/notebook_distribution_cell_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_distribution_cell_attributes.rb @@ -35,6 +35,8 @@ class NotebookDistributionCellAttributes # Timeframe for the notebook cell. When 'null', the notebook global time is used. attr_accessor :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookDistributionCellAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookDistributionCellAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -116,6 +120,26 @@ def definition=(definition) @definition = definition 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 @@ -126,6 +150,7 @@ def ==(o) graph_size == o.graph_size && split_by == o.split_by && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_heat_map_cell_attributes.rb b/lib/datadog_api_client/v1/models/notebook_heat_map_cell_attributes.rb index fa00d32d793c..a8554a60eec7 100644 --- a/lib/datadog_api_client/v1/models/notebook_heat_map_cell_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_heat_map_cell_attributes.rb @@ -33,6 +33,8 @@ class NotebookHeatMapCellAttributes # Timeframe for the notebook cell. When 'null', the notebook global time is used. attr_accessor :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookHeatMapCellAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookHeatMapCellAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -114,6 +118,26 @@ def definition=(definition) @definition = definition 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 @@ -124,6 +148,7 @@ def ==(o) graph_size == o.graph_size && split_by == o.split_by && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_log_stream_cell_attributes.rb b/lib/datadog_api_client/v1/models/notebook_log_stream_cell_attributes.rb index 049b13baa6d5..ad823bc75c5b 100644 --- a/lib/datadog_api_client/v1/models/notebook_log_stream_cell_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_log_stream_cell_attributes.rb @@ -30,6 +30,8 @@ class NotebookLogStreamCellAttributes # Timeframe for the notebook cell. When 'null', the notebook global time is used. attr_accessor :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookLogStreamCellAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookLogStreamCellAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -105,6 +109,26 @@ def definition=(definition) @definition = definition 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 @@ -114,6 +138,7 @@ def ==(o) definition == o.definition && graph_size == o.graph_size && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_markdown_cell_attributes.rb b/lib/datadog_api_client/v1/models/notebook_markdown_cell_attributes.rb index d83d8df50025..c5e43573bfa6 100644 --- a/lib/datadog_api_client/v1/models/notebook_markdown_cell_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_markdown_cell_attributes.rb @@ -24,6 +24,8 @@ class NotebookMarkdownCellAttributes # Text in a notebook is formatted with [Markdown](https://daringfireball.net/projects/markdown/), which enables the use of headings, subheadings, links, images, lists, and code blocks. attr_reader :definition + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookMarkdownCellAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookMarkdownCellAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -79,6 +83,26 @@ def definition=(definition) @definition = definition 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && definition == o.definition + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_markdown_cell_definition.rb b/lib/datadog_api_client/v1/models/notebook_markdown_cell_definition.rb index 6db3a0f78502..2c1ddcbdf2c7 100644 --- a/lib/datadog_api_client/v1/models/notebook_markdown_cell_definition.rb +++ b/lib/datadog_api_client/v1/models/notebook_markdown_cell_definition.rb @@ -27,6 +27,8 @@ class NotebookMarkdownCellDefinition # Type of the markdown cell. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookMarkdownCellDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookMarkdownCellDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'text') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && text == o.text && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_metadata.rb b/lib/datadog_api_client/v1/models/notebook_metadata.rb index 3c5c38c8f784..94817f2d6fb9 100644 --- a/lib/datadog_api_client/v1/models/notebook_metadata.rb +++ b/lib/datadog_api_client/v1/models/notebook_metadata.rb @@ -30,6 +30,8 @@ class NotebookMetadata # Metadata type of the notebook. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_template') @@ -87,6 +91,26 @@ 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 @@ -96,6 +120,7 @@ def ==(o) is_template == o.is_template && take_snapshots == o.take_snapshots && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_relative_time.rb b/lib/datadog_api_client/v1/models/notebook_relative_time.rb index 65742b109ecb..44afd83a32fa 100644 --- a/lib/datadog_api_client/v1/models/notebook_relative_time.rb +++ b/lib/datadog_api_client/v1/models/notebook_relative_time.rb @@ -24,6 +24,8 @@ class NotebookRelativeTime # The available timeframes depend on the widget you are using. attr_reader :live_span + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookRelativeTime` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookRelativeTime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'live_span') @@ -79,6 +83,26 @@ def live_span=(live_span) @live_span = live_span 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && live_span == o.live_span + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_response.rb b/lib/datadog_api_client/v1/models/notebook_response.rb index 0f2a43c7e133..d76057931171 100644 --- a/lib/datadog_api_client/v1/models/notebook_response.rb +++ b/lib/datadog_api_client/v1/models/notebook_response.rb @@ -24,6 +24,8 @@ class NotebookResponse # The data for a notebook. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_response_data.rb b/lib/datadog_api_client/v1/models/notebook_response_data.rb index b5d96df8daee..a17add410ab3 100644 --- a/lib/datadog_api_client/v1/models/notebook_response_data.rb +++ b/lib/datadog_api_client/v1/models/notebook_response_data.rb @@ -30,6 +30,8 @@ class NotebookResponseData # Type of the Notebook resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb b/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb index ab36d3325121..ab1c4be24bcb 100644 --- a/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb @@ -45,6 +45,8 @@ class NotebookResponseDataAttributes # Notebook global timeframe. attr_reader :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookResponseDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author') @@ -174,6 +178,26 @@ def time=(time) @time = time 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 @@ -188,6 +212,7 @@ def ==(o) name == o.name && status == o.status && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_split_by.rb b/lib/datadog_api_client/v1/models/notebook_split_by.rb index c8509a718a44..44ac9e2588bb 100644 --- a/lib/datadog_api_client/v1/models/notebook_split_by.rb +++ b/lib/datadog_api_client/v1/models/notebook_split_by.rb @@ -27,6 +27,8 @@ class NotebookSplitBy # Tags to split on. attr_reader :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookSplitBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookSplitBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'keys') @@ -103,6 +107,26 @@ def tags=(tags) @tags = tags 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 @@ -111,6 +135,7 @@ def ==(o) self.class == o.class && keys == o.keys && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_timeseries_cell_attributes.rb b/lib/datadog_api_client/v1/models/notebook_timeseries_cell_attributes.rb index bcd20a227d3c..3b5b1c7f2c19 100644 --- a/lib/datadog_api_client/v1/models/notebook_timeseries_cell_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_timeseries_cell_attributes.rb @@ -33,6 +33,8 @@ class NotebookTimeseriesCellAttributes # Timeframe for the notebook cell. When 'null', the notebook global time is used. attr_accessor :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookTimeseriesCellAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookTimeseriesCellAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -114,6 +118,26 @@ def definition=(definition) @definition = definition 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 @@ -124,6 +148,7 @@ def ==(o) graph_size == o.graph_size && split_by == o.split_by && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_toplist_cell_attributes.rb b/lib/datadog_api_client/v1/models/notebook_toplist_cell_attributes.rb index 45b2f5f775ae..a4aa14907148 100644 --- a/lib/datadog_api_client/v1/models/notebook_toplist_cell_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_toplist_cell_attributes.rb @@ -33,6 +33,8 @@ class NotebookToplistCellAttributes # Timeframe for the notebook cell. When 'null', the notebook global time is used. attr_accessor :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookToplistCellAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookToplistCellAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -114,6 +118,26 @@ def definition=(definition) @definition = definition 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 @@ -124,6 +148,7 @@ def ==(o) graph_size == o.graph_size && split_by == o.split_by && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_update_data.rb b/lib/datadog_api_client/v1/models/notebook_update_data.rb index 7751d784e671..40915fed4afd 100644 --- a/lib/datadog_api_client/v1/models/notebook_update_data.rb +++ b/lib/datadog_api_client/v1/models/notebook_update_data.rb @@ -27,6 +27,8 @@ class NotebookUpdateData # Type of the Notebook resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb b/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb index 11b7dbd78df0..4c65566b0db6 100644 --- a/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb @@ -36,6 +36,8 @@ class NotebookUpdateDataAttributes # Notebook global timeframe. attr_reader :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookUpdateDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookUpdateDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cells') @@ -147,6 +151,26 @@ def time=(time) @time = time 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 @@ -158,6 +182,7 @@ def ==(o) name == o.name && status == o.status && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebook_update_request.rb b/lib/datadog_api_client/v1/models/notebook_update_request.rb index 1aec519c85e3..6de88074f2c4 100644 --- a/lib/datadog_api_client/v1/models/notebook_update_request.rb +++ b/lib/datadog_api_client/v1/models/notebook_update_request.rb @@ -24,6 +24,8 @@ class NotebookUpdateRequest # The data for a notebook update request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebooks_response.rb b/lib/datadog_api_client/v1/models/notebooks_response.rb index 8b42cd8cdd0c..90212ff593c2 100644 --- a/lib/datadog_api_client/v1/models/notebooks_response.rb +++ b/lib/datadog_api_client/v1/models/notebooks_response.rb @@ -27,6 +27,8 @@ class NotebooksResponse # Searches metadata returned by the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebooksResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebooksResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebooks_response_data.rb b/lib/datadog_api_client/v1/models/notebooks_response_data.rb index 8a74a2d3f0da..2f6c38b64320 100644 --- a/lib/datadog_api_client/v1/models/notebooks_response_data.rb +++ b/lib/datadog_api_client/v1/models/notebooks_response_data.rb @@ -30,6 +30,8 @@ class NotebooksResponseData # Type of the Notebook resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebooksResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebooksResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebooks_response_data_attributes.rb b/lib/datadog_api_client/v1/models/notebooks_response_data_attributes.rb index 947691af2fac..ba1f1b5d78e9 100644 --- a/lib/datadog_api_client/v1/models/notebooks_response_data_attributes.rb +++ b/lib/datadog_api_client/v1/models/notebooks_response_data_attributes.rb @@ -45,6 +45,8 @@ class NotebooksResponseDataAttributes # Notebook global timeframe. attr_accessor :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebooksResponseDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebooksResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author') @@ -152,6 +156,26 @@ def name=(name) @name = name 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 @@ -166,6 +190,7 @@ def ==(o) name == o.name && status == o.status && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebooks_response_meta.rb b/lib/datadog_api_client/v1/models/notebooks_response_meta.rb index 4b409db224d0..8d84681bf761 100644 --- a/lib/datadog_api_client/v1/models/notebooks_response_meta.rb +++ b/lib/datadog_api_client/v1/models/notebooks_response_meta.rb @@ -24,6 +24,8 @@ class NotebooksResponseMeta # Pagination metadata returned by the API. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebooksResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebooksResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/notebooks_response_page.rb b/lib/datadog_api_client/v1/models/notebooks_response_page.rb index 39360a356491..28578129aadb 100644 --- a/lib/datadog_api_client/v1/models/notebooks_response_page.rb +++ b/lib/datadog_api_client/v1/models/notebooks_response_page.rb @@ -27,6 +27,8 @@ class NotebooksResponsePage # The total number of notebooks returned. attr_accessor :total_filtered_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebooksResponsePage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebooksResponsePage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && total_count == o.total_count && total_filtered_count == o.total_filtered_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/org_downgraded_response.rb b/lib/datadog_api_client/v1/models/org_downgraded_response.rb index cceca7194371..53e4e9c70d79 100644 --- a/lib/datadog_api_client/v1/models/org_downgraded_response.rb +++ b/lib/datadog_api_client/v1/models/org_downgraded_response.rb @@ -24,6 +24,8 @@ class OrgDowngradedResponse # Information pertaining to the downgraded child organization. attr_accessor :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrgDowngradedResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrgDowngradedResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'message') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization.rb b/lib/datadog_api_client/v1/models/organization.rb index 315d54e62edb..f9406983eb7a 100644 --- a/lib/datadog_api_client/v1/models/organization.rb +++ b/lib/datadog_api_client/v1/models/organization.rb @@ -45,6 +45,8 @@ class Organization # Only available for MSP customers. Allows child organizations to be created on a trial plan. attr_accessor :trial + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Organization` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Organization`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'billing') @@ -142,6 +146,26 @@ def name=(name) @name = name 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 @@ -156,6 +180,7 @@ def ==(o) settings == o.settings && subscription == o.subscription && trial == o.trial + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_billing.rb b/lib/datadog_api_client/v1/models/organization_billing.rb index 6d3e445f333a..7b2d84be48f8 100644 --- a/lib/datadog_api_client/v1/models/organization_billing.rb +++ b/lib/datadog_api_client/v1/models/organization_billing.rb @@ -26,6 +26,8 @@ class OrganizationBilling # The type of billing. Only `parent_billing` is supported. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -51,12 +53,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationBilling` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationBilling`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -64,6 +68,26 @@ 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 @@ -71,6 +95,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_create_body.rb b/lib/datadog_api_client/v1/models/organization_create_body.rb index 83f6694df9bc..8615c5daf862 100644 --- a/lib/datadog_api_client/v1/models/organization_create_body.rb +++ b/lib/datadog_api_client/v1/models/organization_create_body.rb @@ -30,6 +30,8 @@ class OrganizationCreateBody # Subscription definition. attr_accessor :subscription + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationCreateBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationCreateBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'billing') @@ -101,6 +105,26 @@ def name=(name) @name = name 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 @@ -110,6 +134,7 @@ def ==(o) billing == o.billing && name == o.name && subscription == o.subscription + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_create_response.rb b/lib/datadog_api_client/v1/models/organization_create_response.rb index 35a16b367f0b..3e6d9e3974d1 100644 --- a/lib/datadog_api_client/v1/models/organization_create_response.rb +++ b/lib/datadog_api_client/v1/models/organization_create_response.rb @@ -33,6 +33,8 @@ class OrganizationCreateResponse # Create, edit, and disable users. attr_accessor :user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationCreateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) application_key == o.application_key && org == o.org && user == o.user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_list_response.rb b/lib/datadog_api_client/v1/models/organization_list_response.rb index acdf9db5cb44..73f1b5bba36c 100644 --- a/lib/datadog_api_client/v1/models/organization_list_response.rb +++ b/lib/datadog_api_client/v1/models/organization_list_response.rb @@ -24,6 +24,8 @@ class OrganizationListResponse # Array of organization objects. attr_accessor :orgs + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'orgs') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && orgs == o.orgs + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_response.rb b/lib/datadog_api_client/v1/models/organization_response.rb index 40ab14da4d24..0baf232d2cfb 100644 --- a/lib/datadog_api_client/v1/models/organization_response.rb +++ b/lib/datadog_api_client/v1/models/organization_response.rb @@ -24,6 +24,8 @@ class OrganizationResponse # Create, edit, and manage organizations. attr_accessor :org + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'org') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && org == o.org + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_settings.rb b/lib/datadog_api_client/v1/models/organization_settings.rb index 8c117061fd37..a18015141113 100644 --- a/lib/datadog_api_client/v1/models/organization_settings.rb +++ b/lib/datadog_api_client/v1/models/organization_settings.rb @@ -52,6 +52,8 @@ class OrganizationSettings # Has one property enabled (boolean). attr_accessor :saml_strict_mode + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -102,12 +104,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationSettings` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'private_widget_share') @@ -151,6 +155,26 @@ 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 @@ -167,6 +191,7 @@ def ==(o) saml_idp_metadata_uploaded == o.saml_idp_metadata_uploaded && saml_login_url == o.saml_login_url && saml_strict_mode == o.saml_strict_mode + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_settings_saml.rb b/lib/datadog_api_client/v1/models/organization_settings_saml.rb index 2ee3501893c6..a6a452eaecae 100644 --- a/lib/datadog_api_client/v1/models/organization_settings_saml.rb +++ b/lib/datadog_api_client/v1/models/organization_settings_saml.rb @@ -25,6 +25,8 @@ class OrganizationSettingsSaml # Whether or not SAML is enabled for this organization. attr_accessor :enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationSettingsSaml` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationSettingsSaml`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && enabled == o.enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_settings_saml_autocreate_users_domains.rb b/lib/datadog_api_client/v1/models/organization_settings_saml_autocreate_users_domains.rb index 40f4a3853476..5b4b8d8bf820 100644 --- a/lib/datadog_api_client/v1/models/organization_settings_saml_autocreate_users_domains.rb +++ b/lib/datadog_api_client/v1/models/organization_settings_saml_autocreate_users_domains.rb @@ -27,6 +27,8 @@ class OrganizationSettingsSamlAutocreateUsersDomains # Whether or not the automated user creation based on SAML domain is enabled. attr_accessor :enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationSettingsSamlAutocreateUsersDomains` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationSettingsSamlAutocreateUsersDomains`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'domains') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && domains == o.domains && enabled == o.enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_settings_saml_idp_initiated_login.rb b/lib/datadog_api_client/v1/models/organization_settings_saml_idp_initiated_login.rb index a99b62e0cb33..a032b1d224cb 100644 --- a/lib/datadog_api_client/v1/models/organization_settings_saml_idp_initiated_login.rb +++ b/lib/datadog_api_client/v1/models/organization_settings_saml_idp_initiated_login.rb @@ -25,6 +25,8 @@ class OrganizationSettingsSamlIdpInitiatedLogin # in the [SAML documentation](https://docs.datadoghq.com/account_management/saml/#idp-initiated-login). attr_accessor :enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationSettingsSamlIdpInitiatedLogin` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationSettingsSamlIdpInitiatedLogin`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && enabled == o.enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_settings_saml_strict_mode.rb b/lib/datadog_api_client/v1/models/organization_settings_saml_strict_mode.rb index b72c2e2c5d1b..d95a73e50072 100644 --- a/lib/datadog_api_client/v1/models/organization_settings_saml_strict_mode.rb +++ b/lib/datadog_api_client/v1/models/organization_settings_saml_strict_mode.rb @@ -25,6 +25,8 @@ class OrganizationSettingsSamlStrictMode # Learn more on the [SAML Strict documentation](https://docs.datadoghq.com/account_management/saml/#saml-strict). attr_accessor :enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationSettingsSamlStrictMode` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationSettingsSamlStrictMode`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && enabled == o.enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/organization_subscription.rb b/lib/datadog_api_client/v1/models/organization_subscription.rb index 7fc2d7421fdb..3e34b2c12490 100644 --- a/lib/datadog_api_client/v1/models/organization_subscription.rb +++ b/lib/datadog_api_client/v1/models/organization_subscription.rb @@ -26,6 +26,8 @@ class OrganizationSubscription # The subscription type. Types available are `trial`, `free`, and `pro`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -51,12 +53,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrganizationSubscription` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrganizationSubscription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -64,6 +68,26 @@ 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 @@ -71,6 +95,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/pager_duty_service.rb b/lib/datadog_api_client/v1/models/pager_duty_service.rb index 1a20164122d6..e76fc2e4c8d2 100644 --- a/lib/datadog_api_client/v1/models/pager_duty_service.rb +++ b/lib/datadog_api_client/v1/models/pager_duty_service.rb @@ -27,6 +27,8 @@ class PagerDutyService # Your service name associated with a service key in PagerDuty. attr_reader :service_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PagerDutyService` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::PagerDutyService`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'service_key') @@ -99,6 +103,26 @@ def service_name=(service_name) @service_name = service_name 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && service_key == o.service_key && service_name == o.service_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/pager_duty_service_key.rb b/lib/datadog_api_client/v1/models/pager_duty_service_key.rb index e2fddadac7c5..8a401df1af0f 100644 --- a/lib/datadog_api_client/v1/models/pager_duty_service_key.rb +++ b/lib/datadog_api_client/v1/models/pager_duty_service_key.rb @@ -24,6 +24,8 @@ class PagerDutyServiceKey # Your service key in PagerDuty. attr_reader :service_key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PagerDutyServiceKey` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::PagerDutyServiceKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'service_key') @@ -79,6 +83,26 @@ def service_key=(service_key) @service_key = service_key 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && service_key == o.service_key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/pager_duty_service_name.rb b/lib/datadog_api_client/v1/models/pager_duty_service_name.rb index 73cf17d54ed2..4d6ae129b535 100644 --- a/lib/datadog_api_client/v1/models/pager_duty_service_name.rb +++ b/lib/datadog_api_client/v1/models/pager_duty_service_name.rb @@ -24,6 +24,8 @@ class PagerDutyServiceName # Your service name associated service key in PagerDuty. attr_reader :service_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PagerDutyServiceName` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::PagerDutyServiceName`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'service_name') @@ -79,6 +83,26 @@ def service_name=(service_name) @service_name = service_name 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && service_name == o.service_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/pagination.rb b/lib/datadog_api_client/v1/models/pagination.rb index 74c01402dc71..0c6bc907dfc4 100644 --- a/lib/datadog_api_client/v1/models/pagination.rb +++ b/lib/datadog_api_client/v1/models/pagination.rb @@ -27,6 +27,8 @@ class Pagination # Total count of elements matched by the filter. attr_accessor :total_filtered_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Pagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Pagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && total_count == o.total_count && total_filtered_count == o.total_filtered_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb b/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb index ad71519ba594..f084a23b77b3 100644 --- a/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb +++ b/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb @@ -30,6 +30,8 @@ class PowerpackTemplateVariableContents # One or many template variable values within the saved view, which will be unioned together using `OR` if more than one is specified. attr_reader :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PowerpackTemplateVariableContents` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::PowerpackTemplateVariableContents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -110,6 +114,26 @@ def values=(values) @values = values 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 @@ -119,6 +143,7 @@ def ==(o) name == o.name && prefix == o.prefix && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/powerpack_template_variables.rb b/lib/datadog_api_client/v1/models/powerpack_template_variables.rb index a490c3916f6f..c5bfe6d03acb 100644 --- a/lib/datadog_api_client/v1/models/powerpack_template_variables.rb +++ b/lib/datadog_api_client/v1/models/powerpack_template_variables.rb @@ -27,6 +27,8 @@ class PowerpackTemplateVariables # Template variables controlled by the external resource, such as the dashboard this powerpack is on. attr_accessor :controlled_externally + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PowerpackTemplateVariables` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::PowerpackTemplateVariables`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'controlled_by_powerpack') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && controlled_by_powerpack == o.controlled_by_powerpack && controlled_externally == o.controlled_externally + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb b/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb index c2cf99ec29ee..e88d0c36a3e3 100644 --- a/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb @@ -42,6 +42,8 @@ class PowerpackWidgetDefinition # Type of the powerpack widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PowerpackWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::PowerpackWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'background_color') @@ -144,6 +148,26 @@ def type=(type) @type = type 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 @@ -157,6 +181,7 @@ def ==(o) template_variables == o.template_variables && title == o.title && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/process_query_definition.rb b/lib/datadog_api_client/v1/models/process_query_definition.rb index 369d86c2aac0..bfc1ffddad6f 100644 --- a/lib/datadog_api_client/v1/models/process_query_definition.rb +++ b/lib/datadog_api_client/v1/models/process_query_definition.rb @@ -33,6 +33,8 @@ class ProcessQueryDefinition # Your chosen search term. attr_accessor :search_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProcessQueryDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProcessQueryDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter_by') @@ -119,6 +123,26 @@ def metric=(metric) @metric = metric 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 @@ -129,6 +153,7 @@ def ==(o) limit == o.limit && metric == o.metric && search_by == o.search_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/query_value_widget_definition.rb b/lib/datadog_api_client/v1/models/query_value_widget_definition.rb index 0c4b4a5b1caa..788f56661179 100644 --- a/lib/datadog_api_client/v1/models/query_value_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/query_value_widget_definition.rb @@ -57,6 +57,8 @@ class QueryValueWidgetDefinition # Type of the query value widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -103,12 +105,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::QueryValueWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::QueryValueWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'autoscale') @@ -201,6 +205,26 @@ def type=(type) @type = type 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 @@ -219,6 +243,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/query_value_widget_request.rb b/lib/datadog_api_client/v1/models/query_value_widget_request.rb index 1ebfe9d23263..3ce0c45ab3f9 100644 --- a/lib/datadog_api_client/v1/models/query_value_widget_request.rb +++ b/lib/datadog_api_client/v1/models/query_value_widget_request.rb @@ -66,6 +66,8 @@ class QueryValueWidgetRequest # The log query. attr_accessor :security_query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -118,12 +120,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::QueryValueWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::QueryValueWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregator') @@ -193,6 +197,26 @@ 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 @@ -214,6 +238,7 @@ def ==(o) response_format == o.response_format && rum_query == o.rum_query && security_query == o.security_query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/reference_table_logs_lookup_processor.rb b/lib/datadog_api_client/v1/models/reference_table_logs_lookup_processor.rb index fe3070c70b93..3d5630f422f5 100644 --- a/lib/datadog_api_client/v1/models/reference_table_logs_lookup_processor.rb +++ b/lib/datadog_api_client/v1/models/reference_table_logs_lookup_processor.rb @@ -45,6 +45,8 @@ class ReferenceTableLogsLookupProcessor # Type of logs lookup processor. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -79,12 +81,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ReferenceTableLogsLookupProcessor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ReferenceTableLogsLookupProcessor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -163,6 +167,26 @@ def type=(type) @type = type 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 @@ -175,6 +199,7 @@ def ==(o) source == o.source && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/response_meta_attributes.rb b/lib/datadog_api_client/v1/models/response_meta_attributes.rb index 16af5e995b71..93d197cd991e 100644 --- a/lib/datadog_api_client/v1/models/response_meta_attributes.rb +++ b/lib/datadog_api_client/v1/models/response_meta_attributes.rb @@ -24,6 +24,8 @@ class ResponseMetaAttributes # Pagination object. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ResponseMetaAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ResponseMetaAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb b/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb index d449f165ac66..09871dce86cf 100644 --- a/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb @@ -45,6 +45,8 @@ class RunWorkflowWidgetDefinition # Workflow id. attr_reader :workflow_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::RunWorkflowWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RunWorkflowWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -157,6 +161,26 @@ def workflow_id=(workflow_id) @workflow_id = workflow_id 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 @@ -171,6 +195,7 @@ def ==(o) title_size == o.title_size && type == o.type && workflow_id == o.workflow_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb b/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb index beee48e01b60..6883510026f1 100644 --- a/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb +++ b/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb @@ -27,6 +27,8 @@ class RunWorkflowWidgetInput # Dashboard template variable. Can be suffixed with '.value' or '.key'. attr_reader :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::RunWorkflowWidgetInput` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RunWorkflowWidgetInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -99,6 +103,26 @@ def value=(value) @value = value 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && name == o.name && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/scatter_plot_request.rb b/lib/datadog_api_client/v1/models/scatter_plot_request.rb index 2e8565818678..6238cbde0e06 100644 --- a/lib/datadog_api_client/v1/models/scatter_plot_request.rb +++ b/lib/datadog_api_client/v1/models/scatter_plot_request.rb @@ -51,6 +51,8 @@ class ScatterPlotRequest # The log query. attr_accessor :security_query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ScatterPlotRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ScatterPlotRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregator') @@ -142,6 +146,26 @@ 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 @@ -158,6 +182,7 @@ def ==(o) q == o.q && rum_query == o.rum_query && security_query == o.security_query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/scatter_plot_widget_definition.rb b/lib/datadog_api_client/v1/models/scatter_plot_widget_definition.rb index dfbf0343439f..a1f0c325bce9 100644 --- a/lib/datadog_api_client/v1/models/scatter_plot_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/scatter_plot_widget_definition.rb @@ -51,6 +51,8 @@ class ScatterPlotWidgetDefinition # Axis controls for the widget. attr_accessor :yaxis + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ScatterPlotWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ScatterPlotWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'color_by_groups') @@ -175,6 +179,26 @@ def type=(type) @type = type 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 @@ -191,6 +215,7 @@ def ==(o) type == o.type && xaxis == o.xaxis && yaxis == o.yaxis + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/scatter_plot_widget_definition_requests.rb b/lib/datadog_api_client/v1/models/scatter_plot_widget_definition_requests.rb index 905eb003712a..5b0d32c6ce27 100644 --- a/lib/datadog_api_client/v1/models/scatter_plot_widget_definition_requests.rb +++ b/lib/datadog_api_client/v1/models/scatter_plot_widget_definition_requests.rb @@ -30,6 +30,8 @@ class ScatterPlotWidgetDefinitionRequests # Updated scatter plot. attr_accessor :y + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ScatterPlotWidgetDefinitionRequests` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ScatterPlotWidgetDefinitionRequests`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'table') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) table == o.table && x == o.x && y == o.y + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/scatterplot_table_request.rb b/lib/datadog_api_client/v1/models/scatterplot_table_request.rb index 9fd4638a0d0c..194dd3b31aa0 100644 --- a/lib/datadog_api_client/v1/models/scatterplot_table_request.rb +++ b/lib/datadog_api_client/v1/models/scatterplot_table_request.rb @@ -30,6 +30,8 @@ class ScatterplotTableRequest # Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. attr_accessor :response_format + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ScatterplotTableRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ScatterplotTableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'formulas') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) formulas == o.formulas && queries == o.queries && response_format == o.response_format + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/scatterplot_widget_formula.rb b/lib/datadog_api_client/v1/models/scatterplot_widget_formula.rb index be886062aaeb..876e97579e80 100644 --- a/lib/datadog_api_client/v1/models/scatterplot_widget_formula.rb +++ b/lib/datadog_api_client/v1/models/scatterplot_widget_formula.rb @@ -30,6 +30,8 @@ class ScatterplotWidgetFormula # String expression built from queries, formulas, and functions. attr_reader :formula + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ScatterplotWidgetFormula` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ScatterplotWidgetFormula`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_alias') @@ -108,6 +112,26 @@ def formula=(formula) @formula = formula 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 @@ -117,6 +141,7 @@ def ==(o) _alias == o._alias && dimension == o.dimension && formula == o.formula + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_service_level_objective.rb b/lib/datadog_api_client/v1/models/search_service_level_objective.rb index ff26802b39b0..cadb1366611d 100644 --- a/lib/datadog_api_client/v1/models/search_service_level_objective.rb +++ b/lib/datadog_api_client/v1/models/search_service_level_objective.rb @@ -24,6 +24,8 @@ class SearchServiceLevelObjective # A service level objective ID and attributes. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchServiceLevelObjective` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchServiceLevelObjective`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb b/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb index 25a2b2b15bc5..07553dbe58f9 100644 --- a/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +++ b/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb @@ -83,6 +83,8 @@ class SearchServiceLevelObjectiveAttributes # objective object. attr_accessor :thresholds + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -149,12 +151,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchServiceLevelObjectiveAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchServiceLevelObjectiveAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'all_tags') @@ -238,6 +242,26 @@ 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 @@ -260,6 +284,7 @@ def ==(o) status == o.status && team_tags == o.team_tags && thresholds == o.thresholds + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb b/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb index 5fb528e33d62..5b5ef7e05cf0 100644 --- a/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +++ b/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb @@ -33,6 +33,8 @@ class SearchServiceLevelObjectiveData # The type of the object, must be `slo`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchServiceLevelObjectiveData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchServiceLevelObjectiveData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -82,6 +86,26 @@ 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 @@ -91,6 +115,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_query.rb b/lib/datadog_api_client/v1/models/search_slo_query.rb index fba320cace13..1a3f82235b0d 100644 --- a/lib/datadog_api_client/v1/models/search_slo_query.rb +++ b/lib/datadog_api_client/v1/models/search_slo_query.rb @@ -33,6 +33,8 @@ class SearchSLOQuery # A Datadog metric query for good events. attr_accessor :numerator + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'denominator') @@ -92,6 +96,26 @@ 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,6 +125,7 @@ def ==(o) denominator == o.denominator && metrics == o.metrics && numerator == o.numerator + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response.rb b/lib/datadog_api_client/v1/models/search_slo_response.rb index 3f664118bced..8ebef8ee4d21 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response.rb @@ -30,6 +30,8 @@ class SearchSLOResponse # Searches metadata returned by the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response_data.rb b/lib/datadog_api_client/v1/models/search_slo_response_data.rb index 374b333cdac8..ccac3a1f878b 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response_data.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response_data.rb @@ -27,6 +27,8 @@ class SearchSLOResponseData # Type of service level objective result. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb b/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb index 097aa6fbfe86..5b4795c745bd 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb @@ -27,6 +27,8 @@ class SearchSLOResponseDataAttributes # SLOs attr_accessor :slos + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facets') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && facets == o.facets && slos == o.slos + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets.rb b/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets.rb index ce40792ba574..7509353eb6e2 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets.rb @@ -45,6 +45,8 @@ class SearchSLOResponseDataAttributesFacets # Timeframes of SLOs. attr_accessor :timeframe + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseDataAttributesFacets` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseDataAttributesFacets`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'all_tags') @@ -140,6 +144,26 @@ 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 @@ -154,6 +178,7 @@ def ==(o) target == o.target && team_tags == o.team_tags && timeframe == o.timeframe + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_int.rb b/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_int.rb index f6290bdc8260..e0f9e2263cc8 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_int.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_int.rb @@ -27,6 +27,8 @@ class SearchSLOResponseDataAttributesFacetsObjectInt # Facet attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseDataAttributesFacetsObjectInt` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseDataAttributesFacetsObjectInt`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && count == o.count && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_string.rb b/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_string.rb index aae9ed78a1de..e588a5dfe20b 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_string.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_string.rb @@ -27,6 +27,8 @@ class SearchSLOResponseDataAttributesFacetsObjectString # Facet attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseDataAttributesFacetsObjectString` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseDataAttributesFacetsObjectString`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && count == o.count && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response_links.rb b/lib/datadog_api_client/v1/models/search_slo_response_links.rb index fbd4a6ee83fa..a57d7b02e601 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response_links.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response_links.rb @@ -36,6 +36,8 @@ class SearchSLOResponseLinks # Link to current page. attr_accessor :_self + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -77,12 +79,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'first') @@ -106,6 +110,26 @@ 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 @@ -117,6 +141,7 @@ def ==(o) _next == o._next && prev == o.prev && _self == o._self + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response_meta.rb b/lib/datadog_api_client/v1/models/search_slo_response_meta.rb index d69f4300d76f..10d1003cdb19 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response_meta.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response_meta.rb @@ -24,6 +24,8 @@ class SearchSLOResponseMeta # Pagination metadata returned by the API. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_response_meta_page.rb b/lib/datadog_api_client/v1/models/search_slo_response_meta_page.rb index efbe8c8934a6..5dfaa826c58f 100644 --- a/lib/datadog_api_client/v1/models/search_slo_response_meta_page.rb +++ b/lib/datadog_api_client/v1/models/search_slo_response_meta_page.rb @@ -45,6 +45,8 @@ class SearchSLOResponseMetaPage # Type of pagination. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'first_number') @@ -124,6 +128,26 @@ 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 @@ -138,6 +162,7 @@ def ==(o) size == o.size && total == o.total && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/search_slo_threshold.rb b/lib/datadog_api_client/v1/models/search_slo_threshold.rb index fd1fbcf0a893..956e6890b61f 100644 --- a/lib/datadog_api_client/v1/models/search_slo_threshold.rb +++ b/lib/datadog_api_client/v1/models/search_slo_threshold.rb @@ -45,6 +45,8 @@ class SearchSLOThreshold # Ignored in create/update requests. attr_accessor :warning_display + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -86,12 +88,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOThreshold` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOThreshold`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'target') @@ -144,6 +148,26 @@ def timeframe=(timeframe) @timeframe = timeframe 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 @@ -155,6 +179,7 @@ def ==(o) timeframe == o.timeframe && warning == o.warning && warning_display == o.warning_display + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb b/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb index 300b370701b7..1df411b874ea 100644 --- a/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb +++ b/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb @@ -33,6 +33,8 @@ class SelectableTemplateVariableItems # List of visible tag values on the shared dashboard. attr_accessor :visible_tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SelectableTemplateVariableItems` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SelectableTemplateVariableItems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'default_value') @@ -98,6 +102,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) name == o.name && prefix == o.prefix && visible_tags == o.visible_tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/series.rb b/lib/datadog_api_client/v1/models/series.rb index 6198483aec41..ac74a0cb9eb3 100644 --- a/lib/datadog_api_client/v1/models/series.rb +++ b/lib/datadog_api_client/v1/models/series.rb @@ -40,6 +40,8 @@ class Series # The type of the metric. Valid types are "",`count`, `gauge`, and `rate`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -82,12 +84,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Series` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Series`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'host') @@ -148,6 +152,26 @@ def points=(points) @points = points 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 @@ -160,6 +184,7 @@ def ==(o) points == o.points && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/service_check.rb b/lib/datadog_api_client/v1/models/service_check.rb index 61d9acba3c16..41faf53d5df5 100644 --- a/lib/datadog_api_client/v1/models/service_check.rb +++ b/lib/datadog_api_client/v1/models/service_check.rb @@ -39,6 +39,8 @@ class ServiceCheck # Time of check. attr_accessor :timestamp + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ServiceCheck` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ServiceCheck`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'check') @@ -159,6 +163,26 @@ def tags=(tags) @tags = tags 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 @@ -171,6 +195,7 @@ def ==(o) status == o.status && tags == o.tags && timestamp == o.timestamp + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/service_level_objective.rb b/lib/datadog_api_client/v1/models/service_level_objective.rb index 29469e9e708c..e741c5e29923 100644 --- a/lib/datadog_api_client/v1/models/service_level_objective.rb +++ b/lib/datadog_api_client/v1/models/service_level_objective.rb @@ -102,6 +102,8 @@ class ServiceLevelObjective # threshold. attr_accessor :warning_threshold + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -166,12 +168,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ServiceLevelObjective` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ServiceLevelObjective`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -293,6 +297,26 @@ def type=(type) @type = type 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 @@ -316,6 +340,7 @@ def ==(o) timeframe == o.timeframe && type == o.type && warning_threshold == o.warning_threshold + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/service_level_objective_query.rb b/lib/datadog_api_client/v1/models/service_level_objective_query.rb index b2632ae7d6f2..3f86b9844711 100644 --- a/lib/datadog_api_client/v1/models/service_level_objective_query.rb +++ b/lib/datadog_api_client/v1/models/service_level_objective_query.rb @@ -29,6 +29,8 @@ class ServiceLevelObjectiveQuery # A Datadog metric query for good events. attr_reader :numerator + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -55,12 +57,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ServiceLevelObjectiveQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ServiceLevelObjectiveQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'denominator') @@ -101,6 +105,26 @@ def numerator=(numerator) @numerator = numerator 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 @@ -109,6 +133,7 @@ def ==(o) self.class == o.class && denominator == o.denominator && numerator == o.numerator + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/service_level_objective_request.rb b/lib/datadog_api_client/v1/models/service_level_objective_request.rb index e3c19901e41c..f3956fa964dd 100644 --- a/lib/datadog_api_client/v1/models/service_level_objective_request.rb +++ b/lib/datadog_api_client/v1/models/service_level_objective_request.rb @@ -76,6 +76,8 @@ class ServiceLevelObjectiveRequest # threshold. attr_accessor :warning_threshold + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -130,12 +132,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ServiceLevelObjectiveRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ServiceLevelObjectiveRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -235,6 +239,26 @@ def type=(type) @type = type 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 @@ -253,6 +277,7 @@ def ==(o) timeframe == o.timeframe && type == o.type && warning_threshold == o.warning_threshold + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/service_map_widget_definition.rb b/lib/datadog_api_client/v1/models/service_map_widget_definition.rb index 4b6b925a315d..34769809a8f5 100644 --- a/lib/datadog_api_client/v1/models/service_map_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/service_map_widget_definition.rb @@ -42,6 +42,8 @@ class ServiceMapWidgetDefinition # Type of the service map widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ServiceMapWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ServiceMapWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -163,6 +167,26 @@ def type=(type) @type = type 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 @@ -176,6 +200,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/service_summary_widget_definition.rb b/lib/datadog_api_client/v1/models/service_summary_widget_definition.rb index a5e1b8e8387c..b9ff308149e8 100644 --- a/lib/datadog_api_client/v1/models/service_summary_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/service_summary_widget_definition.rb @@ -69,6 +69,8 @@ class ServiceSummaryWidgetDefinition # Type of the service summary widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -123,12 +125,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ServiceSummaryWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ServiceSummaryWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'display_format') @@ -247,6 +251,26 @@ def type=(type) @type = type 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 @@ -269,6 +293,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard.rb b/lib/datadog_api_client/v1/models/shared_dashboard.rb index 5801466a5cc6..c02c0cd2930e 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard.rb @@ -54,6 +54,8 @@ class SharedDashboard # A unique token assigned to the shared dashboard. attr_accessor :token + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -109,12 +111,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboard` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboard`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author') @@ -195,6 +199,26 @@ def dashboard_type=(dashboard_type) @dashboard_type = dashboard_type 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 @@ -212,6 +236,7 @@ def ==(o) share_list == o.share_list && share_type == o.share_type && token == o.token + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_author.rb b/lib/datadog_api_client/v1/models/shared_dashboard_author.rb index 5d5423a7eb10..796081e3c291 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_author.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_author.rb @@ -27,6 +27,8 @@ class SharedDashboardAuthor # Name of the user who shared the dashboard. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardAuthor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboardAuthor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'handle') @@ -78,6 +82,26 @@ 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 @@ -86,6 +110,7 @@ def ==(o) self.class == o.class && handle == o.handle && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_invites.rb b/lib/datadog_api_client/v1/models/shared_dashboard_invites.rb index 03ad37ea6a4b..6269ae27e522 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_invites.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_invites.rb @@ -27,6 +27,8 @@ class SharedDashboardInvites # Pagination metadata returned by the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardInvites` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboardInvites`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -88,6 +92,26 @@ def data=(data) @data = data 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object.rb b/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object.rb index 980ce4fc5c12..3aa3b606a7d7 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object.rb @@ -27,6 +27,8 @@ class SharedDashboardInvitesDataObject # Type for shared dashboard invitation request body. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardInvitesDataObject` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboardInvitesDataObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object_attributes.rb b/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object_attributes.rb index 3078deb5ebe1..9da82a3a3ebb 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object_attributes.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_invites_data_object_attributes.rb @@ -39,6 +39,8 @@ class SharedDashboardInvitesDataObjectAttributes # The unique token of the shared dashboard that was (or is to be) shared. attr_accessor :share_token + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -114,6 +118,26 @@ 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 @@ -126,6 +150,7 @@ def ==(o) invitation_expiry == o.invitation_expiry && session_expiry == o.session_expiry && share_token == o.share_token + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta.rb b/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta.rb index bbe3028f494b..c1a1e3f932c9 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta.rb @@ -24,6 +24,8 @@ class SharedDashboardInvitesMeta # Object containing the total count of invitations across all pages attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardInvitesMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboardInvitesMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta_page.rb b/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta_page.rb index d9e0edee0103..5c28c587b8dd 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta_page.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_invites_meta_page.rb @@ -24,6 +24,8 @@ class SharedDashboardInvitesMetaPage # The total number of invitations on this shared board, across all pages. attr_accessor :total_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardInvitesMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboardInvitesMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_count') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && total_count == o.total_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb b/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb index c49ccb4f7fa3..c89bff78b589 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb @@ -36,6 +36,8 @@ class SharedDashboardUpdateRequest # Type of sharing access (either open to anyone who has the public URL or invite-only). attr_accessor :share_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -80,12 +82,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboardUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'global_time') @@ -113,6 +117,26 @@ 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 @@ -124,6 +148,7 @@ def ==(o) selectable_template_vars == o.selectable_template_vars && share_list == o.share_list && share_type == o.share_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_update_request_global_time.rb b/lib/datadog_api_client/v1/models/shared_dashboard_update_request_global_time.rb index 583f4ac40b60..8bd000a58323 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_update_request_global_time.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_update_request_global_time.rb @@ -24,6 +24,8 @@ class SharedDashboardUpdateRequestGlobalTime # Dashboard global time live_span selection attr_accessor :live_span + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardUpdateRequestGlobalTime` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SharedDashboardUpdateRequestGlobalTime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'live_span') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && live_span == o.live_span + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/signal_assignee_update_request.rb b/lib/datadog_api_client/v1/models/signal_assignee_update_request.rb index 5bd2f95585c7..bcb70583ca71 100644 --- a/lib/datadog_api_client/v1/models/signal_assignee_update_request.rb +++ b/lib/datadog_api_client/v1/models/signal_assignee_update_request.rb @@ -27,6 +27,8 @@ class SignalAssigneeUpdateRequest # Version of the updated signal. If server side version is higher, update will be rejected. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SignalAssigneeUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SignalAssigneeUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assignee') @@ -88,6 +92,26 @@ def assignee=(assignee) @assignee = assignee 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && assignee == o.assignee && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/signal_state_update_request.rb b/lib/datadog_api_client/v1/models/signal_state_update_request.rb index 2974fcc62822..e6c1faa7f3e4 100644 --- a/lib/datadog_api_client/v1/models/signal_state_update_request.rb +++ b/lib/datadog_api_client/v1/models/signal_state_update_request.rb @@ -33,6 +33,8 @@ class SignalStateUpdateRequest # Version of the updated signal. If server side version is higher, update will be rejected. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SignalStateUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SignalStateUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'archive_comment') @@ -106,6 +110,26 @@ def state=(state) @state = state 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 @@ -116,6 +140,7 @@ def ==(o) archive_reason == o.archive_reason && state == o.state && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slack_integration_channel.rb b/lib/datadog_api_client/v1/models/slack_integration_channel.rb index 7e0c2eb4c6ad..ce64e1d0c997 100644 --- a/lib/datadog_api_client/v1/models/slack_integration_channel.rb +++ b/lib/datadog_api_client/v1/models/slack_integration_channel.rb @@ -27,6 +27,8 @@ class SlackIntegrationChannel # Your channel name. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SlackIntegrationChannel` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SlackIntegrationChannel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'display') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && display == o.display && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb b/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb index 70d3981cf841..13fc7a57e4c0 100644 --- a/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb +++ b/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb @@ -33,6 +33,8 @@ class SlackIntegrationChannelDisplay # Show the scopes on which the monitor alerted. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SlackIntegrationChannelDisplay` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SlackIntegrationChannelDisplay`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'message') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) notified == o.notified && snapshot == o.snapshot && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_bulk_delete_error.rb b/lib/datadog_api_client/v1/models/slo_bulk_delete_error.rb index 6424e7665541..0ad679a11c2d 100644 --- a/lib/datadog_api_client/v1/models/slo_bulk_delete_error.rb +++ b/lib/datadog_api_client/v1/models/slo_bulk_delete_error.rb @@ -32,6 +32,8 @@ class SLOBulkDeleteError # or "all" if all thresholds are affected. attr_reader :timeframe + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -60,12 +62,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOBulkDeleteError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOBulkDeleteError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -121,6 +125,26 @@ def timeframe=(timeframe) @timeframe = timeframe 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 @@ -130,6 +154,7 @@ def ==(o) id == o.id && message == o.message && timeframe == o.timeframe + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_bulk_delete_response.rb b/lib/datadog_api_client/v1/models/slo_bulk_delete_response.rb index 1648faf851fd..acef6a716223 100644 --- a/lib/datadog_api_client/v1/models/slo_bulk_delete_response.rb +++ b/lib/datadog_api_client/v1/models/slo_bulk_delete_response.rb @@ -32,6 +32,8 @@ class SLOBulkDeleteResponse # Array of errors object returned. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOBulkDeleteResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOBulkDeleteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -77,6 +81,26 @@ 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 @@ -85,6 +109,7 @@ def ==(o) self.class == o.class && data == o.data && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_bulk_delete_response_data.rb b/lib/datadog_api_client/v1/models/slo_bulk_delete_response_data.rb index 177b7b10d92a..9a134e6c2963 100644 --- a/lib/datadog_api_client/v1/models/slo_bulk_delete_response_data.rb +++ b/lib/datadog_api_client/v1/models/slo_bulk_delete_response_data.rb @@ -30,6 +30,8 @@ class SLOBulkDeleteResponseData # threshold was deleted, but that were not completely deleted). attr_accessor :updated + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOBulkDeleteResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOBulkDeleteResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'deleted') @@ -77,6 +81,26 @@ 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 @@ -85,6 +109,7 @@ def ==(o) self.class == o.class && deleted == o.deleted && updated == o.updated + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction.rb b/lib/datadog_api_client/v1/models/slo_correction.rb index 99a256d88d88..d02c655042c1 100644 --- a/lib/datadog_api_client/v1/models/slo_correction.rb +++ b/lib/datadog_api_client/v1/models/slo_correction.rb @@ -30,6 +30,8 @@ class SLOCorrection # SLO correction resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrection` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_create_data.rb b/lib/datadog_api_client/v1/models/slo_correction_create_data.rb index 294b2827308a..ae8aff73e6d2 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_create_data.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_create_data.rb @@ -27,6 +27,8 @@ class SLOCorrectionCreateData # SLO correction resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ def type=(type) @type = type 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_create_request.rb b/lib/datadog_api_client/v1/models/slo_correction_create_request.rb index 259da8752782..d812b78a3f0e 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_create_request.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_create_request.rb @@ -24,6 +24,8 @@ class SLOCorrectionCreateRequest # The data object associated with the SLO correction to be created. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb b/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb index aa47cbfac72a..932773591e96 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb @@ -46,6 +46,8 @@ class SLOCorrectionCreateRequestAttributes # The timezone to display in the UI for the correction times (defaults to "UTC"). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -84,12 +86,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionCreateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'category') @@ -165,6 +169,26 @@ def start=(start) @start = start 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 @@ -179,6 +203,7 @@ def ==(o) slo_id == o.slo_id && start == o.start && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_list_response.rb b/lib/datadog_api_client/v1/models/slo_correction_list_response.rb index 10b115d65cda..dd2b4b93a279 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_list_response.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_list_response.rb @@ -27,6 +27,8 @@ class SLOCorrectionListResponse # Object describing meta attributes of response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_response.rb b/lib/datadog_api_client/v1/models/slo_correction_response.rb index f38f6cb45ef7..7025e9f3f1f6 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_response.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_response.rb @@ -24,6 +24,8 @@ class SLOCorrectionResponse # The response object of a list of SLO corrections. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb b/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb index af9440dc8786..a0760a143c76 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb @@ -58,6 +58,8 @@ class SLOCorrectionResponseAttributes # The timezone to display in the UI for the correction times (defaults to "UTC"). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -117,12 +119,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'category') @@ -174,6 +178,26 @@ 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 @@ -192,6 +216,7 @@ def ==(o) slo_id == o.slo_id && start == o.start && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_response_attributes_modifier.rb b/lib/datadog_api_client/v1/models/slo_correction_response_attributes_modifier.rb index c776bd9509a5..16f4982ef66b 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_response_attributes_modifier.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_response_attributes_modifier.rb @@ -30,6 +30,8 @@ class SLOCorrectionResponseAttributesModifier # Name of the Modifier. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionResponseAttributesModifier` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionResponseAttributesModifier`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) email == o.email && handle == o.handle && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_update_data.rb b/lib/datadog_api_client/v1/models/slo_correction_update_data.rb index 056e59377e5a..52d626cc512e 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_update_data.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_update_data.rb @@ -27,6 +27,8 @@ class SLOCorrectionUpdateData # SLO correction resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_update_request.rb b/lib/datadog_api_client/v1/models/slo_correction_update_request.rb index 4efff54b217e..e9648698fd90 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_update_request.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_update_request.rb @@ -24,6 +24,8 @@ class SLOCorrectionUpdateRequest # The data object associated with the SLO correction to be updated. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb b/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb index b63913f05b02..b1d6d96ed962 100644 --- a/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +++ b/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb @@ -43,6 +43,8 @@ class SLOCorrectionUpdateRequestAttributes # The timezone to display in the UI for the correction times (defaults to "UTC"). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -79,12 +81,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCorrectionUpdateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCorrectionUpdateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'category') @@ -116,6 +120,26 @@ 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 @@ -129,6 +153,7 @@ def ==(o) rrule == o.rrule && start == o.start && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_creator.rb b/lib/datadog_api_client/v1/models/slo_creator.rb index d1c09a13dac8..46982e91bbbd 100644 --- a/lib/datadog_api_client/v1/models/slo_creator.rb +++ b/lib/datadog_api_client/v1/models/slo_creator.rb @@ -30,6 +30,8 @@ class SLOCreator # Name of the creator. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCreator` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCreator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -87,6 +91,26 @@ 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 @@ -96,6 +120,7 @@ def ==(o) email == o.email && id == o.id && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_delete_response.rb b/lib/datadog_api_client/v1/models/slo_delete_response.rb index fa4180b38efb..9506524b462f 100644 --- a/lib/datadog_api_client/v1/models/slo_delete_response.rb +++ b/lib/datadog_api_client/v1/models/slo_delete_response.rb @@ -27,6 +27,8 @@ class SLODeleteResponse # An dictionary containing the ID of the SLO as key and a deletion error as value. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLODeleteResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLODeleteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_formula.rb b/lib/datadog_api_client/v1/models/slo_formula.rb index 6fee9a2d0ed1..2b644a77aeec 100644 --- a/lib/datadog_api_client/v1/models/slo_formula.rb +++ b/lib/datadog_api_client/v1/models/slo_formula.rb @@ -24,6 +24,8 @@ class SLOFormula # The formula string, which is an expression involving named queries. attr_reader :formula + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOFormula` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOFormula`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'formula') @@ -79,6 +83,26 @@ def formula=(formula) @formula = formula 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && formula == o.formula + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_metrics.rb b/lib/datadog_api_client/v1/models/slo_history_metrics.rb index 1a5adaac60aa..35b0c1e3d2e5 100644 --- a/lib/datadog_api_client/v1/models/slo_history_metrics.rb +++ b/lib/datadog_api_client/v1/models/slo_history_metrics.rb @@ -49,6 +49,8 @@ class SLOHistoryMetrics # An array of query timestamps in EPOCH milliseconds. attr_reader :times + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -87,12 +89,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryMetrics` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryMetrics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'denominator') @@ -214,6 +218,26 @@ def times=(times) @times = times 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 @@ -228,6 +252,7 @@ def ==(o) res_type == o.res_type && resp_version == o.resp_version && times == o.times + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb b/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb index 12b1a46e9023..b11529750d34 100644 --- a/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb +++ b/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb @@ -34,6 +34,8 @@ class SLOHistoryMetricsSeries # The query values for each metric. attr_reader :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryMetricsSeries` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryMetricsSeries`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -131,6 +135,26 @@ def values=(values) @values = values 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 @@ -141,6 +165,7 @@ def ==(o) metadata == o.metadata && sum == o.sum && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_metrics_series_metadata.rb b/lib/datadog_api_client/v1/models/slo_history_metrics_series_metadata.rb index d5eb8ac97484..3dd5cd9f9ce0 100644 --- a/lib/datadog_api_client/v1/models/slo_history_metrics_series_metadata.rb +++ b/lib/datadog_api_client/v1/models/slo_history_metrics_series_metadata.rb @@ -41,6 +41,8 @@ class SLOHistoryMetricsSeriesMetadata # If a metric query only has one unit object, the second array element is null. attr_accessor :unit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryMetricsSeriesMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryMetricsSeriesMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggr') @@ -118,6 +122,26 @@ 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 @@ -130,6 +154,7 @@ def ==(o) query_index == o.query_index && scope == o.scope && unit == o.unit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_metrics_series_metadata_unit.rb b/lib/datadog_api_client/v1/models/slo_history_metrics_series_metadata_unit.rb index 6e5a8b358ec1..c081d1b5cbbe 100644 --- a/lib/datadog_api_client/v1/models/slo_history_metrics_series_metadata_unit.rb +++ b/lib/datadog_api_client/v1/models/slo_history_metrics_series_metadata_unit.rb @@ -39,6 +39,8 @@ class SLOHistoryMetricsSeriesMetadataUnit # A shorter and abbreviated version of the metric unit, for instance `B`. attr_accessor :short_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -82,12 +84,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryMetricsSeriesMetadataUnit` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryMetricsSeriesMetadataUnit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'family') @@ -115,6 +119,26 @@ 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 @@ -127,6 +151,7 @@ def ==(o) plural == o.plural && scale_factor == o.scale_factor && short_name == o.short_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_monitor.rb b/lib/datadog_api_client/v1/models/slo_history_monitor.rb index 3c25dee43bae..502b96038c0b 100644 --- a/lib/datadog_api_client/v1/models/slo_history_monitor.rb +++ b/lib/datadog_api_client/v1/models/slo_history_monitor.rb @@ -65,6 +65,8 @@ class SLOHistoryMonitor # Use `sli_value` instead. attr_accessor :uptime + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -119,12 +121,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryMonitor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryMonitor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'error_budget_remaining') @@ -180,6 +184,26 @@ 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 @@ -198,6 +222,7 @@ def ==(o) sli_value == o.sli_value && span_precision == o.span_precision && uptime == o.uptime + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_response.rb b/lib/datadog_api_client/v1/models/slo_history_response.rb index f56b72506b3a..96dc823dd7ff 100644 --- a/lib/datadog_api_client/v1/models/slo_history_response.rb +++ b/lib/datadog_api_client/v1/models/slo_history_response.rb @@ -27,6 +27,8 @@ class SLOHistoryResponse # A list of errors while querying the history data for the service level objective. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -80,6 +84,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) self.class == o.class && data == o.data && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_response_data.rb b/lib/datadog_api_client/v1/models/slo_history_response_data.rb index 73ed7fae2c1f..ea60d8002d4a 100644 --- a/lib/datadog_api_client/v1/models/slo_history_response_data.rb +++ b/lib/datadog_api_client/v1/models/slo_history_response_data.rb @@ -62,6 +62,8 @@ class SLOHistoryResponseData # Ignored in create/update requests. attr_accessor :type_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -104,12 +106,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from_ts') @@ -159,6 +163,26 @@ 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 @@ -175,6 +199,7 @@ def ==(o) to_ts == o.to_ts && type == o.type && type_id == o.type_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_response_error.rb b/lib/datadog_api_client/v1/models/slo_history_response_error.rb index 6189efc30c1f..5478ed3b0e7d 100644 --- a/lib/datadog_api_client/v1/models/slo_history_response_error.rb +++ b/lib/datadog_api_client/v1/models/slo_history_response_error.rb @@ -24,6 +24,8 @@ class SLOHistoryResponseError # Human readable error. attr_accessor :error + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryResponseError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryResponseError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'error') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && error == o.error + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_response_error_with_type.rb b/lib/datadog_api_client/v1/models/slo_history_response_error_with_type.rb index 8674e45d310e..a51812d9bc05 100644 --- a/lib/datadog_api_client/v1/models/slo_history_response_error_with_type.rb +++ b/lib/datadog_api_client/v1/models/slo_history_response_error_with_type.rb @@ -27,6 +27,8 @@ class SLOHistoryResponseErrorWithType # Type of the error. attr_reader :error_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryResponseErrorWithType` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryResponseErrorWithType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'error_message') @@ -99,6 +103,26 @@ def error_type=(error_type) @error_type = error_type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && error_message == o.error_message && error_type == o.error_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_history_sli_data.rb b/lib/datadog_api_client/v1/models/slo_history_sli_data.rb index dacd34b0d13f..552f4a92c8af 100644 --- a/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +++ b/lib/datadog_api_client/v1/models/slo_history_sli_data.rb @@ -66,6 +66,8 @@ class SLOHistorySLIData # Use `sli_value` instead. attr_accessor :uptime + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -121,12 +123,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistorySLIData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistorySLIData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'error_budget_remaining') @@ -182,6 +186,26 @@ 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 @@ -200,6 +224,7 @@ def ==(o) sli_value == o.sli_value && span_precision == o.span_precision && uptime == o.uptime + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_list_response.rb b/lib/datadog_api_client/v1/models/slo_list_response.rb index 9d32567c5325..7510937525a8 100644 --- a/lib/datadog_api_client/v1/models/slo_list_response.rb +++ b/lib/datadog_api_client/v1/models/slo_list_response.rb @@ -31,6 +31,8 @@ class SLOListResponse # The metadata object containing additional information about the list of SLOs. attr_accessor :metadata + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -84,6 +88,26 @@ 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 @@ -93,6 +117,7 @@ def ==(o) data == o.data && errors == o.errors && metadata == o.metadata + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_list_response_metadata.rb b/lib/datadog_api_client/v1/models/slo_list_response_metadata.rb index edf3f6ccd87b..9f6559c3a010 100644 --- a/lib/datadog_api_client/v1/models/slo_list_response_metadata.rb +++ b/lib/datadog_api_client/v1/models/slo_list_response_metadata.rb @@ -24,6 +24,8 @@ class SLOListResponseMetadata # The object containing information about the pages of the list of SLOs. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_list_response_metadata_page.rb b/lib/datadog_api_client/v1/models/slo_list_response_metadata_page.rb index 05270469c2ca..8cd94a535172 100644 --- a/lib/datadog_api_client/v1/models/slo_list_response_metadata_page.rb +++ b/lib/datadog_api_client/v1/models/slo_list_response_metadata_page.rb @@ -27,6 +27,8 @@ class SLOListResponseMetadataPage # The total number of resources that match the parameters and filters in the request. This attribute can be used by a client to determine the total number of pages. attr_accessor :total_filtered_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListResponseMetadataPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListResponseMetadataPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && total_count == o.total_count && total_filtered_count == o.total_filtered_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb b/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb index b30b1af756eb..a3d5da46b603 100644 --- a/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb @@ -36,6 +36,8 @@ class SLOListWidgetDefinition # Type of the SLO List widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'requests') @@ -136,6 +140,26 @@ def type=(type) @type = type 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 @@ -147,6 +171,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_list_widget_query.rb b/lib/datadog_api_client/v1/models/slo_list_widget_query.rb index af131b44ad22..a991c4a2ad89 100644 --- a/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +++ b/lib/datadog_api_client/v1/models/slo_list_widget_query.rb @@ -30,6 +30,8 @@ class SLOListWidgetQuery # Options for sorting results. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListWidgetQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListWidgetQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'limit') @@ -114,6 +118,26 @@ def query_string=(query_string) @query_string = query_string 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 @@ -123,6 +147,7 @@ def ==(o) limit == o.limit && query_string == o.query_string && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_list_widget_request.rb b/lib/datadog_api_client/v1/models/slo_list_widget_request.rb index 1d6184385605..d4a0fd670953 100644 --- a/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +++ b/lib/datadog_api_client/v1/models/slo_list_widget_request.rb @@ -27,6 +27,8 @@ class SLOListWidgetRequest # Widget request type. attr_reader :request_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -99,6 +103,26 @@ def request_type=(request_type) @request_type = request_type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && query == o.query && request_type == o.request_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_overall_statuses.rb b/lib/datadog_api_client/v1/models/slo_overall_statuses.rb index e86bf22c6365..bb85be58c3d6 100644 --- a/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +++ b/lib/datadog_api_client/v1/models/slo_overall_statuses.rb @@ -50,6 +50,8 @@ class SLOOverallStatuses # or updating SLOs. It is only used when querying SLO history over custom timeframes. attr_accessor :timeframe + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -102,12 +104,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOOverallStatuses` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOOverallStatuses`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'error') @@ -147,6 +151,26 @@ 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 @@ -162,6 +186,7 @@ def ==(o) status == o.status && target == o.target && timeframe == o.timeframe + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb b/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb index 4c2b76209ec3..63444409c190 100644 --- a/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +++ b/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb @@ -27,6 +27,8 @@ class SLORawErrorBudgetRemaining # Error budget remaining value. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLORawErrorBudgetRemaining` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLORawErrorBudgetRemaining`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'unit') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && unit == o.unit && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_response.rb b/lib/datadog_api_client/v1/models/slo_response.rb index 58ad43517f8b..543d97f60194 100644 --- a/lib/datadog_api_client/v1/models/slo_response.rb +++ b/lib/datadog_api_client/v1/models/slo_response.rb @@ -29,6 +29,8 @@ class SLOResponse # used. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -55,12 +57,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && data == o.data && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_response_data.rb b/lib/datadog_api_client/v1/models/slo_response_data.rb index d049af5b2455..122c2d8374e6 100644 --- a/lib/datadog_api_client/v1/models/slo_response_data.rb +++ b/lib/datadog_api_client/v1/models/slo_response_data.rb @@ -105,6 +105,8 @@ class SLOResponseData # threshold. attr_accessor :warning_threshold + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -171,12 +173,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'configured_alert_ids') @@ -264,6 +268,26 @@ 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 @@ -288,6 +312,7 @@ def ==(o) timeframe == o.timeframe && type == o.type && warning_threshold == o.warning_threshold + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_status.rb b/lib/datadog_api_client/v1/models/slo_status.rb index 197a0452e74a..5115c94156e6 100644 --- a/lib/datadog_api_client/v1/models/slo_status.rb +++ b/lib/datadog_api_client/v1/models/slo_status.rb @@ -43,6 +43,8 @@ class SLOStatus # State of the SLO. attr_accessor :state + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -91,12 +93,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOStatus` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'calculation_error') @@ -128,6 +132,26 @@ 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 @@ -141,6 +165,7 @@ def ==(o) sli == o.sli && span_precision == o.span_precision && state == o.state + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_threshold.rb b/lib/datadog_api_client/v1/models/slo_threshold.rb index daf668760a36..76d43da00632 100644 --- a/lib/datadog_api_client/v1/models/slo_threshold.rb +++ b/lib/datadog_api_client/v1/models/slo_threshold.rb @@ -46,6 +46,8 @@ class SLOThreshold # Ignored in create/update requests. attr_accessor :warning_display + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOThreshold` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOThreshold`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'target') @@ -136,6 +140,26 @@ def timeframe=(timeframe) @timeframe = timeframe 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 @@ -147,6 +171,7 @@ def ==(o) timeframe == o.timeframe && warning == o.warning && warning_display == o.warning_display + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb b/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb index 80928f9aad42..81113ee13c77 100644 --- a/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +++ b/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb @@ -36,6 +36,8 @@ class SLOTimeSliceCondition # The threshold value to which each SLI value will be compared. attr_reader :threshold + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOTimeSliceCondition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOTimeSliceCondition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'comparator') @@ -131,6 +135,26 @@ def threshold=(threshold) @threshold = threshold 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 @@ -141,6 +165,7 @@ def ==(o) query == o.query && query_interval_seconds == o.query_interval_seconds && threshold == o.threshold + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_time_slice_query.rb b/lib/datadog_api_client/v1/models/slo_time_slice_query.rb index 8ffc733cc01d..bddd2640fe24 100644 --- a/lib/datadog_api_client/v1/models/slo_time_slice_query.rb +++ b/lib/datadog_api_client/v1/models/slo_time_slice_query.rb @@ -27,6 +27,8 @@ class SLOTimeSliceQuery # A list of queries that are used to calculate the SLI value. attr_reader :queries + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOTimeSliceQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOTimeSliceQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'formulas') @@ -111,6 +115,26 @@ def queries=(queries) @queries = queries 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 @@ -119,6 +143,7 @@ def ==(o) self.class == o.class && formulas == o.formulas && queries == o.queries + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/slo_widget_definition.rb b/lib/datadog_api_client/v1/models/slo_widget_definition.rb index 3502b8f3208b..f68ff8da4c2e 100644 --- a/lib/datadog_api_client/v1/models/slo_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/slo_widget_definition.rb @@ -54,6 +54,8 @@ class SLOWidgetDefinition # Type of view displayed by the widget. attr_reader :view_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'additional_query_filters') @@ -182,6 +186,26 @@ def view_type=(view_type) @view_type = view_type 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 @@ -199,6 +223,7 @@ def ==(o) type == o.type && view_mode == o.view_mode && view_type == o.view_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/split_config.rb b/lib/datadog_api_client/v1/models/split_config.rb index 8fcdf6de86a4..0faaab8b98bc 100644 --- a/lib/datadog_api_client/v1/models/split_config.rb +++ b/lib/datadog_api_client/v1/models/split_config.rb @@ -33,6 +33,8 @@ class SplitConfig # Manual selection of tags making split graph widget static attr_reader :static_splits + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SplitConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SplitConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'limit') @@ -159,6 +163,26 @@ def static_splits=(static_splits) @static_splits = static_splits 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 @@ -169,6 +193,7 @@ def ==(o) sort == o.sort && split_dimensions == o.split_dimensions && static_splits == o.static_splits + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/split_config_sort_compute.rb b/lib/datadog_api_client/v1/models/split_config_sort_compute.rb index 9f697bc6200f..c493e52c01bd 100644 --- a/lib/datadog_api_client/v1/models/split_config_sort_compute.rb +++ b/lib/datadog_api_client/v1/models/split_config_sort_compute.rb @@ -27,6 +27,8 @@ class SplitConfigSortCompute # The metric to use for sorting graphs. attr_reader :metric + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SplitConfigSortCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SplitConfigSortCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -99,6 +103,26 @@ def metric=(metric) @metric = metric 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && aggregation == o.aggregation && metric == o.metric + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/split_dimension.rb b/lib/datadog_api_client/v1/models/split_dimension.rb index 178d4309faaa..61a90b6ab3ea 100644 --- a/lib/datadog_api_client/v1/models/split_dimension.rb +++ b/lib/datadog_api_client/v1/models/split_dimension.rb @@ -24,6 +24,8 @@ class SplitDimension # The system interprets this attribute differently depending on the data source of the query being split. For metrics, it's a tag. For the events platform, it's an attribute or tag. attr_reader :one_graph_per + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SplitDimension` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SplitDimension`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'one_graph_per') @@ -79,6 +83,26 @@ def one_graph_per=(one_graph_per) @one_graph_per = one_graph_per 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && one_graph_per == o.one_graph_per + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb b/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb index d4d873aaa646..6a1ed28c0ed9 100644 --- a/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb @@ -42,6 +42,8 @@ class SplitGraphWidgetDefinition # Type of the split graph widget attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SplitGraphWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SplitGraphWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'has_uniform_y_axes') @@ -166,6 +170,26 @@ def type=(type) @type = type 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 @@ -179,6 +203,7 @@ def ==(o) time == o.time && title == o.title && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/split_sort.rb b/lib/datadog_api_client/v1/models/split_sort.rb index eb5b43c9eb85..0e5887a516b7 100644 --- a/lib/datadog_api_client/v1/models/split_sort.rb +++ b/lib/datadog_api_client/v1/models/split_sort.rb @@ -27,6 +27,8 @@ class SplitSort # Widget sorting methods. attr_reader :order + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SplitSort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SplitSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -88,6 +92,26 @@ def order=(order) @order = order 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && compute == o.compute && order == o.order + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/split_vector_entry_item.rb b/lib/datadog_api_client/v1/models/split_vector_entry_item.rb index 9bfbb04510a0..58e01ddde2c3 100644 --- a/lib/datadog_api_client/v1/models/split_vector_entry_item.rb +++ b/lib/datadog_api_client/v1/models/split_vector_entry_item.rb @@ -27,6 +27,8 @@ class SplitVectorEntryItem # The tag values. attr_reader :tag_values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SplitVectorEntryItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SplitVectorEntryItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tag_key') @@ -105,6 +109,26 @@ def tag_values=(tag_values) @tag_values = tag_values 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 @@ -113,6 +137,7 @@ def ==(o) self.class == o.class && tag_key == o.tag_key && tag_values == o.tag_values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/successful_signal_update_response.rb b/lib/datadog_api_client/v1/models/successful_signal_update_response.rb index f78819717c9c..62092291bf93 100644 --- a/lib/datadog_api_client/v1/models/successful_signal_update_response.rb +++ b/lib/datadog_api_client/v1/models/successful_signal_update_response.rb @@ -24,6 +24,8 @@ class SuccessfulSignalUpdateResponse # Status of the response. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SuccessfulSignalUpdateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SuccessfulSignalUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'status') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/sunburst_widget_definition.rb b/lib/datadog_api_client/v1/models/sunburst_widget_definition.rb index 3efca70d8d40..c852479d5956 100644 --- a/lib/datadog_api_client/v1/models/sunburst_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/sunburst_widget_definition.rb @@ -48,6 +48,8 @@ class SunburstWidgetDefinition # Type of the Sunburst widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SunburstWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SunburstWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -170,6 +174,26 @@ def type=(type) @type = type 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 @@ -185,6 +209,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/sunburst_widget_legend_inline_automatic.rb b/lib/datadog_api_client/v1/models/sunburst_widget_legend_inline_automatic.rb index 0f0bce0a0c89..cbe859c35fd0 100644 --- a/lib/datadog_api_client/v1/models/sunburst_widget_legend_inline_automatic.rb +++ b/lib/datadog_api_client/v1/models/sunburst_widget_legend_inline_automatic.rb @@ -30,6 +30,8 @@ class SunburstWidgetLegendInlineAutomatic # Whether to show the legend inline or let it be automatically generated. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SunburstWidgetLegendInlineAutomatic` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SunburstWidgetLegendInlineAutomatic`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hide_percent') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) hide_percent == o.hide_percent && hide_value == o.hide_value && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/sunburst_widget_legend_table.rb b/lib/datadog_api_client/v1/models/sunburst_widget_legend_table.rb index 82e364b886ca..8111b506b911 100644 --- a/lib/datadog_api_client/v1/models/sunburst_widget_legend_table.rb +++ b/lib/datadog_api_client/v1/models/sunburst_widget_legend_table.rb @@ -24,6 +24,8 @@ class SunburstWidgetLegendTable # Whether or not to show a table legend. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SunburstWidgetLegendTable` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SunburstWidgetLegendTable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -79,6 +83,26 @@ def type=(type) @type = type 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/sunburst_widget_request.rb b/lib/datadog_api_client/v1/models/sunburst_widget_request.rb index dfa10c4409bf..a30a1170fa4b 100644 --- a/lib/datadog_api_client/v1/models/sunburst_widget_request.rb +++ b/lib/datadog_api_client/v1/models/sunburst_widget_request.rb @@ -63,6 +63,8 @@ class SunburstWidgetRequest # Widget style definition. attr_accessor :style + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -113,12 +115,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SunburstWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SunburstWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_query') @@ -182,6 +186,26 @@ 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 @@ -202,6 +226,7 @@ def ==(o) rum_query == o.rum_query && security_query == o.security_query && style == o.style + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test.rb b/lib/datadog_api_client/v1/models/synthetics_api_test.rb index a844c6bb3cb8..df1e78421023 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test.rb @@ -56,6 +56,8 @@ class SyntheticsAPITest # Type of the Synthetic test, `api`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -100,12 +102,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'config') @@ -230,6 +234,26 @@ def type=(type) @type = type 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 @@ -247,6 +271,7 @@ def ==(o) subtype == o.subtype && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb index 49b395c3a8b7..6f08c5c20930 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb @@ -36,6 +36,8 @@ class SyntheticsAPITestConfig # Variables defined from JavaScript code. attr_accessor :variables_from_script + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITestConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITestConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assertions') @@ -103,6 +107,26 @@ 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 @@ -114,6 +138,7 @@ def ==(o) request == o.request && steps == o.steps && variables_from_script == o.variables_from_script + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_result_data.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_result_data.rb index f79288a948ce..0982652e0d99 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_result_data.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_result_data.rb @@ -49,6 +49,8 @@ class SyntheticsAPITestResultData # See the [Synthetic Monitoring Metrics documentation](https://docs.datadoghq.com/synthetics/metrics/). attr_accessor :timings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -89,12 +91,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITestResultData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITestResultData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cert') @@ -134,6 +138,26 @@ 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 @@ -149,6 +173,7 @@ def ==(o) response_headers == o.response_headers && response_size == o.response_size && timings == o.timings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_result_failure.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_result_failure.rb index 3acda46e8505..1872dc2d4d76 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_result_failure.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_result_failure.rb @@ -27,6 +27,8 @@ class SyntheticsApiTestResultFailure # The API test error message. attr_accessor :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsApiTestResultFailure` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsApiTestResultFailure`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && code == o.code && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_result_full.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_result_full.rb index 6918f736cdc9..17e74517e95d 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_result_full.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_result_full.rb @@ -45,6 +45,8 @@ class SyntheticsAPITestResultFull # * `2` for no data attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITestResultFull` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITestResultFull`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'check') @@ -118,6 +122,26 @@ 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 @@ -131,6 +155,7 @@ def ==(o) result == o.result && result_id == o.result_id && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_result_full_check.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_result_full_check.rb index 0b12757f6ad7..30d8a36cab36 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_result_full_check.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_result_full_check.rb @@ -24,6 +24,8 @@ class SyntheticsAPITestResultFullCheck # Configuration object for a Synthetic test. attr_reader :config + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITestResultFullCheck` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITestResultFullCheck`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'config') @@ -79,6 +83,26 @@ def config=(config) @config = config 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && config == o.config + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_result_short.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_result_short.rb index a6252d28ae47..e9f07e890958 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_result_short.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_result_short.rb @@ -39,6 +39,8 @@ class SyntheticsAPITestResultShort # * `2` for no data attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITestResultShort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITestResultShort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'check_time') @@ -100,6 +104,26 @@ 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 @@ -111,6 +135,7 @@ def ==(o) result == o.result && result_id == o.result_id && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_result_short_result.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_result_short_result.rb index 73fec7f242f3..4e0c7b38b619 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_result_short_result.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_result_short_result.rb @@ -28,6 +28,8 @@ class SyntheticsAPITestResultShortResult # See the [Synthetic Monitoring Metrics documentation](https://docs.datadoghq.com/synthetics/metrics/). attr_accessor :timings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITestResultShortResult` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITestResultShortResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'passed') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && passed == o.passed && timings == o.timings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_test_step.rb b/lib/datadog_api_client/v1/models/synthetics_api_test_step.rb index 0b2b818b80dd..fa982af91532 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_test_step.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_test_step.rb @@ -46,6 +46,8 @@ class SyntheticsAPITestStep # The subtype of the Synthetic multi-step API test step. attr_reader :subtype + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -84,12 +86,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITestStep` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITestStep`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'allow_failure') @@ -180,6 +184,26 @@ def subtype=(subtype) @subtype = subtype 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 @@ -194,6 +218,7 @@ def ==(o) request == o.request && _retry == o._retry && subtype == o.subtype + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_api_wait_step.rb b/lib/datadog_api_client/v1/models/synthetics_api_wait_step.rb index e2764eb7157d..12fbaf017163 100644 --- a/lib/datadog_api_client/v1/models/synthetics_api_wait_step.rb +++ b/lib/datadog_api_client/v1/models/synthetics_api_wait_step.rb @@ -30,6 +30,8 @@ class SyntheticsAPIWaitStep # The time to wait in seconds. Minimum value: 0. Maximum value: 180. attr_reader :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPIWaitStep` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPIWaitStep`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -127,6 +131,26 @@ def value=(value) @value = value 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 @@ -136,6 +160,7 @@ def ==(o) name == o.name && subtype == o.subtype && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb index 876672658139..2b0fca21d455 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb @@ -30,6 +30,8 @@ class SyntheticsAssertionBodyHashTarget # Type of the assertion. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionBodyHashTarget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionBodyHashTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'operator') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) operator == o.operator && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target.rb index 3ea300b3b759..db22cd710656 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target.rb @@ -33,6 +33,8 @@ class SyntheticsAssertionJSONPathTarget # Type of the assertion. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionJSONPathTarget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionJSONPathTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'operator') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) property == o.property && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb index d09d213291e7..daac817ae801 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb @@ -33,6 +33,8 @@ class SyntheticsAssertionJSONPathTargetTarget # The path target value to compare to. attr_accessor :target_value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionJSONPathTargetTarget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionJSONPathTargetTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elements_operator') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) json_path == o.json_path && operator == o.operator && target_value == o.target_value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target.rb index c17e068ef8c1..a7e05af987e0 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target.rb @@ -30,6 +30,8 @@ class SyntheticsAssertionJSONSchemaTarget # Type of the assertion. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaTarget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'operator') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) operator == o.operator && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target_target.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target_target.rb index 6ce083469a7f..f94455b39a79 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target_target.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_json_schema_target_target.rb @@ -27,6 +27,8 @@ class SyntheticsAssertionJSONSchemaTargetTarget # The JSON Schema meta-schema version used in the assertion. attr_accessor :meta_schema + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaTargetTarget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaTargetTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'json_schema') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && json_schema == o.json_schema && meta_schema == o.meta_schema + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb index c15490e855f3..72a7c774cab8 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb @@ -36,6 +36,8 @@ class SyntheticsAssertionTarget # Type of the assertion. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionTarget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'operator') @@ -137,6 +141,26 @@ def type=(type) @type = type 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 @@ -148,6 +172,7 @@ def ==(o) target == o.target && timings_scope == o.timings_scope && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target.rb index 8275951c8cb1..7dd7fff4ba1d 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target.rb @@ -33,6 +33,8 @@ class SyntheticsAssertionXPathTarget # Type of the assertion. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionXPathTarget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionXPathTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'operator') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) property == o.property && target == o.target && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb index 86ab326c0204..5855865fc4e4 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb @@ -30,6 +30,8 @@ class SyntheticsAssertionXPathTargetTarget # The X path to assert. attr_accessor :x_path + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionXPathTargetTarget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionXPathTargetTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'operator') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) operator == o.operator && target_value == o.target_value && x_path == o.x_path + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb b/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb index e99478615a16..1b01b2349513 100644 --- a/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +++ b/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb @@ -30,6 +30,8 @@ class SyntheticsBasicAuthDigest # Username to use for the digest authentication. attr_reader :username + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBasicAuthDigest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBasicAuthDigest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'password') @@ -119,6 +123,26 @@ def username=(username) @username = username 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 @@ -128,6 +152,7 @@ def ==(o) password == o.password && type == o.type && username == o.username + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_basic_auth_ntlm.rb b/lib/datadog_api_client/v1/models/synthetics_basic_auth_ntlm.rb index a224bd9d4aa1..4d5440628c08 100644 --- a/lib/datadog_api_client/v1/models/synthetics_basic_auth_ntlm.rb +++ b/lib/datadog_api_client/v1/models/synthetics_basic_auth_ntlm.rb @@ -36,6 +36,8 @@ class SyntheticsBasicAuthNTLM # Workstation for the authentication to use when performing the test. attr_accessor :workstation + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBasicAuthNTLM` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBasicAuthNTLM`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'domain') @@ -115,6 +119,26 @@ def type=(type) @type = type 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 @@ -126,6 +150,7 @@ def ==(o) type == o.type && username == o.username && workstation == o.workstation + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_client.rb b/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_client.rb index cb7e71c1b124..c21ca679ea0b 100644 --- a/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_client.rb +++ b/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_client.rb @@ -45,6 +45,8 @@ class SyntheticsBasicAuthOauthClient # The type of basic authentication to use when performing the test. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBasicAuthOauthClient` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBasicAuthOauthClient`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'access_token_url') @@ -186,6 +190,26 @@ def type=(type) @type = type 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 @@ -200,6 +224,7 @@ def ==(o) scope == o.scope && token_api_authentication == o.token_api_authentication && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_rop.rb b/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_rop.rb index 8e36ae8083b3..0ac31038dacb 100644 --- a/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_rop.rb +++ b/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_rop.rb @@ -51,6 +51,8 @@ class SyntheticsBasicAuthOauthROP # Username to use when performing the authentication. attr_reader :username + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBasicAuthOauthROP` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBasicAuthOauthROP`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'access_token_url') @@ -204,6 +208,26 @@ def username=(username) @username = username 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 @@ -220,6 +244,7 @@ def ==(o) token_api_authentication == o.token_api_authentication && type == o.type && username == o.username + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_basic_auth_sigv4.rb b/lib/datadog_api_client/v1/models/synthetics_basic_auth_sigv4.rb index 1f9d60cbe38b..436bdcb50ee2 100644 --- a/lib/datadog_api_client/v1/models/synthetics_basic_auth_sigv4.rb +++ b/lib/datadog_api_client/v1/models/synthetics_basic_auth_sigv4.rb @@ -39,6 +39,8 @@ class SyntheticsBasicAuthSigv4 # The type of authentication to use when performing the test. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBasicAuthSigv4` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBasicAuthSigv4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'access_key') @@ -146,6 +150,26 @@ def type=(type) @type = type 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 @@ -158,6 +182,7 @@ def ==(o) service_name == o.service_name && session_token == o.session_token && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_basic_auth_web.rb b/lib/datadog_api_client/v1/models/synthetics_basic_auth_web.rb index 965b49feb424..2681cb027ca3 100644 --- a/lib/datadog_api_client/v1/models/synthetics_basic_auth_web.rb +++ b/lib/datadog_api_client/v1/models/synthetics_basic_auth_web.rb @@ -30,6 +30,8 @@ class SyntheticsBasicAuthWeb # Username to use for the basic authentication. attr_reader :username + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBasicAuthWeb` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBasicAuthWeb`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'password') @@ -108,6 +112,26 @@ def username=(username) @username = username 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 @@ -117,6 +141,7 @@ def ==(o) password == o.password && type == o.type && username == o.username + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_batch_details.rb b/lib/datadog_api_client/v1/models/synthetics_batch_details.rb index 3a57754b14a6..648712d095eb 100644 --- a/lib/datadog_api_client/v1/models/synthetics_batch_details.rb +++ b/lib/datadog_api_client/v1/models/synthetics_batch_details.rb @@ -24,6 +24,8 @@ class SyntheticsBatchDetails # Wrapper object that contains the details of a batch. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBatchDetails` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBatchDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb b/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb index 51cbd6c35b18..37cca7178799 100644 --- a/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb +++ b/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb @@ -30,6 +30,8 @@ class SyntheticsBatchDetailsData # Determines whether or not the batch has passed, failed, or is in progress. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBatchDetailsData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBatchDetailsData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'metadata') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) metadata == o.metadata && results == o.results && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_batch_result.rb b/lib/datadog_api_client/v1/models/synthetics_batch_result.rb index d50489c85d9c..87c110dcbe11 100644 --- a/lib/datadog_api_client/v1/models/synthetics_batch_result.rb +++ b/lib/datadog_api_client/v1/models/synthetics_batch_result.rb @@ -51,6 +51,8 @@ class SyntheticsBatchResult # Type of the Synthetic test, either `api` or `browser`. attr_accessor :test_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBatchResult` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBatchResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'device') @@ -142,6 +146,26 @@ 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 @@ -158,6 +182,7 @@ def ==(o) test_name == o.test_name && test_public_id == o.test_public_id && test_type == o.test_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_error.rb b/lib/datadog_api_client/v1/models/synthetics_browser_error.rb index 0fde018a1e34..88c31cd7d319 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_error.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_error.rb @@ -33,6 +33,8 @@ class SyntheticsBrowserError # Error type returned by a browser test. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -128,6 +132,26 @@ def type=(type) @type = type 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 @@ -138,6 +162,7 @@ def ==(o) name == o.name && status == o.status && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test.rb index 5514e33260cf..801bed09dd7f 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test.rb @@ -55,6 +55,8 @@ class SyntheticsBrowserTest # Type of the Synthetic test, `browser`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -99,12 +101,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'config') @@ -231,6 +235,26 @@ def type=(type) @type = type 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 @@ -248,6 +272,7 @@ def ==(o) steps == o.steps && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test_config.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test_config.rb index 466cec4d850f..fd59d269510d 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test_config.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test_config.rb @@ -36,6 +36,8 @@ class SyntheticsBrowserTestConfig # Array of variables used for the test steps. attr_accessor :variables + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTestConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTestConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assertions') @@ -132,6 +136,26 @@ def request=(request) @request = request 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 @@ -143,6 +167,7 @@ def ==(o) request == o.request && set_cookie == o.set_cookie && variables == o.variables + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_data.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_data.rb index 04945e7e3d54..1b941f077ae1 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_data.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_data.rb @@ -58,6 +58,8 @@ class SyntheticsBrowserTestResultData # reaching the start URL. attr_accessor :time_to_interactive + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -104,12 +106,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTestResultData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTestResultData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'browser_type') @@ -163,6 +167,26 @@ 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 @@ -181,6 +205,7 @@ def ==(o) step_details == o.step_details && thumbnails_bucket_key == o.thumbnails_bucket_key && time_to_interactive == o.time_to_interactive + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_failure.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_failure.rb index 574be184ccc3..6f0dcf3ac49d 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_failure.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_failure.rb @@ -27,6 +27,8 @@ class SyntheticsBrowserTestResultFailure # The browser test error message. attr_accessor :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTestResultFailure` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTestResultFailure`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && code == o.code && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_full.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_full.rb index 0fc6e18b2149..a8d03fc7ede7 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_full.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_full.rb @@ -45,6 +45,8 @@ class SyntheticsBrowserTestResultFull # * `2` for no data attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTestResultFull` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTestResultFull`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'check') @@ -118,6 +122,26 @@ 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 @@ -131,6 +155,7 @@ def ==(o) result == o.result && result_id == o.result_id && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_full_check.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_full_check.rb index bf48c8f3644a..4e6d662a3ba9 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_full_check.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_full_check.rb @@ -24,6 +24,8 @@ class SyntheticsBrowserTestResultFullCheck # Configuration object for a Synthetic test. attr_reader :config + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTestResultFullCheck` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTestResultFullCheck`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'config') @@ -79,6 +83,26 @@ def config=(config) @config = config 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && config == o.config + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_short.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_short.rb index abb056195066..b3fc5a63a8bd 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_short.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_short.rb @@ -39,6 +39,8 @@ class SyntheticsBrowserTestResultShort # * `2` for no data attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTestResultShort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTestResultShort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'check_time') @@ -100,6 +104,26 @@ 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 @@ -111,6 +135,7 @@ def ==(o) result == o.result && result_id == o.result_id && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_short_result.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_short_result.rb index f88eb20e16ce..2d83e02c04ca 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test_result_short_result.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test_result_short_result.rb @@ -36,6 +36,8 @@ class SyntheticsBrowserTestResultShortResult # Total amount of browser test steps. attr_accessor :step_count_total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTestResultShortResult` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTestResultShortResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'device') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) error_count == o.error_count && step_count_completed == o.step_count_completed && step_count_total == o.step_count_total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_test_rum_settings.rb b/lib/datadog_api_client/v1/models/synthetics_browser_test_rum_settings.rb index 2e381aacbffb..3b827b789d90 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_test_rum_settings.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_test_rum_settings.rb @@ -40,6 +40,8 @@ class SyntheticsBrowserTestRumSettings # Determines whether RUM data is collected during test runs. attr_reader :is_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserTestRumSettings` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserTestRumSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'application_id') @@ -107,6 +111,26 @@ def is_enabled=(is_enabled) @is_enabled = is_enabled 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 @@ -116,6 +140,7 @@ def ==(o) application_id == o.application_id && client_token_id == o.client_token_id && is_enabled == o.is_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_browser_variable.rb b/lib/datadog_api_client/v1/models/synthetics_browser_variable.rb index 5751da5d05e3..e8653f1a5cc7 100644 --- a/lib/datadog_api_client/v1/models/synthetics_browser_variable.rb +++ b/lib/datadog_api_client/v1/models/synthetics_browser_variable.rb @@ -40,6 +40,8 @@ class SyntheticsBrowserVariable # Type of browser test variable. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -74,12 +76,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBrowserVariable` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBrowserVariable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'example') @@ -136,6 +140,26 @@ def type=(type) @type = type 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 @@ -148,6 +172,7 @@ def ==(o) pattern == o.pattern && secure == o.secure && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata.rb b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata.rb index 65b999944bec..dc328ea6f048 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata.rb @@ -27,6 +27,8 @@ class SyntheticsCIBatchMetadata # Git information. attr_accessor :git + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCIBatchMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCIBatchMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'ci') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && ci == o.ci && git == o.git + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_ci.rb b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_ci.rb index 5b89644827c5..f85c53267947 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_ci.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_ci.rb @@ -27,6 +27,8 @@ class SyntheticsCIBatchMetadataCI # Description of the CI provider. attr_accessor :provider + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataCI` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataCI`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pipeline') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && pipeline == o.pipeline && provider == o.provider + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_git.rb b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_git.rb index ea01a4d5ee1b..063f52d8634a 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_git.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_git.rb @@ -27,6 +27,8 @@ class SyntheticsCIBatchMetadataGit # The commit SHA. attr_accessor :commit_sha + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataGit` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataGit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'branch') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && branch == o.branch && commit_sha == o.commit_sha + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_pipeline.rb b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_pipeline.rb index 5a571be564f4..fadb70de3feb 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_pipeline.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_pipeline.rb @@ -24,6 +24,8 @@ class SyntheticsCIBatchMetadataPipeline # URL of the pipeline. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataPipeline` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataPipeline`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'url') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_provider.rb b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_provider.rb index 4e0682584e31..042c8411f5ab 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_provider.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ci_batch_metadata_provider.rb @@ -24,6 +24,8 @@ class SyntheticsCIBatchMetadataProvider # Name of the CI provider. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataProvider` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataProvider`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ci_test.rb b/lib/datadog_api_client/v1/models/synthetics_ci_test.rb index 17be3dfe1afd..445a639d6155 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ci_test.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ci_test.rb @@ -63,6 +63,8 @@ class SyntheticsCITest # Variables to replace in the test. attr_accessor :variables + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -113,12 +115,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCITest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCITest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'allow_insecure_certificates') @@ -200,6 +204,26 @@ def public_id=(public_id) @public_id = public_id 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 @@ -220,6 +244,7 @@ def ==(o) _retry == o._retry && start_url == o.start_url && variables == o.variables + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ci_test_body.rb b/lib/datadog_api_client/v1/models/synthetics_ci_test_body.rb index 69e02dfeffcf..74cf519d7fb8 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ci_test_body.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ci_test_body.rb @@ -24,6 +24,8 @@ class SyntheticsCITestBody # Individual synthetics test. attr_accessor :tests + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCITestBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCITestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tests') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && tests == o.tests + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_config_variable.rb b/lib/datadog_api_client/v1/models/synthetics_config_variable.rb index fba36d37c678..d5750f961425 100644 --- a/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +++ b/lib/datadog_api_client/v1/models/synthetics_config_variable.rb @@ -39,6 +39,8 @@ class SyntheticsConfigVariable # Type of the configuration variable. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsConfigVariable` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsConfigVariable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'example') @@ -135,6 +139,26 @@ def type=(type) @type = type 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 @@ -147,6 +171,7 @@ def ==(o) pattern == o.pattern && secure == o.secure && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_core_web_vitals.rb b/lib/datadog_api_client/v1/models/synthetics_core_web_vitals.rb index b65058e024f9..de6e4c14eaab 100644 --- a/lib/datadog_api_client/v1/models/synthetics_core_web_vitals.rb +++ b/lib/datadog_api_client/v1/models/synthetics_core_web_vitals.rb @@ -30,6 +30,8 @@ class SyntheticsCoreWebVitals # URL attached to the metrics. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCoreWebVitals` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCoreWebVitals`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cls') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) cls == o.cls && lcp == o.lcp && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_delete_tests_payload.rb b/lib/datadog_api_client/v1/models/synthetics_delete_tests_payload.rb index c202ac5df338..1f6048416b0e 100644 --- a/lib/datadog_api_client/v1/models/synthetics_delete_tests_payload.rb +++ b/lib/datadog_api_client/v1/models/synthetics_delete_tests_payload.rb @@ -29,6 +29,8 @@ class SyntheticsDeleteTestsPayload # An array of Synthetic test IDs you want to delete. attr_accessor :public_ids + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -55,12 +57,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsDeleteTestsPayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsDeleteTestsPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'force_delete_dependencies') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && force_delete_dependencies == o.force_delete_dependencies && public_ids == o.public_ids + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_delete_tests_response.rb b/lib/datadog_api_client/v1/models/synthetics_delete_tests_response.rb index 4a20877d4880..ae480c6978d4 100644 --- a/lib/datadog_api_client/v1/models/synthetics_delete_tests_response.rb +++ b/lib/datadog_api_client/v1/models/synthetics_delete_tests_response.rb @@ -25,6 +25,8 @@ class SyntheticsDeleteTestsResponse # the associated deletion timestamp. attr_accessor :deleted_tests + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsDeleteTestsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsDeleteTestsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'deleted_tests') @@ -64,6 +68,26 @@ 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 @@ -71,6 +95,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && deleted_tests == o.deleted_tests + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_deleted_test.rb b/lib/datadog_api_client/v1/models/synthetics_deleted_test.rb index 88c3de0ffb18..f5addad320c3 100644 --- a/lib/datadog_api_client/v1/models/synthetics_deleted_test.rb +++ b/lib/datadog_api_client/v1/models/synthetics_deleted_test.rb @@ -28,6 +28,8 @@ class SyntheticsDeletedTest # The Synthetic test ID deleted. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsDeletedTest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsDeletedTest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'deleted_at') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && deleted_at == o.deleted_at && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_device.rb b/lib/datadog_api_client/v1/models/synthetics_device.rb index 39967781a0bc..83b6598e78ed 100644 --- a/lib/datadog_api_client/v1/models/synthetics_device.rb +++ b/lib/datadog_api_client/v1/models/synthetics_device.rb @@ -36,6 +36,8 @@ class SyntheticsDevice # Screen width of the device. attr_reader :width + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsDevice` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsDevice`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'height') @@ -148,6 +152,26 @@ def width=(width) @width = width 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 @@ -159,6 +183,7 @@ def ==(o) is_mobile == o.is_mobile && name == o.name && width == o.width + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_get_api_test_latest_results_response.rb b/lib/datadog_api_client/v1/models/synthetics_get_api_test_latest_results_response.rb index cc12efa1de84..a2b2ad685f21 100644 --- a/lib/datadog_api_client/v1/models/synthetics_get_api_test_latest_results_response.rb +++ b/lib/datadog_api_client/v1/models/synthetics_get_api_test_latest_results_response.rb @@ -27,6 +27,8 @@ class SyntheticsGetAPITestLatestResultsResponse # Result of the latest API test run. attr_accessor :results + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGetAPITestLatestResultsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGetAPITestLatestResultsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'last_timestamp_fetched') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && last_timestamp_fetched == o.last_timestamp_fetched && results == o.results + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_get_browser_test_latest_results_response.rb b/lib/datadog_api_client/v1/models/synthetics_get_browser_test_latest_results_response.rb index eae1264a0503..6fef6a63b7c9 100644 --- a/lib/datadog_api_client/v1/models/synthetics_get_browser_test_latest_results_response.rb +++ b/lib/datadog_api_client/v1/models/synthetics_get_browser_test_latest_results_response.rb @@ -27,6 +27,8 @@ class SyntheticsGetBrowserTestLatestResultsResponse # Result of the latest browser test run. attr_accessor :results + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGetBrowserTestLatestResultsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGetBrowserTestLatestResultsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'last_timestamp_fetched') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && last_timestamp_fetched == o.last_timestamp_fetched && results == o.results + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable.rb index 59fe1f46d5cf..84f6281ab5cd 100644 --- a/lib/datadog_api_client/v1/models/synthetics_global_variable.rb +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable.rb @@ -51,6 +51,8 @@ class SyntheticsGlobalVariable # Value of the global variable. attr_reader :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGlobalVariable` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGlobalVariable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -195,6 +199,26 @@ def value=(value) @value = value 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 @@ -211,6 +235,7 @@ def ==(o) parse_test_public_id == o.parse_test_public_id && tags == o.tags && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable_attributes.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable_attributes.rb index 9f0f98e9cec0..b252f42df586 100644 --- a/lib/datadog_api_client/v1/models/synthetics_global_variable_attributes.rb +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable_attributes.rb @@ -24,6 +24,8 @@ class SyntheticsGlobalVariableAttributes # A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. attr_accessor :restricted_roles + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGlobalVariableAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGlobalVariableAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'restricted_roles') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && restricted_roles == o.restricted_roles + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable_options.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable_options.rb index 1c0fd22b504d..853599eaac12 100644 --- a/lib/datadog_api_client/v1/models/synthetics_global_variable_options.rb +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable_options.rb @@ -24,6 +24,8 @@ class SyntheticsGlobalVariableOptions # Parameters for the TOTP/MFA variable attr_accessor :totp_parameters + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGlobalVariableOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGlobalVariableOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'totp_parameters') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && totp_parameters == o.totp_parameters + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb index d3335f651c88..1342ca59bd8e 100644 --- a/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb @@ -33,6 +33,8 @@ class SyntheticsGlobalVariableParseTestOptions # Property of the Synthetic Test Response to use for a Synthetic global variable. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'field') @@ -106,6 +110,26 @@ def type=(type) @type = type 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 @@ -116,6 +140,7 @@ def ==(o) local_variable_name == o.local_variable_name && parser == o.parser && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable_request.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable_request.rb index e3c35aecfef6..55b914924c68 100644 --- a/lib/datadog_api_client/v1/models/synthetics_global_variable_request.rb +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable_request.rb @@ -51,6 +51,8 @@ class SyntheticsGlobalVariableRequest # Value of the global variable. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGlobalVariableRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGlobalVariableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -184,6 +188,26 @@ def tags=(tags) @tags = tags 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 @@ -200,6 +224,7 @@ def ==(o) parse_test_public_id == o.parse_test_public_id && tags == o.tags && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable_totp_parameters.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable_totp_parameters.rb index 17785fcb5984..47bb8c2e8643 100644 --- a/lib/datadog_api_client/v1/models/synthetics_global_variable_totp_parameters.rb +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable_totp_parameters.rb @@ -27,6 +27,8 @@ class SyntheticsGlobalVariableTOTPParameters # Interval for which to refresh the token (in seconds). attr_reader :refresh_interval + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGlobalVariableTOTPParameters` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGlobalVariableTOTPParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'digits') @@ -107,6 +111,26 @@ def refresh_interval=(refresh_interval) @refresh_interval = refresh_interval 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 @@ -115,6 +139,7 @@ def ==(o) self.class == o.class && digits == o.digits && refresh_interval == o.refresh_interval + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable_value.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable_value.rb index 1ea02f62eb16..0c4025d31dda 100644 --- a/lib/datadog_api_client/v1/models/synthetics_global_variable_value.rb +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable_value.rb @@ -31,6 +31,8 @@ class SyntheticsGlobalVariableValue # the value will not be present if the variable is hidden with the `secure` property. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsGlobalVariableValue` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGlobalVariableValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'options') @@ -80,6 +84,26 @@ 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 @@ -89,6 +113,7 @@ def ==(o) options == o.options && secure == o.secure && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_list_global_variables_response.rb b/lib/datadog_api_client/v1/models/synthetics_list_global_variables_response.rb index 53f45514616c..cfea756c4d6a 100644 --- a/lib/datadog_api_client/v1/models/synthetics_list_global_variables_response.rb +++ b/lib/datadog_api_client/v1/models/synthetics_list_global_variables_response.rb @@ -24,6 +24,8 @@ class SyntheticsListGlobalVariablesResponse # Array of Synthetic global variables. attr_accessor :variables + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsListGlobalVariablesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsListGlobalVariablesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'variables') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && variables == o.variables + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_list_tests_response.rb b/lib/datadog_api_client/v1/models/synthetics_list_tests_response.rb index 6f0cb23a011b..966a58de43ac 100644 --- a/lib/datadog_api_client/v1/models/synthetics_list_tests_response.rb +++ b/lib/datadog_api_client/v1/models/synthetics_list_tests_response.rb @@ -24,6 +24,8 @@ class SyntheticsListTestsResponse # Array of Synthetic tests configuration. attr_accessor :tests + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsListTestsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsListTestsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tests') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && tests == o.tests + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_location.rb b/lib/datadog_api_client/v1/models/synthetics_location.rb index 1d26dd7cf09c..a02dc90b9980 100644 --- a/lib/datadog_api_client/v1/models/synthetics_location.rb +++ b/lib/datadog_api_client/v1/models/synthetics_location.rb @@ -28,6 +28,8 @@ class SyntheticsLocation # Name of the location. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsLocation` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsLocation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && id == o.id && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_locations.rb b/lib/datadog_api_client/v1/models/synthetics_locations.rb index fa1b13917e2b..67b060e1ef87 100644 --- a/lib/datadog_api_client/v1/models/synthetics_locations.rb +++ b/lib/datadog_api_client/v1/models/synthetics_locations.rb @@ -24,6 +24,8 @@ class SyntheticsLocations # List of Synthetic locations. attr_accessor :locations + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsLocations` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsLocations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'locations') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && locations == o.locations + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_parsing_options.rb b/lib/datadog_api_client/v1/models/synthetics_parsing_options.rb index 22c798ff612f..84e5ef5bc575 100644 --- a/lib/datadog_api_client/v1/models/synthetics_parsing_options.rb +++ b/lib/datadog_api_client/v1/models/synthetics_parsing_options.rb @@ -36,6 +36,8 @@ class SyntheticsParsingOptions # Property of the Synthetic Test Response to use for a Synthetic global variable. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsParsingOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsParsingOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'field') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) parser == o.parser && secure == o.secure && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb b/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb index 52fb8f21e890..58833b296721 100644 --- a/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb +++ b/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb @@ -24,6 +24,8 @@ class SyntheticsPatchTestBody # Array of [JSON Patch](https://jsonpatch.com) operations to perform on the test attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPatchTestBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPatchTestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb b/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb index cf434f8ed23c..bd05ebc8c01a 100644 --- a/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb +++ b/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb @@ -30,6 +30,8 @@ class SyntheticsPatchTestOperation # A value to use in a [JSON Patch](https://jsonpatch.com) operation attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPatchTestOperation` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPatchTestOperation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'op') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) op == o.op && path == o.path && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_private_location.rb b/lib/datadog_api_client/v1/models/synthetics_private_location.rb index a73103505d76..724c4aaa3a67 100644 --- a/lib/datadog_api_client/v1/models/synthetics_private_location.rb +++ b/lib/datadog_api_client/v1/models/synthetics_private_location.rb @@ -39,6 +39,8 @@ class SyntheticsPrivateLocation # Array of tags attached to the private location. attr_reader :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPrivateLocation` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPrivateLocation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -148,6 +152,26 @@ def tags=(tags) @tags = tags 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 @@ -160,6 +184,7 @@ def ==(o) name == o.name && secrets == o.secrets && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_private_location_creation_response.rb b/lib/datadog_api_client/v1/models/synthetics_private_location_creation_response.rb index 04cb9de94b5b..c6811fdb4823 100644 --- a/lib/datadog_api_client/v1/models/synthetics_private_location_creation_response.rb +++ b/lib/datadog_api_client/v1/models/synthetics_private_location_creation_response.rb @@ -30,6 +30,8 @@ class SyntheticsPrivateLocationCreationResponse # Public key for the result encryption. attr_accessor :result_encryption + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPrivateLocationCreationResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPrivateLocationCreationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'config') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) config == o.config && private_location == o.private_location && result_encryption == o.result_encryption + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_private_location_creation_response_result_encryption.rb b/lib/datadog_api_client/v1/models/synthetics_private_location_creation_response_result_encryption.rb index 507ad2d9982e..c5125ac84315 100644 --- a/lib/datadog_api_client/v1/models/synthetics_private_location_creation_response_result_encryption.rb +++ b/lib/datadog_api_client/v1/models/synthetics_private_location_creation_response_result_encryption.rb @@ -27,6 +27,8 @@ class SyntheticsPrivateLocationCreationResponseResultEncryption # Public key for result encryption. attr_accessor :key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPrivateLocationCreationResponseResultEncryption` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPrivateLocationCreationResponseResultEncryption`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && key == o.key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_private_location_metadata.rb b/lib/datadog_api_client/v1/models/synthetics_private_location_metadata.rb index 1a5f4abd924c..d4b2e11707b1 100644 --- a/lib/datadog_api_client/v1/models/synthetics_private_location_metadata.rb +++ b/lib/datadog_api_client/v1/models/synthetics_private_location_metadata.rb @@ -24,6 +24,8 @@ class SyntheticsPrivateLocationMetadata # A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. attr_accessor :restricted_roles + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPrivateLocationMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPrivateLocationMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'restricted_roles') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && restricted_roles == o.restricted_roles + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_private_location_secrets.rb b/lib/datadog_api_client/v1/models/synthetics_private_location_secrets.rb index 8e452c7251f8..df43dbc533a9 100644 --- a/lib/datadog_api_client/v1/models/synthetics_private_location_secrets.rb +++ b/lib/datadog_api_client/v1/models/synthetics_private_location_secrets.rb @@ -27,6 +27,8 @@ class SyntheticsPrivateLocationSecrets # Private key for the private location. attr_accessor :config_decryption + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPrivateLocationSecrets` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPrivateLocationSecrets`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'authentication') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && authentication == o.authentication && config_decryption == o.config_decryption + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_private_location_secrets_authentication.rb b/lib/datadog_api_client/v1/models/synthetics_private_location_secrets_authentication.rb index 85e93a9ff4d2..a1313ab2883e 100644 --- a/lib/datadog_api_client/v1/models/synthetics_private_location_secrets_authentication.rb +++ b/lib/datadog_api_client/v1/models/synthetics_private_location_secrets_authentication.rb @@ -27,6 +27,8 @@ class SyntheticsPrivateLocationSecretsAuthentication # Secret access key for the private location. attr_accessor :key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPrivateLocationSecretsAuthentication` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPrivateLocationSecretsAuthentication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && key == o.key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_private_location_secrets_config_decryption.rb b/lib/datadog_api_client/v1/models/synthetics_private_location_secrets_config_decryption.rb index 6731f6a3474c..407f39158334 100644 --- a/lib/datadog_api_client/v1/models/synthetics_private_location_secrets_config_decryption.rb +++ b/lib/datadog_api_client/v1/models/synthetics_private_location_secrets_config_decryption.rb @@ -24,6 +24,8 @@ class SyntheticsPrivateLocationSecretsConfigDecryption # Private key for the private location. attr_accessor :key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsPrivateLocationSecretsConfigDecryption` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsPrivateLocationSecretsConfigDecryption`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'key') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && key == o.key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ssl_certificate.rb b/lib/datadog_api_client/v1/models/synthetics_ssl_certificate.rb index 9ad32c61273a..30952ace83ac 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ssl_certificate.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ssl_certificate.rb @@ -57,6 +57,8 @@ class SyntheticsSSLCertificate # Date until which the SSL certificate is valid. attr_accessor :valid_to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -103,12 +105,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsSSLCertificate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsSSLCertificate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cipher') @@ -162,6 +166,26 @@ 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 @@ -180,6 +204,7 @@ def ==(o) subject == o.subject && valid_from == o.valid_from && valid_to == o.valid_to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ssl_certificate_issuer.rb b/lib/datadog_api_client/v1/models/synthetics_ssl_certificate_issuer.rb index fb90c6dd1417..e76f898f8ebb 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ssl_certificate_issuer.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ssl_certificate_issuer.rb @@ -39,6 +39,8 @@ class SyntheticsSSLCertificateIssuer # State Or Province Name that issued the certificate. attr_accessor :st + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsSSLCertificateIssuer` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsSSLCertificateIssuer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'c') @@ -106,6 +110,26 @@ 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 @@ -118,6 +142,7 @@ def ==(o) o == o.o && ou == o.ou && st == o.st + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_ssl_certificate_subject.rb b/lib/datadog_api_client/v1/models/synthetics_ssl_certificate_subject.rb index d8787ecc5d62..dacc8d4241e9 100644 --- a/lib/datadog_api_client/v1/models/synthetics_ssl_certificate_subject.rb +++ b/lib/datadog_api_client/v1/models/synthetics_ssl_certificate_subject.rb @@ -42,6 +42,8 @@ class SyntheticsSSLCertificateSubject # Subject Alternative Name associated with the certificate. attr_accessor :alt_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsSSLCertificateSubject` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsSSLCertificateSubject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'c') @@ -115,6 +119,26 @@ 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 @@ -128,6 +152,7 @@ def ==(o) ou == o.ou && st == o.st && alt_name == o.alt_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_step.rb b/lib/datadog_api_client/v1/models/synthetics_step.rb index 5b556bbe303c..7cd2f3a28b66 100644 --- a/lib/datadog_api_client/v1/models/synthetics_step.rb +++ b/lib/datadog_api_client/v1/models/synthetics_step.rb @@ -42,6 +42,8 @@ class SyntheticsStep # Step type used in your Synthetic test. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsStep` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsStep`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'allow_failure') @@ -115,6 +119,26 @@ 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 @@ -128,6 +152,7 @@ def ==(o) params == o.params && timeout == o.timeout && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_step_detail.rb b/lib/datadog_api_client/v1/models/synthetics_step_detail.rb index c60e518f71e1..6a6e97abe82c 100644 --- a/lib/datadog_api_client/v1/models/synthetics_step_detail.rb +++ b/lib/datadog_api_client/v1/models/synthetics_step_detail.rb @@ -73,6 +73,8 @@ class SyntheticsStepDetail # Warning collected that didn't failed the step. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -129,12 +131,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsStepDetail` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsStepDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'browser_errors') @@ -214,6 +218,26 @@ 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 @@ -237,6 +261,7 @@ def ==(o) value == o.value && vitals_metrics == o.vitals_metrics && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_step_detail_warning.rb b/lib/datadog_api_client/v1/models/synthetics_step_detail_warning.rb index 6c68d20fbc0c..210a3d048d80 100644 --- a/lib/datadog_api_client/v1/models/synthetics_step_detail_warning.rb +++ b/lib/datadog_api_client/v1/models/synthetics_step_detail_warning.rb @@ -27,6 +27,8 @@ class SyntheticsStepDetailWarning # User locator used. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsStepDetailWarning` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsStepDetailWarning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'message') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && message == o.message && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb b/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb index 41f011c6541d..4fd4d6b43235 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb @@ -24,6 +24,8 @@ class SyntheticsTestCiOptions # Execution rule for a Synthetic test. attr_accessor :execution_rule + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestCiOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestCiOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'execution_rule') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && execution_rule == o.execution_rule + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_config.rb b/lib/datadog_api_client/v1/models/synthetics_test_config.rb index 49da8d6baa92..c2b44add4c30 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_config.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_config.rb @@ -33,6 +33,8 @@ class SyntheticsTestConfig # Browser tests only - array of variables used for the test steps. attr_accessor :variables + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assertions') @@ -94,6 +98,26 @@ 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 @@ -104,6 +128,7 @@ def ==(o) config_variables == o.config_variables && request == o.request && variables == o.variables + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_details.rb b/lib/datadog_api_client/v1/models/synthetics_test_details.rb index d90dbc015b38..7108560181ba 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_details.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_details.rb @@ -62,6 +62,8 @@ class SyntheticsTestDetails # Type of the Synthetic test, either `api` or `browser`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -110,12 +112,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestDetails` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'config') @@ -177,6 +181,26 @@ 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 @@ -196,6 +220,7 @@ def ==(o) subtype == o.subtype && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_options.rb b/lib/datadog_api_client/v1/models/synthetics_test_options.rb index 43a2d4c2a7ee..a1d65efea0c8 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_options.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_options.rb @@ -106,6 +106,8 @@ class SyntheticsTestOptions # The frequency at which to run the Synthetic test (in seconds). attr_reader :tick_every + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -176,12 +178,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'accept_self_signed') @@ -322,6 +326,26 @@ def tick_every=(tick_every) @tick_every = tick_every 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 @@ -352,6 +376,7 @@ def ==(o) rum_settings == o.rum_settings && scheduling == o.scheduling && tick_every == o.tick_every + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options.rb b/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options.rb index 62cfcfc4c5ab..1a1e34bb9625 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options.rb @@ -26,6 +26,8 @@ class SyntheticsTestOptionsMonitorOptions # (in minutes). attr_reader :renotify_interval + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -50,12 +52,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'renotify_interval') @@ -81,6 +85,26 @@ def renotify_interval=(renotify_interval) @renotify_interval = renotify_interval 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && renotify_interval == o.renotify_interval + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_options_retry.rb b/lib/datadog_api_client/v1/models/synthetics_test_options_retry.rb index 3116bbeb626a..e40bb3490412 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_options_retry.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_options_retry.rb @@ -29,6 +29,8 @@ class SyntheticsTestOptionsRetry # 300ms. attr_accessor :interval + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -55,12 +57,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestOptionsRetry` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestOptionsRetry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && count == o.count && interval == o.interval + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb b/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb index 8b9100318535..ae829098db7a 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb @@ -27,6 +27,8 @@ class SyntheticsTestOptionsScheduling # Timezone in which the timeframe is based. attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestOptionsScheduling` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestOptionsScheduling`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'timeframes') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && timeframes == o.timeframes && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb b/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb index f6ca34c915e7..40c2dd589300 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb @@ -30,6 +30,8 @@ class SyntheticsTestOptionsSchedulingTimeframe # The hour of the day on which scheduling ends. attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'day') @@ -101,6 +105,26 @@ def day=(day) @day = day 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 @@ -110,6 +134,7 @@ def ==(o) day == o.day && from == o.from && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_request.rb b/lib/datadog_api_client/v1/models/synthetics_test_request.rb index ee0f71024202..ba1fe839002d 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_request.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_request.rb @@ -113,6 +113,8 @@ class SyntheticsTestRequest # URL to perform the test with. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -195,12 +197,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'allow_insecure') @@ -365,6 +369,26 @@ def number_of_packets=(number_of_packets) @number_of_packets = number_of_packets 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 @@ -401,6 +425,7 @@ def ==(o) should_track_hops == o.should_track_hops && timeout == o.timeout && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb b/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb index 2b383891d794..92ed779f39ee 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb @@ -39,6 +39,8 @@ class SyntheticsTestRequestBodyFile # Type of the file. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestRequestBodyFile` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestRequestBodyFile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'bucket_key') @@ -172,6 +176,26 @@ def type=(type) @type = type 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 @@ -184,6 +208,7 @@ def ==(o) original_file_name == o.original_file_name && size == o.size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_request_certificate.rb b/lib/datadog_api_client/v1/models/synthetics_test_request_certificate.rb index 3ae976ccd3a3..a40d4ccaab6c 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_request_certificate.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_request_certificate.rb @@ -27,6 +27,8 @@ class SyntheticsTestRequestCertificate # Define a request certificate. attr_accessor :key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestRequestCertificate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestRequestCertificate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cert') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && cert == o.cert && key == o.key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_request_certificate_item.rb b/lib/datadog_api_client/v1/models/synthetics_test_request_certificate_item.rb index 1678948d077b..0eb50fe0dae1 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_request_certificate_item.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_request_certificate_item.rb @@ -30,6 +30,8 @@ class SyntheticsTestRequestCertificateItem # Date of update of the certificate or key, ISO format. attr_accessor :updated_at + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'content') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) content == o.content && filename == o.filename && updated_at == o.updated_at + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_test_request_proxy.rb b/lib/datadog_api_client/v1/models/synthetics_test_request_proxy.rb index 8d958ab212ec..f59219f6352f 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_request_proxy.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_request_proxy.rb @@ -27,6 +27,8 @@ class SyntheticsTestRequestProxy # URL of the proxy to perform the test. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestRequestProxy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestRequestProxy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'headers') @@ -88,6 +92,26 @@ def url=(url) @url = url 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && headers == o.headers && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_timing.rb b/lib/datadog_api_client/v1/models/synthetics_timing.rb index c870352066a5..137fa54ddfbe 100644 --- a/lib/datadog_api_client/v1/models/synthetics_timing.rb +++ b/lib/datadog_api_client/v1/models/synthetics_timing.rb @@ -49,6 +49,8 @@ class SyntheticsTiming # Time spent in millisecond waiting for a response. attr_accessor :wait + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -89,12 +91,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTiming` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTiming`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dns') @@ -134,6 +138,26 @@ 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 @@ -149,6 +173,7 @@ def ==(o) tcp == o.tcp && total == o.total && wait == o.wait + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_trigger_body.rb b/lib/datadog_api_client/v1/models/synthetics_trigger_body.rb index ec55e67af406..451e0e20937d 100644 --- a/lib/datadog_api_client/v1/models/synthetics_trigger_body.rb +++ b/lib/datadog_api_client/v1/models/synthetics_trigger_body.rb @@ -24,6 +24,8 @@ class SyntheticsTriggerBody # Individual Synthetic test. attr_reader :tests + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTriggerBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTriggerBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tests') @@ -81,6 +85,26 @@ def tests=(tests) @tests = tests 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && tests == o.tests + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_trigger_ci_test_location.rb b/lib/datadog_api_client/v1/models/synthetics_trigger_ci_test_location.rb index 26df9bda6e26..624493497b87 100644 --- a/lib/datadog_api_client/v1/models/synthetics_trigger_ci_test_location.rb +++ b/lib/datadog_api_client/v1/models/synthetics_trigger_ci_test_location.rb @@ -27,6 +27,8 @@ class SyntheticsTriggerCITestLocation # Name of the location. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTriggerCITestLocation` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTriggerCITestLocation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_trigger_ci_test_run_result.rb b/lib/datadog_api_client/v1/models/synthetics_trigger_ci_test_run_result.rb index 5636a2b67657..360d1b2be100 100644 --- a/lib/datadog_api_client/v1/models/synthetics_trigger_ci_test_run_result.rb +++ b/lib/datadog_api_client/v1/models/synthetics_trigger_ci_test_run_result.rb @@ -33,6 +33,8 @@ class SyntheticsTriggerCITestRunResult # ID of the result. attr_accessor :result_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTriggerCITestRunResult` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTriggerCITestRunResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'device') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) location == o.location && public_id == o.public_id && result_id == o.result_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_trigger_ci_tests_response.rb b/lib/datadog_api_client/v1/models/synthetics_trigger_ci_tests_response.rb index 08685436c699..eded5bc1cb11 100644 --- a/lib/datadog_api_client/v1/models/synthetics_trigger_ci_tests_response.rb +++ b/lib/datadog_api_client/v1/models/synthetics_trigger_ci_tests_response.rb @@ -33,6 +33,8 @@ class SyntheticsTriggerCITestsResponse # The public IDs of the Synthetic test triggered. attr_accessor :triggered_check_ids + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTriggerCITestsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTriggerCITestsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'batch_id') @@ -102,6 +106,26 @@ 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 @@ -112,6 +136,7 @@ def ==(o) locations == o.locations && results == o.results && triggered_check_ids == o.triggered_check_ids + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_trigger_test.rb b/lib/datadog_api_client/v1/models/synthetics_trigger_test.rb index b713ae957e7d..679c21b12569 100644 --- a/lib/datadog_api_client/v1/models/synthetics_trigger_test.rb +++ b/lib/datadog_api_client/v1/models/synthetics_trigger_test.rb @@ -27,6 +27,8 @@ class SyntheticsTriggerTest # The public ID of the Synthetic test to trigger. attr_reader :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTriggerTest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTriggerTest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'metadata') @@ -88,6 +92,26 @@ def public_id=(public_id) @public_id = public_id 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && metadata == o.metadata && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_update_test_pause_status_payload.rb b/lib/datadog_api_client/v1/models/synthetics_update_test_pause_status_payload.rb index 2c6cc8965c82..82e88f7f718b 100644 --- a/lib/datadog_api_client/v1/models/synthetics_update_test_pause_status_payload.rb +++ b/lib/datadog_api_client/v1/models/synthetics_update_test_pause_status_payload.rb @@ -25,6 +25,8 @@ class SyntheticsUpdateTestPauseStatusPayload # Synthetic test. attr_accessor :new_status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsUpdateTestPauseStatusPayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsUpdateTestPauseStatusPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'new_status') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && new_status == o.new_status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/synthetics_variable_parser.rb b/lib/datadog_api_client/v1/models/synthetics_variable_parser.rb index aa429137a08e..f31c15202ab6 100644 --- a/lib/datadog_api_client/v1/models/synthetics_variable_parser.rb +++ b/lib/datadog_api_client/v1/models/synthetics_variable_parser.rb @@ -27,6 +27,8 @@ class SyntheticsVariableParser # Regex or JSON path used for the parser. Not used with type `raw`. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsVariableParser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsVariableParser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -88,6 +92,26 @@ def type=(type) @type = type 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && type == o.type && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/table_widget_definition.rb b/lib/datadog_api_client/v1/models/table_widget_definition.rb index c58e7f24f80f..c493d600d690 100644 --- a/lib/datadog_api_client/v1/models/table_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/table_widget_definition.rb @@ -45,6 +45,8 @@ class TableWidgetDefinition # Type of the table widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TableWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TableWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -157,6 +161,26 @@ def type=(type) @type = type 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 @@ -171,6 +195,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/table_widget_request.rb b/lib/datadog_api_client/v1/models/table_widget_request.rb index 7e3d908249dc..fea7f99bc81d 100644 --- a/lib/datadog_api_client/v1/models/table_widget_request.rb +++ b/lib/datadog_api_client/v1/models/table_widget_request.rb @@ -81,6 +81,8 @@ class TableWidgetRequest # The controls for sorting the widget. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -143,12 +145,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TableWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TableWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregator') @@ -240,6 +244,26 @@ 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 @@ -266,6 +290,7 @@ def ==(o) rum_query == o.rum_query && security_query == o.security_query && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/tag_to_hosts.rb b/lib/datadog_api_client/v1/models/tag_to_hosts.rb index fc6b15fcf10d..96ca601a1d1a 100644 --- a/lib/datadog_api_client/v1/models/tag_to_hosts.rb +++ b/lib/datadog_api_client/v1/models/tag_to_hosts.rb @@ -24,6 +24,8 @@ class TagToHosts # A list of tags to apply to the host. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TagToHosts` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TagToHosts`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tags') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/timeseries_background.rb b/lib/datadog_api_client/v1/models/timeseries_background.rb index 401b89d997a7..8f8fa5ced516 100644 --- a/lib/datadog_api_client/v1/models/timeseries_background.rb +++ b/lib/datadog_api_client/v1/models/timeseries_background.rb @@ -27,6 +27,8 @@ class TimeseriesBackground # Axis controls for the widget. attr_accessor :yaxis + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TimeseriesBackground` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TimeseriesBackground`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -88,6 +92,26 @@ def type=(type) @type = type 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && type == o.type && yaxis == o.yaxis + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/timeseries_widget_definition.rb b/lib/datadog_api_client/v1/models/timeseries_widget_definition.rb index 1534291eab72..d67d53ef039b 100644 --- a/lib/datadog_api_client/v1/models/timeseries_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/timeseries_widget_definition.rb @@ -66,6 +66,8 @@ class TimeseriesWidgetDefinition # Axis controls for the widget. attr_accessor :yaxis + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -118,12 +120,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TimeseriesWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TimeseriesWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -230,6 +234,26 @@ def type=(type) @type = type 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 @@ -251,6 +275,7 @@ def ==(o) title_size == o.title_size && type == o.type && yaxis == o.yaxis + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/timeseries_widget_expression_alias.rb b/lib/datadog_api_client/v1/models/timeseries_widget_expression_alias.rb index 43016df3cd9a..4a974193a69a 100644 --- a/lib/datadog_api_client/v1/models/timeseries_widget_expression_alias.rb +++ b/lib/datadog_api_client/v1/models/timeseries_widget_expression_alias.rb @@ -27,6 +27,8 @@ class TimeseriesWidgetExpressionAlias # Expression name. attr_reader :expression + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TimeseriesWidgetExpressionAlias` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TimeseriesWidgetExpressionAlias`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'alias_name') @@ -88,6 +92,26 @@ def expression=(expression) @expression = expression 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && alias_name == o.alias_name && expression == o.expression + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/timeseries_widget_request.rb b/lib/datadog_api_client/v1/models/timeseries_widget_request.rb index fa951a9c69f4..b862e649abe4 100644 --- a/lib/datadog_api_client/v1/models/timeseries_widget_request.rb +++ b/lib/datadog_api_client/v1/models/timeseries_widget_request.rb @@ -72,6 +72,8 @@ class TimeseriesWidgetRequest # Define request widget style. attr_accessor :style + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -128,12 +130,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TimeseriesWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TimeseriesWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_query') @@ -211,6 +215,26 @@ 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 @@ -234,6 +258,7 @@ def ==(o) rum_query == o.rum_query && security_query == o.security_query && style == o.style + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/toplist_widget_definition.rb b/lib/datadog_api_client/v1/models/toplist_widget_definition.rb index 68006df23e42..98dac3ba44a6 100644 --- a/lib/datadog_api_client/v1/models/toplist_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/toplist_widget_definition.rb @@ -45,6 +45,8 @@ class ToplistWidgetDefinition # Type of the top list widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ToplistWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ToplistWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -157,6 +161,26 @@ def type=(type) @type = type 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 @@ -171,6 +195,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/toplist_widget_flat.rb b/lib/datadog_api_client/v1/models/toplist_widget_flat.rb index 4d9b23c93d44..83405173c73f 100644 --- a/lib/datadog_api_client/v1/models/toplist_widget_flat.rb +++ b/lib/datadog_api_client/v1/models/toplist_widget_flat.rb @@ -24,6 +24,8 @@ class ToplistWidgetFlat # Top list widget flat display type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ToplistWidgetFlat` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ToplistWidgetFlat`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -79,6 +83,26 @@ def type=(type) @type = type 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/toplist_widget_request.rb b/lib/datadog_api_client/v1/models/toplist_widget_request.rb index b0881ae023a9..6f411d8ffb9a 100644 --- a/lib/datadog_api_client/v1/models/toplist_widget_request.rb +++ b/lib/datadog_api_client/v1/models/toplist_widget_request.rb @@ -69,6 +69,8 @@ class ToplistWidgetRequest # Define request widget style. attr_accessor :style + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -123,12 +125,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ToplistWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ToplistWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_query') @@ -220,6 +224,26 @@ def conditional_formats=(conditional_formats) @conditional_formats = conditional_formats 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 @@ -242,6 +266,7 @@ def ==(o) security_query == o.security_query && sort == o.sort && style == o.style + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb b/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb index b6a608aff553..8699d2dd301c 100644 --- a/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb +++ b/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb @@ -27,6 +27,8 @@ class ToplistWidgetStacked # Top list widget stacked display type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ToplistWidgetStacked` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ToplistWidgetStacked`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'legend') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && legend == o.legend && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/toplist_widget_style.rb b/lib/datadog_api_client/v1/models/toplist_widget_style.rb index b99bb806f723..4a663ede364d 100644 --- a/lib/datadog_api_client/v1/models/toplist_widget_style.rb +++ b/lib/datadog_api_client/v1/models/toplist_widget_style.rb @@ -27,6 +27,8 @@ class ToplistWidgetStyle # Top list widget scaling definition. attr_accessor :scaling + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ToplistWidgetStyle` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ToplistWidgetStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'display') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && display == o.display && scaling == o.scaling + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb b/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb index d0c08908dcd0..7a39c3178a74 100644 --- a/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb @@ -39,6 +39,8 @@ class TopologyMapWidgetDefinition # Type of the topology map widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TopologyMapWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TopologyMapWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_links') @@ -143,6 +147,26 @@ def type=(type) @type = type 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 @@ -155,6 +179,7 @@ def ==(o) title_align == o.title_align && title_size == o.title_size && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/topology_query.rb b/lib/datadog_api_client/v1/models/topology_query.rb index c78aad64428c..072d06430be3 100644 --- a/lib/datadog_api_client/v1/models/topology_query.rb +++ b/lib/datadog_api_client/v1/models/topology_query.rb @@ -30,6 +30,8 @@ class TopologyQuery # Name of the service attr_accessor :service + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TopologyQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TopologyQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data_source') @@ -99,6 +103,26 @@ def filters=(filters) @filters = filters 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 @@ -108,6 +132,7 @@ def ==(o) data_source == o.data_source && filters == o.filters && service == o.service + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/topology_request.rb b/lib/datadog_api_client/v1/models/topology_request.rb index 78c5d7d50128..f824052b5a3b 100644 --- a/lib/datadog_api_client/v1/models/topology_request.rb +++ b/lib/datadog_api_client/v1/models/topology_request.rb @@ -27,6 +27,8 @@ class TopologyRequest # Widget request type. attr_accessor :request_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TopologyRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TopologyRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && query == o.query && request_type == o.request_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/tree_map_widget_definition.rb b/lib/datadog_api_client/v1/models/tree_map_widget_definition.rb index 30500e1fa776..6dadea8d4876 100644 --- a/lib/datadog_api_client/v1/models/tree_map_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/tree_map_widget_definition.rb @@ -45,6 +45,8 @@ class TreeMapWidgetDefinition # Type of the treemap widget. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TreeMapWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TreeMapWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'color_by') @@ -165,6 +169,26 @@ def type=(type) @type = type 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 @@ -179,6 +203,7 @@ def ==(o) time == o.time && title == o.title && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/tree_map_widget_request.rb b/lib/datadog_api_client/v1/models/tree_map_widget_request.rb index 87f0095b316b..25d0fb2cc609 100644 --- a/lib/datadog_api_client/v1/models/tree_map_widget_request.rb +++ b/lib/datadog_api_client/v1/models/tree_map_widget_request.rb @@ -33,6 +33,8 @@ class TreeMapWidgetRequest # Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. attr_accessor :response_format + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::TreeMapWidgetRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::TreeMapWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'formulas') @@ -92,6 +96,26 @@ 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 @@ -102,6 +126,7 @@ def ==(o) q == o.q && queries == o.queries && response_format == o.response_format + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_analyzed_logs_hour.rb b/lib/datadog_api_client/v1/models/usage_analyzed_logs_hour.rb index 0e122567e26f..d5e4be33fe4a 100644 --- a/lib/datadog_api_client/v1/models/usage_analyzed_logs_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_analyzed_logs_hour.rb @@ -33,6 +33,8 @@ class UsageAnalyzedLogsHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageAnalyzedLogsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageAnalyzedLogsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'analyzed_logs') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_analyzed_logs_response.rb b/lib/datadog_api_client/v1/models/usage_analyzed_logs_response.rb index a72da6ee38c5..1ddacae79e03 100644 --- a/lib/datadog_api_client/v1/models/usage_analyzed_logs_response.rb +++ b/lib/datadog_api_client/v1/models/usage_analyzed_logs_response.rb @@ -24,6 +24,8 @@ class UsageAnalyzedLogsResponse # Get hourly usage for analyzed logs. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageAnalyzedLogsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageAnalyzedLogsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_attribution_aggregates_body.rb b/lib/datadog_api_client/v1/models/usage_attribution_aggregates_body.rb index 0239c44cdd2d..6b0d3db0c54e 100644 --- a/lib/datadog_api_client/v1/models/usage_attribution_aggregates_body.rb +++ b/lib/datadog_api_client/v1/models/usage_attribution_aggregates_body.rb @@ -30,6 +30,8 @@ class UsageAttributionAggregatesBody # The value for a given field. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageAttributionAggregatesBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageAttributionAggregatesBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'agg_type') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) agg_type == o.agg_type && field == o.field && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_audit_logs_hour.rb b/lib/datadog_api_client/v1/models/usage_audit_logs_hour.rb index 8c13d20df3b1..43c22fa76288 100644 --- a/lib/datadog_api_client/v1/models/usage_audit_logs_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_audit_logs_hour.rb @@ -33,6 +33,8 @@ class UsageAuditLogsHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageAuditLogsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageAuditLogsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) lines_indexed == o.lines_indexed && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_audit_logs_response.rb b/lib/datadog_api_client/v1/models/usage_audit_logs_response.rb index e00565a2c7d3..50bd0cb63e0f 100644 --- a/lib/datadog_api_client/v1/models/usage_audit_logs_response.rb +++ b/lib/datadog_api_client/v1/models/usage_audit_logs_response.rb @@ -24,6 +24,8 @@ class UsageAuditLogsResponse # Get hourly usage for audit logs. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageAuditLogsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageAuditLogsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_billable_summary_body.rb b/lib/datadog_api_client/v1/models/usage_billable_summary_body.rb index b8059cf7c2b7..6208358fd890 100644 --- a/lib/datadog_api_client/v1/models/usage_billable_summary_body.rb +++ b/lib/datadog_api_client/v1/models/usage_billable_summary_body.rb @@ -42,6 +42,8 @@ class UsageBillableSummaryBody # Units pertaining to the usage. attr_accessor :usage_unit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageBillableSummaryBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageBillableSummaryBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_billable_usage') @@ -115,6 +119,26 @@ 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 @@ -128,6 +152,7 @@ def ==(o) org_billable_usage == o.org_billable_usage && percentage_in_account == o.percentage_in_account && usage_unit == o.usage_unit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb b/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb index 9716d1d056d8..a28701c53609 100644 --- a/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb @@ -54,6 +54,8 @@ class UsageBillableSummaryHour # Response with aggregated usage types. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageBillableSummaryHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageBillableSummaryHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_name') @@ -151,6 +155,26 @@ 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 @@ -168,6 +192,7 @@ def ==(o) region == o.region && start_date == o.start_date && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb b/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb index 9f6efd6c37f5..158cf04c324b 100644 --- a/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb +++ b/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb @@ -288,6 +288,8 @@ class UsageBillableSummaryKeys # Response with properties for each aggregated usage type. attr_accessor :timeseries_sum + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -488,12 +490,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageBillableSummaryKeys` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageBillableSummaryKeys`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_fargate_average') @@ -853,6 +857,26 @@ 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 @@ -948,6 +972,7 @@ def ==(o) synthetics_browser_checks_sum == o.synthetics_browser_checks_sum && timeseries_average == o.timeseries_average && timeseries_sum == o.timeseries_sum + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_billable_summary_response.rb b/lib/datadog_api_client/v1/models/usage_billable_summary_response.rb index 9cc61b915dbc..bfdf460a870c 100644 --- a/lib/datadog_api_client/v1/models/usage_billable_summary_response.rb +++ b/lib/datadog_api_client/v1/models/usage_billable_summary_response.rb @@ -24,6 +24,8 @@ class UsageBillableSummaryResponse # An array of objects regarding usage of billable summary. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageBillableSummaryResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageBillableSummaryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_ci_visibility_hour.rb b/lib/datadog_api_client/v1/models/usage_ci_visibility_hour.rb index e0873e7f29a6..ccd798bdc785 100644 --- a/lib/datadog_api_client/v1/models/usage_ci_visibility_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_ci_visibility_hour.rb @@ -42,6 +42,8 @@ class UsageCIVisibilityHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -90,12 +92,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCIVisibilityHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCIVisibilityHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'ci_pipeline_indexed_spans') @@ -127,6 +131,26 @@ 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 @@ -140,6 +164,7 @@ def ==(o) ci_visibility_test_committers == o.ci_visibility_test_committers && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_ci_visibility_response.rb b/lib/datadog_api_client/v1/models/usage_ci_visibility_response.rb index f0506f0abcd2..ff4ada2019cf 100644 --- a/lib/datadog_api_client/v1/models/usage_ci_visibility_response.rb +++ b/lib/datadog_api_client/v1/models/usage_ci_visibility_response.rb @@ -24,6 +24,8 @@ class UsageCIVisibilityResponse # Response containing CI visibility usage. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCIVisibilityResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCIVisibilityResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb b/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb index 0fe7a8109bbd..2bbc8b2beb46 100644 --- a/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb @@ -51,6 +51,8 @@ class UsageCloudSecurityPostureManagementHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -107,12 +109,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCloudSecurityPostureManagementHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCloudSecurityPostureManagementHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aas_host_count') @@ -156,6 +160,26 @@ 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 @@ -172,6 +196,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb b/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb index 777940875aa9..7fd40df51f9b 100644 --- a/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb +++ b/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb @@ -24,6 +24,8 @@ class UsageCloudSecurityPostureManagementResponse # Get hourly usage for Cloud Security Management Pro. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCloudSecurityPostureManagementResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCloudSecurityPostureManagementResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_custom_reports_attributes.rb b/lib/datadog_api_client/v1/models/usage_custom_reports_attributes.rb index ff2225cfab61..a6cb2968d66e 100644 --- a/lib/datadog_api_client/v1/models/usage_custom_reports_attributes.rb +++ b/lib/datadog_api_client/v1/models/usage_custom_reports_attributes.rb @@ -36,6 +36,8 @@ class UsageCustomReportsAttributes # A list of tags to apply to custom reports. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCustomReportsAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCustomReportsAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'computed_on') @@ -99,6 +103,26 @@ 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 @@ -110,6 +134,7 @@ def ==(o) size == o.size && start_date == o.start_date && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_custom_reports_data.rb b/lib/datadog_api_client/v1/models/usage_custom_reports_data.rb index 8ef0ff32ca48..822d6fe4a2a9 100644 --- a/lib/datadog_api_client/v1/models/usage_custom_reports_data.rb +++ b/lib/datadog_api_client/v1/models/usage_custom_reports_data.rb @@ -30,6 +30,8 @@ class UsageCustomReportsData # The type of reports. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCustomReportsData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCustomReportsData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_custom_reports_meta.rb b/lib/datadog_api_client/v1/models/usage_custom_reports_meta.rb index 1813521ca3af..dc78c00596ec 100644 --- a/lib/datadog_api_client/v1/models/usage_custom_reports_meta.rb +++ b/lib/datadog_api_client/v1/models/usage_custom_reports_meta.rb @@ -24,6 +24,8 @@ class UsageCustomReportsMeta # The object containing page total count. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCustomReportsMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCustomReportsMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_custom_reports_page.rb b/lib/datadog_api_client/v1/models/usage_custom_reports_page.rb index 06291da807df..f03340b54b24 100644 --- a/lib/datadog_api_client/v1/models/usage_custom_reports_page.rb +++ b/lib/datadog_api_client/v1/models/usage_custom_reports_page.rb @@ -24,6 +24,8 @@ class UsageCustomReportsPage # Total page count. attr_accessor :total_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCustomReportsPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCustomReportsPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_count') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && total_count == o.total_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_custom_reports_response.rb b/lib/datadog_api_client/v1/models/usage_custom_reports_response.rb index 4e7f2c05bcd5..702ea93a10fc 100644 --- a/lib/datadog_api_client/v1/models/usage_custom_reports_response.rb +++ b/lib/datadog_api_client/v1/models/usage_custom_reports_response.rb @@ -27,6 +27,8 @@ class UsageCustomReportsResponse # The object containing document metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCustomReportsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCustomReportsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_cws_hour.rb b/lib/datadog_api_client/v1/models/usage_cws_hour.rb index b4c63283d299..42712db4254d 100644 --- a/lib/datadog_api_client/v1/models/usage_cws_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_cws_hour.rb @@ -36,6 +36,8 @@ class UsageCWSHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -77,12 +79,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCWSHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCWSHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cws_container_count') @@ -106,6 +110,26 @@ 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 @@ -117,6 +141,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_cws_response.rb b/lib/datadog_api_client/v1/models/usage_cws_response.rb index 67c33a832283..819b17597967 100644 --- a/lib/datadog_api_client/v1/models/usage_cws_response.rb +++ b/lib/datadog_api_client/v1/models/usage_cws_response.rb @@ -24,6 +24,8 @@ class UsageCWSResponse # Get hourly usage for Cloud Workload Security. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageCWSResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageCWSResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_dbm_hour.rb b/lib/datadog_api_client/v1/models/usage_dbm_hour.rb index a8d74494bfc9..73e0796a65c0 100644 --- a/lib/datadog_api_client/v1/models/usage_dbm_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_dbm_hour.rb @@ -36,6 +36,8 @@ class UsageDBMHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -77,12 +79,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageDBMHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageDBMHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dbm_host_count') @@ -106,6 +110,26 @@ 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 @@ -117,6 +141,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_dbm_response.rb b/lib/datadog_api_client/v1/models/usage_dbm_response.rb index f2be554cecfd..058bf9df5505 100644 --- a/lib/datadog_api_client/v1/models/usage_dbm_response.rb +++ b/lib/datadog_api_client/v1/models/usage_dbm_response.rb @@ -24,6 +24,8 @@ class UsageDBMResponse # Get hourly usage for Database Monitoring attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageDBMResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageDBMResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_fargate_hour.rb b/lib/datadog_api_client/v1/models/usage_fargate_hour.rb index 508229e95f5b..af113eba43be 100644 --- a/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_fargate_hour.rb @@ -42,6 +42,8 @@ class UsageFargateHour # The number of Fargate tasks run. attr_accessor :tasks_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -89,12 +91,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageFargateHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageFargateHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_fargate_count') @@ -126,6 +130,26 @@ 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 @@ -139,6 +163,7 @@ def ==(o) org_name == o.org_name && public_id == o.public_id && tasks_count == o.tasks_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_fargate_response.rb b/lib/datadog_api_client/v1/models/usage_fargate_response.rb index b7837e1efe68..a8e5d232b25e 100644 --- a/lib/datadog_api_client/v1/models/usage_fargate_response.rb +++ b/lib/datadog_api_client/v1/models/usage_fargate_response.rb @@ -24,6 +24,8 @@ class UsageFargateResponse # Array with the number of hourly Fargate tasks recorded for a given organization. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageFargateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageFargateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_host_hour.rb b/lib/datadog_api_client/v1/models/usage_host_hour.rb index 50803861eb1d..cf57844cacd0 100644 --- a/lib/datadog_api_client/v1/models/usage_host_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_host_hour.rb @@ -81,6 +81,8 @@ class UsageHostHour # (and were NOT running the Datadog Agent). attr_accessor :vsphere_host_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -159,12 +161,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageHostHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageHostHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'agent_host_count') @@ -236,6 +240,26 @@ 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 @@ -259,6 +283,7 @@ def ==(o) org_name == o.org_name && public_id == o.public_id && vsphere_host_count == o.vsphere_host_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_hosts_response.rb b/lib/datadog_api_client/v1/models/usage_hosts_response.rb index 31c2eea6a446..ee9f79ea750a 100644 --- a/lib/datadog_api_client/v1/models/usage_hosts_response.rb +++ b/lib/datadog_api_client/v1/models/usage_hosts_response.rb @@ -24,6 +24,8 @@ class UsageHostsResponse # An array of objects related to host usage. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageHostsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageHostsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb b/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb index 0d37efb007cc..eb833ecd507c 100644 --- a/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb @@ -33,6 +33,8 @@ class UsageIncidentManagementHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIncidentManagementHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageIncidentManagementHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) monthly_active_users == o.monthly_active_users && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_incident_management_response.rb b/lib/datadog_api_client/v1/models/usage_incident_management_response.rb index 603f17b55177..395e55190eb5 100644 --- a/lib/datadog_api_client/v1/models/usage_incident_management_response.rb +++ b/lib/datadog_api_client/v1/models/usage_incident_management_response.rb @@ -24,6 +24,8 @@ class UsageIncidentManagementResponse # Get hourly usage for incident management. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIncidentManagementResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageIncidentManagementResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_indexed_spans_hour.rb b/lib/datadog_api_client/v1/models/usage_indexed_spans_hour.rb index f675b2e6ba7b..51413bacce58 100644 --- a/lib/datadog_api_client/v1/models/usage_indexed_spans_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_indexed_spans_hour.rb @@ -33,6 +33,8 @@ class UsageIndexedSpansHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIndexedSpansHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageIndexedSpansHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) indexed_events_count == o.indexed_events_count && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_indexed_spans_response.rb b/lib/datadog_api_client/v1/models/usage_indexed_spans_response.rb index 11c92be613cb..09e8baa6f1f9 100644 --- a/lib/datadog_api_client/v1/models/usage_indexed_spans_response.rb +++ b/lib/datadog_api_client/v1/models/usage_indexed_spans_response.rb @@ -24,6 +24,8 @@ class UsageIndexedSpansResponse # Array with the number of hourly traces indexed for a given organization. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIndexedSpansResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageIndexedSpansResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_ingested_spans_hour.rb b/lib/datadog_api_client/v1/models/usage_ingested_spans_hour.rb index e34b78a6fa1b..ee464f540cce 100644 --- a/lib/datadog_api_client/v1/models/usage_ingested_spans_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_ingested_spans_hour.rb @@ -33,6 +33,8 @@ class UsageIngestedSpansHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIngestedSpansHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageIngestedSpansHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) ingested_events_bytes == o.ingested_events_bytes && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_ingested_spans_response.rb b/lib/datadog_api_client/v1/models/usage_ingested_spans_response.rb index 1a0b93eba582..9c40fca72aae 100644 --- a/lib/datadog_api_client/v1/models/usage_ingested_spans_response.rb +++ b/lib/datadog_api_client/v1/models/usage_ingested_spans_response.rb @@ -24,6 +24,8 @@ class UsageIngestedSpansResponse # Get hourly usage for ingested spans. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIngestedSpansResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageIngestedSpansResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_iot_hour.rb b/lib/datadog_api_client/v1/models/usage_iot_hour.rb index 241fdc2dfe05..082ccf947208 100644 --- a/lib/datadog_api_client/v1/models/usage_iot_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_iot_hour.rb @@ -33,6 +33,8 @@ class UsageIoTHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIoTHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageIoTHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) iot_device_count == o.iot_device_count && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_iot_response.rb b/lib/datadog_api_client/v1/models/usage_iot_response.rb index 73728bb3c278..7b1e5c5ac07d 100644 --- a/lib/datadog_api_client/v1/models/usage_iot_response.rb +++ b/lib/datadog_api_client/v1/models/usage_iot_response.rb @@ -24,6 +24,8 @@ class UsageIoTResponse # Get hourly usage for IoT. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIoTResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageIoTResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_lambda_hour.rb b/lib/datadog_api_client/v1/models/usage_lambda_hour.rb index ad58fc53117b..f034b9c37b46 100644 --- a/lib/datadog_api_client/v1/models/usage_lambda_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_lambda_hour.rb @@ -37,6 +37,8 @@ class UsageLambdaHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageLambdaHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageLambdaHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'func_count') @@ -107,6 +111,26 @@ 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 @@ -118,6 +142,7 @@ def ==(o) invocations_sum == o.invocations_sum && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_lambda_response.rb b/lib/datadog_api_client/v1/models/usage_lambda_response.rb index fbf73f6ec3f9..32329494e4e2 100644 --- a/lib/datadog_api_client/v1/models/usage_lambda_response.rb +++ b/lib/datadog_api_client/v1/models/usage_lambda_response.rb @@ -25,6 +25,8 @@ class UsageLambdaResponse # Get hourly usage for Lambda. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageLambdaResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageLambdaResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -64,6 +68,26 @@ 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 @@ -71,6 +95,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_logs_by_index_hour.rb b/lib/datadog_api_client/v1/models/usage_logs_by_index_hour.rb index eea661c32452..61d28db299a5 100644 --- a/lib/datadog_api_client/v1/models/usage_logs_by_index_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_logs_by_index_hour.rb @@ -42,6 +42,8 @@ class UsageLogsByIndexHour # The retention period (in days) for this index ID. attr_accessor :retention + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageLogsByIndexHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageLogsByIndexHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'event_count') @@ -115,6 +119,26 @@ 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 @@ -128,6 +152,7 @@ def ==(o) org_name == o.org_name && public_id == o.public_id && retention == o.retention + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_logs_by_index_response.rb b/lib/datadog_api_client/v1/models/usage_logs_by_index_response.rb index f72a5c31fa23..64ff8d47b60d 100644 --- a/lib/datadog_api_client/v1/models/usage_logs_by_index_response.rb +++ b/lib/datadog_api_client/v1/models/usage_logs_by_index_response.rb @@ -24,6 +24,8 @@ class UsageLogsByIndexResponse # An array of objects regarding hourly usage of logs by index response. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageLogsByIndexResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageLogsByIndexResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_logs_by_retention_hour.rb b/lib/datadog_api_client/v1/models/usage_logs_by_retention_hour.rb index 219c9a19d64f..76bf4d7da495 100644 --- a/lib/datadog_api_client/v1/models/usage_logs_by_retention_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_logs_by_retention_hour.rb @@ -39,6 +39,8 @@ class UsageLogsByRetentionHour # The retention period in days or "custom" for all custom retention usage. attr_accessor :retention + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -84,12 +86,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageLogsByRetentionHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageLogsByRetentionHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'indexed_events_count') @@ -117,6 +121,26 @@ 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 @@ -129,6 +153,7 @@ def ==(o) public_id == o.public_id && rehydrated_indexed_events_count == o.rehydrated_indexed_events_count && retention == o.retention + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_logs_by_retention_response.rb b/lib/datadog_api_client/v1/models/usage_logs_by_retention_response.rb index 677db6463273..116488524c89 100644 --- a/lib/datadog_api_client/v1/models/usage_logs_by_retention_response.rb +++ b/lib/datadog_api_client/v1/models/usage_logs_by_retention_response.rb @@ -24,6 +24,8 @@ class UsageLogsByRetentionResponse # Get hourly usage for indexed logs by retention period. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageLogsByRetentionResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageLogsByRetentionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_logs_hour.rb b/lib/datadog_api_client/v1/models/usage_logs_hour.rb index 23344bc9cc7e..82c703d6b294 100644 --- a/lib/datadog_api_client/v1/models/usage_logs_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_logs_hour.rb @@ -54,6 +54,8 @@ class UsageLogsHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -113,12 +115,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageLogsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageLogsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'billable_ingested_bytes') @@ -166,6 +170,26 @@ 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 @@ -183,6 +207,7 @@ def ==(o) logs_rehydrated_ingested_bytes == o.logs_rehydrated_ingested_bytes && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_logs_response.rb b/lib/datadog_api_client/v1/models/usage_logs_response.rb index 08d9c8ab8737..f5a6a91f84e1 100644 --- a/lib/datadog_api_client/v1/models/usage_logs_response.rb +++ b/lib/datadog_api_client/v1/models/usage_logs_response.rb @@ -24,6 +24,8 @@ class UsageLogsResponse # An array of objects regarding hourly usage of logs. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageLogsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageLogsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_network_flows_hour.rb b/lib/datadog_api_client/v1/models/usage_network_flows_hour.rb index 24fa0211de5b..c6067cf69d0a 100644 --- a/lib/datadog_api_client/v1/models/usage_network_flows_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_network_flows_hour.rb @@ -33,6 +33,8 @@ class UsageNetworkFlowsHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageNetworkFlowsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageNetworkFlowsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) indexed_events_count == o.indexed_events_count && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_network_flows_response.rb b/lib/datadog_api_client/v1/models/usage_network_flows_response.rb index 681d5156f6ad..523d7b5f6c43 100644 --- a/lib/datadog_api_client/v1/models/usage_network_flows_response.rb +++ b/lib/datadog_api_client/v1/models/usage_network_flows_response.rb @@ -24,6 +24,8 @@ class UsageNetworkFlowsResponse # Get hourly usage for Network Flows. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageNetworkFlowsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageNetworkFlowsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_network_hosts_hour.rb b/lib/datadog_api_client/v1/models/usage_network_hosts_hour.rb index 1d73ab5ccc0a..fc10291da683 100644 --- a/lib/datadog_api_client/v1/models/usage_network_hosts_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_network_hosts_hour.rb @@ -33,6 +33,8 @@ class UsageNetworkHostsHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageNetworkHostsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageNetworkHostsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'host_count') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_network_hosts_response.rb b/lib/datadog_api_client/v1/models/usage_network_hosts_response.rb index c816b4083362..d3c5f27441b4 100644 --- a/lib/datadog_api_client/v1/models/usage_network_hosts_response.rb +++ b/lib/datadog_api_client/v1/models/usage_network_hosts_response.rb @@ -24,6 +24,8 @@ class UsageNetworkHostsResponse # Get hourly usage for NPM hosts. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageNetworkHostsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageNetworkHostsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_online_archive_hour.rb b/lib/datadog_api_client/v1/models/usage_online_archive_hour.rb index 33f57854d433..3892f6cb8054 100644 --- a/lib/datadog_api_client/v1/models/usage_online_archive_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_online_archive_hour.rb @@ -33,6 +33,8 @@ class UsageOnlineArchiveHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageOnlineArchiveHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageOnlineArchiveHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) online_archive_events_count == o.online_archive_events_count && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_online_archive_response.rb b/lib/datadog_api_client/v1/models/usage_online_archive_response.rb index c6aaf58f881d..13849aad4887 100644 --- a/lib/datadog_api_client/v1/models/usage_online_archive_response.rb +++ b/lib/datadog_api_client/v1/models/usage_online_archive_response.rb @@ -24,6 +24,8 @@ class UsageOnlineArchiveResponse # Response containing Online Archive usage. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageOnlineArchiveResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageOnlineArchiveResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_profiling_hour.rb b/lib/datadog_api_client/v1/models/usage_profiling_hour.rb index 2fc993de4886..14a9e38608f7 100644 --- a/lib/datadog_api_client/v1/models/usage_profiling_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_profiling_hour.rb @@ -39,6 +39,8 @@ class UsageProfilingHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageProfilingHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageProfilingHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aas_count') @@ -116,6 +120,26 @@ 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 @@ -128,6 +152,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_profiling_response.rb b/lib/datadog_api_client/v1/models/usage_profiling_response.rb index 106f49759541..41a454463044 100644 --- a/lib/datadog_api_client/v1/models/usage_profiling_response.rb +++ b/lib/datadog_api_client/v1/models/usage_profiling_response.rb @@ -24,6 +24,8 @@ class UsageProfilingResponse # Get hourly usage for profiled hosts. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageProfilingResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageProfilingResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb b/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb index 04d76b1ccd2d..7601beae9520 100644 --- a/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb @@ -48,6 +48,8 @@ class UsageRumSessionsHour # Contains the number of mobile RUM sessions on React Native (data available beginning May 1, 2022). attr_accessor :session_count_reactnative + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -100,12 +102,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageRumSessionsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageRumSessionsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -145,6 +149,26 @@ 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 @@ -160,6 +184,7 @@ def ==(o) session_count_flutter == o.session_count_flutter && session_count_ios == o.session_count_ios && session_count_reactnative == o.session_count_reactnative + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_rum_sessions_response.rb b/lib/datadog_api_client/v1/models/usage_rum_sessions_response.rb index 14fbd92b799a..1823e9040d73 100644 --- a/lib/datadog_api_client/v1/models/usage_rum_sessions_response.rb +++ b/lib/datadog_api_client/v1/models/usage_rum_sessions_response.rb @@ -24,6 +24,8 @@ class UsageRumSessionsResponse # Get hourly usage for RUM sessions. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageRumSessionsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageRumSessionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_rum_units_hour.rb b/lib/datadog_api_client/v1/models/usage_rum_units_hour.rb index 0124db1b1fba..52a2ad5db7ae 100644 --- a/lib/datadog_api_client/v1/models/usage_rum_units_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_rum_units_hour.rb @@ -36,6 +36,8 @@ class UsageRumUnitsHour # Total RUM units across mobile and browser RUM. attr_accessor :rum_units + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageRumUnitsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageRumUnitsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'browser_rum_units') @@ -107,6 +111,26 @@ 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 @@ -118,6 +142,7 @@ def ==(o) org_name == o.org_name && public_id == o.public_id && rum_units == o.rum_units + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_rum_units_response.rb b/lib/datadog_api_client/v1/models/usage_rum_units_response.rb index 4f7146735c9e..190cbbd6d21c 100644 --- a/lib/datadog_api_client/v1/models/usage_rum_units_response.rb +++ b/lib/datadog_api_client/v1/models/usage_rum_units_response.rb @@ -24,6 +24,8 @@ class UsageRumUnitsResponse # Get hourly usage for RUM Units. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageRumUnitsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageRumUnitsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_sds_hour.rb b/lib/datadog_api_client/v1/models/usage_sds_hour.rb index 2201fdc2a93f..12dd5722ba0b 100644 --- a/lib/datadog_api_client/v1/models/usage_sds_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_sds_hour.rb @@ -45,6 +45,8 @@ class UsageSDSHour # The total number of bytes scanned across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour. attr_accessor :total_scanned_bytes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -95,12 +97,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSDSHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSDSHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'apm_scanned_bytes') @@ -136,6 +140,26 @@ 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 @@ -150,6 +174,7 @@ def ==(o) public_id == o.public_id && rum_scanned_bytes == o.rum_scanned_bytes && total_scanned_bytes == o.total_scanned_bytes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_sds_response.rb b/lib/datadog_api_client/v1/models/usage_sds_response.rb index c8a64d5e84a2..d5596d3c6b27 100644 --- a/lib/datadog_api_client/v1/models/usage_sds_response.rb +++ b/lib/datadog_api_client/v1/models/usage_sds_response.rb @@ -24,6 +24,8 @@ class UsageSDSResponse # Get hourly usage for Sensitive Data Scanner. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSDSResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSDSResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_snmp_hour.rb b/lib/datadog_api_client/v1/models/usage_snmp_hour.rb index 7c663cd588f7..ad4b67e25e7a 100644 --- a/lib/datadog_api_client/v1/models/usage_snmp_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_snmp_hour.rb @@ -33,6 +33,8 @@ class UsageSNMPHour # Contains the number of SNMP devices. attr_accessor :snmp_devices + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSNMPHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSNMPHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) org_name == o.org_name && public_id == o.public_id && snmp_devices == o.snmp_devices + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_snmp_response.rb b/lib/datadog_api_client/v1/models/usage_snmp_response.rb index 91a6f79f0d70..f9d84164b141 100644 --- a/lib/datadog_api_client/v1/models/usage_snmp_response.rb +++ b/lib/datadog_api_client/v1/models/usage_snmp_response.rb @@ -24,6 +24,8 @@ class UsageSNMPResponse # Get hourly usage for SNMP devices. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSNMPResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSNMPResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_attributes.rb b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_attributes.rb index 7c0ad5fc13fb..1964beb8a470 100644 --- a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_attributes.rb +++ b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_attributes.rb @@ -39,6 +39,8 @@ class UsageSpecifiedCustomReportsAttributes # A list of tags to apply to specified custom reports. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'computed_on') @@ -108,6 +112,26 @@ 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 @@ -120,6 +144,7 @@ def ==(o) size == o.size && start_date == o.start_date && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_data.rb b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_data.rb index 68aa6f3bc539..be4cced3feef 100644 --- a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_data.rb +++ b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_data.rb @@ -30,6 +30,8 @@ class UsageSpecifiedCustomReportsData # The type of reports. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_meta.rb b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_meta.rb index fd2e88433e06..0ba55a7841d0 100644 --- a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_meta.rb +++ b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_meta.rb @@ -24,6 +24,8 @@ class UsageSpecifiedCustomReportsMeta # The object containing page total count for specified ID. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_page.rb b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_page.rb index 943930df1662..3a3bc6c9af57 100644 --- a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_page.rb +++ b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_page.rb @@ -24,6 +24,8 @@ class UsageSpecifiedCustomReportsPage # Total page count. attr_accessor :total_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_count') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && total_count == o.total_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_response.rb b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_response.rb index 57300ce53d8e..4dc4c183774a 100644 --- a/lib/datadog_api_client/v1/models/usage_specified_custom_reports_response.rb +++ b/lib/datadog_api_client/v1/models/usage_specified_custom_reports_response.rb @@ -27,6 +27,8 @@ class UsageSpecifiedCustomReportsResponse # The object containing document metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSpecifiedCustomReportsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_summary_date.rb b/lib/datadog_api_client/v1/models/usage_summary_date.rb index bda92507e82a..a1682ebfb26c 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_date.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_date.rb @@ -417,6 +417,8 @@ class UsageSummaryDate # Sum of all workflows executed over all hours in the current date for all organizations. attr_accessor :workflow_executions_usage_sum + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -703,12 +705,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSummaryDate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSummaryDate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'agent_host_top99p') @@ -1242,6 +1246,26 @@ 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 @@ -1380,6 +1404,7 @@ def ==(o) vsphere_host_top99p == o.vsphere_host_top99p && vuln_management_host_count_top99p == o.vuln_management_host_count_top99p && workflow_executions_usage_sum == o.workflow_executions_usage_sum + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_summary_date_org.rb b/lib/datadog_api_client/v1/models/usage_summary_date_org.rb index 633d95594cc7..b8e4cf69bc4d 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_date_org.rb @@ -435,6 +435,8 @@ class UsageSummaryDateOrg # Sum of all workflows executed over all hours in the current date for the given org. attr_accessor :workflow_executions_usage_sum + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -733,12 +735,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSummaryDateOrg` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSummaryDateOrg`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_name') @@ -1294,6 +1298,26 @@ 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 @@ -1438,6 +1462,7 @@ def ==(o) vsphere_host_top99p == o.vsphere_host_top99p && vuln_management_host_count_top99p == o.vuln_management_host_count_top99p && workflow_executions_usage_sum == o.workflow_executions_usage_sum + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_summary_response.rb b/lib/datadog_api_client/v1/models/usage_summary_response.rb index 878841ae8a80..009f0b040aed 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_response.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_response.rb @@ -450,6 +450,8 @@ class UsageSummaryResponse # Sum of all workflows executed over all hours in the current month for all organizations. attr_accessor :workflow_executions_usage_agg_sum + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -758,12 +760,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSummaryResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSummaryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'agent_host_top99p_sum') @@ -1341,6 +1345,26 @@ 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 @@ -1490,6 +1514,7 @@ def ==(o) vsphere_host_top99p_sum == o.vsphere_host_top99p_sum && vuln_management_host_count_top99p_sum == o.vuln_management_host_count_top99p_sum && workflow_executions_usage_agg_sum == o.workflow_executions_usage_agg_sum + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_synthetics_api_hour.rb b/lib/datadog_api_client/v1/models/usage_synthetics_api_hour.rb index 5dc51fa9ebd0..4cc56ec4f2d8 100644 --- a/lib/datadog_api_client/v1/models/usage_synthetics_api_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_synthetics_api_hour.rb @@ -33,6 +33,8 @@ class UsageSyntheticsAPIHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSyntheticsAPIHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSyntheticsAPIHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'check_calls_count') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_synthetics_api_response.rb b/lib/datadog_api_client/v1/models/usage_synthetics_api_response.rb index c2e74cb9cdcb..b923017a8f0d 100644 --- a/lib/datadog_api_client/v1/models/usage_synthetics_api_response.rb +++ b/lib/datadog_api_client/v1/models/usage_synthetics_api_response.rb @@ -24,6 +24,8 @@ class UsageSyntheticsAPIResponse # Get hourly usage for Synthetics API tests. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSyntheticsAPIResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSyntheticsAPIResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_synthetics_browser_hour.rb b/lib/datadog_api_client/v1/models/usage_synthetics_browser_hour.rb index 816481805bdd..e87b7e29be25 100644 --- a/lib/datadog_api_client/v1/models/usage_synthetics_browser_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_synthetics_browser_hour.rb @@ -33,6 +33,8 @@ class UsageSyntheticsBrowserHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSyntheticsBrowserHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSyntheticsBrowserHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'browser_check_calls_count') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_synthetics_browser_response.rb b/lib/datadog_api_client/v1/models/usage_synthetics_browser_response.rb index c8c43849e01f..3dbbb0990e18 100644 --- a/lib/datadog_api_client/v1/models/usage_synthetics_browser_response.rb +++ b/lib/datadog_api_client/v1/models/usage_synthetics_browser_response.rb @@ -24,6 +24,8 @@ class UsageSyntheticsBrowserResponse # Get hourly usage for Synthetics Browser tests. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSyntheticsBrowserResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSyntheticsBrowserResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_synthetics_hour.rb b/lib/datadog_api_client/v1/models/usage_synthetics_hour.rb index 1c84d179ce16..9ba1ce8a4deb 100644 --- a/lib/datadog_api_client/v1/models/usage_synthetics_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_synthetics_hour.rb @@ -33,6 +33,8 @@ class UsageSyntheticsHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSyntheticsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSyntheticsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'check_calls_count') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) hour == o.hour && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_synthetics_response.rb b/lib/datadog_api_client/v1/models/usage_synthetics_response.rb index 7eb380584905..4f03be9960e0 100644 --- a/lib/datadog_api_client/v1/models/usage_synthetics_response.rb +++ b/lib/datadog_api_client/v1/models/usage_synthetics_response.rb @@ -24,6 +24,8 @@ class UsageSyntheticsResponse # Array with the number of hourly Synthetics test run for a given organization. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSyntheticsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSyntheticsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_timeseries_hour.rb b/lib/datadog_api_client/v1/models/usage_timeseries_hour.rb index 8ad3666f9ec0..f525cedc4638 100644 --- a/lib/datadog_api_client/v1/models/usage_timeseries_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_timeseries_hour.rb @@ -39,6 +39,8 @@ class UsageTimeseriesHour # The organization public ID. attr_accessor :public_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageTimeseriesHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageTimeseriesHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hour') @@ -106,6 +110,26 @@ 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 @@ -118,6 +142,7 @@ def ==(o) num_custom_timeseries == o.num_custom_timeseries && org_name == o.org_name && public_id == o.public_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_timeseries_response.rb b/lib/datadog_api_client/v1/models/usage_timeseries_response.rb index 7cd580246c24..f5fec66df5a0 100644 --- a/lib/datadog_api_client/v1/models/usage_timeseries_response.rb +++ b/lib/datadog_api_client/v1/models/usage_timeseries_response.rb @@ -24,6 +24,8 @@ class UsageTimeseriesResponse # An array of objects regarding hourly usage of timeseries. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageTimeseriesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageTimeseriesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_top_avg_metrics_hour.rb b/lib/datadog_api_client/v1/models/usage_top_avg_metrics_hour.rb index 05382bff3949..1b36c914c0be 100644 --- a/lib/datadog_api_client/v1/models/usage_top_avg_metrics_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_top_avg_metrics_hour.rb @@ -33,6 +33,8 @@ class UsageTopAvgMetricsHour # Contains the custom metric name. attr_accessor :metric_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageTopAvgMetricsHour` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageTopAvgMetricsHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'avg_metric_hour') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) max_metric_hour == o.max_metric_hour && metric_category == o.metric_category && metric_name == o.metric_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_top_avg_metrics_metadata.rb b/lib/datadog_api_client/v1/models/usage_top_avg_metrics_metadata.rb index cb285009f9de..ee8196d354c2 100644 --- a/lib/datadog_api_client/v1/models/usage_top_avg_metrics_metadata.rb +++ b/lib/datadog_api_client/v1/models/usage_top_avg_metrics_metadata.rb @@ -30,6 +30,8 @@ class UsageTopAvgMetricsMetadata # The metadata for the current pagination. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageTopAvgMetricsMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageTopAvgMetricsMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'day') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) day == o.day && month == o.month && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_top_avg_metrics_pagination.rb b/lib/datadog_api_client/v1/models/usage_top_avg_metrics_pagination.rb index 36a94082a497..dfdd048270f5 100644 --- a/lib/datadog_api_client/v1/models/usage_top_avg_metrics_pagination.rb +++ b/lib/datadog_api_client/v1/models/usage_top_avg_metrics_pagination.rb @@ -30,6 +30,8 @@ class UsageTopAvgMetricsPagination # Total number of records. attr_accessor :total_number_of_records + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -67,12 +69,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageTopAvgMetricsPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageTopAvgMetricsPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'limit') @@ -88,6 +92,26 @@ 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 @@ -97,6 +121,7 @@ def ==(o) limit == o.limit && next_record_id == o.next_record_id && total_number_of_records == o.total_number_of_records + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/usage_top_avg_metrics_response.rb b/lib/datadog_api_client/v1/models/usage_top_avg_metrics_response.rb index 91cd837adca3..da4c672f359e 100644 --- a/lib/datadog_api_client/v1/models/usage_top_avg_metrics_response.rb +++ b/lib/datadog_api_client/v1/models/usage_top_avg_metrics_response.rb @@ -27,6 +27,8 @@ class UsageTopAvgMetricsResponse # Number of hourly recorded custom metrics for a given organization. attr_accessor :usage + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageTopAvgMetricsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageTopAvgMetricsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'metadata') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && metadata == o.metadata && usage == o.usage + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/user.rb b/lib/datadog_api_client/v1/models/user.rb index 3e6544f9d2f7..e8c4860f5403 100644 --- a/lib/datadog_api_client/v1/models/user.rb +++ b/lib/datadog_api_client/v1/models/user.rb @@ -42,6 +42,8 @@ class User # Whether or not the user logged in Datadog at least once. attr_accessor :verified + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -86,12 +88,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::User` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::User`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'access_role') @@ -123,6 +127,26 @@ 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 @@ -136,6 +160,7 @@ def ==(o) icon == o.icon && name == o.name && verified == o.verified + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/user_disable_response.rb b/lib/datadog_api_client/v1/models/user_disable_response.rb index b87289942fd6..0ef61674a62a 100644 --- a/lib/datadog_api_client/v1/models/user_disable_response.rb +++ b/lib/datadog_api_client/v1/models/user_disable_response.rb @@ -24,6 +24,8 @@ class UserDisableResponse # Information pertaining to a user disabled for a given organization. attr_accessor :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserDisableResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UserDisableResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'message') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/user_list_response.rb b/lib/datadog_api_client/v1/models/user_list_response.rb index b195edae0f8b..0da850e2d410 100644 --- a/lib/datadog_api_client/v1/models/user_list_response.rb +++ b/lib/datadog_api_client/v1/models/user_list_response.rb @@ -24,6 +24,8 @@ class UserListResponse # Array of users. attr_accessor :users + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UserListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'users') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && users == o.users + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/user_response.rb b/lib/datadog_api_client/v1/models/user_response.rb index e3c15fcb3074..1820bb67c90a 100644 --- a/lib/datadog_api_client/v1/models/user_response.rb +++ b/lib/datadog_api_client/v1/models/user_response.rb @@ -24,6 +24,8 @@ class UserResponse # Create, edit, and disable users. attr_accessor :user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UserResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'user') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && user == o.user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/webhooks_integration.rb b/lib/datadog_api_client/v1/models/webhooks_integration.rb index 5d8ff322a889..67fd1ddbf140 100644 --- a/lib/datadog_api_client/v1/models/webhooks_integration.rb +++ b/lib/datadog_api_client/v1/models/webhooks_integration.rb @@ -42,6 +42,8 @@ class WebhooksIntegration # URL of the webhook. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WebhooksIntegration` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WebhooksIntegration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_headers') @@ -141,6 +145,26 @@ def url=(url) @url = url 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 @@ -152,6 +176,7 @@ def ==(o) name == o.name && payload == o.payload && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable.rb b/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable.rb index cda7c69409aa..6b91b0a3c3a9 100644 --- a/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable.rb +++ b/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable.rb @@ -31,6 +31,8 @@ class WebhooksIntegrationCustomVariable # Value of the custom variable. attr_reader :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WebhooksIntegrationCustomVariable` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WebhooksIntegrationCustomVariable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_secret') @@ -120,6 +124,26 @@ def value=(value) @value = value 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 @@ -129,6 +153,7 @@ def ==(o) is_secret == o.is_secret && name == o.name && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable_response.rb b/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable_response.rb index 247ac6818504..324838ddec6d 100644 --- a/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable_response.rb +++ b/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable_response.rb @@ -31,6 +31,8 @@ class WebhooksIntegrationCustomVariableResponse # Value of the custom variable. It won't be returned if the variable is secret. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WebhooksIntegrationCustomVariableResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WebhooksIntegrationCustomVariableResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_secret') @@ -109,6 +113,26 @@ def name=(name) @name = name 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 @@ -118,6 +142,7 @@ def ==(o) is_secret == o.is_secret && name == o.name && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable_update_request.rb b/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable_update_request.rb index 46599091bab2..17d430964f03 100644 --- a/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable_update_request.rb +++ b/lib/datadog_api_client/v1/models/webhooks_integration_custom_variable_update_request.rb @@ -33,6 +33,8 @@ class WebhooksIntegrationCustomVariableUpdateRequest # Value of the custom variable. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WebhooksIntegrationCustomVariableUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WebhooksIntegrationCustomVariableUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_secret') @@ -82,6 +86,26 @@ 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 @@ -91,6 +115,7 @@ def ==(o) is_secret == o.is_secret && name == o.name && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb b/lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb index deb73cfc2279..89063c6e3d86 100644 --- a/lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb +++ b/lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb @@ -44,6 +44,8 @@ class WebhooksIntegrationUpdateRequest # URL of the webhook. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -84,12 +86,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WebhooksIntegrationUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WebhooksIntegrationUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_headers') @@ -113,6 +117,26 @@ 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 @@ -124,6 +148,7 @@ def ==(o) name == o.name && payload == o.payload && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget.rb b/lib/datadog_api_client/v1/models/widget.rb index bc77870cfd49..7482f8a35fde 100644 --- a/lib/datadog_api_client/v1/models/widget.rb +++ b/lib/datadog_api_client/v1/models/widget.rb @@ -35,6 +35,8 @@ class Widget # The layout for a widget on a `free` or **new dashboard layout** dashboard. attr_accessor :layout + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::Widget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::Widget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -102,6 +106,26 @@ def definition=(definition) @definition = definition 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 @@ -111,6 +135,7 @@ def ==(o) definition == o.definition && id == o.id && layout == o.layout + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_axis.rb b/lib/datadog_api_client/v1/models/widget_axis.rb index 4c443740f88e..62aaa5b27990 100644 --- a/lib/datadog_api_client/v1/models/widget_axis.rb +++ b/lib/datadog_api_client/v1/models/widget_axis.rb @@ -36,6 +36,8 @@ class WidgetAxis # Specifies the scale type. Possible values are `linear`, `log`, `sqrt`, and `pow##` (for example `pow2` or `pow0.5`). attr_accessor :scale + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetAxis` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetAxis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'include_zero') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) max == o.max && min == o.min && scale == o.scale + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_conditional_format.rb b/lib/datadog_api_client/v1/models/widget_conditional_format.rb index c2bf26001b3f..872ebc6bd212 100644 --- a/lib/datadog_api_client/v1/models/widget_conditional_format.rb +++ b/lib/datadog_api_client/v1/models/widget_conditional_format.rb @@ -48,6 +48,8 @@ class WidgetConditionalFormat # Value for the comparator. attr_reader :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetConditionalFormat` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetConditionalFormat`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'comparator') @@ -173,6 +177,26 @@ def value=(value) @value = value 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 @@ -188,6 +212,7 @@ def ==(o) palette == o.palette && timeframe == o.timeframe && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_custom_link.rb b/lib/datadog_api_client/v1/models/widget_custom_link.rb index 357acd7a331f..4b7689cd1025 100644 --- a/lib/datadog_api_client/v1/models/widget_custom_link.rb +++ b/lib/datadog_api_client/v1/models/widget_custom_link.rb @@ -33,6 +33,8 @@ class WidgetCustomLink # The label ID that refers to a context menu link. Can be `logs`, `hosts`, `traces`, `profiles`, `processes`, `containers`, or `rum`. attr_accessor :override_label + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetCustomLink` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetCustomLink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_hidden') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) label == o.label && link == o.link && override_label == o.override_label + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_event.rb b/lib/datadog_api_client/v1/models/widget_event.rb index 263d88019a97..2d443905b0a9 100644 --- a/lib/datadog_api_client/v1/models/widget_event.rb +++ b/lib/datadog_api_client/v1/models/widget_event.rb @@ -30,6 +30,8 @@ class WidgetEvent # The execution method for multi-value filters. attr_accessor :tags_execution + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetEvent` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'q') @@ -91,6 +95,26 @@ def q=(q) @q = q 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 @@ -99,6 +123,7 @@ def ==(o) self.class == o.class && q == o.q && tags_execution == o.tags_execution + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_field_sort.rb b/lib/datadog_api_client/v1/models/widget_field_sort.rb index 8a8831963749..f346749e587b 100644 --- a/lib/datadog_api_client/v1/models/widget_field_sort.rb +++ b/lib/datadog_api_client/v1/models/widget_field_sort.rb @@ -27,6 +27,8 @@ class WidgetFieldSort # Widget sorting methods. attr_reader :order + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetFieldSort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetFieldSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'column') @@ -99,6 +103,26 @@ def order=(order) @order = order 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && column == o.column && order == o.order + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_formula.rb b/lib/datadog_api_client/v1/models/widget_formula.rb index 48f8b40787bb..65a165b09525 100644 --- a/lib/datadog_api_client/v1/models/widget_formula.rb +++ b/lib/datadog_api_client/v1/models/widget_formula.rb @@ -39,6 +39,8 @@ class WidgetFormula # Styling options for widget formulas. attr_accessor :style + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetFormula` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetFormula`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_alias') @@ -126,6 +130,26 @@ def formula=(formula) @formula = formula 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 @@ -138,6 +162,7 @@ def ==(o) formula == o.formula && limit == o.limit && style == o.style + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_formula_limit.rb b/lib/datadog_api_client/v1/models/widget_formula_limit.rb index 5a48eccf606a..93d6254eb958 100644 --- a/lib/datadog_api_client/v1/models/widget_formula_limit.rb +++ b/lib/datadog_api_client/v1/models/widget_formula_limit.rb @@ -27,6 +27,8 @@ class WidgetFormulaLimit # Direction of sort. attr_accessor :order + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetFormulaLimit` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetFormulaLimit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && count == o.count && order == o.order + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_formula_sort.rb b/lib/datadog_api_client/v1/models/widget_formula_sort.rb index b4ca83e3820b..0df6dc3e9e67 100644 --- a/lib/datadog_api_client/v1/models/widget_formula_sort.rb +++ b/lib/datadog_api_client/v1/models/widget_formula_sort.rb @@ -30,6 +30,8 @@ class WidgetFormulaSort # Set the sort type to formula. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetFormulaSort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetFormulaSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'index') @@ -123,6 +127,26 @@ def type=(type) @type = type 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 @@ -132,6 +156,7 @@ def ==(o) index == o.index && order == o.order && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_formula_style.rb b/lib/datadog_api_client/v1/models/widget_formula_style.rb index b30b038c6ddf..fc2e33d3b5c4 100644 --- a/lib/datadog_api_client/v1/models/widget_formula_style.rb +++ b/lib/datadog_api_client/v1/models/widget_formula_style.rb @@ -27,6 +27,8 @@ class WidgetFormulaStyle # Index specifying which color to use within the palette. attr_accessor :palette_index + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetFormulaStyle` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetFormulaStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'palette') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && palette == o.palette && palette_index == o.palette_index + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_group_sort.rb b/lib/datadog_api_client/v1/models/widget_group_sort.rb index a9f54ac312a0..a07d5996ed10 100644 --- a/lib/datadog_api_client/v1/models/widget_group_sort.rb +++ b/lib/datadog_api_client/v1/models/widget_group_sort.rb @@ -30,6 +30,8 @@ class WidgetGroupSort # Set the sort type to group. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetGroupSort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetGroupSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) name == o.name && order == o.order && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_layout.rb b/lib/datadog_api_client/v1/models/widget_layout.rb index 8a70b36eb239..a5709449e2ba 100644 --- a/lib/datadog_api_client/v1/models/widget_layout.rb +++ b/lib/datadog_api_client/v1/models/widget_layout.rb @@ -37,6 +37,8 @@ class WidgetLayout # The position of the widget on the y (vertical) axis. Should be a non-negative integer. attr_reader :y + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetLayout` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetLayout`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'height') @@ -165,6 +169,26 @@ def y=(y) @y = y 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 @@ -176,6 +200,7 @@ def ==(o) width == o.width && x == o.x && y == o.y + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_marker.rb b/lib/datadog_api_client/v1/models/widget_marker.rb index 154287bb82e6..a9744f4a1e51 100644 --- a/lib/datadog_api_client/v1/models/widget_marker.rb +++ b/lib/datadog_api_client/v1/models/widget_marker.rb @@ -37,6 +37,8 @@ class WidgetMarker # Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10. attr_reader :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -67,12 +69,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetMarker` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetMarker`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'display_type') @@ -110,6 +114,26 @@ def value=(value) @value = value 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 @@ -120,6 +144,7 @@ def ==(o) label == o.label && time == o.time && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_request_style.rb b/lib/datadog_api_client/v1/models/widget_request_style.rb index fce0bbde7310..e2ef48ff5378 100644 --- a/lib/datadog_api_client/v1/models/widget_request_style.rb +++ b/lib/datadog_api_client/v1/models/widget_request_style.rb @@ -30,6 +30,8 @@ class WidgetRequestStyle # Color palette to apply to the widget. attr_accessor :palette + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetRequestStyle` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetRequestStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'line_type') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) line_type == o.line_type && line_width == o.line_width && palette == o.palette + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_sort_by.rb b/lib/datadog_api_client/v1/models/widget_sort_by.rb index 670a54bff2af..19cc7236f892 100644 --- a/lib/datadog_api_client/v1/models/widget_sort_by.rb +++ b/lib/datadog_api_client/v1/models/widget_sort_by.rb @@ -27,6 +27,8 @@ class WidgetSortBy # The array of items to sort the widget by in order. attr_accessor :order_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetSortBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetSortBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -90,6 +94,26 @@ def count=(count) @count = count 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && count == o.count && order_by == o.order_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_style.rb b/lib/datadog_api_client/v1/models/widget_style.rb index 6af52e104beb..1d2a2ecb334a 100644 --- a/lib/datadog_api_client/v1/models/widget_style.rb +++ b/lib/datadog_api_client/v1/models/widget_style.rb @@ -24,6 +24,8 @@ class WidgetStyle # Color palette to apply to the widget. attr_accessor :palette + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetStyle` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'palette') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && palette == o.palette + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v1/models/widget_time.rb b/lib/datadog_api_client/v1/models/widget_time.rb index 58f194a55404..c8a0524315c5 100644 --- a/lib/datadog_api_client/v1/models/widget_time.rb +++ b/lib/datadog_api_client/v1/models/widget_time.rb @@ -24,6 +24,8 @@ class WidgetTime # The available timeframes depend on the widget you are using. attr_accessor :live_span + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetTime` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WidgetTime`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'live_span') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && live_span == o.live_span + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/model_base.rb b/lib/datadog_api_client/v2/model_base.rb index c1c63472d1cc..7bdfde0c6bcd 100644 --- a/lib/datadog_api_client/v2/model_base.rb +++ b/lib/datadog_api_client/v2/model_base.rb @@ -57,6 +57,11 @@ def eql?(o) # @!visibility private def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + unless self.respond_to?(:additional_properties) + unless attributes.keys.all? { |key| self.class.openapi_types.key?(key) } + raise SchemaMismatchError, "Additional properties are not allowed" + end + end self.class.openapi_types.each_pair do |key, type| if attributes.key?(self.class.attribute_map[key]) && attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) diff --git a/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb b/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb index c198a747d9cc..6103e109359f 100644 --- a/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb +++ b/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb @@ -27,6 +27,8 @@ class ActiveBillingDimensionsAttributes # List of active billing dimensions. Example: `[infra_host, apm_host, serverless_infra]`. attr_accessor :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ActiveBillingDimensionsAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ActiveBillingDimensionsAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'month') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && month == o.month && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb b/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb index 5be4f6b54dd6..1d0dc4e07715 100644 --- a/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb +++ b/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb @@ -30,6 +30,8 @@ class ActiveBillingDimensionsBody # Type of active billing dimensions data. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ActiveBillingDimensionsBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ActiveBillingDimensionsBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb b/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb index f24b38f46a42..0ca80517333d 100644 --- a/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb +++ b/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb @@ -24,6 +24,8 @@ class ActiveBillingDimensionsResponse # Active billing dimensions data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ActiveBillingDimensionsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ActiveBillingDimensionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_error_response.rb b/lib/datadog_api_client/v2/models/api_error_response.rb index 7ddbf8b8ad46..3e992f7bc778 100644 --- a/lib/datadog_api_client/v2/models/api_error_response.rb +++ b/lib/datadog_api_client/v2/models/api_error_response.rb @@ -24,6 +24,8 @@ class APIErrorResponse # A list of errors. attr_reader :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIErrorResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'errors') @@ -81,6 +85,26 @@ def errors=(errors) @errors = errors 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_key_create_attributes.rb b/lib/datadog_api_client/v2/models/api_key_create_attributes.rb index ceb18ef342fe..f0b87999efb6 100644 --- a/lib/datadog_api_client/v2/models/api_key_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/api_key_create_attributes.rb @@ -30,6 +30,8 @@ class APIKeyCreateAttributes # The APIKeyCreateAttributes remote_config_read_enabled. attr_accessor :remote_config_read_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeyCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeyCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'category') @@ -97,6 +101,26 @@ def name=(name) @name = name 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 @@ -106,6 +130,7 @@ def ==(o) category == o.category && name == o.name && remote_config_read_enabled == o.remote_config_read_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_key_create_data.rb b/lib/datadog_api_client/v2/models/api_key_create_data.rb index d776a869a15c..d3adfe0ddb03 100644 --- a/lib/datadog_api_client/v2/models/api_key_create_data.rb +++ b/lib/datadog_api_client/v2/models/api_key_create_data.rb @@ -27,6 +27,8 @@ class APIKeyCreateData # API Keys resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeyCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeyCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_key_create_request.rb b/lib/datadog_api_client/v2/models/api_key_create_request.rb index 5e271b758ff0..e3f3818214f8 100644 --- a/lib/datadog_api_client/v2/models/api_key_create_request.rb +++ b/lib/datadog_api_client/v2/models/api_key_create_request.rb @@ -24,6 +24,8 @@ class APIKeyCreateRequest # Object used to create an API key. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeyCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeyCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_key_relationships.rb b/lib/datadog_api_client/v2/models/api_key_relationships.rb index 20c2d90b4f5c..25c7ae3d6f11 100644 --- a/lib/datadog_api_client/v2/models/api_key_relationships.rb +++ b/lib/datadog_api_client/v2/models/api_key_relationships.rb @@ -27,6 +27,8 @@ class APIKeyRelationships # Relationship to user. attr_accessor :modified_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeyRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeyRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_by') @@ -78,6 +82,26 @@ 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 @@ -86,6 +110,7 @@ def ==(o) self.class == o.class && created_by == o.created_by && modified_by == o.modified_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_key_response.rb b/lib/datadog_api_client/v2/models/api_key_response.rb index 1f1c48d78dca..776572151d2b 100644 --- a/lib/datadog_api_client/v2/models/api_key_response.rb +++ b/lib/datadog_api_client/v2/models/api_key_response.rb @@ -27,6 +27,8 @@ class APIKeyResponse # Array of objects related to the API key. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeyResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_key_update_attributes.rb b/lib/datadog_api_client/v2/models/api_key_update_attributes.rb index 77cd36c1ffac..880f5f7a2244 100644 --- a/lib/datadog_api_client/v2/models/api_key_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/api_key_update_attributes.rb @@ -30,6 +30,8 @@ class APIKeyUpdateAttributes # The APIKeyUpdateAttributes remote_config_read_enabled. attr_accessor :remote_config_read_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeyUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeyUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'category') @@ -97,6 +101,26 @@ def name=(name) @name = name 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 @@ -106,6 +130,7 @@ def ==(o) category == o.category && name == o.name && remote_config_read_enabled == o.remote_config_read_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_key_update_data.rb b/lib/datadog_api_client/v2/models/api_key_update_data.rb index 0e3ae3074ab0..ccecc7ab8d6c 100644 --- a/lib/datadog_api_client/v2/models/api_key_update_data.rb +++ b/lib/datadog_api_client/v2/models/api_key_update_data.rb @@ -30,6 +30,8 @@ class APIKeyUpdateData # API Keys resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeyUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeyUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_key_update_request.rb b/lib/datadog_api_client/v2/models/api_key_update_request.rb index 0e9c5600f06d..4d911e94bbd3 100644 --- a/lib/datadog_api_client/v2/models/api_key_update_request.rb +++ b/lib/datadog_api_client/v2/models/api_key_update_request.rb @@ -24,6 +24,8 @@ class APIKeyUpdateRequest # Object used to update an API key. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeyUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeyUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_keys_response.rb b/lib/datadog_api_client/v2/models/api_keys_response.rb index dede1b99cd5c..7a8873e84508 100644 --- a/lib/datadog_api_client/v2/models/api_keys_response.rb +++ b/lib/datadog_api_client/v2/models/api_keys_response.rb @@ -30,6 +30,8 @@ class APIKeysResponse # Additional information related to api keys response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeysResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeysResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_keys_response_meta.rb b/lib/datadog_api_client/v2/models/api_keys_response_meta.rb index 11322f5c3742..122302fad067 100644 --- a/lib/datadog_api_client/v2/models/api_keys_response_meta.rb +++ b/lib/datadog_api_client/v2/models/api_keys_response_meta.rb @@ -27,6 +27,8 @@ class APIKeysResponseMeta # Additional information related to the API keys response. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeysResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeysResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'max_allowed') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && max_allowed == o.max_allowed && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb b/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb index 62e040c76ef1..35153d3720d8 100644 --- a/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb +++ b/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb @@ -24,6 +24,8 @@ class APIKeysResponseMetaPage # Total filtered application key count. attr_accessor :total_filtered_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::APIKeysResponseMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::APIKeysResponseMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_filtered_count') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && total_filtered_count == o.total_filtered_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_create_attributes.rb b/lib/datadog_api_client/v2/models/application_key_create_attributes.rb index 8d6e459e0a00..7e27a64e0c35 100644 --- a/lib/datadog_api_client/v2/models/application_key_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/application_key_create_attributes.rb @@ -27,6 +27,8 @@ class ApplicationKeyCreateAttributes # Array of scopes to grant the application key. attr_accessor :scopes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -98,6 +102,26 @@ def name=(name) @name = name 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 @@ -106,6 +130,7 @@ def ==(o) self.class == o.class && name == o.name && scopes == o.scopes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_create_data.rb b/lib/datadog_api_client/v2/models/application_key_create_data.rb index 8785ad9a9f79..cf551863210e 100644 --- a/lib/datadog_api_client/v2/models/application_key_create_data.rb +++ b/lib/datadog_api_client/v2/models/application_key_create_data.rb @@ -27,6 +27,8 @@ class ApplicationKeyCreateData # Application Keys resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_create_request.rb b/lib/datadog_api_client/v2/models/application_key_create_request.rb index d65b677ee3ff..4c7e587e324c 100644 --- a/lib/datadog_api_client/v2/models/application_key_create_request.rb +++ b/lib/datadog_api_client/v2/models/application_key_create_request.rb @@ -24,6 +24,8 @@ class ApplicationKeyCreateRequest # Object used to create an application key. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_relationships.rb b/lib/datadog_api_client/v2/models/application_key_relationships.rb index c5076c04c805..b893cfe8ae05 100644 --- a/lib/datadog_api_client/v2/models/application_key_relationships.rb +++ b/lib/datadog_api_client/v2/models/application_key_relationships.rb @@ -24,6 +24,8 @@ class ApplicationKeyRelationships # Relationship to user. attr_accessor :owned_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'owned_by') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && owned_by == o.owned_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_response.rb b/lib/datadog_api_client/v2/models/application_key_response.rb index 6b279f78bb50..656ecf30b4da 100644 --- a/lib/datadog_api_client/v2/models/application_key_response.rb +++ b/lib/datadog_api_client/v2/models/application_key_response.rb @@ -27,6 +27,8 @@ class ApplicationKeyResponse # Array of objects related to the application key. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_response_meta.rb b/lib/datadog_api_client/v2/models/application_key_response_meta.rb index 95dd70b23662..e284e28a89c3 100644 --- a/lib/datadog_api_client/v2/models/application_key_response_meta.rb +++ b/lib/datadog_api_client/v2/models/application_key_response_meta.rb @@ -27,6 +27,8 @@ class ApplicationKeyResponseMeta # Additional information related to the application key response. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'max_allowed_per_user') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && max_allowed_per_user == o.max_allowed_per_user && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb b/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb index cce2e51cf70d..3793ce37b280 100644 --- a/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb +++ b/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb @@ -24,6 +24,8 @@ class ApplicationKeyResponseMetaPage # Total filtered application key count. attr_accessor :total_filtered_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyResponseMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyResponseMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_filtered_count') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && total_filtered_count == o.total_filtered_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_update_attributes.rb b/lib/datadog_api_client/v2/models/application_key_update_attributes.rb index 6c3f45bc95a4..70eb50d9c5fc 100644 --- a/lib/datadog_api_client/v2/models/application_key_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/application_key_update_attributes.rb @@ -27,6 +27,8 @@ class ApplicationKeyUpdateAttributes # Array of scopes to grant the application key. attr_accessor :scopes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -80,6 +84,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) self.class == o.class && name == o.name && scopes == o.scopes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_update_data.rb b/lib/datadog_api_client/v2/models/application_key_update_data.rb index 863e60483cc2..f50681a1db7d 100644 --- a/lib/datadog_api_client/v2/models/application_key_update_data.rb +++ b/lib/datadog_api_client/v2/models/application_key_update_data.rb @@ -30,6 +30,8 @@ class ApplicationKeyUpdateData # Application Keys resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/application_key_update_request.rb b/lib/datadog_api_client/v2/models/application_key_update_request.rb index f2c621809ad3..275889fc9ac2 100644 --- a/lib/datadog_api_client/v2/models/application_key_update_request.rb +++ b/lib/datadog_api_client/v2/models/application_key_update_request.rb @@ -24,6 +24,8 @@ class ApplicationKeyUpdateRequest # Object used to update an application key. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApplicationKeyUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ApplicationKeyUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_event.rb b/lib/datadog_api_client/v2/models/audit_logs_event.rb index 44ccb064ead9..e47e0e3900ed 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_event.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_event.rb @@ -30,6 +30,8 @@ class AuditLogsEvent # Type of the event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsEvent` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_event_attributes.rb b/lib/datadog_api_client/v2/models/audit_logs_event_attributes.rb index b08b2c3c7b7e..776c292fc25d 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_event_attributes.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_event_attributes.rb @@ -38,6 +38,8 @@ class AuditLogsEventAttributes # Timestamp of your event. attr_accessor :timestamp + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -70,12 +72,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsEventAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsEventAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -101,6 +105,26 @@ 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 @@ -112,6 +136,7 @@ def ==(o) service == o.service && tags == o.tags && timestamp == o.timestamp + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_events_response.rb b/lib/datadog_api_client/v2/models/audit_logs_events_response.rb index 079c7f928d0f..260e3a891690 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_events_response.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_events_response.rb @@ -30,6 +30,8 @@ class AuditLogsEventsResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsEventsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsEventsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_query_filter.rb b/lib/datadog_api_client/v2/models/audit_logs_query_filter.rb index a9bbb36140b1..ebce981ef271 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_query_filter.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_query_filter.rb @@ -30,6 +30,8 @@ class AuditLogsQueryFilter # Maximum time for the requested events. Supports date, math, and regular timestamps (in milliseconds). attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsQueryFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsQueryFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) from == o.from && query == o.query && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_query_options.rb b/lib/datadog_api_client/v2/models/audit_logs_query_options.rb index 2f6dc06c353f..232ef4cb645b 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_query_options.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_query_options.rb @@ -28,6 +28,8 @@ class AuditLogsQueryOptions # The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsQueryOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsQueryOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time_offset') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && time_offset == o.time_offset && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_query_page_options.rb b/lib/datadog_api_client/v2/models/audit_logs_query_page_options.rb index a073d8e35360..c576172eb1e3 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_query_page_options.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_query_page_options.rb @@ -27,6 +27,8 @@ class AuditLogsQueryPageOptions # Maximum number of events in the response. attr_reader :limit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsQueryPageOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsQueryPageOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -88,6 +92,26 @@ def limit=(limit) @limit = limit 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && cursor == o.cursor && limit == o.limit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_response_links.rb b/lib/datadog_api_client/v2/models/audit_logs_response_links.rb index f12cdeba888f..0f88b3c2935c 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_response_links.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_response_links.rb @@ -25,6 +25,8 @@ class AuditLogsResponseLinks # POST endpoint. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_response_metadata.rb b/lib/datadog_api_client/v2/models/audit_logs_response_metadata.rb index 63c571c4a9e6..6274790d70e9 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_response_metadata.rb @@ -37,6 +37,8 @@ class AuditLogsResponseMetadata # warnings are present in the response. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elapsed') @@ -100,6 +104,26 @@ 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 @@ -111,6 +135,7 @@ def ==(o) request_id == o.request_id && status == o.status && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_response_page.rb b/lib/datadog_api_client/v2/models/audit_logs_response_page.rb index 345875820f3e..52f0ca6c594d 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_response_page.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_response_page.rb @@ -24,6 +24,8 @@ class AuditLogsResponsePage # The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]`. attr_accessor :after + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsResponsePage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsResponsePage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'after') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && after == o.after + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_search_events_request.rb b/lib/datadog_api_client/v2/models/audit_logs_search_events_request.rb index bc009de17f62..4fc42c60c16b 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_search_events_request.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_search_events_request.rb @@ -34,6 +34,8 @@ class AuditLogsSearchEventsRequest # Sort parameters when querying events. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsSearchEventsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsSearchEventsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -89,6 +93,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) options == o.options && page == o.page && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/audit_logs_warning.rb b/lib/datadog_api_client/v2/models/audit_logs_warning.rb index 4b91345f6ce8..ec389f8ad4d7 100644 --- a/lib/datadog_api_client/v2/models/audit_logs_warning.rb +++ b/lib/datadog_api_client/v2/models/audit_logs_warning.rb @@ -30,6 +30,8 @@ class AuditLogsWarning # Short human-readable summary of the warning. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuditLogsWarning` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuditLogsWarning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) code == o.code && detail == o.detail && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping.rb b/lib/datadog_api_client/v2/models/authn_mapping.rb index 9bbeb49f8ec8..b84acc35c546 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping.rb @@ -33,6 +33,8 @@ class AuthNMapping # AuthN Mappings resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMapping` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMapping`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_attributes.rb b/lib/datadog_api_client/v2/models/authn_mapping_attributes.rb index 527ff51f4ebb..d6da093c4ce0 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_attributes.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_attributes.rb @@ -36,6 +36,8 @@ class AuthNMappingAttributes # The ID of the SAML assertion attribute. attr_accessor :saml_assertion_attribute_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attribute_key') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) created_at == o.created_at && modified_at == o.modified_at && saml_assertion_attribute_id == o.saml_assertion_attribute_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_create_attributes.rb b/lib/datadog_api_client/v2/models/authn_mapping_create_attributes.rb index 0a4f622c3771..7c0d98367471 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_create_attributes.rb @@ -27,6 +27,8 @@ class AuthNMappingCreateAttributes # Value portion of a key/value pair of the attribute sent from the Identity Provider. attr_accessor :attribute_value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attribute_key') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attribute_key == o.attribute_key && attribute_value == o.attribute_value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb b/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb index f90893f84c2f..70ae4fff6442 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb @@ -30,6 +30,8 @@ class AuthNMappingCreateData # AuthN Mappings resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_create_request.rb b/lib/datadog_api_client/v2/models/authn_mapping_create_request.rb index 43b5fad7792a..dbc1b0328f80 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_create_request.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_create_request.rb @@ -24,6 +24,8 @@ class AuthNMappingCreateRequest # Data for creating an AuthN Mapping. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb b/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb index 7b11295f2e04..12742c23a77d 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb @@ -24,6 +24,8 @@ class AuthNMappingRelationshipToRole # Relationship to role. attr_reader :role + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingRelationshipToRole` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingRelationshipToRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'role') @@ -79,6 +83,26 @@ def role=(role) @role = role 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && role == o.role + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb b/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb index c340a902ac9a..1f163c09f5b7 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb @@ -24,6 +24,8 @@ class AuthNMappingRelationshipToTeam # Relationship to team. attr_reader :team + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingRelationshipToTeam` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingRelationshipToTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'team') @@ -79,6 +83,26 @@ def team=(team) @team = team 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && team == o.team + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb b/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb index 870e72af8129..e7249232aa85 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb @@ -30,6 +30,8 @@ class AuthNMappingRelationships # Relationship to team. attr_accessor :team + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'role') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) role == o.role && saml_assertion_attribute == o.saml_assertion_attribute && team == o.team + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_response.rb b/lib/datadog_api_client/v2/models/authn_mapping_response.rb index 78763cebec46..80c576f33d51 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_response.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_response.rb @@ -27,6 +27,8 @@ class AuthNMappingResponse # Included data in the AuthN Mapping response. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_team.rb b/lib/datadog_api_client/v2/models/authn_mapping_team.rb index ebcbd03d8541..cf5ff506b1df 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_team.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_team.rb @@ -30,6 +30,8 @@ class AuthNMappingTeam # Team type attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingTeam` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb b/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb index ba0757c80764..04a9021c7e9d 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb @@ -42,6 +42,8 @@ class AuthNMappingTeamAttributes # The number of users belonging to the team attr_reader :user_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingTeamAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingTeamAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'avatar') @@ -187,6 +191,26 @@ def user_count=(user_count) @user_count = user_count 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 @@ -200,6 +224,7 @@ def ==(o) name == o.name && summary == o.summary && user_count == o.user_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_update_attributes.rb b/lib/datadog_api_client/v2/models/authn_mapping_update_attributes.rb index e793ac44709c..57291c89d651 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_update_attributes.rb @@ -27,6 +27,8 @@ class AuthNMappingUpdateAttributes # Value portion of a key/value pair of the attribute sent from the Identity Provider. attr_accessor :attribute_value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attribute_key') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attribute_key == o.attribute_key && attribute_value == o.attribute_value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb b/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb index 36716fc028ab..4cd83bc3394f 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb @@ -33,6 +33,8 @@ class AuthNMappingUpdateData # AuthN Mappings resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mapping_update_request.rb b/lib/datadog_api_client/v2/models/authn_mapping_update_request.rb index 89c421106a9f..17f8a6e055e7 100644 --- a/lib/datadog_api_client/v2/models/authn_mapping_update_request.rb +++ b/lib/datadog_api_client/v2/models/authn_mapping_update_request.rb @@ -24,6 +24,8 @@ class AuthNMappingUpdateRequest # Data for updating an AuthN Mapping. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/authn_mappings_response.rb b/lib/datadog_api_client/v2/models/authn_mappings_response.rb index c920a072b1f3..979677598cb0 100644 --- a/lib/datadog_api_client/v2/models/authn_mappings_response.rb +++ b/lib/datadog_api_client/v2/models/authn_mappings_response.rb @@ -30,6 +30,8 @@ class AuthNMappingsResponse # Object describing meta attributes of response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config.rb b/lib/datadog_api_client/v2/models/aws_cur_config.rb index 9a8e2b52ec15..41eecad512e8 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config.rb @@ -30,6 +30,8 @@ class AwsCURConfig # Type of AWS CUR config. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb b/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb index d0a33c468c1a..81c7ee23c30c 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb @@ -54,6 +54,8 @@ class AwsCURConfigAttributes # The timestamp when the AWS CUR config status was updated. attr_reader :updated_at + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -276,6 +280,26 @@ def updated_at=(updated_at) @updated_at = updated_at 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 @@ -293,6 +317,7 @@ def ==(o) status == o.status && status_updated_at == o.status_updated_at && updated_at == o.updated_at + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb b/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb index d886d9a54b3f..64ecab23543b 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb @@ -27,6 +27,8 @@ class AwsCURConfigPatchData # Type of AWS CUR config Patch Request. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigPatchData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigPatchData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb b/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb index dc492f0b0b40..a98862433a44 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb @@ -24,6 +24,8 @@ class AwsCURConfigPatchRequest # AWS CUR config Patch data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigPatchRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigPatchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb b/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb index 8dda2b4a09e8..f61b02d5e12a 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb @@ -24,6 +24,8 @@ class AwsCURConfigPatchRequestAttributes # Whether or not the Cloud Cost Management account is enabled. attr_reader :is_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigPatchRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigPatchRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -79,6 +83,26 @@ def is_enabled=(is_enabled) @is_enabled = is_enabled 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && is_enabled == o.is_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb b/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb index f12df29450a0..983a13ad6ab4 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb @@ -27,6 +27,8 @@ class AwsCURConfigPostData # Type of AWS CUR config Post Request. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigPostData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigPostData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb b/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb index 8d91cbe7d921..4d2607c7097d 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb @@ -24,6 +24,8 @@ class AwsCURConfigPostRequest # AWS CUR config Post data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigPostRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigPostRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb b/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb index 0ead92a3fa80..bbe773114616 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb @@ -42,6 +42,8 @@ class AwsCURConfigPostRequestAttributes # The report prefix used for the Cost and Usage Report. attr_reader :report_prefix + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigPostRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigPostRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -177,6 +181,26 @@ def report_prefix=(report_prefix) @report_prefix = report_prefix 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 @@ -190,6 +214,7 @@ def ==(o) months == o.months && report_name == o.report_name && report_prefix == o.report_prefix + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_response.rb b/lib/datadog_api_client/v2/models/aws_cur_config_response.rb index 3b9d7e660c57..77b63c40d4ff 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_response.rb @@ -24,6 +24,8 @@ class AwsCURConfigResponse # AWS CUR config. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb b/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb index 1a606fb4b8a9..56e4384068f4 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb @@ -24,6 +24,8 @@ class AwsCURConfigsResponse # An AWS CUR config. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AwsCURConfigsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_related_account.rb b/lib/datadog_api_client/v2/models/aws_related_account.rb index 0ef90ec4e509..a2ce67413ef5 100644 --- a/lib/datadog_api_client/v2/models/aws_related_account.rb +++ b/lib/datadog_api_client/v2/models/aws_related_account.rb @@ -30,6 +30,8 @@ class AWSRelatedAccount # Type of AWS related account. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSRelatedAccount` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AWSRelatedAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb b/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb index c54e034155e2..f6f1bb28db55 100644 --- a/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb +++ b/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb @@ -27,6 +27,8 @@ class AWSRelatedAccountAttributes # The name of the AWS account. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSRelatedAccountAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AWSRelatedAccountAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'has_datadog_integration') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && has_datadog_integration == o.has_datadog_integration && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb b/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb index a789ff5fabf0..46da2ce3d52a 100644 --- a/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb +++ b/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb @@ -24,6 +24,8 @@ class AWSRelatedAccountsResponse # An AWS related account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSRelatedAccountsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AWSRelatedAccountsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config.rb b/lib/datadog_api_client/v2/models/azure_uc_config.rb index 3712406b7a6a..3787b6d067eb 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config.rb @@ -66,6 +66,8 @@ class AzureUCConfig # The timestamp when the Azure config was last updated. attr_reader :updated_at + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -118,12 +120,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -345,6 +349,26 @@ def updated_at=(updated_at) @updated_at = updated_at 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 @@ -366,6 +390,7 @@ def ==(o) storage_account == o.storage_account && storage_container == o.storage_container && updated_at == o.updated_at + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb b/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb index 43fa42a61f49..61f6d40cb79d 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb @@ -30,6 +30,8 @@ class AzureUCConfigPair # Type of Azure config pair. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPair` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPair`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb b/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb index 99a65b4575f0..3e91f52fe4cb 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb @@ -27,6 +27,8 @@ class AzureUCConfigPairAttributes # The ID of the Azure config pair. attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPairAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPairAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'configs') @@ -90,6 +94,26 @@ def configs=(configs) @configs = configs 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && configs == o.configs && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb b/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb index b6d0f05f625d..5058e46f8c3d 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb @@ -24,6 +24,8 @@ class AzureUCConfigPairsResponse # Azure config pair. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPairsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPairsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb b/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb index 83118f751417..e3a7518e30d6 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb @@ -27,6 +27,8 @@ class AzureUCConfigPatchData # Type of Azure config Patch Request. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPatchData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPatchData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb b/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb index 6cafda10a266..e768620ef78e 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb @@ -24,6 +24,8 @@ class AzureUCConfigPatchRequest # Azure config Patch data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPatchRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPatchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb b/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb index ea44ea770f0c..14ef295561c3 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb @@ -24,6 +24,8 @@ class AzureUCConfigPatchRequestAttributes # Whether or not the Cloud Cost Management account is enabled. attr_reader :is_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPatchRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPatchRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -79,6 +83,26 @@ def is_enabled=(is_enabled) @is_enabled = is_enabled 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && is_enabled == o.is_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb b/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb index 25759c01ae8f..17506a559c4e 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb @@ -27,6 +27,8 @@ class AzureUCConfigPostData # Type of Azure config Post Request. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPostData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPostData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb b/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb index 3129fd7f43b6..9351ceea22d7 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb @@ -24,6 +24,8 @@ class AzureUCConfigPostRequest # Azure config Post data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPostRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPostRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb b/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb index a11c867424de..a68bb99dde31 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb @@ -39,6 +39,8 @@ class AzureUCConfigPostRequestAttributes # The scope of your observed subscription. attr_reader :scope + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigPostRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigPostRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -168,6 +172,26 @@ def scope=(scope) @scope = scope 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 @@ -180,6 +204,7 @@ def ==(o) client_id == o.client_id && is_enabled == o.is_enabled && scope == o.scope + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb b/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb index 101d19e12f24..39b05adbd976 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb @@ -24,6 +24,8 @@ class AzureUCConfigsResponse # An Azure config pair. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureUCConfigsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AzureUCConfigsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/bill_config.rb b/lib/datadog_api_client/v2/models/bill_config.rb index 3960f3be6562..7c4db5e7b723 100644 --- a/lib/datadog_api_client/v2/models/bill_config.rb +++ b/lib/datadog_api_client/v2/models/bill_config.rb @@ -33,6 +33,8 @@ class BillConfig # The name of the storage container where the Azure Export is saved. attr_reader :storage_container + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BillConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BillConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'export_name') @@ -139,6 +143,26 @@ def storage_container=(storage_container) @storage_container = storage_container 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,6 +173,7 @@ def ==(o) export_path == o.export_path && storage_account == o.storage_account && storage_container == o.storage_container + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/bulk_mute_findings_request.rb b/lib/datadog_api_client/v2/models/bulk_mute_findings_request.rb index 585082ab35fe..0d0dcfa94fbb 100644 --- a/lib/datadog_api_client/v2/models/bulk_mute_findings_request.rb +++ b/lib/datadog_api_client/v2/models/bulk_mute_findings_request.rb @@ -24,6 +24,8 @@ class BulkMuteFindingsRequest # Data object containing the new bulk mute properties of the finding. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/bulk_mute_findings_request_data.rb b/lib/datadog_api_client/v2/models/bulk_mute_findings_request_data.rb index 71b4ea3f0cb5..9ba3f3c7dd1c 100644 --- a/lib/datadog_api_client/v2/models/bulk_mute_findings_request_data.rb +++ b/lib/datadog_api_client/v2/models/bulk_mute_findings_request_data.rb @@ -33,6 +33,8 @@ class BulkMuteFindingsRequestData # The JSON:API type for findings. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -139,6 +143,26 @@ def type=(type) @type = type 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,6 +173,7 @@ def ==(o) id == o.id && meta == o.meta && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta.rb b/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta.rb index 0d4abe99266a..894e709d4e1a 100644 --- a/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta.rb +++ b/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta.rb @@ -24,6 +24,8 @@ class BulkMuteFindingsRequestMeta # Array of findings. attr_accessor :findings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequestMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequestMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'findings') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && findings == o.findings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta_findings.rb b/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta_findings.rb index f80816617b8c..315864e4549b 100644 --- a/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta_findings.rb +++ b/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta_findings.rb @@ -24,6 +24,8 @@ class BulkMuteFindingsRequestMetaFindings # The unique ID for this finding. attr_accessor :finding_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequestMetaFindings` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequestMetaFindings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'finding_id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && finding_id == o.finding_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/bulk_mute_findings_response.rb b/lib/datadog_api_client/v2/models/bulk_mute_findings_response.rb index f4efa078642f..4ec819024c71 100644 --- a/lib/datadog_api_client/v2/models/bulk_mute_findings_response.rb +++ b/lib/datadog_api_client/v2/models/bulk_mute_findings_response.rb @@ -24,6 +24,8 @@ class BulkMuteFindingsResponse # Data object containing the ID of the request that was updated. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb b/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb index 73778f1e86aa..daf608b8f006 100644 --- a/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb +++ b/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb @@ -27,6 +27,8 @@ class BulkMuteFindingsResponseData # The JSON:API type for findings. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case.rb b/lib/datadog_api_client/v2/models/case.rb index d3366e12bb6a..1573f988c3a5 100644 --- a/lib/datadog_api_client/v2/models/case.rb +++ b/lib/datadog_api_client/v2/models/case.rb @@ -33,6 +33,8 @@ class Case # Case resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Case` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Case`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -128,6 +132,26 @@ def type=(type) @type = type 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 @@ -138,6 +162,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_assign.rb b/lib/datadog_api_client/v2/models/case_assign.rb index 12bd1dfae1a8..81931c5e9bc2 100644 --- a/lib/datadog_api_client/v2/models/case_assign.rb +++ b/lib/datadog_api_client/v2/models/case_assign.rb @@ -27,6 +27,8 @@ class CaseAssign # Case resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAssign` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseAssign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_assign_attributes.rb b/lib/datadog_api_client/v2/models/case_assign_attributes.rb index 42c81d43ada3..8001037c13a1 100644 --- a/lib/datadog_api_client/v2/models/case_assign_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_assign_attributes.rb @@ -24,6 +24,8 @@ class CaseAssignAttributes # Assignee's UUID attr_reader :assignee_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAssignAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseAssignAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assignee_id') @@ -79,6 +83,26 @@ def assignee_id=(assignee_id) @assignee_id = assignee_id 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && assignee_id == o.assignee_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_assign_request.rb b/lib/datadog_api_client/v2/models/case_assign_request.rb index 3fe164b52f6a..091ff5e3a47c 100644 --- a/lib/datadog_api_client/v2/models/case_assign_request.rb +++ b/lib/datadog_api_client/v2/models/case_assign_request.rb @@ -24,6 +24,8 @@ class CaseAssignRequest # Case assign attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAssignRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseAssignRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_attributes.rb b/lib/datadog_api_client/v2/models/case_attributes.rb index e65a3d6702d3..7ab640637638 100644 --- a/lib/datadog_api_client/v2/models/case_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_attributes.rb @@ -57,6 +57,8 @@ class CaseAttributes # Case type attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -115,12 +117,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'archived_at') @@ -172,6 +176,26 @@ 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 @@ -190,6 +214,7 @@ def ==(o) status == o.status && title == o.title && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_create.rb b/lib/datadog_api_client/v2/models/case_create.rb index 8edabe745def..2f4ec7b26982 100644 --- a/lib/datadog_api_client/v2/models/case_create.rb +++ b/lib/datadog_api_client/v2/models/case_create.rb @@ -30,6 +30,8 @@ class CaseCreate # Case resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_create_attributes.rb b/lib/datadog_api_client/v2/models/case_create_attributes.rb index 393d63dcb20e..9739ca48b80b 100644 --- a/lib/datadog_api_client/v2/models/case_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_create_attributes.rb @@ -33,6 +33,8 @@ class CaseCreateAttributes # Case type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) priority == o.priority && title == o.title && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_create_relationships.rb b/lib/datadog_api_client/v2/models/case_create_relationships.rb index abda206ac604..91b529d1ad07 100644 --- a/lib/datadog_api_client/v2/models/case_create_relationships.rb +++ b/lib/datadog_api_client/v2/models/case_create_relationships.rb @@ -27,6 +27,8 @@ class CaseCreateRelationships # Relationship to project attr_reader :project + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCreateRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseCreateRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assignee') @@ -96,6 +100,26 @@ def project=(project) @project = project 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 @@ -104,6 +128,7 @@ def ==(o) self.class == o.class && assignee == o.assignee && project == o.project + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_create_request.rb b/lib/datadog_api_client/v2/models/case_create_request.rb index 495b0296089e..51e78c431536 100644 --- a/lib/datadog_api_client/v2/models/case_create_request.rb +++ b/lib/datadog_api_client/v2/models/case_create_request.rb @@ -24,6 +24,8 @@ class CaseCreateRequest # Case creation data attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_empty.rb b/lib/datadog_api_client/v2/models/case_empty.rb index 2e6c006ddef2..e6ca66b4da0c 100644 --- a/lib/datadog_api_client/v2/models/case_empty.rb +++ b/lib/datadog_api_client/v2/models/case_empty.rb @@ -24,6 +24,8 @@ class CaseEmpty # Case resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseEmpty` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseEmpty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -79,6 +83,26 @@ def type=(type) @type = type 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_empty_request.rb b/lib/datadog_api_client/v2/models/case_empty_request.rb index b96376e6f99d..5f7a626bb2a9 100644 --- a/lib/datadog_api_client/v2/models/case_empty_request.rb +++ b/lib/datadog_api_client/v2/models/case_empty_request.rb @@ -24,6 +24,8 @@ class CaseEmptyRequest # Case empty request data attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseEmptyRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseEmptyRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_relationships.rb b/lib/datadog_api_client/v2/models/case_relationships.rb index a5bacb560f80..d20f70fbab41 100644 --- a/lib/datadog_api_client/v2/models/case_relationships.rb +++ b/lib/datadog_api_client/v2/models/case_relationships.rb @@ -33,6 +33,8 @@ class CaseRelationships # Relationship to project attr_accessor :project + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assignee') @@ -98,6 +102,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) created_by == o.created_by && modified_by == o.modified_by && project == o.project + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_response.rb b/lib/datadog_api_client/v2/models/case_response.rb index e83ffcf71b05..e10580f69057 100644 --- a/lib/datadog_api_client/v2/models/case_response.rb +++ b/lib/datadog_api_client/v2/models/case_response.rb @@ -24,6 +24,8 @@ class CaseResponse # A case attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_update_priority.rb b/lib/datadog_api_client/v2/models/case_update_priority.rb index 9cde453c6e6b..23438aea53d8 100644 --- a/lib/datadog_api_client/v2/models/case_update_priority.rb +++ b/lib/datadog_api_client/v2/models/case_update_priority.rb @@ -27,6 +27,8 @@ class CaseUpdatePriority # Case resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdatePriority` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseUpdatePriority`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb b/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb index f6fef912a8c8..37a5acafb5e2 100644 --- a/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb @@ -24,6 +24,8 @@ class CaseUpdatePriorityAttributes # Case priority attr_reader :priority + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdatePriorityAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseUpdatePriorityAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'priority') @@ -79,6 +83,26 @@ def priority=(priority) @priority = priority 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && priority == o.priority + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_update_priority_request.rb b/lib/datadog_api_client/v2/models/case_update_priority_request.rb index 552d33f7b5d5..ebda37319f21 100644 --- a/lib/datadog_api_client/v2/models/case_update_priority_request.rb +++ b/lib/datadog_api_client/v2/models/case_update_priority_request.rb @@ -24,6 +24,8 @@ class CaseUpdatePriorityRequest # Case priority status attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdatePriorityRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseUpdatePriorityRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_update_status.rb b/lib/datadog_api_client/v2/models/case_update_status.rb index df8e2a94de3c..b96236c2b0ef 100644 --- a/lib/datadog_api_client/v2/models/case_update_status.rb +++ b/lib/datadog_api_client/v2/models/case_update_status.rb @@ -27,6 +27,8 @@ class CaseUpdateStatus # Case resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateStatus` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseUpdateStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_update_status_attributes.rb b/lib/datadog_api_client/v2/models/case_update_status_attributes.rb index 26c79058fd87..fd04d01cb0e9 100644 --- a/lib/datadog_api_client/v2/models/case_update_status_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_update_status_attributes.rb @@ -24,6 +24,8 @@ class CaseUpdateStatusAttributes # Case status attr_reader :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateStatusAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseUpdateStatusAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'status') @@ -79,6 +83,26 @@ def status=(status) @status = status 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/case_update_status_request.rb b/lib/datadog_api_client/v2/models/case_update_status_request.rb index baf36077c75a..62b9fe343cd5 100644 --- a/lib/datadog_api_client/v2/models/case_update_status_request.rb +++ b/lib/datadog_api_client/v2/models/case_update_status_request.rb @@ -24,6 +24,8 @@ class CaseUpdateStatusRequest # Case update status attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateStatusRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseUpdateStatusRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cases_response.rb b/lib/datadog_api_client/v2/models/cases_response.rb index 94f9c0dfbe5f..456328db3773 100644 --- a/lib/datadog_api_client/v2/models/cases_response.rb +++ b/lib/datadog_api_client/v2/models/cases_response.rb @@ -27,6 +27,8 @@ class CasesResponse # Cases response metadata attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CasesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CasesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cases_response_meta.rb b/lib/datadog_api_client/v2/models/cases_response_meta.rb index 81e9b4bc51ea..acfaa5f6360e 100644 --- a/lib/datadog_api_client/v2/models/cases_response_meta.rb +++ b/lib/datadog_api_client/v2/models/cases_response_meta.rb @@ -24,6 +24,8 @@ class CasesResponseMeta # Pagination metadata attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CasesResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CasesResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb b/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb index d02c834fda7e..ea60d4208b6b 100644 --- a/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +++ b/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb @@ -30,6 +30,8 @@ class CasesResponseMetaPagination # Total number of pages attr_accessor :total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CasesResponseMetaPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CasesResponseMetaPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'current') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) current == o.current && size == o.size && total == o.total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/chargeback_breakdown.rb b/lib/datadog_api_client/v2/models/chargeback_breakdown.rb index 038b5e5ec7dd..2f81f1cd4202 100644 --- a/lib/datadog_api_client/v2/models/chargeback_breakdown.rb +++ b/lib/datadog_api_client/v2/models/chargeback_breakdown.rb @@ -30,6 +30,8 @@ class ChargebackBreakdown # The product for which cost is being reported. attr_accessor :product_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ChargebackBreakdown` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ChargebackBreakdown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'charge_type') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) charge_type == o.charge_type && cost == o.cost && product_name == o.product_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value_timeseries_point.rb b/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value_timeseries_point.rb index df308f4a1535..4fb63ea3ee2a 100644 --- a/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value_timeseries_point.rb +++ b/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value_timeseries_point.rb @@ -27,6 +27,8 @@ class CIAppAggregateBucketValueTimeseriesPoint # The value for this point. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppAggregateBucketValueTimeseriesPoint` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppAggregateBucketValueTimeseriesPoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && time == o.time && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb b/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb index 1dc21ab58aad..03206c524af2 100644 --- a/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +++ b/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb @@ -33,6 +33,8 @@ class CIAppAggregateSort # The type of sorting algorithm. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppAggregateSort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppAggregateSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) metric == o.metric && order == o.order && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_ci_error.rb b/lib/datadog_api_client/v2/models/ci_app_ci_error.rb index a4073a526070..f2414bf5381d 100644 --- a/lib/datadog_api_client/v2/models/ci_app_ci_error.rb +++ b/lib/datadog_api_client/v2/models/ci_app_ci_error.rb @@ -33,6 +33,8 @@ class CIAppCIError # Short description of the error type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppCIError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppCIError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'domain') @@ -127,6 +131,26 @@ def type=(type) @type = type 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 @@ -137,6 +161,7 @@ def ==(o) message == o.message && stack == o.stack && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_compute.rb b/lib/datadog_api_client/v2/models/ci_app_compute.rb index b01222c55f8a..49cfb41f6b4f 100644 --- a/lib/datadog_api_client/v2/models/ci_app_compute.rb +++ b/lib/datadog_api_client/v2/models/ci_app_compute.rb @@ -34,6 +34,8 @@ class CIAppCompute # The type of compute. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -107,6 +111,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -117,6 +141,7 @@ def ==(o) interval == o.interval && metric == o.metric && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request.rb b/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request.rb index 5ff10c515f46..e341a0cef52a 100644 --- a/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request.rb +++ b/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request.rb @@ -24,6 +24,8 @@ class CIAppCreatePipelineEventRequest # Data of the pipeline event to create. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppCreatePipelineEventRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppCreatePipelineEventRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_attributes.rb b/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_attributes.rb index c2848361ccf4..367f47346315 100644 --- a/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_attributes.rb @@ -30,6 +30,8 @@ class CIAppCreatePipelineEventRequestAttributes # If the CI provider is SaaS, use this to differentiate between instances. attr_accessor :service + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppCreatePipelineEventRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppCreatePipelineEventRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'env') @@ -97,6 +101,26 @@ def resource=(resource) @resource = resource 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 @@ -106,6 +130,7 @@ def ==(o) env == o.env && resource == o.resource && service == o.service + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_data.rb b/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_data.rb index a27599124f23..a431fa7c91c2 100644 --- a/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_data.rb +++ b/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_data.rb @@ -27,6 +27,8 @@ class CIAppCreatePipelineEventRequestData # Type of the event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppCreatePipelineEventRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppCreatePipelineEventRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb b/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb index 0dde89ac3bb4..3e9d9bef8e9d 100644 --- a/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb +++ b/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb @@ -30,6 +30,8 @@ class CIAppEventAttributes # Test run level. attr_accessor :test_level + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppEventAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppEventAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) attributes == o.attributes && tags == o.tags && test_level == o.test_level + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_git_info.rb b/lib/datadog_api_client/v2/models/ci_app_git_info.rb index 969d4e73cb9d..726cf72ebc5f 100644 --- a/lib/datadog_api_client/v2/models/ci_app_git_info.rb +++ b/lib/datadog_api_client/v2/models/ci_app_git_info.rb @@ -58,6 +58,8 @@ class CIAppGitInfo # The tag name (if a branch use the branch parameter). attr_accessor :tag + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -120,12 +122,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppGitInfo` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppGitInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author_email') @@ -223,6 +227,26 @@ def sha=(sha) @sha = sha 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 @@ -241,6 +265,7 @@ def ==(o) repository_url == o.repository_url && sha == o.sha && tag == o.tag + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_group_by_histogram.rb b/lib/datadog_api_client/v2/models/ci_app_group_by_histogram.rb index e4e918ebb927..21c1adb588cd 100644 --- a/lib/datadog_api_client/v2/models/ci_app_group_by_histogram.rb +++ b/lib/datadog_api_client/v2/models/ci_app_group_by_histogram.rb @@ -33,6 +33,8 @@ class CIAppGroupByHistogram # (values smaller than this one are filtered out). attr_reader :min + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppGroupByHistogram` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppGroupByHistogram`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'interval') @@ -122,6 +126,26 @@ def min=(min) @min = min 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 @@ -131,6 +155,7 @@ def ==(o) interval == o.interval && max == o.max && min == o.min + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_host_info.rb b/lib/datadog_api_client/v2/models/ci_app_host_info.rb index d32c665b257b..6874177af91b 100644 --- a/lib/datadog_api_client/v2/models/ci_app_host_info.rb +++ b/lib/datadog_api_client/v2/models/ci_app_host_info.rb @@ -33,6 +33,8 @@ class CIAppHostInfo # The path where the code is checked out. attr_accessor :workspace + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppHostInfo` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppHostInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'hostname') @@ -90,6 +94,26 @@ 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 @@ -100,6 +124,7 @@ def ==(o) labels == o.labels && name == o.name && workspace == o.workspace + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb index db133cee0c4c..e48a786960d5 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb @@ -30,6 +30,8 @@ class CIAppPipelineEvent # Type of the event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEvent` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_attributes.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_attributes.rb index c0a9640b36b2..8ee21295b015 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_attributes.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_attributes.rb @@ -30,6 +30,8 @@ class CIAppPipelineEventAttributes # Array of tags associated with your event. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) attributes == o.attributes && ci_level == o.ci_level && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_job.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_job.rb index e3ebe3dc7423..b4a1f7867004 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_job.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_job.rb @@ -79,6 +79,8 @@ class CIAppPipelineEventJob # The URL to look at the job in the CI provider UI. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -156,12 +158,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventJob` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventJob`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dependencies') @@ -364,6 +368,26 @@ def url=(url) @url = url 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 @@ -389,6 +413,7 @@ def ==(o) status == o.status && tags == o.tags && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_parent_pipeline.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_parent_pipeline.rb index 2e3fdb390fbd..b626b5616aa3 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_parent_pipeline.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_parent_pipeline.rb @@ -27,6 +27,8 @@ class CIAppPipelineEventParentPipeline # The URL to look at the pipeline in the CI provider UI. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventParentPipeline` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventParentPipeline`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -88,6 +92,26 @@ def id=(id) @id = id 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && id == o.id && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_pipeline.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_pipeline.rb index e0a04e4e9dae..0e9e1afd3878 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_pipeline.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_pipeline.rb @@ -85,6 +85,8 @@ class CIAppPipelineEventPipeline # The URL to look at the pipeline in the CI provider UI. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -165,12 +167,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventPipeline` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventPipeline`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -364,6 +368,26 @@ def url=(url) @url = url 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 @@ -390,6 +414,7 @@ def ==(o) tags == o.tags && unique_id == o.unique_id && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_previous_pipeline.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_previous_pipeline.rb index 6458f4a664fd..ad5e416777f7 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_previous_pipeline.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_previous_pipeline.rb @@ -27,6 +27,8 @@ class CIAppPipelineEventPreviousPipeline # The URL to look at the pipeline in the CI provider UI. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventPreviousPipeline` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventPreviousPipeline`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -88,6 +92,26 @@ def id=(id) @id = id 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && id == o.id && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_stage.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_stage.rb index 85ef4543aecd..e4c1f6d19f49 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_stage.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_stage.rb @@ -70,6 +70,8 @@ class CIAppPipelineEventStage # A list of user-defined tags. The tags must follow the `key:value` pattern. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -139,12 +141,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventStage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventStage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dependencies') @@ -324,6 +328,26 @@ def status=(status) @status = status 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 @@ -346,6 +370,7 @@ def ==(o) start == o.start && status == o.status && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_step.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_step.rb index efc044fa31ae..9ed84458db65 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_event_step.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_event_step.rb @@ -79,6 +79,8 @@ class CIAppPipelineEventStep # The URL to look at the step in the CI provider UI. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -157,12 +159,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventStep` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventStep`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -341,6 +345,26 @@ def status=(status) @status = status 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 @@ -366,6 +390,7 @@ def ==(o) status == o.status && tags == o.tags && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_events_request.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_events_request.rb index b0f362f7b1c2..0586481b1b7b 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_events_request.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_events_request.rb @@ -34,6 +34,8 @@ class CIAppPipelineEventsRequest # Sort parameters when querying events. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -89,6 +93,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) options == o.options && page == o.page && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipeline_events_response.rb b/lib/datadog_api_client/v2/models/ci_app_pipeline_events_response.rb index 0bc2814ee9f0..172d7be59110 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipeline_events_response.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipeline_events_response.rb @@ -30,6 +30,8 @@ class CIAppPipelineEventsResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregate_request.rb b/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregate_request.rb index c7398ec16f1b..e266598734c2 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregate_request.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregate_request.rb @@ -34,6 +34,8 @@ class CIAppPipelinesAggregateRequest # Only supply timezone or time offset, not both. Otherwise, the query fails. attr_accessor :options + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelinesAggregateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelinesAggregateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -93,6 +97,26 @@ 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 @@ -103,6 +127,7 @@ def ==(o) filter == o.filter && group_by == o.group_by && options == o.options + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregation_buckets_response.rb b/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregation_buckets_response.rb index 445d75ac47cc..89bf49d1b573 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregation_buckets_response.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregation_buckets_response.rb @@ -24,6 +24,8 @@ class CIAppPipelinesAggregationBucketsResponse # The list of matching buckets, one item per bucket. attr_accessor :buckets + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelinesAggregationBucketsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelinesAggregationBucketsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'buckets') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && buckets == o.buckets + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipelines_analytics_aggregate_response.rb b/lib/datadog_api_client/v2/models/ci_app_pipelines_analytics_aggregate_response.rb index 9c8492a5487b..6529d1845ffd 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipelines_analytics_aggregate_response.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipelines_analytics_aggregate_response.rb @@ -30,6 +30,8 @@ class CIAppPipelinesAnalyticsAggregateResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelinesAnalyticsAggregateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelinesAnalyticsAggregateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipelines_bucket_response.rb b/lib/datadog_api_client/v2/models/ci_app_pipelines_bucket_response.rb index bc0b3b2332f8..250e6ce07d8f 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipelines_bucket_response.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipelines_bucket_response.rb @@ -27,6 +27,8 @@ class CIAppPipelinesBucketResponse # A map of the metric name to value for regular compute, or a list of values for a timeseries. attr_accessor :computes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelinesBucketResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelinesBucketResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'by') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && by == o.by && computes == o.computes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb b/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb index 317842b99cf7..e6c7deb5698e 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb @@ -40,6 +40,8 @@ class CIAppPipelinesGroupBy # A resulting object to put the given computes in over all the matching records. attr_accessor :total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -74,12 +76,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelinesGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelinesGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -125,6 +129,26 @@ def facet=(facet) @facet = facet 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 @@ -137,6 +161,7 @@ def ==(o) missing == o.missing && sort == o.sort && total == o.total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb b/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb index 7eb68cea287d..38eea3965b83 100644 --- a/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb +++ b/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb @@ -30,6 +30,8 @@ class CIAppPipelinesQueryFilter # The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds). attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelinesQueryFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelinesQueryFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) from == o.from && query == o.query && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_query_options.rb b/lib/datadog_api_client/v2/models/ci_app_query_options.rb index c2f66e73335f..660b08a08100 100644 --- a/lib/datadog_api_client/v2/models/ci_app_query_options.rb +++ b/lib/datadog_api_client/v2/models/ci_app_query_options.rb @@ -28,6 +28,8 @@ class CIAppQueryOptions # The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppQueryOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppQueryOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time_offset') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && time_offset == o.time_offset && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_query_page_options.rb b/lib/datadog_api_client/v2/models/ci_app_query_page_options.rb index bc56eac3325d..70a6a05b9a3f 100644 --- a/lib/datadog_api_client/v2/models/ci_app_query_page_options.rb +++ b/lib/datadog_api_client/v2/models/ci_app_query_page_options.rb @@ -27,6 +27,8 @@ class CIAppQueryPageOptions # Maximum number of events in the response. attr_reader :limit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppQueryPageOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppQueryPageOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -88,6 +92,26 @@ def limit=(limit) @limit = limit 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && cursor == o.cursor && limit == o.limit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_response_links.rb b/lib/datadog_api_client/v2/models/ci_app_response_links.rb index c7509f60ac00..ddd2e142f441 100644 --- a/lib/datadog_api_client/v2/models/ci_app_response_links.rb +++ b/lib/datadog_api_client/v2/models/ci_app_response_links.rb @@ -25,6 +25,8 @@ class CIAppResponseLinks # POST endpoint. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_response_metadata.rb b/lib/datadog_api_client/v2/models/ci_app_response_metadata.rb index 63485a322b4b..b6bc0eafb72c 100644 --- a/lib/datadog_api_client/v2/models/ci_app_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/ci_app_response_metadata.rb @@ -34,6 +34,8 @@ class CIAppResponseMetadata # warnings are present in the response. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elapsed') @@ -91,6 +95,26 @@ 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,6 +125,7 @@ def ==(o) request_id == o.request_id && status == o.status && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_response_metadata_with_pagination.rb b/lib/datadog_api_client/v2/models/ci_app_response_metadata_with_pagination.rb index 3b2708fd3d4b..90e0f8c8c307 100644 --- a/lib/datadog_api_client/v2/models/ci_app_response_metadata_with_pagination.rb +++ b/lib/datadog_api_client/v2/models/ci_app_response_metadata_with_pagination.rb @@ -37,6 +37,8 @@ class CIAppResponseMetadataWithPagination # warnings are present in the response. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppResponseMetadataWithPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppResponseMetadataWithPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elapsed') @@ -100,6 +104,26 @@ 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 @@ -111,6 +135,7 @@ def ==(o) request_id == o.request_id && status == o.status && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_response_page.rb b/lib/datadog_api_client/v2/models/ci_app_response_page.rb index 465c339a1f8c..daf82380ba57 100644 --- a/lib/datadog_api_client/v2/models/ci_app_response_page.rb +++ b/lib/datadog_api_client/v2/models/ci_app_response_page.rb @@ -24,6 +24,8 @@ class CIAppResponsePage # The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]`. attr_accessor :after + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppResponsePage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppResponsePage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'after') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && after == o.after + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_test_event.rb b/lib/datadog_api_client/v2/models/ci_app_test_event.rb index 778780d6616c..02ca45e86d69 100644 --- a/lib/datadog_api_client/v2/models/ci_app_test_event.rb +++ b/lib/datadog_api_client/v2/models/ci_app_test_event.rb @@ -30,6 +30,8 @@ class CIAppTestEvent # Type of the event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestEvent` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_test_events_request.rb b/lib/datadog_api_client/v2/models/ci_app_test_events_request.rb index 38470f4d0f6e..69263a6d936a 100644 --- a/lib/datadog_api_client/v2/models/ci_app_test_events_request.rb +++ b/lib/datadog_api_client/v2/models/ci_app_test_events_request.rb @@ -34,6 +34,8 @@ class CIAppTestEventsRequest # Sort parameters when querying events. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestEventsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestEventsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -89,6 +93,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) options == o.options && page == o.page && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_test_events_response.rb b/lib/datadog_api_client/v2/models/ci_app_test_events_response.rb index 1a02be38cfa5..14b46743c988 100644 --- a/lib/datadog_api_client/v2/models/ci_app_test_events_response.rb +++ b/lib/datadog_api_client/v2/models/ci_app_test_events_response.rb @@ -30,6 +30,8 @@ class CIAppTestEventsResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestEventsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestEventsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_tests_aggregate_request.rb b/lib/datadog_api_client/v2/models/ci_app_tests_aggregate_request.rb index a40a1b75aa3e..51731da3bcf2 100644 --- a/lib/datadog_api_client/v2/models/ci_app_tests_aggregate_request.rb +++ b/lib/datadog_api_client/v2/models/ci_app_tests_aggregate_request.rb @@ -34,6 +34,8 @@ class CIAppTestsAggregateRequest # Only supply timezone or time offset, not both. Otherwise, the query fails. attr_accessor :options + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestsAggregateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestsAggregateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -93,6 +97,26 @@ 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 @@ -103,6 +127,7 @@ def ==(o) filter == o.filter && group_by == o.group_by && options == o.options + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_tests_aggregation_buckets_response.rb b/lib/datadog_api_client/v2/models/ci_app_tests_aggregation_buckets_response.rb index c2efd707cd90..2a53c9ece9c4 100644 --- a/lib/datadog_api_client/v2/models/ci_app_tests_aggregation_buckets_response.rb +++ b/lib/datadog_api_client/v2/models/ci_app_tests_aggregation_buckets_response.rb @@ -24,6 +24,8 @@ class CIAppTestsAggregationBucketsResponse # The list of matching buckets, one item per bucket. attr_accessor :buckets + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestsAggregationBucketsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestsAggregationBucketsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'buckets') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && buckets == o.buckets + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb b/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb index 96c874b099c2..38842c3a7223 100644 --- a/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb +++ b/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb @@ -30,6 +30,8 @@ class CIAppTestsAnalyticsAggregateResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestsAnalyticsAggregateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestsAnalyticsAggregateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_tests_bucket_response.rb b/lib/datadog_api_client/v2/models/ci_app_tests_bucket_response.rb index 16130c6c116c..989bb59edf3d 100644 --- a/lib/datadog_api_client/v2/models/ci_app_tests_bucket_response.rb +++ b/lib/datadog_api_client/v2/models/ci_app_tests_bucket_response.rb @@ -27,6 +27,8 @@ class CIAppTestsBucketResponse # A map of the metric name to value for regular compute, or a list of values for a timeseries. attr_accessor :computes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestsBucketResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestsBucketResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'by') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && by == o.by && computes == o.computes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb b/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb index 0fd54c9dd9fd..667a6386c363 100644 --- a/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +++ b/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb @@ -40,6 +40,8 @@ class CIAppTestsGroupBy # A resulting object to put the given computes in over all the matching records. attr_accessor :total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -74,12 +76,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestsGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestsGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -125,6 +129,26 @@ def facet=(facet) @facet = facet 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 @@ -137,6 +161,7 @@ def ==(o) missing == o.missing && sort == o.sort && total == o.total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb b/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb index 97e54d1e6c50..092738ff6029 100644 --- a/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb +++ b/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb @@ -30,6 +30,8 @@ class CIAppTestsQueryFilter # The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds). attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppTestsQueryFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppTestsQueryFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) from == o.from && query == o.query && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ci_app_warning.rb b/lib/datadog_api_client/v2/models/ci_app_warning.rb index 30b342109861..b91425e852ef 100644 --- a/lib/datadog_api_client/v2/models/ci_app_warning.rb +++ b/lib/datadog_api_client/v2/models/ci_app_warning.rb @@ -30,6 +30,8 @@ class CIAppWarning # A short human-readable summary of the warning. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppWarning` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppWarning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) code == o.code && detail == o.detail && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_configuration_compliance_rule_options.rb b/lib/datadog_api_client/v2/models/cloud_configuration_compliance_rule_options.rb index e9e8b3cc7de6..b6adaf791d5e 100644 --- a/lib/datadog_api_client/v2/models/cloud_configuration_compliance_rule_options.rb +++ b/lib/datadog_api_client/v2/models/cloud_configuration_compliance_rule_options.rb @@ -34,6 +34,8 @@ class CloudConfigurationComplianceRuleOptions # attr_accessor :resource_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -62,12 +64,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudConfigurationComplianceRuleOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudConfigurationComplianceRuleOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'complex_rule') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) complex_rule == o.complex_rule && rego_rule == o.rego_rule && resource_type == o.resource_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_configuration_rego_rule.rb b/lib/datadog_api_client/v2/models/cloud_configuration_rego_rule.rb index ceb9429651f7..8322bc8e34f8 100644 --- a/lib/datadog_api_client/v2/models/cloud_configuration_rego_rule.rb +++ b/lib/datadog_api_client/v2/models/cloud_configuration_rego_rule.rb @@ -27,6 +27,8 @@ class CloudConfigurationRegoRule # List of resource types that will be evaluated upon. Must have at least one element. attr_reader :resource_types + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudConfigurationRegoRule` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudConfigurationRegoRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'policy') @@ -101,6 +105,26 @@ def resource_types=(resource_types) @resource_types = resource_types 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 @@ -109,6 +133,7 @@ def ==(o) self.class == o.class && policy == o.policy && resource_types == o.resource_types + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_configuration_rule_case_create.rb b/lib/datadog_api_client/v2/models/cloud_configuration_rule_case_create.rb index 8432bee447a5..cdd160271a3d 100644 --- a/lib/datadog_api_client/v2/models/cloud_configuration_rule_case_create.rb +++ b/lib/datadog_api_client/v2/models/cloud_configuration_rule_case_create.rb @@ -27,6 +27,8 @@ class CloudConfigurationRuleCaseCreate # Severity of the Security Signal. attr_reader :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudConfigurationRuleCaseCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudConfigurationRuleCaseCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'notifications') @@ -90,6 +94,26 @@ def status=(status) @status = status 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && notifications == o.notifications && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_configuration_rule_compliance_signal_options.rb b/lib/datadog_api_client/v2/models/cloud_configuration_rule_compliance_signal_options.rb index cb7ae9397c98..bb1693fb614f 100644 --- a/lib/datadog_api_client/v2/models/cloud_configuration_rule_compliance_signal_options.rb +++ b/lib/datadog_api_client/v2/models/cloud_configuration_rule_compliance_signal_options.rb @@ -33,6 +33,8 @@ class CloudConfigurationRuleComplianceSignalOptions # Fields to use to group findings by when sending signals. attr_accessor :user_group_by_fields + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -74,12 +76,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudConfigurationRuleComplianceSignalOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudConfigurationRuleComplianceSignalOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'default_activation_status') @@ -103,6 +107,26 @@ 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 @@ -113,6 +137,7 @@ def ==(o) default_group_by_fields == o.default_group_by_fields && user_activation_status == o.user_activation_status && user_group_by_fields == o.user_group_by_fields + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_configuration_rule_create_payload.rb b/lib/datadog_api_client/v2/models/cloud_configuration_rule_create_payload.rb index ba826b8d1887..812744c50c43 100644 --- a/lib/datadog_api_client/v2/models/cloud_configuration_rule_create_payload.rb +++ b/lib/datadog_api_client/v2/models/cloud_configuration_rule_create_payload.rb @@ -49,6 +49,8 @@ class CloudConfigurationRuleCreatePayload # The rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -89,12 +91,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudConfigurationRuleCreatePayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudConfigurationRuleCreatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -213,6 +217,26 @@ def options=(options) @options = options 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 @@ -228,6 +252,7 @@ def ==(o) options == o.options && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_configuration_rule_options.rb b/lib/datadog_api_client/v2/models/cloud_configuration_rule_options.rb index b4fd50b95034..ed577c0a5718 100644 --- a/lib/datadog_api_client/v2/models/cloud_configuration_rule_options.rb +++ b/lib/datadog_api_client/v2/models/cloud_configuration_rule_options.rb @@ -26,6 +26,8 @@ class CloudConfigurationRuleOptions # attr_reader :compliance_rule_options + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -50,12 +52,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudConfigurationRuleOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudConfigurationRuleOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compliance_rule_options') @@ -81,6 +85,26 @@ def compliance_rule_options=(compliance_rule_options) @compliance_rule_options = compliance_rule_options 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && compliance_rule_options == o.compliance_rule_options + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb b/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb index 0a6810252a42..c0703f3190c6 100644 --- a/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb +++ b/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb @@ -49,6 +49,8 @@ class CloudConfigurationRulePayload # The rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -89,12 +91,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudConfigurationRulePayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudConfigurationRulePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -213,6 +217,26 @@ def options=(options) @options = options 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 @@ -228,6 +252,7 @@ def ==(o) options == o.options && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_cost_activity.rb b/lib/datadog_api_client/v2/models/cloud_cost_activity.rb index 742962a6c775..a47c7ab00506 100644 --- a/lib/datadog_api_client/v2/models/cloud_cost_activity.rb +++ b/lib/datadog_api_client/v2/models/cloud_cost_activity.rb @@ -27,6 +27,8 @@ class CloudCostActivity # Type of Cloud Cost Activity. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudCostActivity` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudCostActivity`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb b/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb index 65bf93b6187e..14f980a622ec 100644 --- a/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb @@ -24,6 +24,8 @@ class CloudCostActivityAttributes # Whether or not the cloud account is enabled. attr_reader :is_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudCostActivityAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudCostActivityAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'is_enabled') @@ -79,6 +83,26 @@ def is_enabled=(is_enabled) @is_enabled = is_enabled 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && is_enabled == o.is_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb b/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb index 428eaf887375..80a6018bfc60 100644 --- a/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb +++ b/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb @@ -24,6 +24,8 @@ class CloudCostActivityResponse # Cloud Cost Activity. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudCostActivityResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudCostActivityResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb index 928c8e39c9d3..b47013766209 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb @@ -27,6 +27,8 @@ class CloudWorkloadSecurityAgentRuleAction # Kill system call applied on the container matching the rule attr_accessor :kill + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleAction` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleAction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && filter == o.filter && kill == o.kill + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb index fa45b8be5e4e..a6d9b148516d 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb @@ -72,6 +72,8 @@ class CloudWorkloadSecurityAgentRuleAttributes # The version of the Agent rule. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -136,12 +138,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'actions') @@ -217,6 +221,26 @@ 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 @@ -240,6 +264,7 @@ def ==(o) updated_at == o.updated_at && updater == o.updater && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb index df7f86c2ed0d..c7064a4e25f0 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb @@ -36,6 +36,8 @@ class CloudWorkloadSecurityAgentRuleCreateAttributes # The name of the Agent rule. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -128,6 +132,26 @@ def name=(name) @name = name 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 @@ -139,6 +163,7 @@ def ==(o) expression == o.expression && filters == o.filters && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_data.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_data.rb index ca50e942ea55..1b23b48f48b5 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_data.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_data.rb @@ -27,6 +27,8 @@ class CloudWorkloadSecurityAgentRuleCreateData # The type of the resource. The value should always be `agent_rule`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_request.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_request.rb index 7528fd8ebcab..62624100d437 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_request.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_request.rb @@ -24,6 +24,8 @@ class CloudWorkloadSecurityAgentRuleCreateRequest # Object for a single Agent rule. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_creator_attributes.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_creator_attributes.rb index d8fcf48a53f5..e5e22dd27534 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_creator_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_creator_attributes.rb @@ -27,6 +27,8 @@ class CloudWorkloadSecurityAgentRuleCreatorAttributes # The name of the user. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreatorAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreatorAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'handle') @@ -78,6 +82,26 @@ 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 @@ -86,6 +110,7 @@ def ==(o) self.class == o.class && handle == o.handle && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_data.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_data.rb index 20681f7b1647..5d9ad28a64d9 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_data.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_data.rb @@ -30,6 +30,8 @@ class CloudWorkloadSecurityAgentRuleData # The type of the resource. The value should always be `agent_rule`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb index 39d7717ad3a8..8850e6722437 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb @@ -24,6 +24,8 @@ class CloudWorkloadSecurityAgentRuleKill # Supported signals for the kill system call. attr_accessor :signal + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleKill` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleKill`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'signal') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && signal == o.signal + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_response.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_response.rb index 9084694a39da..65d83126261c 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_response.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_response.rb @@ -24,6 +24,8 @@ class CloudWorkloadSecurityAgentRuleResponse # Object for a single Agent rule. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb index 36f7b75b1ee9..78816924bb3d 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb @@ -30,6 +30,8 @@ class CloudWorkloadSecurityAgentRuleUpdateAttributes # The SECL expression of the Agent rule. attr_accessor :expression + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) description == o.description && enabled == o.enabled && expression == o.expression + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb index 46c717409c53..dbb11a788a94 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb @@ -30,6 +30,8 @@ class CloudWorkloadSecurityAgentRuleUpdateData # The type of the resource. The value should always be `agent_rule`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_request.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_request.rb index 353dd20459dd..2c83659c494c 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_request.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_request.rb @@ -24,6 +24,8 @@ class CloudWorkloadSecurityAgentRuleUpdateRequest # Object for a single Agent rule. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_updater_attributes.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_updater_attributes.rb index 0af05a8e2ff1..3c086559a5c6 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_updater_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_updater_attributes.rb @@ -27,6 +27,8 @@ class CloudWorkloadSecurityAgentRuleUpdaterAttributes # The name of the user. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdaterAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdaterAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'handle') @@ -78,6 +82,26 @@ 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 @@ -86,6 +110,7 @@ def ==(o) self.class == o.class && handle == o.handle && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rules_list_response.rb b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rules_list_response.rb index 924a7060e83a..a5710e67bfa1 100644 --- a/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rules_list_response.rb +++ b/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rules_list_response.rb @@ -24,6 +24,8 @@ class CloudWorkloadSecurityAgentRulesListResponse # A list of Agent rules objects. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRulesListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRulesListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb b/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb index 259ebb002d01..9774090eb71d 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb @@ -24,6 +24,8 @@ class CloudflareAccountCreateRequest # Data object for creating a Cloudflare account. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb b/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb index 471fe3498c3f..abd5503f5f5e 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb @@ -36,6 +36,8 @@ class CloudflareAccountCreateRequestAttributes # An allowlist of zones to restrict pulling metrics for. attr_accessor :zones + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountCreateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -130,6 +134,26 @@ def name=(name) @name = name 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 @@ -141,6 +165,7 @@ def ==(o) name == o.name && resources == o.resources && zones == o.zones + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb b/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb index 097b8f452fbf..1363b853457b 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb @@ -27,6 +27,8 @@ class CloudflareAccountCreateRequestData # The JSON:API type for this API. Should always be `cloudflare-accounts`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountCreateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountCreateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_response.rb b/lib/datadog_api_client/v2/models/cloudflare_account_response.rb index ab7157a9b053..d494660cf556 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_response.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_response.rb @@ -24,6 +24,8 @@ class CloudflareAccountResponse # Data object of a Cloudflare account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb b/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb index 876a6964800b..0f998e29a34a 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb @@ -33,6 +33,8 @@ class CloudflareAccountResponseAttributes # An allowlist of zones to restrict pulling metrics for. attr_accessor :zones + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -110,6 +114,26 @@ def name=(name) @name = name 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 @@ -120,6 +144,7 @@ def ==(o) name == o.name && resources == o.resources && zones == o.zones + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb b/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb index 1dbf6f85ea08..e91d7fc588e7 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb @@ -30,6 +30,8 @@ class CloudflareAccountResponseData # The JSON:API type for this API. Should always be `cloudflare-accounts`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb b/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb index 7f4af448888a..4b764f4603d2 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb @@ -24,6 +24,8 @@ class CloudflareAccountUpdateRequest # Data object for updating a Cloudflare account. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb b/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb index 5ae05fb9923f..afb4a082f0ab 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb @@ -33,6 +33,8 @@ class CloudflareAccountUpdateRequestAttributes # An allowlist of zones to restrict pulling metrics for. attr_accessor :zones + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountUpdateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountUpdateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -110,6 +114,26 @@ def api_key=(api_key) @api_key = api_key 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 @@ -120,6 +144,7 @@ def ==(o) email == o.email && resources == o.resources && zones == o.zones + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb b/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb index ba8ef7cfcb8e..cce3aa43856a 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb @@ -27,6 +27,8 @@ class CloudflareAccountUpdateRequestData # The JSON:API type for this API. Should always be `cloudflare-accounts`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountUpdateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountUpdateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb b/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb index bdd73f28c8f4..91bc209baf8e 100644 --- a/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb +++ b/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb @@ -24,6 +24,8 @@ class CloudflareAccountsResponse # The JSON:API data schema. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAccountsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudflareAccountsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_create_request.rb b/lib/datadog_api_client/v2/models/confluent_account_create_request.rb index 9f6b6e51dd51..8edf8ec3fdcc 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_create_request.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_create_request.rb @@ -24,6 +24,8 @@ class ConfluentAccountCreateRequest # The data body for adding a Confluent account. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_create_request_attributes.rb b/lib/datadog_api_client/v2/models/confluent_account_create_request_attributes.rb index 374b6df5838d..e913fc6a1679 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_create_request_attributes.rb @@ -33,6 +33,8 @@ class ConfluentAccountCreateRequestAttributes # A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountCreateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -121,6 +125,26 @@ def api_secret=(api_secret) @api_secret = api_secret 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 @@ -131,6 +155,7 @@ def ==(o) api_secret == o.api_secret && resources == o.resources && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_create_request_data.rb b/lib/datadog_api_client/v2/models/confluent_account_create_request_data.rb index 88ee13379ade..2ec258d9d2aa 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_create_request_data.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_create_request_data.rb @@ -27,6 +27,8 @@ class ConfluentAccountCreateRequestData # The JSON:API type for this API. Should always be `confluent-cloud-accounts`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountCreateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountCreateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_resource_attributes.rb b/lib/datadog_api_client/v2/models/confluent_account_resource_attributes.rb index 38bc96d87a2f..f5f571e27354 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_resource_attributes.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_resource_attributes.rb @@ -33,6 +33,8 @@ class ConfluentAccountResourceAttributes # A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountResourceAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountResourceAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enable_custom_metrics') @@ -108,6 +112,26 @@ def resource_type=(resource_type) @resource_type = resource_type 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 @@ -118,6 +142,7 @@ def ==(o) id == o.id && resource_type == o.resource_type && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_response.rb b/lib/datadog_api_client/v2/models/confluent_account_response.rb index 1981de01797d..aae559bfd112 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_response.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_response.rb @@ -24,6 +24,8 @@ class ConfluentAccountResponse # An API key and API secret pair that represents a Confluent account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_response_attributes.rb b/lib/datadog_api_client/v2/models/confluent_account_response_attributes.rb index badd5ed1eed0..c286d0543ea7 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_response_attributes.rb @@ -30,6 +30,8 @@ class ConfluentAccountResponseAttributes # A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -101,6 +105,26 @@ def api_key=(api_key) @api_key = api_key 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 @@ -110,6 +134,7 @@ def ==(o) api_key == o.api_key && resources == o.resources && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_response_data.rb b/lib/datadog_api_client/v2/models/confluent_account_response_data.rb index 4230b55b7d41..c2a8bf82aa31 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_response_data.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_response_data.rb @@ -30,6 +30,8 @@ class ConfluentAccountResponseData # The JSON:API type for this API. Should always be `confluent-cloud-accounts`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_update_request.rb b/lib/datadog_api_client/v2/models/confluent_account_update_request.rb index e26be7843a73..093336d87e41 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_update_request.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_update_request.rb @@ -24,6 +24,8 @@ class ConfluentAccountUpdateRequest # Data object for updating a Confluent account. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_update_request_attributes.rb b/lib/datadog_api_client/v2/models/confluent_account_update_request_attributes.rb index 5362c6dbb202..987dfa551178 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_update_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_update_request_attributes.rb @@ -30,6 +30,8 @@ class ConfluentAccountUpdateRequestAttributes # A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountUpdateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountUpdateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -110,6 +114,26 @@ def api_secret=(api_secret) @api_secret = api_secret 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 @@ -119,6 +143,7 @@ def ==(o) api_key == o.api_key && api_secret == o.api_secret && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_account_update_request_data.rb b/lib/datadog_api_client/v2/models/confluent_account_update_request_data.rb index b39f28bd52cd..af457d4d97b8 100644 --- a/lib/datadog_api_client/v2/models/confluent_account_update_request_data.rb +++ b/lib/datadog_api_client/v2/models/confluent_account_update_request_data.rb @@ -27,6 +27,8 @@ class ConfluentAccountUpdateRequestData # The JSON:API type for this API. Should always be `confluent-cloud-accounts`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountUpdateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountUpdateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_accounts_response.rb b/lib/datadog_api_client/v2/models/confluent_accounts_response.rb index fa44adca5d12..fdc3dc6c68c5 100644 --- a/lib/datadog_api_client/v2/models/confluent_accounts_response.rb +++ b/lib/datadog_api_client/v2/models/confluent_accounts_response.rb @@ -24,6 +24,8 @@ class ConfluentAccountsResponse # The Confluent account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentAccountsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentAccountsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_resource_request.rb b/lib/datadog_api_client/v2/models/confluent_resource_request.rb index adedc74b8a9f..ceb244e9863d 100644 --- a/lib/datadog_api_client/v2/models/confluent_resource_request.rb +++ b/lib/datadog_api_client/v2/models/confluent_resource_request.rb @@ -24,6 +24,8 @@ class ConfluentResourceRequest # JSON:API request for updating a Confluent resource. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentResourceRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentResourceRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_resource_request_attributes.rb b/lib/datadog_api_client/v2/models/confluent_resource_request_attributes.rb index dd9082140317..c1bd29d3ae2c 100644 --- a/lib/datadog_api_client/v2/models/confluent_resource_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/confluent_resource_request_attributes.rb @@ -30,6 +30,8 @@ class ConfluentResourceRequestAttributes # A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentResourceRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentResourceRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enable_custom_metrics') @@ -99,6 +103,26 @@ def resource_type=(resource_type) @resource_type = resource_type 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 @@ -108,6 +132,7 @@ def ==(o) enable_custom_metrics == o.enable_custom_metrics && resource_type == o.resource_type && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_resource_request_data.rb b/lib/datadog_api_client/v2/models/confluent_resource_request_data.rb index 93aa9eaf7a90..4f1e78aaa8e5 100644 --- a/lib/datadog_api_client/v2/models/confluent_resource_request_data.rb +++ b/lib/datadog_api_client/v2/models/confluent_resource_request_data.rb @@ -30,6 +30,8 @@ class ConfluentResourceRequestData # The JSON:API type for this request. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentResourceRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentResourceRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_resource_response.rb b/lib/datadog_api_client/v2/models/confluent_resource_response.rb index 4c160838b468..3120b35f4367 100644 --- a/lib/datadog_api_client/v2/models/confluent_resource_response.rb +++ b/lib/datadog_api_client/v2/models/confluent_resource_response.rb @@ -24,6 +24,8 @@ class ConfluentResourceResponse # Confluent Cloud resource data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentResourceResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentResourceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_resource_response_attributes.rb b/lib/datadog_api_client/v2/models/confluent_resource_response_attributes.rb index ca73fd7bf03c..87de15dc40dc 100644 --- a/lib/datadog_api_client/v2/models/confluent_resource_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/confluent_resource_response_attributes.rb @@ -33,6 +33,8 @@ class ConfluentResourceResponseAttributes # A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentResourceResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentResourceResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enable_custom_metrics') @@ -108,6 +112,26 @@ def resource_type=(resource_type) @resource_type = resource_type 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 @@ -118,6 +142,7 @@ def ==(o) id == o.id && resource_type == o.resource_type && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_resource_response_data.rb b/lib/datadog_api_client/v2/models/confluent_resource_response_data.rb index 5713ca55ea5b..2fef5eaba0be 100644 --- a/lib/datadog_api_client/v2/models/confluent_resource_response_data.rb +++ b/lib/datadog_api_client/v2/models/confluent_resource_response_data.rb @@ -30,6 +30,8 @@ class ConfluentResourceResponseData # The JSON:API type for this request. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentResourceResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentResourceResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/confluent_resources_response.rb b/lib/datadog_api_client/v2/models/confluent_resources_response.rb index 5d96d3100d6d..4b6b11f77c39 100644 --- a/lib/datadog_api_client/v2/models/confluent_resources_response.rb +++ b/lib/datadog_api_client/v2/models/confluent_resources_response.rb @@ -24,6 +24,8 @@ class ConfluentResourcesResponse # The JSON:API data attribute. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfluentResourcesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ConfluentResourcesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container.rb b/lib/datadog_api_client/v2/models/container.rb index f39ee84e91da..620e189d877d 100644 --- a/lib/datadog_api_client/v2/models/container.rb +++ b/lib/datadog_api_client/v2/models/container.rb @@ -30,6 +30,8 @@ class Container # Type of container. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Container` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Container`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_attributes.rb b/lib/datadog_api_client/v2/models/container_attributes.rb index 5e6a90e2ebc7..4d9759dbbe77 100644 --- a/lib/datadog_api_client/v2/models/container_attributes.rb +++ b/lib/datadog_api_client/v2/models/container_attributes.rb @@ -51,6 +51,8 @@ class ContainerAttributes # List of tags associated with the container. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -102,12 +104,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'container_id') @@ -155,6 +159,26 @@ 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 @@ -171,6 +195,7 @@ def ==(o) started_at == o.started_at && state == o.state && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_group.rb b/lib/datadog_api_client/v2/models/container_group.rb index fb1bf52152ef..06c787bea79d 100644 --- a/lib/datadog_api_client/v2/models/container_group.rb +++ b/lib/datadog_api_client/v2/models/container_group.rb @@ -33,6 +33,8 @@ class ContainerGroup # Type of container group. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerGroup` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_group_attributes.rb b/lib/datadog_api_client/v2/models/container_group_attributes.rb index e01c1148f248..ae2ffa342901 100644 --- a/lib/datadog_api_client/v2/models/container_group_attributes.rb +++ b/lib/datadog_api_client/v2/models/container_group_attributes.rb @@ -27,6 +27,8 @@ class ContainerGroupAttributes # Tags from the group name parsed in key/value format. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerGroupAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerGroupAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && count == o.count && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_group_relationships.rb b/lib/datadog_api_client/v2/models/container_group_relationships.rb index 96a508cf1750..b3533f19dd91 100644 --- a/lib/datadog_api_client/v2/models/container_group_relationships.rb +++ b/lib/datadog_api_client/v2/models/container_group_relationships.rb @@ -24,6 +24,8 @@ class ContainerGroupRelationships # Relationships to Containers inside a Container Group. attr_accessor :containers + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerGroupRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerGroupRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'containers') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && containers == o.containers + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_group_relationships_link.rb b/lib/datadog_api_client/v2/models/container_group_relationships_link.rb index d7021dccb66b..ee133cc42d1a 100644 --- a/lib/datadog_api_client/v2/models/container_group_relationships_link.rb +++ b/lib/datadog_api_client/v2/models/container_group_relationships_link.rb @@ -27,6 +27,8 @@ class ContainerGroupRelationshipsLink # Links attributes. attr_accessor :links + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerGroupRelationshipsLink` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerGroupRelationshipsLink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && links == o.links + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_group_relationships_links.rb b/lib/datadog_api_client/v2/models/container_group_relationships_links.rb index 1ce782e7ac42..de5198b4c86f 100644 --- a/lib/datadog_api_client/v2/models/container_group_relationships_links.rb +++ b/lib/datadog_api_client/v2/models/container_group_relationships_links.rb @@ -24,6 +24,8 @@ class ContainerGroupRelationshipsLinks # Link to related containers. attr_accessor :related + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerGroupRelationshipsLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerGroupRelationshipsLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'related') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && related == o.related + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image.rb b/lib/datadog_api_client/v2/models/container_image.rb index 182fb504d3fb..4db894444e02 100644 --- a/lib/datadog_api_client/v2/models/container_image.rb +++ b/lib/datadog_api_client/v2/models/container_image.rb @@ -30,6 +30,8 @@ class ContainerImage # Type of Container Image. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_attributes.rb b/lib/datadog_api_client/v2/models/container_image_attributes.rb index 8543e4a423ab..d04a8a17069f 100644 --- a/lib/datadog_api_client/v2/models/container_image_attributes.rb +++ b/lib/datadog_api_client/v2/models/container_image_attributes.rb @@ -75,6 +75,8 @@ class ContainerImageAttributes # Vulnerability counts associated with the Container Image. attr_accessor :vulnerability_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -131,12 +133,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'container_count') @@ -226,6 +230,26 @@ 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 @@ -249,6 +273,7 @@ def ==(o) sources == o.sources && tags == o.tags && vulnerability_count == o.vulnerability_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_flavor.rb b/lib/datadog_api_client/v2/models/container_image_flavor.rb index b95fee695158..f33e48c49507 100644 --- a/lib/datadog_api_client/v2/models/container_image_flavor.rb +++ b/lib/datadog_api_client/v2/models/container_image_flavor.rb @@ -36,6 +36,8 @@ class ContainerImageFlavor # Size of the platform-specific Container Image. attr_accessor :size + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageFlavor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageFlavor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'built_at') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) os_name == o.os_name && os_version == o.os_version && size == o.size + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_group.rb b/lib/datadog_api_client/v2/models/container_image_group.rb index 61e921bc9699..5f2aafb4a4b5 100644 --- a/lib/datadog_api_client/v2/models/container_image_group.rb +++ b/lib/datadog_api_client/v2/models/container_image_group.rb @@ -33,6 +33,8 @@ class ContainerImageGroup # Type of Container Image Group. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageGroup` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_group_attributes.rb b/lib/datadog_api_client/v2/models/container_image_group_attributes.rb index d2d007189e58..4d7275ef19c8 100644 --- a/lib/datadog_api_client/v2/models/container_image_group_attributes.rb +++ b/lib/datadog_api_client/v2/models/container_image_group_attributes.rb @@ -30,6 +30,8 @@ class ContainerImageGroupAttributes # Tags from the group name parsed in key/value format. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageGroupAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageGroupAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) count == o.count && name == o.name && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb b/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb index 2bcd20edd5c9..254f843f7e69 100644 --- a/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb +++ b/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb @@ -27,6 +27,8 @@ class ContainerImageGroupImagesRelationshipsLink # Links attributes. attr_accessor :links + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageGroupImagesRelationshipsLink` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageGroupImagesRelationshipsLink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && links == o.links + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_group_relationships.rb b/lib/datadog_api_client/v2/models/container_image_group_relationships.rb index dc6c91689ccb..e1655660ccd4 100644 --- a/lib/datadog_api_client/v2/models/container_image_group_relationships.rb +++ b/lib/datadog_api_client/v2/models/container_image_group_relationships.rb @@ -24,6 +24,8 @@ class ContainerImageGroupRelationships # Relationships to Container Images inside a Container Image Group. attr_accessor :container_images + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageGroupRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageGroupRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'container_images') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && container_images == o.container_images + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb b/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb index 9f51bbb1833b..58eee7913a05 100644 --- a/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb +++ b/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb @@ -24,6 +24,8 @@ class ContainerImageGroupRelationshipsLinks # Link to related Container Images. attr_accessor :related + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageGroupRelationshipsLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageGroupRelationshipsLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'related') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && related == o.related + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_meta.rb b/lib/datadog_api_client/v2/models/container_image_meta.rb index 47d4a5473e0c..03ee68699598 100644 --- a/lib/datadog_api_client/v2/models/container_image_meta.rb +++ b/lib/datadog_api_client/v2/models/container_image_meta.rb @@ -24,6 +24,8 @@ class ContainerImageMeta # Paging attributes. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_meta_page.rb b/lib/datadog_api_client/v2/models/container_image_meta_page.rb index 8a20634c4935..86ef2377015b 100644 --- a/lib/datadog_api_client/v2/models/container_image_meta_page.rb +++ b/lib/datadog_api_client/v2/models/container_image_meta_page.rb @@ -39,6 +39,8 @@ class ContainerImageMetaPage # Type of Container Image pagination. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -136,6 +140,26 @@ def limit=(limit) @limit = limit 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 @@ -148,6 +172,7 @@ def ==(o) prev_cursor == o.prev_cursor && total == o.total && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb b/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb index 563ed9d9edbe..7a7df0685678 100644 --- a/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb +++ b/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb @@ -42,6 +42,8 @@ class ContainerImageVulnerabilities # Number of vulnerabilities with an unknown CVSS severity. attr_accessor :unknown + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImageVulnerabilities` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImageVulnerabilities`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'asset_id') @@ -115,6 +119,26 @@ 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 @@ -128,6 +152,7 @@ def ==(o) medium == o.medium && none == o.none && unknown == o.unknown + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_images_response.rb b/lib/datadog_api_client/v2/models/container_images_response.rb index 655928fa823a..e82988aad1ea 100644 --- a/lib/datadog_api_client/v2/models/container_images_response.rb +++ b/lib/datadog_api_client/v2/models/container_images_response.rb @@ -30,6 +30,8 @@ class ContainerImagesResponse # Response metadata object. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImagesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImagesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_images_response_links.rb b/lib/datadog_api_client/v2/models/container_images_response_links.rb index 1e780f34bcec..34da8c2be5ff 100644 --- a/lib/datadog_api_client/v2/models/container_images_response_links.rb +++ b/lib/datadog_api_client/v2/models/container_images_response_links.rb @@ -36,6 +36,8 @@ class ContainerImagesResponseLinks # Link to current page. attr_accessor :_self + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerImagesResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerImagesResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'first') @@ -107,6 +111,26 @@ 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 @@ -118,6 +142,7 @@ def ==(o) _next == o._next && prev == o.prev && _self == o._self + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_meta.rb b/lib/datadog_api_client/v2/models/container_meta.rb index f5a02f2cbc7f..30ed593f8734 100644 --- a/lib/datadog_api_client/v2/models/container_meta.rb +++ b/lib/datadog_api_client/v2/models/container_meta.rb @@ -24,6 +24,8 @@ class ContainerMeta # Paging attributes. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/container_meta_page.rb b/lib/datadog_api_client/v2/models/container_meta_page.rb index 51eeca24a41d..bacdeb9369e9 100644 --- a/lib/datadog_api_client/v2/models/container_meta_page.rb +++ b/lib/datadog_api_client/v2/models/container_meta_page.rb @@ -39,6 +39,8 @@ class ContainerMetaPage # Type of Container pagination. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainerMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -136,6 +140,26 @@ def limit=(limit) @limit = limit 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 @@ -148,6 +172,7 @@ def ==(o) prev_cursor == o.prev_cursor && total == o.total && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/containers_response.rb b/lib/datadog_api_client/v2/models/containers_response.rb index b12198db9c22..18e8159f58ac 100644 --- a/lib/datadog_api_client/v2/models/containers_response.rb +++ b/lib/datadog_api_client/v2/models/containers_response.rb @@ -30,6 +30,8 @@ class ContainersResponse # Response metadata object. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainersResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/containers_response_links.rb b/lib/datadog_api_client/v2/models/containers_response_links.rb index f33a7a9e3806..5fd17d2de0e6 100644 --- a/lib/datadog_api_client/v2/models/containers_response_links.rb +++ b/lib/datadog_api_client/v2/models/containers_response_links.rb @@ -36,6 +36,8 @@ class ContainersResponseLinks # Link to current page. attr_accessor :_self + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainersResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ContainersResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'first') @@ -107,6 +111,26 @@ 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 @@ -118,6 +142,7 @@ def ==(o) _next == o._next && prev == o.prev && _self == o._self + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cost_attribution_aggregates_body.rb b/lib/datadog_api_client/v2/models/cost_attribution_aggregates_body.rb index d5089d2ba049..507e472cc270 100644 --- a/lib/datadog_api_client/v2/models/cost_attribution_aggregates_body.rb +++ b/lib/datadog_api_client/v2/models/cost_attribution_aggregates_body.rb @@ -30,6 +30,8 @@ class CostAttributionAggregatesBody # The value for a given field. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CostAttributionAggregatesBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CostAttributionAggregatesBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'agg_type') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) agg_type == o.agg_type && field == o.field && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cost_by_org.rb b/lib/datadog_api_client/v2/models/cost_by_org.rb index c4a2c0feae94..73c422431749 100644 --- a/lib/datadog_api_client/v2/models/cost_by_org.rb +++ b/lib/datadog_api_client/v2/models/cost_by_org.rb @@ -30,6 +30,8 @@ class CostByOrg # Type of cost data. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CostByOrg` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CostByOrg`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb b/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb index 1599a8d0926a..ff58e923c9c3 100644 --- a/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +++ b/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb @@ -45,6 +45,8 @@ class CostByOrgAttributes # The total cost of products for the month. attr_accessor :total_cost + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CostByOrgAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CostByOrgAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_name') @@ -126,6 +130,26 @@ 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 @@ -140,6 +164,7 @@ def ==(o) public_id == o.public_id && region == o.region && total_cost == o.total_cost + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/cost_by_org_response.rb b/lib/datadog_api_client/v2/models/cost_by_org_response.rb index 7ab866781fa5..9151d8335c65 100644 --- a/lib/datadog_api_client/v2/models/cost_by_org_response.rb +++ b/lib/datadog_api_client/v2/models/cost_by_org_response.rb @@ -24,6 +24,8 @@ class CostByOrgResponse # Response containing Chargeback Summary. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CostByOrgResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CostByOrgResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/create_open_api_response.rb b/lib/datadog_api_client/v2/models/create_open_api_response.rb index 97a6b189c930..6f6168c69016 100644 --- a/lib/datadog_api_client/v2/models/create_open_api_response.rb +++ b/lib/datadog_api_client/v2/models/create_open_api_response.rb @@ -24,6 +24,8 @@ class CreateOpenAPIResponse # Data envelope for `CreateOpenAPIResponse`. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateOpenAPIResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateOpenAPIResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb b/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb index 0210cea496fd..2a2bf85e1530 100644 --- a/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb @@ -24,6 +24,8 @@ class CreateOpenAPIResponseAttributes # List of endpoints which couldn't be parsed. attr_accessor :failed_endpoints + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateOpenAPIResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateOpenAPIResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'failed_endpoints') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && failed_endpoints == o.failed_endpoints + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/create_open_api_response_data.rb b/lib/datadog_api_client/v2/models/create_open_api_response_data.rb index c3a0228650d7..8e9320577f11 100644 --- a/lib/datadog_api_client/v2/models/create_open_api_response_data.rb +++ b/lib/datadog_api_client/v2/models/create_open_api_response_data.rb @@ -27,6 +27,8 @@ class CreateOpenAPIResponseData # API identifier. attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateOpenAPIResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateOpenAPIResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/create_rule_request.rb b/lib/datadog_api_client/v2/models/create_rule_request.rb index 17d42ad7d58e..7d9cb190b897 100644 --- a/lib/datadog_api_client/v2/models/create_rule_request.rb +++ b/lib/datadog_api_client/v2/models/create_rule_request.rb @@ -24,6 +24,8 @@ class CreateRuleRequest # Scorecard create rule request data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateRuleRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateRuleRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/create_rule_request_data.rb b/lib/datadog_api_client/v2/models/create_rule_request_data.rb index fb1e2c272395..b051af1b4e64 100644 --- a/lib/datadog_api_client/v2/models/create_rule_request_data.rb +++ b/lib/datadog_api_client/v2/models/create_rule_request_data.rb @@ -27,6 +27,8 @@ class CreateRuleRequestData # The JSON:API type for scorecard rules. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateRuleRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateRuleRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/create_rule_response.rb b/lib/datadog_api_client/v2/models/create_rule_response.rb index 1ccc476bbfc3..cf71416e0ee0 100644 --- a/lib/datadog_api_client/v2/models/create_rule_response.rb +++ b/lib/datadog_api_client/v2/models/create_rule_response.rb @@ -24,6 +24,8 @@ class CreateRuleResponse # Create rule response data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateRuleResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateRuleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/create_rule_response_data.rb b/lib/datadog_api_client/v2/models/create_rule_response_data.rb index 42b301170e3e..d5ebbe809c93 100644 --- a/lib/datadog_api_client/v2/models/create_rule_response_data.rb +++ b/lib/datadog_api_client/v2/models/create_rule_response_data.rb @@ -33,6 +33,8 @@ class CreateRuleResponseData # The JSON:API type for scorecard rules. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateRuleResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CreateRuleResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/creator.rb b/lib/datadog_api_client/v2/models/creator.rb index ee50db9b3afd..2ec445d3c175 100644 --- a/lib/datadog_api_client/v2/models/creator.rb +++ b/lib/datadog_api_client/v2/models/creator.rb @@ -30,6 +30,8 @@ class Creator # Name of the creator. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Creator` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Creator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -87,6 +91,26 @@ 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 @@ -96,6 +120,7 @@ def ==(o) email == o.email && handle == o.handle && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_cost_get_response_meta.rb b/lib/datadog_api_client/v2/models/custom_cost_get_response_meta.rb index 532bf702ad8e..24397c6af89d 100644 --- a/lib/datadog_api_client/v2/models/custom_cost_get_response_meta.rb +++ b/lib/datadog_api_client/v2/models/custom_cost_get_response_meta.rb @@ -24,6 +24,8 @@ class CustomCostGetResponseMeta # Version of Custom Costs file attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostGetResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostGetResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'version') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_cost_list_response_meta.rb b/lib/datadog_api_client/v2/models/custom_cost_list_response_meta.rb index fa91569162ee..3950129e4ae5 100644 --- a/lib/datadog_api_client/v2/models/custom_cost_list_response_meta.rb +++ b/lib/datadog_api_client/v2/models/custom_cost_list_response_meta.rb @@ -27,6 +27,8 @@ class CustomCostListResponseMeta # Version of Custom Costs file attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostListResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostListResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_filtered_count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && total_filtered_count == o.total_filtered_count && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_cost_upload_response_meta.rb b/lib/datadog_api_client/v2/models/custom_cost_upload_response_meta.rb index ddd3d4edda3f..ecd06c98551c 100644 --- a/lib/datadog_api_client/v2/models/custom_cost_upload_response_meta.rb +++ b/lib/datadog_api_client/v2/models/custom_cost_upload_response_meta.rb @@ -24,6 +24,8 @@ class CustomCostUploadResponseMeta # Version of Custom Costs file attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostUploadResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostUploadResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'version') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_get_response.rb b/lib/datadog_api_client/v2/models/custom_costs_file_get_response.rb index 41d16505dfeb..51950918defa 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_get_response.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_get_response.rb @@ -27,6 +27,8 @@ class CustomCostsFileGetResponse # Meta for the response from the Get Custom Costs endpoints. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileGetResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_line_item.rb b/lib/datadog_api_client/v2/models/custom_costs_file_line_item.rb index bdceeee8fe80..d9306ab2594c 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_line_item.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_line_item.rb @@ -42,6 +42,8 @@ class CustomCostsFileLineItem # Additional tags for the line item. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileLineItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileLineItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'billed_cost') @@ -148,6 +152,26 @@ def charge_period_start=(charge_period_start) @charge_period_start = charge_period_start 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 @@ -161,6 +185,7 @@ def ==(o) charge_period_start == o.charge_period_start && provider_name == o.provider_name && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_list_response.rb b/lib/datadog_api_client/v2/models/custom_costs_file_list_response.rb index 93ae9867741f..b03b25208f66 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_list_response.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_list_response.rb @@ -27,6 +27,8 @@ class CustomCostsFileListResponse # Meta for the response from the List Custom Costs endpoints. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_metadata.rb b/lib/datadog_api_client/v2/models/custom_costs_file_metadata.rb index 52a5e56a9def..a29861fc0c3d 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_metadata.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_metadata.rb @@ -45,6 +45,8 @@ class CustomCostsFileMetadata # Metadata of the user that has uploaded the Custom Costs file. attr_accessor :uploaded_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'billed_cost') @@ -126,6 +130,26 @@ 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 @@ -140,6 +164,7 @@ def ==(o) status == o.status && uploaded_at == o.uploaded_at && uploaded_by == o.uploaded_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_metadata_high_level.rb b/lib/datadog_api_client/v2/models/custom_costs_file_metadata_high_level.rb index c0ca665aa4f0..3a088b5d5d53 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_metadata_high_level.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_metadata_high_level.rb @@ -30,6 +30,8 @@ class CustomCostsFileMetadataHighLevel # Type of the Custom Costs file metadata. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileMetadataHighLevel` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileMetadataHighLevel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content.rb b/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content.rb index 7a4b732ead9b..69f69e59efe9 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content.rb @@ -48,6 +48,8 @@ class CustomCostsFileMetadataWithContent # Metadata of the user that has uploaded the Custom Costs file. attr_accessor :uploaded_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileMetadataWithContent` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileMetadataWithContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'billed_cost') @@ -137,6 +141,26 @@ 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 @@ -152,6 +176,7 @@ def ==(o) status == o.status && uploaded_at == o.uploaded_at && uploaded_by == o.uploaded_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content_high_level.rb b/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content_high_level.rb index 6cf5a22fc196..4cd22299ce81 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content_high_level.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content_high_level.rb @@ -30,6 +30,8 @@ class CustomCostsFileMetadataWithContentHighLevel # Type of the Custom Costs file metadata. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileMetadataWithContentHighLevel` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileMetadataWithContentHighLevel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_upload_response.rb b/lib/datadog_api_client/v2/models/custom_costs_file_upload_response.rb index 353e2d269a18..c22b1f60da35 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_upload_response.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_upload_response.rb @@ -27,6 +27,8 @@ class CustomCostsFileUploadResponse # Meta for the response from the Upload Custom Costs endpoints. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileUploadResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileUploadResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_file_usage_charge_period.rb b/lib/datadog_api_client/v2/models/custom_costs_file_usage_charge_period.rb index 413f2c52b919..cd57e73af7b1 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_file_usage_charge_period.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_file_usage_charge_period.rb @@ -27,6 +27,8 @@ class CustomCostsFileUsageChargePeriod # Start of the usage of the Custom Costs file. attr_accessor :start + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileUsageChargePeriod` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileUsageChargePeriod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && _end == o._end && start == o.start + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_costs_user.rb b/lib/datadog_api_client/v2/models/custom_costs_user.rb index 3c3f18dbddbb..b979a4bd156f 100644 --- a/lib/datadog_api_client/v2/models/custom_costs_user.rb +++ b/lib/datadog_api_client/v2/models/custom_costs_user.rb @@ -30,6 +30,8 @@ class CustomCostsUser # Name of the user. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsUser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) email == o.email && icon == o.icon && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_create_request.rb b/lib/datadog_api_client/v2/models/custom_destination_create_request.rb index bc9f7b2989df..bc801ecfcab2 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_create_request.rb @@ -24,6 +24,8 @@ class CustomDestinationCreateRequest # The definition of a custom destination. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb b/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb index 3602b00f3091..5f92577ac293 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb @@ -49,6 +49,8 @@ class CustomDestinationCreateRequestAttributes # The custom destination query and filter. Logs matching this query are forwarded to the destination. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -85,12 +87,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -168,6 +172,26 @@ def name=(name) @name = name 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 @@ -181,6 +205,7 @@ def ==(o) forwarder_destination == o.forwarder_destination && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb b/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb index b670f9daf6d6..0892c7989dbb 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb @@ -27,6 +27,8 @@ class CustomDestinationCreateRequestDefinition # The type of the resource. The value should always be `custom_destination`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb b/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb index 24bbd7d4577a..4c485624c410 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb @@ -27,6 +27,8 @@ class CustomDestinationElasticsearchDestinationAuth # The username of the authentication. This field is not returned by the API. attr_reader :username + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationElasticsearchDestinationAuth` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationElasticsearchDestinationAuth`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'password') @@ -99,6 +103,26 @@ def username=(username) @username = username 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && password == o.password && username == o.username + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb b/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb index 89c34faabb12..ca9d1ea89db6 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb @@ -46,6 +46,8 @@ class CustomDestinationForwardDestinationElasticsearch # Type of the Elasticsearch destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationForwardDestinationElasticsearch` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationForwardDestinationElasticsearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'auth') @@ -158,6 +162,26 @@ def type=(type) @type = type 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 @@ -169,6 +193,7 @@ def ==(o) index_name == o.index_name && index_rotation == o.index_rotation && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb b/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb index 00448a2e97ba..d898be9ed95e 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb @@ -31,6 +31,8 @@ class CustomDestinationForwardDestinationHttp # Type of the HTTP destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationForwardDestinationHttp` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationForwardDestinationHttp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'auth') @@ -120,6 +124,26 @@ def type=(type) @type = type 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 @@ -129,6 +153,7 @@ def ==(o) auth == o.auth && endpoint == o.endpoint && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb b/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb index 2e536cfca93a..6ebac3a72593 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb @@ -31,6 +31,8 @@ class CustomDestinationForwardDestinationSplunk # Type of the Splunk HTTP Event Collector (HEC) destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'access_token') @@ -120,6 +124,26 @@ def type=(type) @type = type 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 @@ -129,6 +153,7 @@ def ==(o) access_token == o.access_token && endpoint == o.endpoint && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb b/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb index f1ddbe44f9a5..deaffa852fee 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb @@ -30,6 +30,8 @@ class CustomDestinationHttpDestinationAuthBasic # The username of the authentication. This field is not returned by the API. attr_reader :username + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasic` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasic`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'password') @@ -119,6 +123,26 @@ def username=(username) @username = username 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 @@ -128,6 +152,7 @@ def ==(o) password == o.password && type == o.type && username == o.username + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb b/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb index 464f068e7af2..2cc601f37288 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb @@ -30,6 +30,8 @@ class CustomDestinationHttpDestinationAuthCustomHeader # Type of the custom header access authentication. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthCustomHeader` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthCustomHeader`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'header_name') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) header_name == o.header_name && header_value == o.header_value && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_response.rb b/lib/datadog_api_client/v2/models/custom_destination_response.rb index efa7abac339f..024ed6df1dbc 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response.rb @@ -24,6 +24,8 @@ class CustomDestinationResponse # The definition of a custom destination. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb b/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb index ab013208a8cd..de69d8d8a13b 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb @@ -49,6 +49,8 @@ class CustomDestinationResponseAttributes # The custom destination query filter. Logs matching this query are forwarded to the destination. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -85,12 +87,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -146,6 +150,26 @@ def forward_tags_restriction_list=(forward_tags_restriction_list) @forward_tags_restriction_list = forward_tags_restriction_list 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 @@ -159,6 +183,7 @@ def ==(o) forwarder_destination == o.forwarder_destination && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb b/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb index ddd5494e93c7..84be926ebd86 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb @@ -30,6 +30,8 @@ class CustomDestinationResponseDefinition # The type of the resource. The value should always be `custom_destination`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponseDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationResponseDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb b/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb index dd5f19ec8b0f..b6bdcb7e4eff 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb @@ -46,6 +46,8 @@ class CustomDestinationResponseForwardDestinationElasticsearch # Type of the Elasticsearch destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponseForwardDestinationElasticsearch` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationResponseForwardDestinationElasticsearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'auth') @@ -158,6 +162,26 @@ def type=(type) @type = type 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 @@ -169,6 +193,7 @@ def ==(o) index_name == o.index_name && index_rotation == o.index_rotation && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb b/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb index 83b814f3e008..8b9555c4d2fc 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb @@ -31,6 +31,8 @@ class CustomDestinationResponseForwardDestinationHttp # Type of the HTTP destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponseForwardDestinationHttp` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationResponseForwardDestinationHttp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'auth') @@ -120,6 +124,26 @@ def type=(type) @type = type 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 @@ -129,6 +153,7 @@ def ==(o) auth == o.auth && endpoint == o.endpoint && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb b/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb index abb488a94614..fdd41aa3e0dc 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb @@ -28,6 +28,8 @@ class CustomDestinationResponseForwardDestinationSplunk # Type of the Splunk HTTP Event Collector (HEC) destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponseForwardDestinationSplunk` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationResponseForwardDestinationSplunk`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'endpoint') @@ -100,6 +104,26 @@ def type=(type) @type = type 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 @@ -108,6 +132,7 @@ def ==(o) self.class == o.class && endpoint == o.endpoint && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb b/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb index 825360b48e06..ec2b6d121807 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb @@ -24,6 +24,8 @@ class CustomDestinationResponseHttpDestinationAuthBasic # Type of the basic access authentication. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponseHttpDestinationAuthBasic` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationResponseHttpDestinationAuthBasic`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -79,6 +83,26 @@ def type=(type) @type = type 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb b/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb index d204b7962c42..a32897f1786e 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb @@ -27,6 +27,8 @@ class CustomDestinationResponseHttpDestinationAuthCustomHeader # Type of the custom header access authentication. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponseHttpDestinationAuthCustomHeader` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationResponseHttpDestinationAuthCustomHeader`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'header_name') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && header_name == o.header_name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_update_request.rb b/lib/datadog_api_client/v2/models/custom_destination_update_request.rb index 9778f38a250a..1c8adec241ff 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_update_request.rb @@ -24,6 +24,8 @@ class CustomDestinationUpdateRequest # The definition of a custom destination. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb b/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb index 8cd7d198a203..ef23ce4c6bf7 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb @@ -47,6 +47,8 @@ class CustomDestinationUpdateRequestAttributes # The custom destination query and filter. Logs matching this query are forwarded to the destination. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationUpdateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationUpdateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -144,6 +148,26 @@ def forward_tags_restriction_list=(forward_tags_restriction_list) @forward_tags_restriction_list = forward_tags_restriction_list 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 @@ -157,6 +181,7 @@ def ==(o) forwarder_destination == o.forwarder_destination && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb b/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb index 23535e6156b1..06ff7a142f65 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb @@ -30,6 +30,8 @@ class CustomDestinationUpdateRequestDefinition # The type of the resource. The value should always be `custom_destination`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationUpdateRequestDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationUpdateRequestDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/custom_destinations_response.rb b/lib/datadog_api_client/v2/models/custom_destinations_response.rb index dc042ba4d918..ad60799aa64e 100644 --- a/lib/datadog_api_client/v2/models/custom_destinations_response.rb +++ b/lib/datadog_api_client/v2/models/custom_destinations_response.rb @@ -24,6 +24,8 @@ class CustomDestinationsResponse # A list of custom destinations. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomDestinationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_add_items_request.rb b/lib/datadog_api_client/v2/models/dashboard_list_add_items_request.rb index 17f9accd2bad..e960982638ca 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_add_items_request.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_add_items_request.rb @@ -24,6 +24,8 @@ class DashboardListAddItemsRequest # List of dashboards to add the dashboard list. attr_accessor :dashboards + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListAddItemsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListAddItemsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dashboards') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && dashboards == o.dashboards + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_add_items_response.rb b/lib/datadog_api_client/v2/models/dashboard_list_add_items_response.rb index 9ebc2ea9dad9..f2e4e0b4fd6c 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_add_items_response.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_add_items_response.rb @@ -24,6 +24,8 @@ class DashboardListAddItemsResponse # List of dashboards added to the dashboard list. attr_accessor :added_dashboards_to_list + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListAddItemsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListAddItemsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'added_dashboards_to_list') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && added_dashboards_to_list == o.added_dashboards_to_list + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_delete_items_request.rb b/lib/datadog_api_client/v2/models/dashboard_list_delete_items_request.rb index 1951ecf3c769..e50276b88c75 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_delete_items_request.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_delete_items_request.rb @@ -24,6 +24,8 @@ class DashboardListDeleteItemsRequest # List of dashboards to delete from the dashboard list. attr_accessor :dashboards + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListDeleteItemsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListDeleteItemsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dashboards') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && dashboards == o.dashboards + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_delete_items_response.rb b/lib/datadog_api_client/v2/models/dashboard_list_delete_items_response.rb index 69c0f79f3237..331e37902469 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_delete_items_response.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_delete_items_response.rb @@ -24,6 +24,8 @@ class DashboardListDeleteItemsResponse # List of dashboards deleted from the dashboard list. attr_accessor :deleted_dashboards_from_list + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListDeleteItemsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListDeleteItemsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'deleted_dashboards_from_list') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && deleted_dashboards_from_list == o.deleted_dashboards_from_list + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_item.rb b/lib/datadog_api_client/v2/models/dashboard_list_item.rb index 27f091d65de6..61ecb51cf90d 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_item.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_item.rb @@ -63,6 +63,8 @@ class DashboardListItem # URL path to the dashboard. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -123,12 +125,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author') @@ -241,6 +245,26 @@ def type=(type) @type = type 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 @@ -261,6 +285,7 @@ def ==(o) title == o.title && type == o.type && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_item_request.rb b/lib/datadog_api_client/v2/models/dashboard_list_item_request.rb index e39736a7dbb0..4a47a4994efd 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_item_request.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_item_request.rb @@ -27,6 +27,8 @@ class DashboardListItemRequest # The type of the dashboard. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListItemRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListItemRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_item_response.rb b/lib/datadog_api_client/v2/models/dashboard_list_item_response.rb index 6e38d72239f6..4d0d54e336b6 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_item_response.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_item_response.rb @@ -27,6 +27,8 @@ class DashboardListItemResponse # The type of the dashboard. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListItemResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListItemResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_items.rb b/lib/datadog_api_client/v2/models/dashboard_list_items.rb index ec642dde556c..636c66e2d5a8 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_items.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_items.rb @@ -27,6 +27,8 @@ class DashboardListItems # Number of dashboards in the dashboard list. attr_accessor :total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListItems` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListItems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dashboards') @@ -90,6 +94,26 @@ def dashboards=(dashboards) @dashboards = dashboards 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && dashboards == o.dashboards && total == o.total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_update_items_request.rb b/lib/datadog_api_client/v2/models/dashboard_list_update_items_request.rb index ab91ceaa29b2..c12c94c0b098 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_update_items_request.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_update_items_request.rb @@ -24,6 +24,8 @@ class DashboardListUpdateItemsRequest # List of dashboards to update the dashboard list to. attr_accessor :dashboards + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListUpdateItemsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListUpdateItemsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dashboards') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && dashboards == o.dashboards + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dashboard_list_update_items_response.rb b/lib/datadog_api_client/v2/models/dashboard_list_update_items_response.rb index 1004792d5080..3e0fdbc36278 100644 --- a/lib/datadog_api_client/v2/models/dashboard_list_update_items_response.rb +++ b/lib/datadog_api_client/v2/models/dashboard_list_update_items_response.rb @@ -24,6 +24,8 @@ class DashboardListUpdateItemsResponse # List of dashboards in the dashboard list. attr_accessor :dashboards + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DashboardListUpdateItemsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DashboardListUpdateItemsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dashboards') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && dashboards == o.dashboards + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/data_scalar_column.rb b/lib/datadog_api_client/v2/models/data_scalar_column.rb index eadf4417da12..f6629576d3dc 100644 --- a/lib/datadog_api_client/v2/models/data_scalar_column.rb +++ b/lib/datadog_api_client/v2/models/data_scalar_column.rb @@ -33,6 +33,8 @@ class DataScalarColumn # The array of numerical values for one formula or query. attr_accessor :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DataScalarColumn` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DataScalarColumn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -90,6 +94,26 @@ 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 @@ -100,6 +124,7 @@ def ==(o) name == o.name && type == o.type && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/detailed_finding.rb b/lib/datadog_api_client/v2/models/detailed_finding.rb index c88b0fb5bd37..ba7a0092f334 100644 --- a/lib/datadog_api_client/v2/models/detailed_finding.rb +++ b/lib/datadog_api_client/v2/models/detailed_finding.rb @@ -30,6 +30,8 @@ class DetailedFinding # The JSON:API type for findings that have the message and resource configuration. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DetailedFinding` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DetailedFinding`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/detailed_finding_attributes.rb b/lib/datadog_api_client/v2/models/detailed_finding_attributes.rb index 9167520b59de..6a1479cbe899 100644 --- a/lib/datadog_api_client/v2/models/detailed_finding_attributes.rb +++ b/lib/datadog_api_client/v2/models/detailed_finding_attributes.rb @@ -54,6 +54,8 @@ class DetailedFindingAttributes # The tags associated with this finding. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DetailedFindingAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DetailedFindingAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'evaluation') @@ -182,6 +186,26 @@ def resource_discovery_date=(resource_discovery_date) @resource_discovery_date = resource_discovery_date 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 @@ -199,6 +223,7 @@ def ==(o) rule == o.rule && status == o.status && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/device_attributes.rb b/lib/datadog_api_client/v2/models/device_attributes.rb index 153804d238ab..70b77f0370c9 100644 --- a/lib/datadog_api_client/v2/models/device_attributes.rb +++ b/lib/datadog_api_client/v2/models/device_attributes.rb @@ -81,6 +81,8 @@ class DeviceAttributes # The device version attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -143,12 +145,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeviceAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DeviceAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -234,6 +238,26 @@ 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 @@ -260,6 +284,7 @@ def ==(o) tags == o.tags && vendor == o.vendor && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/device_attributes_interface_statuses.rb b/lib/datadog_api_client/v2/models/device_attributes_interface_statuses.rb index 72e95cc94e5d..3e2291cda34a 100644 --- a/lib/datadog_api_client/v2/models/device_attributes_interface_statuses.rb +++ b/lib/datadog_api_client/v2/models/device_attributes_interface_statuses.rb @@ -33,6 +33,8 @@ class DeviceAttributesInterfaceStatuses # The number of interfaces that are in a warning state attr_accessor :warning + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeviceAttributesInterfaceStatuses` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DeviceAttributesInterfaceStatuses`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'down') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) off == o.off && up == o.up && warning == o.warning + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/devices_list_data.rb b/lib/datadog_api_client/v2/models/devices_list_data.rb index 25fae688b602..d6fdb6a3b7c3 100644 --- a/lib/datadog_api_client/v2/models/devices_list_data.rb +++ b/lib/datadog_api_client/v2/models/devices_list_data.rb @@ -30,6 +30,8 @@ class DevicesListData # The type of the resource. The value should always be device. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DevicesListData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DevicesListData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_deployment_request.rb b/lib/datadog_api_client/v2/models/dora_deployment_request.rb index c3835c2830c0..2180a18a6c28 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_request.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_request.rb @@ -24,6 +24,8 @@ class DORADeploymentRequest # The JSON:API data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORADeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb b/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb index 945d28df09d3..63a7ebd56793 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb @@ -42,6 +42,8 @@ class DORADeploymentRequestAttributes # Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/). attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORADeploymentRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'env') @@ -155,6 +159,26 @@ def started_at=(started_at) @started_at = started_at 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 @@ -168,6 +192,7 @@ def ==(o) service == o.service && started_at == o.started_at && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb b/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb index 10c64f236b6e..e23c9f25bdb0 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb @@ -24,6 +24,8 @@ class DORADeploymentRequestData # Attributes to create a DORA deployment event. attr_reader :attributes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORADeploymentRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ def attributes=(attributes) @attributes = attributes 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_deployment_response.rb b/lib/datadog_api_client/v2/models/dora_deployment_response.rb index 571ade4fddd4..04115d10b54b 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_response.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_response.rb @@ -24,6 +24,8 @@ class DORADeploymentResponse # The JSON:API data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORADeploymentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb b/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb index 622e30686666..68cf1547cc44 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb @@ -27,6 +27,8 @@ class DORADeploymentResponseData # JSON:API type for DORA deployment events. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORADeploymentResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -88,6 +92,26 @@ def id=(id) @id = id 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_git_info.rb b/lib/datadog_api_client/v2/models/dora_git_info.rb index 6742a1e36b42..a0bb0fe90a1d 100644 --- a/lib/datadog_api_client/v2/models/dora_git_info.rb +++ b/lib/datadog_api_client/v2/models/dora_git_info.rb @@ -27,6 +27,8 @@ class DORAGitInfo # Git Repository URL attr_reader :repository_url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAGitInfo` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORAGitInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'commit_sha') @@ -105,6 +109,26 @@ def repository_url=(repository_url) @repository_url = repository_url 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 @@ -113,6 +137,7 @@ def ==(o) self.class == o.class && commit_sha == o.commit_sha && repository_url == o.repository_url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_incident_request.rb b/lib/datadog_api_client/v2/models/dora_incident_request.rb index 64414901e6a1..c65c4a896cee 100644 --- a/lib/datadog_api_client/v2/models/dora_incident_request.rb +++ b/lib/datadog_api_client/v2/models/dora_incident_request.rb @@ -24,6 +24,8 @@ class DORAIncidentRequest # The JSON:API data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORAIncidentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb b/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb index 595b094dded3..3c9e6e1adc5c 100644 --- a/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb @@ -51,6 +51,8 @@ class DORAIncidentRequestAttributes # Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/). attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORAIncidentRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'env') @@ -162,6 +166,26 @@ def started_at=(started_at) @started_at = started_at 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 @@ -178,6 +202,7 @@ def ==(o) started_at == o.started_at && team == o.team && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_incident_request_data.rb b/lib/datadog_api_client/v2/models/dora_incident_request_data.rb index 6729ba6e3045..f9d256e122f2 100644 --- a/lib/datadog_api_client/v2/models/dora_incident_request_data.rb +++ b/lib/datadog_api_client/v2/models/dora_incident_request_data.rb @@ -24,6 +24,8 @@ class DORAIncidentRequestData # Attributes to create a DORA incident event. attr_reader :attributes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORAIncidentRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ def attributes=(attributes) @attributes = attributes 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_incident_response.rb b/lib/datadog_api_client/v2/models/dora_incident_response.rb index 892e2f4756dd..86be6a3d05ec 100644 --- a/lib/datadog_api_client/v2/models/dora_incident_response.rb +++ b/lib/datadog_api_client/v2/models/dora_incident_response.rb @@ -24,6 +24,8 @@ class DORAIncidentResponse # Response after receiving a DORA incident event. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORAIncidentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/dora_incident_response_data.rb b/lib/datadog_api_client/v2/models/dora_incident_response_data.rb index 31a865ea9f80..440b951198b2 100644 --- a/lib/datadog_api_client/v2/models/dora_incident_response_data.rb +++ b/lib/datadog_api_client/v2/models/dora_incident_response_data.rb @@ -27,6 +27,8 @@ class DORAIncidentResponseData # JSON:API type for DORA incident events. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORAIncidentResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -88,6 +92,26 @@ def id=(id) @id = id 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_create_request.rb b/lib/datadog_api_client/v2/models/downtime_create_request.rb index ee9579b928a0..17f54622a227 100644 --- a/lib/datadog_api_client/v2/models/downtime_create_request.rb +++ b/lib/datadog_api_client/v2/models/downtime_create_request.rb @@ -24,6 +24,8 @@ class DowntimeCreateRequest # Object to create a downtime. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_create_request_attributes.rb b/lib/datadog_api_client/v2/models/downtime_create_request_attributes.rb index 528ead2cb1cd..ff27e11ffd6c 100644 --- a/lib/datadog_api_client/v2/models/downtime_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/downtime_create_request_attributes.rb @@ -47,6 +47,8 @@ class DowntimeCreateRequestAttributes # The scope to which the downtime applies. Must follow the [common search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). attr_reader :scope + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -94,12 +96,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeCreateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'display_timezone') @@ -168,6 +172,26 @@ def scope=(scope) @scope = scope 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 @@ -182,6 +206,7 @@ def ==(o) notify_end_types == o.notify_end_types && schedule == o.schedule && scope == o.scope + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_create_request_data.rb b/lib/datadog_api_client/v2/models/downtime_create_request_data.rb index 076718487583..b771b7b71e31 100644 --- a/lib/datadog_api_client/v2/models/downtime_create_request_data.rb +++ b/lib/datadog_api_client/v2/models/downtime_create_request_data.rb @@ -27,6 +27,8 @@ class DowntimeCreateRequestData # Downtime resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeCreateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeCreateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_meta.rb b/lib/datadog_api_client/v2/models/downtime_meta.rb index 5158574ad013..df177c9af62b 100644 --- a/lib/datadog_api_client/v2/models/downtime_meta.rb +++ b/lib/datadog_api_client/v2/models/downtime_meta.rb @@ -24,6 +24,8 @@ class DowntimeMeta # Object containing the total filtered count. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_meta_page.rb b/lib/datadog_api_client/v2/models/downtime_meta_page.rb index 7c1327a97bf8..35f51ba1705a 100644 --- a/lib/datadog_api_client/v2/models/downtime_meta_page.rb +++ b/lib/datadog_api_client/v2/models/downtime_meta_page.rb @@ -24,6 +24,8 @@ class DowntimeMetaPage # Total count of elements matched by the filter. attr_accessor :total_filtered_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_filtered_count') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && total_filtered_count == o.total_filtered_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_monitor_identifier_id.rb b/lib/datadog_api_client/v2/models/downtime_monitor_identifier_id.rb index fc01a575d127..9028cd7daa8a 100644 --- a/lib/datadog_api_client/v2/models/downtime_monitor_identifier_id.rb +++ b/lib/datadog_api_client/v2/models/downtime_monitor_identifier_id.rb @@ -24,6 +24,8 @@ class DowntimeMonitorIdentifierId # ID of the monitor to prevent notifications. attr_reader :monitor_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeMonitorIdentifierId` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeMonitorIdentifierId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'monitor_id') @@ -79,6 +83,26 @@ def monitor_id=(monitor_id) @monitor_id = monitor_id 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && monitor_id == o.monitor_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_monitor_identifier_tags.rb b/lib/datadog_api_client/v2/models/downtime_monitor_identifier_tags.rb index 9795d376261f..f28e3087e527 100644 --- a/lib/datadog_api_client/v2/models/downtime_monitor_identifier_tags.rb +++ b/lib/datadog_api_client/v2/models/downtime_monitor_identifier_tags.rb @@ -27,6 +27,8 @@ class DowntimeMonitorIdentifierTags # to `[*]` configures the downtime to mute all monitors for the given scope. attr_reader :monitor_tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -51,12 +53,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeMonitorIdentifierTags` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeMonitorIdentifierTags`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'monitor_tags') @@ -88,6 +92,26 @@ def monitor_tags=(monitor_tags) @monitor_tags = monitor_tags 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 @@ -95,6 +119,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && monitor_tags == o.monitor_tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_monitor_included_attributes.rb b/lib/datadog_api_client/v2/models/downtime_monitor_included_attributes.rb index 62f6a8d67d6b..28fa209f81ae 100644 --- a/lib/datadog_api_client/v2/models/downtime_monitor_included_attributes.rb +++ b/lib/datadog_api_client/v2/models/downtime_monitor_included_attributes.rb @@ -24,6 +24,8 @@ class DowntimeMonitorIncludedAttributes # The name of the monitor identified by the downtime. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeMonitorIncludedAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeMonitorIncludedAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_monitor_included_item.rb b/lib/datadog_api_client/v2/models/downtime_monitor_included_item.rb index e7f3511eadf6..b743fce26f15 100644 --- a/lib/datadog_api_client/v2/models/downtime_monitor_included_item.rb +++ b/lib/datadog_api_client/v2/models/downtime_monitor_included_item.rb @@ -30,6 +30,8 @@ class DowntimeMonitorIncludedItem # Monitor resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeMonitorIncludedItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeMonitorIncludedItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_relationships.rb b/lib/datadog_api_client/v2/models/downtime_relationships.rb index 9225bce1a8d3..5a8b8e1e9059 100644 --- a/lib/datadog_api_client/v2/models/downtime_relationships.rb +++ b/lib/datadog_api_client/v2/models/downtime_relationships.rb @@ -27,6 +27,8 @@ class DowntimeRelationships # The monitor identified by the downtime. attr_accessor :monitor + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_by') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && created_by == o.created_by && monitor == o.monitor + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_relationships_created_by.rb b/lib/datadog_api_client/v2/models/downtime_relationships_created_by.rb index 609d83806b16..4708443d065e 100644 --- a/lib/datadog_api_client/v2/models/downtime_relationships_created_by.rb +++ b/lib/datadog_api_client/v2/models/downtime_relationships_created_by.rb @@ -24,6 +24,8 @@ class DowntimeRelationshipsCreatedBy # Data for the user who created the downtime. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeRelationshipsCreatedBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeRelationshipsCreatedBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_relationships_created_by_data.rb b/lib/datadog_api_client/v2/models/downtime_relationships_created_by_data.rb index e99ffd8e7c70..4b798d67ef9d 100644 --- a/lib/datadog_api_client/v2/models/downtime_relationships_created_by_data.rb +++ b/lib/datadog_api_client/v2/models/downtime_relationships_created_by_data.rb @@ -27,6 +27,8 @@ class DowntimeRelationshipsCreatedByData # Users resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeRelationshipsCreatedByData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeRelationshipsCreatedByData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_relationships_monitor.rb b/lib/datadog_api_client/v2/models/downtime_relationships_monitor.rb index 6445571132c5..99a994254aa8 100644 --- a/lib/datadog_api_client/v2/models/downtime_relationships_monitor.rb +++ b/lib/datadog_api_client/v2/models/downtime_relationships_monitor.rb @@ -24,6 +24,8 @@ class DowntimeRelationshipsMonitor # Data for the monitor. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeRelationshipsMonitor` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeRelationshipsMonitor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb b/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb index 2e95574c9b49..a4137a916de2 100644 --- a/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb +++ b/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb @@ -27,6 +27,8 @@ class DowntimeRelationshipsMonitorData # Monitor resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeRelationshipsMonitorData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeRelationshipsMonitorData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_response.rb b/lib/datadog_api_client/v2/models/downtime_response.rb index 11382efbcc3c..cd8e664cccf9 100644 --- a/lib/datadog_api_client/v2/models/downtime_response.rb +++ b/lib/datadog_api_client/v2/models/downtime_response.rb @@ -30,6 +30,8 @@ class DowntimeResponse # Array of objects related to the downtime that the user requested. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -75,6 +79,26 @@ 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 @@ -83,6 +107,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_response_attributes.rb b/lib/datadog_api_client/v2/models/downtime_response_attributes.rb index 8d0f1fb0de47..8e9b9ef45912 100644 --- a/lib/datadog_api_client/v2/models/downtime_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/downtime_response_attributes.rb @@ -61,6 +61,8 @@ class DowntimeResponseAttributes # The current status of the downtime. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -117,12 +119,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'canceled') @@ -178,6 +182,26 @@ 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 @@ -196,6 +220,7 @@ def ==(o) schedule == o.schedule && scope == o.scope && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_response_data.rb b/lib/datadog_api_client/v2/models/downtime_response_data.rb index ede339805ee3..5c57a8d668b4 100644 --- a/lib/datadog_api_client/v2/models/downtime_response_data.rb +++ b/lib/datadog_api_client/v2/models/downtime_response_data.rb @@ -33,6 +33,8 @@ class DowntimeResponseData # Downtime resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_schedule_current_downtime_response.rb b/lib/datadog_api_client/v2/models/downtime_schedule_current_downtime_response.rb index 14b15f71fcb0..225aa4406df1 100644 --- a/lib/datadog_api_client/v2/models/downtime_schedule_current_downtime_response.rb +++ b/lib/datadog_api_client/v2/models/downtime_schedule_current_downtime_response.rb @@ -29,6 +29,8 @@ class DowntimeScheduleCurrentDowntimeResponse # The start of the current downtime. attr_accessor :start + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleCurrentDowntimeResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleCurrentDowntimeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -80,6 +84,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) self.class == o.class && _end == o._end && start == o.start + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb b/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb index 80559c5959cd..2a65555fd69e 100644 --- a/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb +++ b/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb @@ -27,6 +27,8 @@ class DowntimeScheduleOneTimeResponse # ISO-8601 Datetime to start the downtime. attr_reader :start + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleOneTimeResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleOneTimeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -96,6 +100,26 @@ def start=(start) @start = start 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 @@ -104,6 +128,7 @@ def ==(o) self.class == o.class && _end == o._end && start == o.start + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_create_update_request.rb b/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_create_update_request.rb index 12169ff379bf..c514a550c194 100644 --- a/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_create_update_request.rb +++ b/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_create_update_request.rb @@ -36,6 +36,8 @@ class DowntimeScheduleRecurrenceCreateUpdateRequest # downtime starts the moment it is created. attr_accessor :start + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -72,12 +74,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleRecurrenceCreateUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleRecurrenceCreateUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'duration') @@ -122,6 +126,26 @@ def rrule=(rrule) @rrule = rrule 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 @@ -131,6 +155,7 @@ def ==(o) duration == o.duration && rrule == o.rrule && start == o.start + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_response.rb b/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_response.rb index f32be07bea57..2e883e4de63e 100644 --- a/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_response.rb +++ b/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_response.rb @@ -36,6 +36,8 @@ class DowntimeScheduleRecurrenceResponse # downtime starts the moment it is created. attr_accessor :start + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleRecurrenceResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleRecurrenceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'duration') @@ -85,6 +89,26 @@ 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 @@ -94,6 +118,7 @@ def ==(o) duration == o.duration && rrule == o.rrule && start == o.start + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_create_request.rb b/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_create_request.rb index 1ee8265c44d3..e273adab95b5 100644 --- a/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_create_request.rb +++ b/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_create_request.rb @@ -27,6 +27,8 @@ class DowntimeScheduleRecurrencesCreateRequest # The timezone in which to schedule the downtime. attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleRecurrencesCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleRecurrencesCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'recurrences') @@ -90,6 +94,26 @@ def recurrences=(recurrences) @recurrences = recurrences 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && recurrences == o.recurrences && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_response.rb b/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_response.rb index 3c016682cd6e..0fad380c43c9 100644 --- a/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_response.rb +++ b/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_response.rb @@ -33,6 +33,8 @@ class DowntimeScheduleRecurrencesResponse # Must match `display_timezone`. attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleRecurrencesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleRecurrencesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'current_downtime') @@ -110,6 +114,26 @@ def recurrences=(recurrences) @recurrences = recurrences 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 @@ -119,6 +143,7 @@ def ==(o) current_downtime == o.current_downtime && recurrences == o.recurrences && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_update_request.rb b/lib/datadog_api_client/v2/models/downtime_update_request.rb index d7980896d223..c0c7d88a1e40 100644 --- a/lib/datadog_api_client/v2/models/downtime_update_request.rb +++ b/lib/datadog_api_client/v2/models/downtime_update_request.rb @@ -24,6 +24,8 @@ class DowntimeUpdateRequest # Object to update a downtime. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_update_request_attributes.rb b/lib/datadog_api_client/v2/models/downtime_update_request_attributes.rb index 0bd732ec3a0b..df504a51c8ca 100644 --- a/lib/datadog_api_client/v2/models/downtime_update_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/downtime_update_request_attributes.rb @@ -47,6 +47,8 @@ class DowntimeUpdateRequestAttributes # The scope to which the downtime applies. Must follow the [common search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). attr_accessor :scope + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -94,12 +96,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeUpdateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeUpdateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'display_timezone') @@ -139,6 +143,26 @@ 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 @@ -153,6 +177,7 @@ def ==(o) notify_end_types == o.notify_end_types && schedule == o.schedule && scope == o.scope + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/downtime_update_request_data.rb b/lib/datadog_api_client/v2/models/downtime_update_request_data.rb index 88c6a7cbd4a2..8ffba0e94704 100644 --- a/lib/datadog_api_client/v2/models/downtime_update_request_data.rb +++ b/lib/datadog_api_client/v2/models/downtime_update_request_data.rb @@ -30,6 +30,8 @@ class DowntimeUpdateRequestData # Downtime resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeUpdateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeUpdateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/event.rb b/lib/datadog_api_client/v2/models/event.rb index f70752109da7..453fc4cdfeb1 100644 --- a/lib/datadog_api_client/v2/models/event.rb +++ b/lib/datadog_api_client/v2/models/event.rb @@ -33,6 +33,8 @@ class Event # Event type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Event` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Event`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) name == o.name && source_id == o.source_id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/event_attributes.rb b/lib/datadog_api_client/v2/models/event_attributes.rb index b5a256eb2cce..235cdb2f071e 100644 --- a/lib/datadog_api_client/v2/models/event_attributes.rb +++ b/lib/datadog_api_client/v2/models/event_attributes.rb @@ -84,6 +84,8 @@ class EventAttributes # The event title. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -155,12 +157,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation_key') @@ -244,6 +248,26 @@ 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 @@ -269,6 +293,7 @@ def ==(o) tags == o.tags && timestamp == o.timestamp && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/event_response.rb b/lib/datadog_api_client/v2/models/event_response.rb index eefbfb5d7590..6cbca2594979 100644 --- a/lib/datadog_api_client/v2/models/event_response.rb +++ b/lib/datadog_api_client/v2/models/event_response.rb @@ -30,6 +30,8 @@ class EventResponse # Type of the event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/event_response_attributes.rb b/lib/datadog_api_client/v2/models/event_response_attributes.rb index 8f372c7bfceb..3d6d4bae4b11 100644 --- a/lib/datadog_api_client/v2/models/event_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/event_response_attributes.rb @@ -33,6 +33,8 @@ class EventResponseAttributes # The timestamp of the event. attr_accessor :timestamp + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -90,6 +94,26 @@ 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 @@ -100,6 +124,7 @@ def ==(o) message == o.message && tags == o.tags && timestamp == o.timestamp + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_compute.rb b/lib/datadog_api_client/v2/models/events_compute.rb index 90f290960839..353cb789e540 100644 --- a/lib/datadog_api_client/v2/models/events_compute.rb +++ b/lib/datadog_api_client/v2/models/events_compute.rb @@ -30,6 +30,8 @@ class EventsCompute # The "measure" attribute on which to perform the computation. attr_accessor :metric + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -97,6 +101,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -106,6 +130,7 @@ def ==(o) aggregation == o.aggregation && interval == o.interval && metric == o.metric + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_group_by.rb b/lib/datadog_api_client/v2/models/events_group_by.rb index 8a73eb9108fc..78cc2b35c103 100644 --- a/lib/datadog_api_client/v2/models/events_group_by.rb +++ b/lib/datadog_api_client/v2/models/events_group_by.rb @@ -31,6 +31,8 @@ class EventsGroupBy # The dimension by which to sort a query's results. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -109,6 +113,26 @@ def limit=(limit) @limit = limit 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 @@ -118,6 +142,7 @@ def ==(o) facet == o.facet && limit == o.limit && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_group_by_sort.rb b/lib/datadog_api_client/v2/models/events_group_by_sort.rb index 27f692a5d2a7..b06ef9885a5e 100644 --- a/lib/datadog_api_client/v2/models/events_group_by_sort.rb +++ b/lib/datadog_api_client/v2/models/events_group_by_sort.rb @@ -33,6 +33,8 @@ class EventsGroupBySort # The type of sort to use on the calculated value. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsGroupBySort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsGroupBySort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -106,6 +110,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -116,6 +140,7 @@ def ==(o) metric == o.metric && order == o.order && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_list_request.rb b/lib/datadog_api_client/v2/models/events_list_request.rb index c918cc16a3c7..502ce7decb83 100644 --- a/lib/datadog_api_client/v2/models/events_list_request.rb +++ b/lib/datadog_api_client/v2/models/events_list_request.rb @@ -34,6 +34,8 @@ class EventsListRequest # The sort parameters when querying events. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsListRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -89,6 +93,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) options == o.options && page == o.page && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_list_response.rb b/lib/datadog_api_client/v2/models/events_list_response.rb index 1301adcf01fe..1b224cfb510c 100644 --- a/lib/datadog_api_client/v2/models/events_list_response.rb +++ b/lib/datadog_api_client/v2/models/events_list_response.rb @@ -30,6 +30,8 @@ class EventsListResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_list_response_links.rb b/lib/datadog_api_client/v2/models/events_list_response_links.rb index 38c513a93b92..13ff294fabfb 100644 --- a/lib/datadog_api_client/v2/models/events_list_response_links.rb +++ b/lib/datadog_api_client/v2/models/events_list_response_links.rb @@ -25,6 +25,8 @@ class EventsListResponseLinks # POST endpoint. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsListResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsListResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_query_filter.rb b/lib/datadog_api_client/v2/models/events_query_filter.rb index 1d6109d01011..46706821726a 100644 --- a/lib/datadog_api_client/v2/models/events_query_filter.rb +++ b/lib/datadog_api_client/v2/models/events_query_filter.rb @@ -30,6 +30,8 @@ class EventsQueryFilter # The maximum time for the requested events. Supports date math and regular timestamps in milliseconds. attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsQueryFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsQueryFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) from == o.from && query == o.query && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_query_options.rb b/lib/datadog_api_client/v2/models/events_query_options.rb index 38722aad4880..d85720ab184f 100644 --- a/lib/datadog_api_client/v2/models/events_query_options.rb +++ b/lib/datadog_api_client/v2/models/events_query_options.rb @@ -28,6 +28,8 @@ class EventsQueryOptions # The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsQueryOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsQueryOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time_offset') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && time_offset == o.time_offset && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_request_page.rb b/lib/datadog_api_client/v2/models/events_request_page.rb index 5a4cf3f49859..1b6f5ad84b39 100644 --- a/lib/datadog_api_client/v2/models/events_request_page.rb +++ b/lib/datadog_api_client/v2/models/events_request_page.rb @@ -27,6 +27,8 @@ class EventsRequestPage # The maximum number of logs in the response. attr_reader :limit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsRequestPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsRequestPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -88,6 +92,26 @@ def limit=(limit) @limit = limit 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && cursor == o.cursor && limit == o.limit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_response_metadata.rb b/lib/datadog_api_client/v2/models/events_response_metadata.rb index a97004e85e91..4c007ca0ef8e 100644 --- a/lib/datadog_api_client/v2/models/events_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/events_response_metadata.rb @@ -37,6 +37,8 @@ class EventsResponseMetadata # warnings are present in the response. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elapsed') @@ -100,6 +104,26 @@ 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 @@ -111,6 +135,7 @@ def ==(o) request_id == o.request_id && status == o.status && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_response_metadata_page.rb b/lib/datadog_api_client/v2/models/events_response_metadata_page.rb index 5726cc4e6990..04df9801e6ab 100644 --- a/lib/datadog_api_client/v2/models/events_response_metadata_page.rb +++ b/lib/datadog_api_client/v2/models/events_response_metadata_page.rb @@ -25,6 +25,8 @@ class EventsResponseMetadataPage # parameters with the addition of the `page[cursor]`. attr_accessor :after + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsResponseMetadataPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsResponseMetadataPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'after') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && after == o.after + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_scalar_query.rb b/lib/datadog_api_client/v2/models/events_scalar_query.rb index 8c4cf08db421..2888702dd55b 100644 --- a/lib/datadog_api_client/v2/models/events_scalar_query.rb +++ b/lib/datadog_api_client/v2/models/events_scalar_query.rb @@ -39,6 +39,8 @@ class EventsScalarQuery # Configuration of the search/filter for an events query. attr_accessor :search + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsScalarQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsScalarQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -139,6 +143,26 @@ def data_source=(data_source) @data_source = data_source 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 @@ -151,6 +175,7 @@ def ==(o) indexes == o.indexes && name == o.name && search == o.search + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_search.rb b/lib/datadog_api_client/v2/models/events_search.rb index a79701f469d3..f1fbaa97ea28 100644 --- a/lib/datadog_api_client/v2/models/events_search.rb +++ b/lib/datadog_api_client/v2/models/events_search.rb @@ -24,6 +24,8 @@ class EventsSearch # The search/filter string for an events query. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsSearch` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsSearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_timeseries_query.rb b/lib/datadog_api_client/v2/models/events_timeseries_query.rb index 8faf0c13de65..170e84f6ac74 100644 --- a/lib/datadog_api_client/v2/models/events_timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/events_timeseries_query.rb @@ -39,6 +39,8 @@ class EventsTimeseriesQuery # Configuration of the search/filter for an events query. attr_accessor :search + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsTimeseriesQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsTimeseriesQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -139,6 +143,26 @@ def data_source=(data_source) @data_source = data_source 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 @@ -151,6 +175,7 @@ def ==(o) indexes == o.indexes && name == o.name && search == o.search + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/events_warning.rb b/lib/datadog_api_client/v2/models/events_warning.rb index 7b2529abadae..3a4f81864029 100644 --- a/lib/datadog_api_client/v2/models/events_warning.rb +++ b/lib/datadog_api_client/v2/models/events_warning.rb @@ -30,6 +30,8 @@ class EventsWarning # A short human-readable summary of the warning. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventsWarning` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventsWarning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) code == o.code && detail == o.detail && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb b/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb index 3cc510b03e6a..6b694ee2b605 100644 --- a/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb @@ -27,6 +27,8 @@ class FastlyAccounResponseAttributes # A list of services belonging to the parent account. attr_accessor :services + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccounResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccounResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -90,6 +94,26 @@ def name=(name) @name = name 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && name == o.name && services == o.services + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_account_create_request.rb b/lib/datadog_api_client/v2/models/fastly_account_create_request.rb index 0bf9995eb7e9..59385202ec09 100644 --- a/lib/datadog_api_client/v2/models/fastly_account_create_request.rb +++ b/lib/datadog_api_client/v2/models/fastly_account_create_request.rb @@ -24,6 +24,8 @@ class FastlyAccountCreateRequest # Data object for creating a Fastly account. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb b/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb index bc195c0e044c..27f9da67abeb 100644 --- a/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb @@ -30,6 +30,8 @@ class FastlyAccountCreateRequestAttributes # A list of services belonging to the parent account. attr_accessor :services + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountCreateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -110,6 +114,26 @@ def name=(name) @name = name 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 @@ -119,6 +143,7 @@ def ==(o) api_key == o.api_key && name == o.name && services == o.services + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb b/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb index 55ead266d1f5..8edce0b13053 100644 --- a/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb +++ b/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb @@ -27,6 +27,8 @@ class FastlyAccountCreateRequestData # The JSON:API type for this API. Should always be `fastly-accounts`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountCreateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountCreateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_account_response.rb b/lib/datadog_api_client/v2/models/fastly_account_response.rb index b36ed9ef79f7..ebc6d0bb8866 100644 --- a/lib/datadog_api_client/v2/models/fastly_account_response.rb +++ b/lib/datadog_api_client/v2/models/fastly_account_response.rb @@ -24,6 +24,8 @@ class FastlyAccountResponse # Data object of a Fastly account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_account_response_data.rb b/lib/datadog_api_client/v2/models/fastly_account_response_data.rb index 6eccf3c0cd13..60e33cb8cca7 100644 --- a/lib/datadog_api_client/v2/models/fastly_account_response_data.rb +++ b/lib/datadog_api_client/v2/models/fastly_account_response_data.rb @@ -30,6 +30,8 @@ class FastlyAccountResponseData # The JSON:API type for this API. Should always be `fastly-accounts`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_account_update_request.rb b/lib/datadog_api_client/v2/models/fastly_account_update_request.rb index 471cf44cb423..c6ec1a5b9682 100644 --- a/lib/datadog_api_client/v2/models/fastly_account_update_request.rb +++ b/lib/datadog_api_client/v2/models/fastly_account_update_request.rb @@ -24,6 +24,8 @@ class FastlyAccountUpdateRequest # Data object for updating a Fastly account. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb b/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb index 87ec50eda899..feb7122ef2f6 100644 --- a/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb @@ -24,6 +24,8 @@ class FastlyAccountUpdateRequestAttributes # The API key of the Fastly account. attr_accessor :api_key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountUpdateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountUpdateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && api_key == o.api_key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb b/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb index d13ca39716ee..2f29ab825a33 100644 --- a/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb +++ b/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb @@ -27,6 +27,8 @@ class FastlyAccountUpdateRequestData # The JSON:API type for this API. Should always be `fastly-accounts`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountUpdateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountUpdateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_accounts_response.rb b/lib/datadog_api_client/v2/models/fastly_accounts_response.rb index 9c9f433ad577..fb6021b2aede 100644 --- a/lib/datadog_api_client/v2/models/fastly_accounts_response.rb +++ b/lib/datadog_api_client/v2/models/fastly_accounts_response.rb @@ -24,6 +24,8 @@ class FastlyAccountsResponse # The JSON:API data schema. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAccountsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyAccountsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_service.rb b/lib/datadog_api_client/v2/models/fastly_service.rb index bec035b26026..7fccc9c232dc 100644 --- a/lib/datadog_api_client/v2/models/fastly_service.rb +++ b/lib/datadog_api_client/v2/models/fastly_service.rb @@ -27,6 +27,8 @@ class FastlyService # A list of tags for the Fastly service. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyService` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyService`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -90,6 +94,26 @@ def id=(id) @id = id 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && id == o.id && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_service_attributes.rb b/lib/datadog_api_client/v2/models/fastly_service_attributes.rb index 8e99f67c7a1c..187e61437af3 100644 --- a/lib/datadog_api_client/v2/models/fastly_service_attributes.rb +++ b/lib/datadog_api_client/v2/models/fastly_service_attributes.rb @@ -24,6 +24,8 @@ class FastlyServiceAttributes # A list of tags for the Fastly service. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyServiceAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyServiceAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tags') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_service_data.rb b/lib/datadog_api_client/v2/models/fastly_service_data.rb index ee83532b7e69..ea5f931d7748 100644 --- a/lib/datadog_api_client/v2/models/fastly_service_data.rb +++ b/lib/datadog_api_client/v2/models/fastly_service_data.rb @@ -30,6 +30,8 @@ class FastlyServiceData # The JSON:API type for this API. Should always be `fastly-services`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyServiceData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyServiceData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_service_request.rb b/lib/datadog_api_client/v2/models/fastly_service_request.rb index d3d65f708c56..fe41a367b87c 100644 --- a/lib/datadog_api_client/v2/models/fastly_service_request.rb +++ b/lib/datadog_api_client/v2/models/fastly_service_request.rb @@ -24,6 +24,8 @@ class FastlyServiceRequest # Data object for Fastly service requests. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyServiceRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyServiceRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_service_response.rb b/lib/datadog_api_client/v2/models/fastly_service_response.rb index 1ac9f583f40d..d5b8be80e55e 100644 --- a/lib/datadog_api_client/v2/models/fastly_service_response.rb +++ b/lib/datadog_api_client/v2/models/fastly_service_response.rb @@ -24,6 +24,8 @@ class FastlyServiceResponse # Data object for Fastly service requests. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyServiceResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyServiceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/fastly_services_response.rb b/lib/datadog_api_client/v2/models/fastly_services_response.rb index ebcc7138de4b..4d01ad2f61b8 100644 --- a/lib/datadog_api_client/v2/models/fastly_services_response.rb +++ b/lib/datadog_api_client/v2/models/fastly_services_response.rb @@ -24,6 +24,8 @@ class FastlyServicesResponse # The JSON:API data schema. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyServicesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FastlyServicesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/finding.rb b/lib/datadog_api_client/v2/models/finding.rb index 019bcbf5432f..77a6175518d5 100644 --- a/lib/datadog_api_client/v2/models/finding.rb +++ b/lib/datadog_api_client/v2/models/finding.rb @@ -30,6 +30,8 @@ class Finding # The JSON:API type for findings. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Finding` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Finding`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/finding_attributes.rb b/lib/datadog_api_client/v2/models/finding_attributes.rb index 3b927667ed0c..6b3e38fa137f 100644 --- a/lib/datadog_api_client/v2/models/finding_attributes.rb +++ b/lib/datadog_api_client/v2/models/finding_attributes.rb @@ -48,6 +48,8 @@ class FindingAttributes # The tags associated with this finding. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FindingAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FindingAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'evaluation') @@ -164,6 +168,26 @@ def resource_discovery_date=(resource_discovery_date) @resource_discovery_date = resource_discovery_date 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 @@ -179,6 +203,7 @@ def ==(o) rule == o.rule && status == o.status && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/formula_limit.rb b/lib/datadog_api_client/v2/models/formula_limit.rb index fc48f4cb59cd..314b7fc4fda5 100644 --- a/lib/datadog_api_client/v2/models/formula_limit.rb +++ b/lib/datadog_api_client/v2/models/formula_limit.rb @@ -28,6 +28,8 @@ class FormulaLimit # Direction of sort. attr_accessor :order + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FormulaLimit` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FormulaLimit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -89,6 +93,26 @@ def count=(count) @count = count 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 @@ -97,6 +121,7 @@ def ==(o) self.class == o.class && count == o.count && order == o.order + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/full_api_key.rb b/lib/datadog_api_client/v2/models/full_api_key.rb index 82cd7916d756..cd25da51b863 100644 --- a/lib/datadog_api_client/v2/models/full_api_key.rb +++ b/lib/datadog_api_client/v2/models/full_api_key.rb @@ -33,6 +33,8 @@ class FullAPIKey # API Keys resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FullAPIKey` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FullAPIKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/full_api_key_attributes.rb b/lib/datadog_api_client/v2/models/full_api_key_attributes.rb index 18749932aeeb..c038b2f464d9 100644 --- a/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +++ b/lib/datadog_api_client/v2/models/full_api_key_attributes.rb @@ -42,6 +42,8 @@ class FullAPIKeyAttributes # The remote config read enabled status. attr_accessor :remote_config_read_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FullAPIKeyAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FullAPIKeyAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'category') @@ -137,6 +141,26 @@ def last4=(last4) @last4 = last4 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 @@ -150,6 +174,7 @@ def ==(o) modified_at == o.modified_at && name == o.name && remote_config_read_enabled == o.remote_config_read_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/full_application_key.rb b/lib/datadog_api_client/v2/models/full_application_key.rb index 72c7898b4e1a..84e4615338f9 100644 --- a/lib/datadog_api_client/v2/models/full_application_key.rb +++ b/lib/datadog_api_client/v2/models/full_application_key.rb @@ -33,6 +33,8 @@ class FullApplicationKey # Application Keys resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FullApplicationKey` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FullApplicationKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/full_application_key_attributes.rb b/lib/datadog_api_client/v2/models/full_application_key_attributes.rb index 75fe7115c611..80ddb5fd6f7d 100644 --- a/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +++ b/lib/datadog_api_client/v2/models/full_application_key_attributes.rb @@ -36,6 +36,8 @@ class FullApplicationKeyAttributes # Array of scopes to grant the application key. attr_accessor :scopes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -76,12 +78,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FullApplicationKeyAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::FullApplicationKeyAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -129,6 +133,26 @@ def last4=(last4) @last4 = last4 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 @@ -140,6 +164,7 @@ def ==(o) last4 == o.last4 && name == o.name && scopes == o.scopes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcp_service_account_meta.rb b/lib/datadog_api_client/v2/models/gcp_service_account_meta.rb index 3a7977972ba2..424257e0b1f0 100644 --- a/lib/datadog_api_client/v2/models/gcp_service_account_meta.rb +++ b/lib/datadog_api_client/v2/models/gcp_service_account_meta.rb @@ -24,6 +24,8 @@ class GCPServiceAccountMeta # The current list of projects accessible from your service account. attr_accessor :accessible_projects + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPServiceAccountMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPServiceAccountMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'accessible_projects') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && accessible_projects == o.accessible_projects + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_delegate_account.rb b/lib/datadog_api_client/v2/models/gcpsts_delegate_account.rb index 73b8315a19b3..8bca046b99bc 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_delegate_account.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_delegate_account.rb @@ -30,6 +30,8 @@ class GCPSTSDelegateAccount # The type of account. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSDelegateAccount` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSDelegateAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_delegate_account_attributes.rb b/lib/datadog_api_client/v2/models/gcpsts_delegate_account_attributes.rb index 0377e8e541ab..899a40e10dd4 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_delegate_account_attributes.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_delegate_account_attributes.rb @@ -24,6 +24,8 @@ class GCPSTSDelegateAccountAttributes # Your organization's Datadog principal email address. attr_accessor :delegate_account_email + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSDelegateAccountAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSDelegateAccountAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'delegate_account_email') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && delegate_account_email == o.delegate_account_email + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_delegate_account_response.rb b/lib/datadog_api_client/v2/models/gcpsts_delegate_account_response.rb index 28a5fbc0478c..4aec31aaf0a0 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_delegate_account_response.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_delegate_account_response.rb @@ -24,6 +24,8 @@ class GCPSTSDelegateAccountResponse # Datadog principal service account info. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSDelegateAccountResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSDelegateAccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_service_account.rb b/lib/datadog_api_client/v2/models/gcpsts_service_account.rb index 515905bc1c46..16e73902bbf5 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_service_account.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_service_account.rb @@ -33,6 +33,8 @@ class GCPSTSServiceAccount # The type of account. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSServiceAccount` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSServiceAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && meta == o.meta && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb b/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb index 0dcbf300f62b..09ff55cf1b27 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb @@ -46,6 +46,8 @@ class GCPSTSServiceAccountAttributes # When enabled, Datadog scans for all resources in your GCP environment. attr_accessor :resource_collection_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -84,12 +86,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSServiceAccountAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSServiceAccountAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_tags') @@ -131,6 +135,26 @@ 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 @@ -145,6 +169,7 @@ def ==(o) is_cspm_enabled == o.is_cspm_enabled && is_security_command_center_enabled == o.is_security_command_center_enabled && resource_collection_enabled == o.resource_collection_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_service_account_create_request.rb b/lib/datadog_api_client/v2/models/gcpsts_service_account_create_request.rb index 966d67d411d0..1f33b6c865b4 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_service_account_create_request.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_service_account_create_request.rb @@ -24,6 +24,8 @@ class GCPSTSServiceAccountCreateRequest # Additional metadata on your generated service account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_service_account_data.rb b/lib/datadog_api_client/v2/models/gcpsts_service_account_data.rb index 288bfbfba17a..614c11d47405 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_service_account_data.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_service_account_data.rb @@ -27,6 +27,8 @@ class GCPSTSServiceAccountData # The type of account. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSServiceAccountData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSServiceAccountData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_service_account_response.rb b/lib/datadog_api_client/v2/models/gcpsts_service_account_response.rb index c2f268b73f37..cc47a748b5a3 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_service_account_response.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_service_account_response.rb @@ -24,6 +24,8 @@ class GCPSTSServiceAccountResponse # Info on your service account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSServiceAccountResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSServiceAccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_service_account_update_request.rb b/lib/datadog_api_client/v2/models/gcpsts_service_account_update_request.rb index 45881de5b28a..0de8c16e0819 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_service_account_update_request.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_service_account_update_request.rb @@ -24,6 +24,8 @@ class GCPSTSServiceAccountUpdateRequest # Data on your service account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_service_account_update_request_data.rb b/lib/datadog_api_client/v2/models/gcpsts_service_account_update_request_data.rb index 6a5a1ca5f325..0738a0111d4f 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_service_account_update_request_data.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_service_account_update_request_data.rb @@ -30,6 +30,8 @@ class GCPSTSServiceAccountUpdateRequestData # The type of account. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/gcpsts_service_accounts_response.rb b/lib/datadog_api_client/v2/models/gcpsts_service_accounts_response.rb index 933eb82ca859..ae5771f5ea2e 100644 --- a/lib/datadog_api_client/v2/models/gcpsts_service_accounts_response.rb +++ b/lib/datadog_api_client/v2/models/gcpsts_service_accounts_response.rb @@ -24,6 +24,8 @@ class GCPSTSServiceAccountsResponse # Array of GCP STS enabled service accounts. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPSTSServiceAccountsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GCPSTSServiceAccountsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/get_device_attributes.rb b/lib/datadog_api_client/v2/models/get_device_attributes.rb index 105a2e92128e..a8c273fdc6df 100644 --- a/lib/datadog_api_client/v2/models/get_device_attributes.rb +++ b/lib/datadog_api_client/v2/models/get_device_attributes.rb @@ -78,6 +78,8 @@ class GetDeviceAttributes # The version of the device. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -138,12 +140,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetDeviceAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GetDeviceAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -225,6 +229,26 @@ 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 @@ -250,6 +274,7 @@ def ==(o) tags == o.tags && vendor == o.vendor && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/get_device_data.rb b/lib/datadog_api_client/v2/models/get_device_data.rb index b92b26c17445..ad2e21a75292 100644 --- a/lib/datadog_api_client/v2/models/get_device_data.rb +++ b/lib/datadog_api_client/v2/models/get_device_data.rb @@ -30,6 +30,8 @@ class GetDeviceData # The type of the resource. The value should always be device. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetDeviceData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GetDeviceData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/get_device_response.rb b/lib/datadog_api_client/v2/models/get_device_response.rb index 2daf046cbdb0..aaf23bc83808 100644 --- a/lib/datadog_api_client/v2/models/get_device_response.rb +++ b/lib/datadog_api_client/v2/models/get_device_response.rb @@ -24,6 +24,8 @@ class GetDeviceResponse # Get device response data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetDeviceResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GetDeviceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/get_finding_response.rb b/lib/datadog_api_client/v2/models/get_finding_response.rb index 390805a07535..8b562597e9fd 100644 --- a/lib/datadog_api_client/v2/models/get_finding_response.rb +++ b/lib/datadog_api_client/v2/models/get_finding_response.rb @@ -24,6 +24,8 @@ class GetFindingResponse # A single finding with with message and resource configuration. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetFindingResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GetFindingResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/get_interfaces_data.rb b/lib/datadog_api_client/v2/models/get_interfaces_data.rb index 2005e76bf6e2..a26bab77a5ab 100644 --- a/lib/datadog_api_client/v2/models/get_interfaces_data.rb +++ b/lib/datadog_api_client/v2/models/get_interfaces_data.rb @@ -30,6 +30,8 @@ class GetInterfacesData # The type of the resource. The value should always be interface. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetInterfacesData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GetInterfacesData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/get_interfaces_response.rb b/lib/datadog_api_client/v2/models/get_interfaces_response.rb index 3b3922006298..da84a5806274 100644 --- a/lib/datadog_api_client/v2/models/get_interfaces_response.rb +++ b/lib/datadog_api_client/v2/models/get_interfaces_response.rb @@ -24,6 +24,8 @@ class GetInterfacesResponse # Get Interfaces response attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetInterfacesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GetInterfacesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/group_scalar_column.rb b/lib/datadog_api_client/v2/models/group_scalar_column.rb index 212696bf2cd9..3624e9eeb44b 100644 --- a/lib/datadog_api_client/v2/models/group_scalar_column.rb +++ b/lib/datadog_api_client/v2/models/group_scalar_column.rb @@ -30,6 +30,8 @@ class GroupScalarColumn # The array of tag values for each group found for the results of the formulas or queries. attr_accessor :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GroupScalarColumn` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::GroupScalarColumn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) name == o.name && type == o.type && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/hourly_usage.rb b/lib/datadog_api_client/v2/models/hourly_usage.rb index 76640b710264..71e7fcbfffce 100644 --- a/lib/datadog_api_client/v2/models/hourly_usage.rb +++ b/lib/datadog_api_client/v2/models/hourly_usage.rb @@ -30,6 +30,8 @@ class HourlyUsage # Type of usage data. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HourlyUsage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HourlyUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/hourly_usage_attributes.rb b/lib/datadog_api_client/v2/models/hourly_usage_attributes.rb index f2562cf9c9c5..9b49bc0c1c85 100644 --- a/lib/datadog_api_client/v2/models/hourly_usage_attributes.rb +++ b/lib/datadog_api_client/v2/models/hourly_usage_attributes.rb @@ -45,6 +45,8 @@ class HourlyUsageAttributes # Datetime in ISO-8601 format, UTC. The hour for the usage. attr_accessor :timestamp + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HourlyUsageAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HourlyUsageAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_name') @@ -126,6 +130,26 @@ 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 @@ -140,6 +164,7 @@ def ==(o) public_id == o.public_id && region == o.region && timestamp == o.timestamp + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/hourly_usage_measurement.rb b/lib/datadog_api_client/v2/models/hourly_usage_measurement.rb index 389c97e4c9b7..d3e5dc0f596c 100644 --- a/lib/datadog_api_client/v2/models/hourly_usage_measurement.rb +++ b/lib/datadog_api_client/v2/models/hourly_usage_measurement.rb @@ -27,6 +27,8 @@ class HourlyUsageMeasurement # Contains the number measured for the given usage_type during the hour. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HourlyUsageMeasurement` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HourlyUsageMeasurement`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'usage_type') @@ -78,6 +82,26 @@ 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 @@ -86,6 +110,7 @@ def ==(o) self.class == o.class && usage_type == o.usage_type && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/hourly_usage_metadata.rb b/lib/datadog_api_client/v2/models/hourly_usage_metadata.rb index e26da44dbcf9..e602e13e6e1c 100644 --- a/lib/datadog_api_client/v2/models/hourly_usage_metadata.rb +++ b/lib/datadog_api_client/v2/models/hourly_usage_metadata.rb @@ -24,6 +24,8 @@ class HourlyUsageMetadata # The metadata for the current pagination. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HourlyUsageMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HourlyUsageMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/hourly_usage_pagination.rb b/lib/datadog_api_client/v2/models/hourly_usage_pagination.rb index 1f24d6b1aa69..883089974a2d 100644 --- a/lib/datadog_api_client/v2/models/hourly_usage_pagination.rb +++ b/lib/datadog_api_client/v2/models/hourly_usage_pagination.rb @@ -24,6 +24,8 @@ class HourlyUsagePagination # The cursor to get the next results (if any). To make the next request, use the same parameters and add `next_record_id`. attr_accessor :next_record_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HourlyUsagePagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HourlyUsagePagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'next_record_id') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && next_record_id == o.next_record_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/hourly_usage_response.rb b/lib/datadog_api_client/v2/models/hourly_usage_response.rb index 93bdb843eef2..84dbc1412fb5 100644 --- a/lib/datadog_api_client/v2/models/hourly_usage_response.rb +++ b/lib/datadog_api_client/v2/models/hourly_usage_response.rb @@ -27,6 +27,8 @@ class HourlyUsageResponse # The object containing document metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HourlyUsageResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HourlyUsageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/http_log_error.rb b/lib/datadog_api_client/v2/models/http_log_error.rb index 60c073ddf9b2..b165533579fd 100644 --- a/lib/datadog_api_client/v2/models/http_log_error.rb +++ b/lib/datadog_api_client/v2/models/http_log_error.rb @@ -30,6 +30,8 @@ class HTTPLogError # Error title. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HTTPLogError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HTTPLogError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'detail') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) detail == o.detail && status == o.status && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/http_log_errors.rb b/lib/datadog_api_client/v2/models/http_log_errors.rb index 8d23b8e8f15d..a47d709b0ac8 100644 --- a/lib/datadog_api_client/v2/models/http_log_errors.rb +++ b/lib/datadog_api_client/v2/models/http_log_errors.rb @@ -24,6 +24,8 @@ class HTTPLogErrors # Structured errors. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HTTPLogErrors` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HTTPLogErrors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'errors') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/httpci_app_error.rb b/lib/datadog_api_client/v2/models/httpci_app_error.rb index b96ab8da3d99..d5ee23375685 100644 --- a/lib/datadog_api_client/v2/models/httpci_app_error.rb +++ b/lib/datadog_api_client/v2/models/httpci_app_error.rb @@ -30,6 +30,8 @@ class HTTPCIAppError # Error title. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HTTPCIAppError` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HTTPCIAppError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'detail') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) detail == o.detail && status == o.status && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/httpci_app_errors.rb b/lib/datadog_api_client/v2/models/httpci_app_errors.rb index 20c2d5046db1..db313b56ffde 100644 --- a/lib/datadog_api_client/v2/models/httpci_app_errors.rb +++ b/lib/datadog_api_client/v2/models/httpci_app_errors.rb @@ -24,6 +24,8 @@ class HTTPCIAppErrors # Structured errors. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::HTTPCIAppErrors` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::HTTPCIAppErrors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'errors') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/idp_metadata_form_data.rb b/lib/datadog_api_client/v2/models/idp_metadata_form_data.rb index 94c5ebe79833..2766275a9a88 100644 --- a/lib/datadog_api_client/v2/models/idp_metadata_form_data.rb +++ b/lib/datadog_api_client/v2/models/idp_metadata_form_data.rb @@ -24,6 +24,8 @@ class IdPMetadataFormData # The IdP metadata XML file attr_accessor :idp_file + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IdPMetadataFormData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IdPMetadataFormData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'idp_file') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && idp_file == o.idp_file + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachment_data.rb b/lib/datadog_api_client/v2/models/incident_attachment_data.rb index 7c163346757d..771dbae9acea 100644 --- a/lib/datadog_api_client/v2/models/incident_attachment_data.rb +++ b/lib/datadog_api_client/v2/models/incident_attachment_data.rb @@ -33,6 +33,8 @@ class IncidentAttachmentData # The incident attachment resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -139,6 +143,26 @@ def type=(type) @type = type 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,6 +173,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb b/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb index 8e5793131856..b69df29b0d86 100644 --- a/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb @@ -30,6 +30,8 @@ class IncidentAttachmentLinkAttributes # Timestamp when the incident attachment link was last modified. attr_accessor :modified + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentLinkAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentLinkAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attachment') @@ -108,6 +112,26 @@ def attachment_type=(attachment_type) @attachment_type = attachment_type 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 @@ -117,6 +141,7 @@ def ==(o) attachment == o.attachment && attachment_type == o.attachment_type && modified == o.modified + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb b/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb index 12398f521b50..e3acd333f349 100644 --- a/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +++ b/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb @@ -27,6 +27,8 @@ class IncidentAttachmentLinkAttributesAttachmentObject # The title of this link attachment. attr_reader :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentLinkAttributesAttachmentObject` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentLinkAttributesAttachmentObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'document_url') @@ -99,6 +103,26 @@ def title=(title) @title = title 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && document_url == o.document_url && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb b/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb index a79298fde4a0..a1f980470c0b 100644 --- a/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb @@ -27,6 +27,8 @@ class IncidentAttachmentPostmortemAttributes # The type of postmortem attachment attributes. attr_reader :attachment_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentPostmortemAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentPostmortemAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attachment') @@ -99,6 +103,26 @@ def attachment_type=(attachment_type) @attachment_type = attachment_type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attachment == o.attachment && attachment_type == o.attachment_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb b/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb index bc67b954ef50..7a6bb9614987 100644 --- a/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +++ b/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb @@ -24,6 +24,8 @@ class IncidentAttachmentRelationships # Relationship to user. attr_accessor :last_modified_by_user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'last_modified_by_user') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && last_modified_by_user == o.last_modified_by_user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb b/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb index c64083f01ab0..1b77406e790e 100644 --- a/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +++ b/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb @@ -30,6 +30,8 @@ class IncidentAttachmentUpdateData # The incident attachment resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb b/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb index cfbeee4d3602..5311d24a8578 100644 --- a/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +++ b/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb @@ -27,6 +27,8 @@ class IncidentAttachmentUpdateRequest # indicates that you want to update that attachment. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -51,12 +53,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -84,6 +88,26 @@ def data=(data) @data = data 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 @@ -91,6 +115,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb b/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb index 5490e4c05ead..406fdad425af 100644 --- a/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +++ b/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb @@ -28,6 +28,8 @@ class IncidentAttachmentUpdateResponse # Included related resources that the user requested. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentUpdateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -93,6 +97,26 @@ def data=(data) @data = data 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,6 +125,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb b/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb index bd5ed22fcaab..979d5b96ac05 100644 --- a/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +++ b/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb @@ -27,6 +27,8 @@ class IncidentAttachmentsPostmortemAttributesAttachmentObject # The title of this postmortem attachment. attr_reader :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentsPostmortemAttributesAttachmentObject` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentsPostmortemAttributesAttachmentObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'document_url') @@ -99,6 +103,26 @@ def title=(title) @title = title 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && document_url == o.document_url && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_attachments_response.rb b/lib/datadog_api_client/v2/models/incident_attachments_response.rb index 20896dadc324..10998f76eeda 100644 --- a/lib/datadog_api_client/v2/models/incident_attachments_response.rb +++ b/lib/datadog_api_client/v2/models/incident_attachments_response.rb @@ -27,6 +27,8 @@ class IncidentAttachmentsResponse # Included related resources that the user requested. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -92,6 +96,26 @@ def data=(data) @data = data 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 @@ -100,6 +124,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_create_attributes.rb b/lib/datadog_api_client/v2/models/incident_create_attributes.rb index f3442d39fe05..a71b9c580151 100644 --- a/lib/datadog_api_client/v2/models/incident_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_create_attributes.rb @@ -39,6 +39,8 @@ class IncidentCreateAttributes # The title of the incident, which summarizes what happened. attr_reader :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'customer_impact_scope') @@ -139,6 +143,26 @@ def title=(title) @title = title 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 @@ -151,6 +175,7 @@ def ==(o) initial_cells == o.initial_cells && notification_handles == o.notification_handles && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_create_data.rb b/lib/datadog_api_client/v2/models/incident_create_data.rb index fc5108f107f4..b87d3daa9934 100644 --- a/lib/datadog_api_client/v2/models/incident_create_data.rb +++ b/lib/datadog_api_client/v2/models/incident_create_data.rb @@ -30,6 +30,8 @@ class IncidentCreateData # Incident resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_create_relationships.rb b/lib/datadog_api_client/v2/models/incident_create_relationships.rb index b4309ca7ea48..4c85d45026f0 100644 --- a/lib/datadog_api_client/v2/models/incident_create_relationships.rb +++ b/lib/datadog_api_client/v2/models/incident_create_relationships.rb @@ -24,6 +24,8 @@ class IncidentCreateRelationships # Relationship to user. attr_accessor :commander_user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCreateRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentCreateRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'commander_user') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && commander_user == o.commander_user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_create_request.rb b/lib/datadog_api_client/v2/models/incident_create_request.rb index 690220718685..412402ae85af 100644 --- a/lib/datadog_api_client/v2/models/incident_create_request.rb +++ b/lib/datadog_api_client/v2/models/incident_create_request.rb @@ -24,6 +24,8 @@ class IncidentCreateRequest # Incident data for a create request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_field_attributes_multiple_value.rb b/lib/datadog_api_client/v2/models/incident_field_attributes_multiple_value.rb index 2f9ed992fe83..328eb8fe7c35 100644 --- a/lib/datadog_api_client/v2/models/incident_field_attributes_multiple_value.rb +++ b/lib/datadog_api_client/v2/models/incident_field_attributes_multiple_value.rb @@ -27,6 +27,8 @@ class IncidentFieldAttributesMultipleValue # The multiple values selected for this field. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentFieldAttributesMultipleValue` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentFieldAttributesMultipleValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -80,6 +84,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) self.class == o.class && type == o.type && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_field_attributes_single_value.rb b/lib/datadog_api_client/v2/models/incident_field_attributes_single_value.rb index 3b4a463a0ee6..c1229870cbbd 100644 --- a/lib/datadog_api_client/v2/models/incident_field_attributes_single_value.rb +++ b/lib/datadog_api_client/v2/models/incident_field_attributes_single_value.rb @@ -27,6 +27,8 @@ class IncidentFieldAttributesSingleValue # The single value selected for this field. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentFieldAttributesSingleValue` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentFieldAttributesSingleValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'type') @@ -78,6 +82,26 @@ 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 @@ -86,6 +110,7 @@ def ==(o) self.class == o.class && type == o.type && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb b/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb index 93d7b578b291..ed48d8fb95b4 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb @@ -42,6 +42,8 @@ class IncidentIntegrationMetadataAttributes # 4 indicates manually updated; 5 indicates failed. attr_reader :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -76,12 +78,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created') @@ -153,6 +157,26 @@ def status=(status) @status = status 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 @@ -165,6 +189,7 @@ def ==(o) metadata == o.metadata && modified == o.modified && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_metadata_create_data.rb b/lib/datadog_api_client/v2/models/incident_integration_metadata_create_data.rb index 99b3f58345e2..c7b308bd7838 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_metadata_create_data.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_metadata_create_data.rb @@ -27,6 +27,8 @@ class IncidentIntegrationMetadataCreateData # Integration metadata resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_metadata_create_request.rb b/lib/datadog_api_client/v2/models/incident_integration_metadata_create_request.rb index f6b81ba725a8..a1d9837bacf3 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_metadata_create_request.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_metadata_create_request.rb @@ -24,6 +24,8 @@ class IncidentIntegrationMetadataCreateRequest # Incident integration metadata data for a create request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_metadata_list_response.rb b/lib/datadog_api_client/v2/models/incident_integration_metadata_list_response.rb index 19ea46be2931..b1c8ee6647f7 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_metadata_list_response.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_metadata_list_response.rb @@ -30,6 +30,8 @@ class IncidentIntegrationMetadataListResponse # The metadata object containing pagination metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -101,6 +105,26 @@ def data=(data) @data = data 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 @@ -110,6 +134,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_data.rb b/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_data.rb index 6c1ce9f8a4a9..0ded517d8eed 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_data.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_data.rb @@ -27,6 +27,8 @@ class IncidentIntegrationMetadataPatchData # Integration metadata resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataPatchData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataPatchData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_request.rb b/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_request.rb index 154c76c5105e..3275537cbdfb 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_request.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_request.rb @@ -24,6 +24,8 @@ class IncidentIntegrationMetadataPatchRequest # Incident integration metadata data for a patch request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataPatchRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataPatchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_metadata_response.rb b/lib/datadog_api_client/v2/models/incident_integration_metadata_response.rb index 394125f9851a..c139ab14c439 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_metadata_response.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_metadata_response.rb @@ -27,6 +27,8 @@ class IncidentIntegrationMetadataResponse # Included related resources that the user requested. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -90,6 +94,26 @@ def data=(data) @data = data 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb b/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb index 8968712e924d..dcdf2d5a8891 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb @@ -33,6 +33,8 @@ class IncidentIntegrationMetadataResponseData # Integration metadata resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_integration_relationships.rb b/lib/datadog_api_client/v2/models/incident_integration_relationships.rb index 15d655999c06..fed14643480b 100644 --- a/lib/datadog_api_client/v2/models/incident_integration_relationships.rb +++ b/lib/datadog_api_client/v2/models/incident_integration_relationships.rb @@ -27,6 +27,8 @@ class IncidentIntegrationRelationships # Relationship to user. attr_accessor :last_modified_by_user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_by_user') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && created_by_user == o.created_by_user && last_modified_by_user == o.last_modified_by_user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb b/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb index bdb8df48667b..150c7d603b7f 100644 --- a/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb +++ b/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb @@ -27,6 +27,8 @@ class IncidentNonDatadogCreator # Non Datadog creator name. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentNonDatadogCreator` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentNonDatadogCreator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'image_48_px') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && image_48_px == o.image_48_px && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_notification_handle.rb b/lib/datadog_api_client/v2/models/incident_notification_handle.rb index fc1f71f54544..f0cffab69227 100644 --- a/lib/datadog_api_client/v2/models/incident_notification_handle.rb +++ b/lib/datadog_api_client/v2/models/incident_notification_handle.rb @@ -27,6 +27,8 @@ class IncidentNotificationHandle # The email address used for the notification. attr_accessor :handle + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentNotificationHandle` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentNotificationHandle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'display_name') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && display_name == o.display_name && handle == o.handle + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_response.rb b/lib/datadog_api_client/v2/models/incident_response.rb index d9f3d5d0b08b..7ebcf26be734 100644 --- a/lib/datadog_api_client/v2/models/incident_response.rb +++ b/lib/datadog_api_client/v2/models/incident_response.rb @@ -27,6 +27,8 @@ class IncidentResponse # Included related resources that the user requested. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -90,6 +94,26 @@ def data=(data) @data = data 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_response_attributes.rb b/lib/datadog_api_client/v2/models/incident_response_attributes.rb index 6ee8b82a365f..d4d9ceb9f3af 100644 --- a/lib/datadog_api_client/v2/models/incident_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_response_attributes.rb @@ -92,6 +92,8 @@ class IncidentResponseAttributes # The incident visibility status. attr_accessor :visibility + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -178,12 +180,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'archived') @@ -299,6 +303,26 @@ def title=(title) @title = title 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 @@ -328,6 +352,7 @@ def ==(o) time_to_resolve == o.time_to_resolve && title == o.title && visibility == o.visibility + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_response_data.rb b/lib/datadog_api_client/v2/models/incident_response_data.rb index 6205c83ac5bf..23af292694fc 100644 --- a/lib/datadog_api_client/v2/models/incident_response_data.rb +++ b/lib/datadog_api_client/v2/models/incident_response_data.rb @@ -33,6 +33,8 @@ class IncidentResponseData # Incident resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_response_meta.rb b/lib/datadog_api_client/v2/models/incident_response_meta.rb index e4382591d732..72dd4566e8f3 100644 --- a/lib/datadog_api_client/v2/models/incident_response_meta.rb +++ b/lib/datadog_api_client/v2/models/incident_response_meta.rb @@ -24,6 +24,8 @@ class IncidentResponseMeta # Pagination properties. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_response_meta_pagination.rb b/lib/datadog_api_client/v2/models/incident_response_meta_pagination.rb index e83456315e82..8b7e724c629e 100644 --- a/lib/datadog_api_client/v2/models/incident_response_meta_pagination.rb +++ b/lib/datadog_api_client/v2/models/incident_response_meta_pagination.rb @@ -30,6 +30,8 @@ class IncidentResponseMetaPagination # Maximum size of pages to return. attr_accessor :size + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentResponseMetaPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentResponseMetaPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'next_offset') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) next_offset == o.next_offset && offset == o.offset && size == o.size + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_response_relationships.rb b/lib/datadog_api_client/v2/models/incident_response_relationships.rb index bacf0f49954d..7d4d920a5af5 100644 --- a/lib/datadog_api_client/v2/models/incident_response_relationships.rb +++ b/lib/datadog_api_client/v2/models/incident_response_relationships.rb @@ -45,6 +45,8 @@ class IncidentResponseRelationships # Relationship to incident user defined fields. attr_accessor :user_defined_fields + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -91,12 +93,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentResponseRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentResponseRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attachments') @@ -132,6 +136,26 @@ 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 @@ -146,6 +170,7 @@ def ==(o) last_modified_by_user == o.last_modified_by_user && responders == o.responders && user_defined_fields == o.user_defined_fields + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response.rb b/lib/datadog_api_client/v2/models/incident_search_response.rb index 5e24fc6dbe21..efc1ec9b2fca 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response.rb @@ -30,6 +30,8 @@ class IncidentSearchResponse # The metadata object containing pagination metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -99,6 +103,26 @@ def data=(data) @data = data 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 @@ -108,6 +132,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_attributes.rb b/lib/datadog_api_client/v2/models/incident_search_response_attributes.rb index a83e303ba399..382ecf1f92f7 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_attributes.rb @@ -30,6 +30,8 @@ class IncidentSearchResponseAttributes # Number of incidents returned by the search. attr_reader :total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facets') @@ -125,6 +129,26 @@ def total=(total) @total = total 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 @@ -134,6 +158,7 @@ def ==(o) facets == o.facets && incidents == o.incidents && total == o.total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_data.rb b/lib/datadog_api_client/v2/models/incident_search_response_data.rb index 7da38d9a2ea8..05c78f03dbb7 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_data.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_data.rb @@ -27,6 +27,8 @@ class IncidentSearchResponseData # Incident search result type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_facets_data.rb b/lib/datadog_api_client/v2/models/incident_search_response_facets_data.rb index e162eaf7db40..73f1711b52c0 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_facets_data.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_facets_data.rb @@ -54,6 +54,8 @@ class IncidentSearchResponseFacetsData # Facet data for incident time to resolve metrics. attr_accessor :time_to_resolve + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseFacetsData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseFacetsData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'commander') @@ -173,6 +177,26 @@ 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 @@ -190,6 +214,7 @@ def ==(o) state == o.state && time_to_repair == o.time_to_repair && time_to_resolve == o.time_to_resolve + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_field_facet_data.rb b/lib/datadog_api_client/v2/models/incident_search_response_field_facet_data.rb index 47d9b0cc4cc6..2d5c4c327932 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_field_facet_data.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_field_facet_data.rb @@ -27,6 +27,8 @@ class IncidentSearchResponseFieldFacetData # The facet value appearing in search results. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseFieldFacetData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseFieldFacetData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -88,6 +92,26 @@ def count=(count) @count = count 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && count == o.count && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_incidents_data.rb b/lib/datadog_api_client/v2/models/incident_search_response_incidents_data.rb index f6c5fb75536c..033ecd274814 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_incidents_data.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_incidents_data.rb @@ -24,6 +24,8 @@ class IncidentSearchResponseIncidentsData # Incident data from a response. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseIncidentsData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseIncidentsData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_meta.rb b/lib/datadog_api_client/v2/models/incident_search_response_meta.rb index f082bf2af713..b6be7dd00f93 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_meta.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_meta.rb @@ -24,6 +24,8 @@ class IncidentSearchResponseMeta # Pagination properties. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_numeric_facet_data.rb b/lib/datadog_api_client/v2/models/incident_search_response_numeric_facet_data.rb index f459938cf182..b6dc9dec7376 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_numeric_facet_data.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_numeric_facet_data.rb @@ -27,6 +27,8 @@ class IncidentSearchResponseNumericFacetData # Name of the incident property field. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseNumericFacetData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseNumericFacetData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregates') @@ -99,6 +103,26 @@ def name=(name) @name = name 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && aggregates == o.aggregates && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_numeric_facet_data_aggregates.rb b/lib/datadog_api_client/v2/models/incident_search_response_numeric_facet_data_aggregates.rb index 8471d8aa71b2..cbb63e344266 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_numeric_facet_data_aggregates.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_numeric_facet_data_aggregates.rb @@ -27,6 +27,8 @@ class IncidentSearchResponseNumericFacetDataAggregates # Minimum value of the numeric aggregates. attr_accessor :min + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -62,12 +64,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseNumericFacetDataAggregates` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseNumericFacetDataAggregates`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'max') @@ -79,6 +83,26 @@ 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 @@ -87,6 +111,7 @@ def ==(o) self.class == o.class && max == o.max && min == o.min + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_property_field_facet_data.rb b/lib/datadog_api_client/v2/models/incident_search_response_property_field_facet_data.rb index 46053385715e..88b2be4562e4 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_property_field_facet_data.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_property_field_facet_data.rb @@ -30,6 +30,8 @@ class IncidentSearchResponsePropertyFieldFacetData # Name of the incident property field. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponsePropertyFieldFacetData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponsePropertyFieldFacetData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregates') @@ -110,6 +114,26 @@ def name=(name) @name = name 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 @@ -119,6 +143,7 @@ def ==(o) aggregates == o.aggregates && facets == o.facets && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_search_response_user_facet_data.rb b/lib/datadog_api_client/v2/models/incident_search_response_user_facet_data.rb index de6c58d022de..4a99ee5856c0 100644 --- a/lib/datadog_api_client/v2/models/incident_search_response_user_facet_data.rb +++ b/lib/datadog_api_client/v2/models/incident_search_response_user_facet_data.rb @@ -36,6 +36,8 @@ class IncidentSearchResponseUserFacetData # ID of the user. attr_accessor :uuid + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentSearchResponseUserFacetData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentSearchResponseUserFacetData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count') @@ -115,6 +119,26 @@ def count=(count) @count = count 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 @@ -126,6 +150,7 @@ def ==(o) handle == o.handle && name == o.name && uuid == o.uuid + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_create_attributes.rb b/lib/datadog_api_client/v2/models/incident_service_create_attributes.rb index b2ae7d90ebab..f99c18020114 100644 --- a/lib/datadog_api_client/v2/models/incident_service_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_service_create_attributes.rb @@ -24,6 +24,8 @@ class IncidentServiceCreateAttributes # Name of the incident service. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -79,6 +83,26 @@ def name=(name) @name = name 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_create_data.rb b/lib/datadog_api_client/v2/models/incident_service_create_data.rb index 1d60e906be22..f16977fc1be3 100644 --- a/lib/datadog_api_client/v2/models/incident_service_create_data.rb +++ b/lib/datadog_api_client/v2/models/incident_service_create_data.rb @@ -30,6 +30,8 @@ class IncidentServiceCreateData # Incident service resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_create_request.rb b/lib/datadog_api_client/v2/models/incident_service_create_request.rb index fe13c67c0e4c..b7b063e01bd0 100644 --- a/lib/datadog_api_client/v2/models/incident_service_create_request.rb +++ b/lib/datadog_api_client/v2/models/incident_service_create_request.rb @@ -24,6 +24,8 @@ class IncidentServiceCreateRequest # Incident Service payload for create requests. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_relationships.rb b/lib/datadog_api_client/v2/models/incident_service_relationships.rb index 4e084154ff59..f4b2e60e9b43 100644 --- a/lib/datadog_api_client/v2/models/incident_service_relationships.rb +++ b/lib/datadog_api_client/v2/models/incident_service_relationships.rb @@ -27,6 +27,8 @@ class IncidentServiceRelationships # Relationship to user. attr_accessor :last_modified_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_by') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && created_by == o.created_by && last_modified_by == o.last_modified_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_response.rb b/lib/datadog_api_client/v2/models/incident_service_response.rb index efb44e25c8c3..03645c4306b1 100644 --- a/lib/datadog_api_client/v2/models/incident_service_response.rb +++ b/lib/datadog_api_client/v2/models/incident_service_response.rb @@ -27,6 +27,8 @@ class IncidentServiceResponse # Included objects from relationships. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -90,6 +94,26 @@ def data=(data) @data = data 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_response_attributes.rb b/lib/datadog_api_client/v2/models/incident_service_response_attributes.rb index 34b6a154fe04..a9779cce538c 100644 --- a/lib/datadog_api_client/v2/models/incident_service_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_service_response_attributes.rb @@ -30,6 +30,8 @@ class IncidentServiceResponseAttributes # Name of the incident service. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) created == o.created && modified == o.modified && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_response_data.rb b/lib/datadog_api_client/v2/models/incident_service_response_data.rb index 852ba20d87ca..5d525d32b7c3 100644 --- a/lib/datadog_api_client/v2/models/incident_service_response_data.rb +++ b/lib/datadog_api_client/v2/models/incident_service_response_data.rb @@ -33,6 +33,8 @@ class IncidentServiceResponseData # Incident service resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_update_attributes.rb b/lib/datadog_api_client/v2/models/incident_service_update_attributes.rb index dcdb4fda7d7b..868d2a468c09 100644 --- a/lib/datadog_api_client/v2/models/incident_service_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_service_update_attributes.rb @@ -24,6 +24,8 @@ class IncidentServiceUpdateAttributes # Name of the incident service. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -79,6 +83,26 @@ def name=(name) @name = name 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_update_data.rb b/lib/datadog_api_client/v2/models/incident_service_update_data.rb index 721cdd3d0a27..87c5a3d70eba 100644 --- a/lib/datadog_api_client/v2/models/incident_service_update_data.rb +++ b/lib/datadog_api_client/v2/models/incident_service_update_data.rb @@ -33,6 +33,8 @@ class IncidentServiceUpdateData # Incident service resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -106,6 +110,26 @@ def type=(type) @type = type 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 @@ -116,6 +140,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_service_update_request.rb b/lib/datadog_api_client/v2/models/incident_service_update_request.rb index 1a23dc39b704..7923f4a46823 100644 --- a/lib/datadog_api_client/v2/models/incident_service_update_request.rb +++ b/lib/datadog_api_client/v2/models/incident_service_update_request.rb @@ -24,6 +24,8 @@ class IncidentServiceUpdateRequest # Incident Service payload for update requests. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServiceUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServiceUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_services_response.rb b/lib/datadog_api_client/v2/models/incident_services_response.rb index 3c465312fc7c..2c8f3b530a08 100644 --- a/lib/datadog_api_client/v2/models/incident_services_response.rb +++ b/lib/datadog_api_client/v2/models/incident_services_response.rb @@ -30,6 +30,8 @@ class IncidentServicesResponse # The metadata object containing pagination metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentServicesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentServicesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -101,6 +105,26 @@ def data=(data) @data = data 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 @@ -110,6 +134,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb index a01fcfc210b4..ceedc7d328a6 100644 --- a/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb @@ -24,6 +24,8 @@ class IncidentTeamCreateAttributes # Name of the incident team. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -79,6 +83,26 @@ def name=(name) @name = name 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_create_data.rb b/lib/datadog_api_client/v2/models/incident_team_create_data.rb index 2bd522ef84a7..c3b812e7e206 100644 --- a/lib/datadog_api_client/v2/models/incident_team_create_data.rb +++ b/lib/datadog_api_client/v2/models/incident_team_create_data.rb @@ -30,6 +30,8 @@ class IncidentTeamCreateData # Incident Team resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_create_request.rb b/lib/datadog_api_client/v2/models/incident_team_create_request.rb index 750c675a5368..535d7a64f437 100644 --- a/lib/datadog_api_client/v2/models/incident_team_create_request.rb +++ b/lib/datadog_api_client/v2/models/incident_team_create_request.rb @@ -24,6 +24,8 @@ class IncidentTeamCreateRequest # Incident Team data for a create request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_relationships.rb b/lib/datadog_api_client/v2/models/incident_team_relationships.rb index 722a3115c8d0..b94c2da84db3 100644 --- a/lib/datadog_api_client/v2/models/incident_team_relationships.rb +++ b/lib/datadog_api_client/v2/models/incident_team_relationships.rb @@ -27,6 +27,8 @@ class IncidentTeamRelationships # Relationship to user. attr_accessor :last_modified_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_by') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && created_by == o.created_by && last_modified_by == o.last_modified_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_response.rb b/lib/datadog_api_client/v2/models/incident_team_response.rb index e0d45158e742..58b9b81f1507 100644 --- a/lib/datadog_api_client/v2/models/incident_team_response.rb +++ b/lib/datadog_api_client/v2/models/incident_team_response.rb @@ -27,6 +27,8 @@ class IncidentTeamResponse # Included objects from relationships. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -90,6 +94,26 @@ def data=(data) @data = data 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb index aaa910613117..606514e7f361 100644 --- a/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb @@ -30,6 +30,8 @@ class IncidentTeamResponseAttributes # Name of the incident team. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) created == o.created && modified == o.modified && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_response_data.rb b/lib/datadog_api_client/v2/models/incident_team_response_data.rb index 8ab2ab34bef1..1c015649bfde 100644 --- a/lib/datadog_api_client/v2/models/incident_team_response_data.rb +++ b/lib/datadog_api_client/v2/models/incident_team_response_data.rb @@ -33,6 +33,8 @@ class IncidentTeamResponseData # Incident Team resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb index 72e8a49051af..268926f7b094 100644 --- a/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb @@ -24,6 +24,8 @@ class IncidentTeamUpdateAttributes # Name of the incident team. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -79,6 +83,26 @@ def name=(name) @name = name 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_update_data.rb b/lib/datadog_api_client/v2/models/incident_team_update_data.rb index a72a83a12ba1..435c5a3a3a2b 100644 --- a/lib/datadog_api_client/v2/models/incident_team_update_data.rb +++ b/lib/datadog_api_client/v2/models/incident_team_update_data.rb @@ -33,6 +33,8 @@ class IncidentTeamUpdateData # Incident Team resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -106,6 +110,26 @@ def type=(type) @type = type 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 @@ -116,6 +140,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_team_update_request.rb b/lib/datadog_api_client/v2/models/incident_team_update_request.rb index 202de3fe57a8..00ef374c6d76 100644 --- a/lib/datadog_api_client/v2/models/incident_team_update_request.rb +++ b/lib/datadog_api_client/v2/models/incident_team_update_request.rb @@ -24,6 +24,8 @@ class IncidentTeamUpdateRequest # Incident Team data for an update request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_teams_response.rb b/lib/datadog_api_client/v2/models/incident_teams_response.rb index cb593061139d..13c027ffcb96 100644 --- a/lib/datadog_api_client/v2/models/incident_teams_response.rb +++ b/lib/datadog_api_client/v2/models/incident_teams_response.rb @@ -30,6 +30,8 @@ class IncidentTeamsResponse # The metadata object containing pagination metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTeamsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -101,6 +105,26 @@ def data=(data) @data = data 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 @@ -110,6 +134,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_timeline_cell_markdown_create_attributes.rb b/lib/datadog_api_client/v2/models/incident_timeline_cell_markdown_create_attributes.rb index 000e1052068f..a1af65674a46 100644 --- a/lib/datadog_api_client/v2/models/incident_timeline_cell_markdown_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_timeline_cell_markdown_create_attributes.rb @@ -30,6 +30,8 @@ class IncidentTimelineCellMarkdownCreateAttributes # A flag indicating whether the timeline cell is important and should be highlighted. attr_accessor :important + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineCellMarkdownCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTimelineCellMarkdownCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cell_type') @@ -108,6 +112,26 @@ def content=(content) @content = content 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 @@ -117,6 +141,7 @@ def ==(o) cell_type == o.cell_type && content == o.content && important == o.important + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_timeline_cell_markdown_create_attributes_content.rb b/lib/datadog_api_client/v2/models/incident_timeline_cell_markdown_create_attributes_content.rb index 44b0704274d5..0ea3f4045133 100644 --- a/lib/datadog_api_client/v2/models/incident_timeline_cell_markdown_create_attributes_content.rb +++ b/lib/datadog_api_client/v2/models/incident_timeline_cell_markdown_create_attributes_content.rb @@ -24,6 +24,8 @@ class IncidentTimelineCellMarkdownCreateAttributesContent # The Markdown content of the cell. attr_accessor :content + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineCellMarkdownCreateAttributesContent` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTimelineCellMarkdownCreateAttributesContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'content') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && content == o.content + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_anonymous_assignee.rb b/lib/datadog_api_client/v2/models/incident_todo_anonymous_assignee.rb index 20426825b2a3..abbaab0f9d9b 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_anonymous_assignee.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_anonymous_assignee.rb @@ -33,6 +33,8 @@ class IncidentTodoAnonymousAssignee # The source of the anonymous assignee. attr_reader :source + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoAnonymousAssignee` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoAnonymousAssignee`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'icon') @@ -139,6 +143,26 @@ def source=(source) @source = source 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,6 +173,7 @@ def ==(o) id == o.id && name == o.name && source == o.source + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_attributes.rb b/lib/datadog_api_client/v2/models/incident_todo_attributes.rb index bcb1ecef0a50..e822c67892b8 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_attributes.rb @@ -42,6 +42,8 @@ class IncidentTodoAttributes # Timestamp when the incident todo was last modified. attr_accessor :modified + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -87,12 +89,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assignees') @@ -155,6 +159,26 @@ def content=(content) @content = content 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 @@ -168,6 +192,7 @@ def ==(o) due_date == o.due_date && incident_id == o.incident_id && modified == o.modified + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_create_data.rb b/lib/datadog_api_client/v2/models/incident_todo_create_data.rb index ccd333f1e4fc..31883a848c28 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_create_data.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_create_data.rb @@ -27,6 +27,8 @@ class IncidentTodoCreateData # Todo resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_create_request.rb b/lib/datadog_api_client/v2/models/incident_todo_create_request.rb index 436b431025d9..b1c36148ab77 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_create_request.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_create_request.rb @@ -24,6 +24,8 @@ class IncidentTodoCreateRequest # Incident todo data for a create request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_list_response.rb b/lib/datadog_api_client/v2/models/incident_todo_list_response.rb index 9ec6732ff1a2..e7746e4baf3e 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_list_response.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_list_response.rb @@ -30,6 +30,8 @@ class IncidentTodoListResponse # The metadata object containing pagination metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -101,6 +105,26 @@ def data=(data) @data = data 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 @@ -110,6 +134,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_patch_data.rb b/lib/datadog_api_client/v2/models/incident_todo_patch_data.rb index 91cea8ec373a..16697eb7ac7b 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_patch_data.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_patch_data.rb @@ -27,6 +27,8 @@ class IncidentTodoPatchData # Todo resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoPatchData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoPatchData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_patch_request.rb b/lib/datadog_api_client/v2/models/incident_todo_patch_request.rb index d551df3b1ab1..01844afcd706 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_patch_request.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_patch_request.rb @@ -24,6 +24,8 @@ class IncidentTodoPatchRequest # Incident todo data for a patch request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoPatchRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoPatchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_relationships.rb b/lib/datadog_api_client/v2/models/incident_todo_relationships.rb index 1be7c81d52b4..cd84592387d1 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_relationships.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_relationships.rb @@ -27,6 +27,8 @@ class IncidentTodoRelationships # Relationship to user. attr_accessor :last_modified_by_user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_by_user') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && created_by_user == o.created_by_user && last_modified_by_user == o.last_modified_by_user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_response.rb b/lib/datadog_api_client/v2/models/incident_todo_response.rb index 3e474add6696..d65091af9a8b 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_response.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_response.rb @@ -27,6 +27,8 @@ class IncidentTodoResponse # Included related resources that the user requested. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -90,6 +94,26 @@ def data=(data) @data = data 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_todo_response_data.rb b/lib/datadog_api_client/v2/models/incident_todo_response_data.rb index 4441f8655ead..38b94f5b9d73 100644 --- a/lib/datadog_api_client/v2/models/incident_todo_response_data.rb +++ b/lib/datadog_api_client/v2/models/incident_todo_response_data.rb @@ -33,6 +33,8 @@ class IncidentTodoResponseData # Todo resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTodoResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentTodoResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_update_attributes.rb b/lib/datadog_api_client/v2/models/incident_update_attributes.rb index 2e931c1e4b59..512ae5d94e1d 100644 --- a/lib/datadog_api_client/v2/models/incident_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/incident_update_attributes.rb @@ -45,6 +45,8 @@ class IncidentUpdateAttributes # The title of the incident, which summarizes what happened. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'customer_impact_end') @@ -136,6 +140,26 @@ 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 @@ -150,6 +174,7 @@ def ==(o) fields == o.fields && notification_handles == o.notification_handles && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_update_data.rb b/lib/datadog_api_client/v2/models/incident_update_data.rb index 27258b01795f..c87b3da847d2 100644 --- a/lib/datadog_api_client/v2/models/incident_update_data.rb +++ b/lib/datadog_api_client/v2/models/incident_update_data.rb @@ -33,6 +33,8 @@ class IncidentUpdateData # Incident resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_update_relationships.rb b/lib/datadog_api_client/v2/models/incident_update_relationships.rb index 7f5d1b7b2da0..e787b83ce937 100644 --- a/lib/datadog_api_client/v2/models/incident_update_relationships.rb +++ b/lib/datadog_api_client/v2/models/incident_update_relationships.rb @@ -30,6 +30,8 @@ class IncidentUpdateRelationships # A relationship reference for postmortems. attr_accessor :postmortem + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentUpdateRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentUpdateRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'commander_user') @@ -87,6 +91,26 @@ 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 @@ -96,6 +120,7 @@ def ==(o) commander_user == o.commander_user && integrations == o.integrations && postmortem == o.postmortem + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incident_update_request.rb b/lib/datadog_api_client/v2/models/incident_update_request.rb index db5167713bff..e8ff7c3c89d8 100644 --- a/lib/datadog_api_client/v2/models/incident_update_request.rb +++ b/lib/datadog_api_client/v2/models/incident_update_request.rb @@ -24,6 +24,8 @@ class IncidentUpdateRequest # Incident data for an update request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/incidents_response.rb b/lib/datadog_api_client/v2/models/incidents_response.rb index 88c917c129ff..9e7d5fe83755 100644 --- a/lib/datadog_api_client/v2/models/incidents_response.rb +++ b/lib/datadog_api_client/v2/models/incidents_response.rb @@ -30,6 +30,8 @@ class IncidentsResponse # The metadata object containing pagination metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -101,6 +105,26 @@ def data=(data) @data = data 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 @@ -110,6 +134,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/intake_payload_accepted.rb b/lib/datadog_api_client/v2/models/intake_payload_accepted.rb index 574b838dbb8a..62f964664f1f 100644 --- a/lib/datadog_api_client/v2/models/intake_payload_accepted.rb +++ b/lib/datadog_api_client/v2/models/intake_payload_accepted.rb @@ -24,6 +24,8 @@ class IntakePayloadAccepted # A list of errors. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntakePayloadAccepted` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IntakePayloadAccepted`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'errors') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/interface_attributes.rb b/lib/datadog_api_client/v2/models/interface_attributes.rb index ea4ff5aef34b..fab7b299e0f4 100644 --- a/lib/datadog_api_client/v2/models/interface_attributes.rb +++ b/lib/datadog_api_client/v2/models/interface_attributes.rb @@ -39,6 +39,8 @@ class InterfaceAttributes # The interface status attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::InterfaceAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::InterfaceAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_alias') @@ -106,6 +110,26 @@ 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 @@ -118,6 +142,7 @@ def ==(o) mac_address == o.mac_address && name == o.name && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ip_allowlist_attributes.rb b/lib/datadog_api_client/v2/models/ip_allowlist_attributes.rb index fd251596ca41..0c3aa6f29c16 100644 --- a/lib/datadog_api_client/v2/models/ip_allowlist_attributes.rb +++ b/lib/datadog_api_client/v2/models/ip_allowlist_attributes.rb @@ -27,6 +27,8 @@ class IPAllowlistAttributes # Array of entries in the IP allowlist. attr_accessor :entries + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && enabled == o.enabled && entries == o.entries + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ip_allowlist_data.rb b/lib/datadog_api_client/v2/models/ip_allowlist_data.rb index abf821f1cddf..a80a7924bc07 100644 --- a/lib/datadog_api_client/v2/models/ip_allowlist_data.rb +++ b/lib/datadog_api_client/v2/models/ip_allowlist_data.rb @@ -30,6 +30,8 @@ class IPAllowlistData # IP allowlist type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ip_allowlist_entry.rb b/lib/datadog_api_client/v2/models/ip_allowlist_entry.rb index 4e4ae287984e..d21f92889ed6 100644 --- a/lib/datadog_api_client/v2/models/ip_allowlist_entry.rb +++ b/lib/datadog_api_client/v2/models/ip_allowlist_entry.rb @@ -24,6 +24,8 @@ class IPAllowlistEntry # Data of the IP allowlist entry object. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistEntry` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ip_allowlist_entry_attributes.rb b/lib/datadog_api_client/v2/models/ip_allowlist_entry_attributes.rb index 33f54b3ebf2c..e9b02fe99151 100644 --- a/lib/datadog_api_client/v2/models/ip_allowlist_entry_attributes.rb +++ b/lib/datadog_api_client/v2/models/ip_allowlist_entry_attributes.rb @@ -33,6 +33,8 @@ class IPAllowlistEntryAttributes # A note describing the IP allowlist entry. attr_accessor :note + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistEntryAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistEntryAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cidr_block') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) created_at == o.created_at && modified_at == o.modified_at && note == o.note + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ip_allowlist_entry_data.rb b/lib/datadog_api_client/v2/models/ip_allowlist_entry_data.rb index 9ca60617c456..e4d2e66ff17d 100644 --- a/lib/datadog_api_client/v2/models/ip_allowlist_entry_data.rb +++ b/lib/datadog_api_client/v2/models/ip_allowlist_entry_data.rb @@ -30,6 +30,8 @@ class IPAllowlistEntryData # IP allowlist Entry type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistEntryData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistEntryData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ip_allowlist_response.rb b/lib/datadog_api_client/v2/models/ip_allowlist_response.rb index d40a70014e17..7de1c61d5896 100644 --- a/lib/datadog_api_client/v2/models/ip_allowlist_response.rb +++ b/lib/datadog_api_client/v2/models/ip_allowlist_response.rb @@ -24,6 +24,8 @@ class IPAllowlistResponse # IP allowlist data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/ip_allowlist_update_request.rb b/lib/datadog_api_client/v2/models/ip_allowlist_update_request.rb index 20d2e3e4a0c6..a608f7090f05 100644 --- a/lib/datadog_api_client/v2/models/ip_allowlist_update_request.rb +++ b/lib/datadog_api_client/v2/models/ip_allowlist_update_request.rb @@ -24,6 +24,8 @@ class IPAllowlistUpdateRequest # IP allowlist data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IPAllowlistUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IPAllowlistUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/jira_integration_metadata.rb b/lib/datadog_api_client/v2/models/jira_integration_metadata.rb index 0418da9cd97e..88e802588c37 100644 --- a/lib/datadog_api_client/v2/models/jira_integration_metadata.rb +++ b/lib/datadog_api_client/v2/models/jira_integration_metadata.rb @@ -24,6 +24,8 @@ class JiraIntegrationMetadata # Array of Jira issues in this integration metadata. attr_reader :issues + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIntegrationMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::JiraIntegrationMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'issues') @@ -81,6 +85,26 @@ def issues=(issues) @issues = issues 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && issues == o.issues + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/jira_integration_metadata_issues_item.rb b/lib/datadog_api_client/v2/models/jira_integration_metadata_issues_item.rb index 80224dadfee6..d5510a211185 100644 --- a/lib/datadog_api_client/v2/models/jira_integration_metadata_issues_item.rb +++ b/lib/datadog_api_client/v2/models/jira_integration_metadata_issues_item.rb @@ -36,6 +36,8 @@ class JiraIntegrationMetadataIssuesItem # URL redirecting to the Jira issue. attr_accessor :redirect_url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIntegrationMetadataIssuesItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::JiraIntegrationMetadataIssuesItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account') @@ -126,6 +130,26 @@ def project_key=(project_key) @project_key = project_key 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 @@ -137,6 +161,7 @@ def ==(o) issuetype_id == o.issuetype_id && project_key == o.project_key && redirect_url == o.redirect_url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/jira_issue.rb b/lib/datadog_api_client/v2/models/jira_issue.rb index 6c16cb6a3f3e..5e0cc247580c 100644 --- a/lib/datadog_api_client/v2/models/jira_issue.rb +++ b/lib/datadog_api_client/v2/models/jira_issue.rb @@ -27,6 +27,8 @@ class JiraIssue # Case status attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssue` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::JiraIssue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'result') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && result == o.result && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/jira_issue_result.rb b/lib/datadog_api_client/v2/models/jira_issue_result.rb index ef3a1c245a86..839def28f592 100644 --- a/lib/datadog_api_client/v2/models/jira_issue_result.rb +++ b/lib/datadog_api_client/v2/models/jira_issue_result.rb @@ -33,6 +33,8 @@ class JiraIssueResult # Jira project key attr_accessor :project_key + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JiraIssueResult` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::JiraIssueResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'issue_id') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) issue_key == o.issue_key && issue_url == o.issue_url && project_key == o.project_key + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/jsonapi_error_item.rb b/lib/datadog_api_client/v2/models/jsonapi_error_item.rb index cb7ca55fc158..20986088d5c3 100644 --- a/lib/datadog_api_client/v2/models/jsonapi_error_item.rb +++ b/lib/datadog_api_client/v2/models/jsonapi_error_item.rb @@ -30,6 +30,8 @@ class JSONAPIErrorItem # Short human-readable summary of the error. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JSONAPIErrorItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::JSONAPIErrorItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'detail') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) detail == o.detail && status == o.status && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/jsonapi_error_response.rb b/lib/datadog_api_client/v2/models/jsonapi_error_response.rb index 4b3a651ecbc2..6e9651aa97b0 100644 --- a/lib/datadog_api_client/v2/models/jsonapi_error_response.rb +++ b/lib/datadog_api_client/v2/models/jsonapi_error_response.rb @@ -24,6 +24,8 @@ class JSONAPIErrorResponse # A list of errors. attr_reader :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JSONAPIErrorResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::JSONAPIErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'errors') @@ -81,6 +85,26 @@ def errors=(errors) @errors = errors 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/leaked_key.rb b/lib/datadog_api_client/v2/models/leaked_key.rb index 248ccf6260b9..9461782c78a1 100644 --- a/lib/datadog_api_client/v2/models/leaked_key.rb +++ b/lib/datadog_api_client/v2/models/leaked_key.rb @@ -30,6 +30,8 @@ class LeakedKey # The definition of LeakedKeyType object. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LeakedKey` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LeakedKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/leaked_key_attributes.rb b/lib/datadog_api_client/v2/models/leaked_key_attributes.rb index b612249e47a9..4cb28da03ac5 100644 --- a/lib/datadog_api_client/v2/models/leaked_key_attributes.rb +++ b/lib/datadog_api_client/v2/models/leaked_key_attributes.rb @@ -27,6 +27,8 @@ class LeakedKeyAttributes # The LeakedKeyAttributes leak_source. attr_accessor :leak_source + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LeakedKeyAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LeakedKeyAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'date') @@ -88,6 +92,26 @@ def date=(date) @date = date 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && date == o.date && leak_source == o.leak_source + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_apis_response.rb b/lib/datadog_api_client/v2/models/list_apis_response.rb index c00f1b5d3f07..b321e777fbce 100644 --- a/lib/datadog_api_client/v2/models/list_apis_response.rb +++ b/lib/datadog_api_client/v2/models/list_apis_response.rb @@ -27,6 +27,8 @@ class ListAPIsResponse # Metadata for `ListAPIsResponse`. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_apis_response_data.rb b/lib/datadog_api_client/v2/models/list_apis_response_data.rb index 9c0af8174418..a8d3d3f2d92a 100644 --- a/lib/datadog_api_client/v2/models/list_apis_response_data.rb +++ b/lib/datadog_api_client/v2/models/list_apis_response_data.rb @@ -27,6 +27,8 @@ class ListAPIsResponseData # API identifier. attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb b/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb index e65c6e5535d8..24499d2a8c56 100644 --- a/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb @@ -24,6 +24,8 @@ class ListAPIsResponseDataAttributes # API name. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponseDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_apis_response_meta.rb b/lib/datadog_api_client/v2/models/list_apis_response_meta.rb index 4cde7cdffcec..9e4e2ad4f660 100644 --- a/lib/datadog_api_client/v2/models/list_apis_response_meta.rb +++ b/lib/datadog_api_client/v2/models/list_apis_response_meta.rb @@ -24,6 +24,8 @@ class ListAPIsResponseMeta # Pagination metadata information for `ListAPIsResponse`. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb b/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb index ee426b185dd4..6181153e921e 100644 --- a/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb +++ b/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb @@ -30,6 +30,8 @@ class ListAPIsResponseMetaPagination # Total number of items. attr_accessor :total_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListAPIsResponseMetaPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListAPIsResponseMetaPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'limit') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) limit == o.limit && offset == o.offset && total_count == o.total_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_application_keys_response.rb b/lib/datadog_api_client/v2/models/list_application_keys_response.rb index 93ba597c01a6..77acf50ece87 100644 --- a/lib/datadog_api_client/v2/models/list_application_keys_response.rb +++ b/lib/datadog_api_client/v2/models/list_application_keys_response.rb @@ -30,6 +30,8 @@ class ListApplicationKeysResponse # Additional information related to the application key response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListApplicationKeysResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListApplicationKeysResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_devices_response.rb b/lib/datadog_api_client/v2/models/list_devices_response.rb index 58882e518fee..23bf93313ea3 100644 --- a/lib/datadog_api_client/v2/models/list_devices_response.rb +++ b/lib/datadog_api_client/v2/models/list_devices_response.rb @@ -27,6 +27,8 @@ class ListDevicesResponse # Object describing meta attributes of response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListDevicesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListDevicesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_devices_response_metadata.rb b/lib/datadog_api_client/v2/models/list_devices_response_metadata.rb index 33679714fc02..fd0e2a20a7e4 100644 --- a/lib/datadog_api_client/v2/models/list_devices_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/list_devices_response_metadata.rb @@ -24,6 +24,8 @@ class ListDevicesResponseMetadata # Pagination object. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListDevicesResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListDevicesResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_devices_response_metadata_page.rb b/lib/datadog_api_client/v2/models/list_devices_response_metadata_page.rb index ad2bd9f6e150..5cf903fe637b 100644 --- a/lib/datadog_api_client/v2/models/list_devices_response_metadata_page.rb +++ b/lib/datadog_api_client/v2/models/list_devices_response_metadata_page.rb @@ -24,6 +24,8 @@ class ListDevicesResponseMetadataPage # Total count of devices matched by the filter. attr_accessor :total_filtered_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListDevicesResponseMetadataPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListDevicesResponseMetadataPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_filtered_count') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && total_filtered_count == o.total_filtered_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_downtimes_response.rb b/lib/datadog_api_client/v2/models/list_downtimes_response.rb index b3f0093d66b5..4349eaa91620 100644 --- a/lib/datadog_api_client/v2/models/list_downtimes_response.rb +++ b/lib/datadog_api_client/v2/models/list_downtimes_response.rb @@ -30,6 +30,8 @@ class ListDowntimesResponse # Pagination metadata returned by the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListDowntimesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListDowntimesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_findings_response.rb b/lib/datadog_api_client/v2/models/list_findings_response.rb index 6633cb21bb67..d2831565e361 100644 --- a/lib/datadog_api_client/v2/models/list_findings_response.rb +++ b/lib/datadog_api_client/v2/models/list_findings_response.rb @@ -27,6 +27,8 @@ class ListFindingsResponse # Metadata for pagination. attr_reader :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListFindingsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListFindingsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -101,6 +105,26 @@ def meta=(meta) @meta = meta 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 @@ -109,6 +133,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_powerpacks_response.rb b/lib/datadog_api_client/v2/models/list_powerpacks_response.rb index 0fc32fd07cad..0a7b578017eb 100644 --- a/lib/datadog_api_client/v2/models/list_powerpacks_response.rb +++ b/lib/datadog_api_client/v2/models/list_powerpacks_response.rb @@ -33,6 +33,8 @@ class ListPowerpacksResponse # Powerpack response metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListPowerpacksResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListPowerpacksResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -92,6 +96,26 @@ 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 @@ -102,6 +126,7 @@ def ==(o) included == o.included && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_rules_response.rb b/lib/datadog_api_client/v2/models/list_rules_response.rb index 8598044525ec..444146cea09c 100644 --- a/lib/datadog_api_client/v2/models/list_rules_response.rb +++ b/lib/datadog_api_client/v2/models/list_rules_response.rb @@ -27,6 +27,8 @@ class ListRulesResponse # Links attributes. attr_accessor :links + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListRulesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListRulesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && links == o.links + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_rules_response_data_item.rb b/lib/datadog_api_client/v2/models/list_rules_response_data_item.rb index 3733d74c6898..3246b75c6ae0 100644 --- a/lib/datadog_api_client/v2/models/list_rules_response_data_item.rb +++ b/lib/datadog_api_client/v2/models/list_rules_response_data_item.rb @@ -33,6 +33,8 @@ class ListRulesResponseDataItem # The JSON:API type for scorecard rules. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListRulesResponseDataItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListRulesResponseDataItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_rules_response_links.rb b/lib/datadog_api_client/v2/models/list_rules_response_links.rb index 3ad6a82e9455..0da42eb2fc50 100644 --- a/lib/datadog_api_client/v2/models/list_rules_response_links.rb +++ b/lib/datadog_api_client/v2/models/list_rules_response_links.rb @@ -24,6 +24,8 @@ class ListRulesResponseLinks # Link for the next set of rules. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListRulesResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListRulesResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_tags_response.rb b/lib/datadog_api_client/v2/models/list_tags_response.rb index 2dc016fdf672..165b8c929bb1 100644 --- a/lib/datadog_api_client/v2/models/list_tags_response.rb +++ b/lib/datadog_api_client/v2/models/list_tags_response.rb @@ -24,6 +24,8 @@ class ListTagsResponse # The list tags response data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListTagsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListTagsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_tags_response_data.rb b/lib/datadog_api_client/v2/models/list_tags_response_data.rb index 3fe4b09bdb71..5f51b443b2b4 100644 --- a/lib/datadog_api_client/v2/models/list_tags_response_data.rb +++ b/lib/datadog_api_client/v2/models/list_tags_response_data.rb @@ -30,6 +30,8 @@ class ListTagsResponseData # The type of the resource. The value should always be tags. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListTagsResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListTagsResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/list_tags_response_data_attributes.rb b/lib/datadog_api_client/v2/models/list_tags_response_data_attributes.rb index 1c97fe9851d2..2b8ff8d8999f 100644 --- a/lib/datadog_api_client/v2/models/list_tags_response_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/list_tags_response_data_attributes.rb @@ -24,6 +24,8 @@ class ListTagsResponseDataAttributes # The list of tags attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListTagsResponseDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ListTagsResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tags') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/log.rb b/lib/datadog_api_client/v2/models/log.rb index 96e3e1de623e..3e7741e47a26 100644 --- a/lib/datadog_api_client/v2/models/log.rb +++ b/lib/datadog_api_client/v2/models/log.rb @@ -30,6 +30,8 @@ class Log # Type of the event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Log` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Log`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/log_attributes.rb b/lib/datadog_api_client/v2/models/log_attributes.rb index 992ebf164caa..0ead271f7344 100644 --- a/lib/datadog_api_client/v2/models/log_attributes.rb +++ b/lib/datadog_api_client/v2/models/log_attributes.rb @@ -46,6 +46,8 @@ class LogAttributes # Timestamp of your log. attr_accessor :timestamp + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -82,12 +84,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -121,6 +125,26 @@ 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 @@ -134,6 +158,7 @@ def ==(o) status == o.status && tags == o.tags && timestamp == o.timestamp + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_aggregate_bucket.rb b/lib/datadog_api_client/v2/models/logs_aggregate_bucket.rb index e9bcc60c1079..ed3f673acc30 100644 --- a/lib/datadog_api_client/v2/models/logs_aggregate_bucket.rb +++ b/lib/datadog_api_client/v2/models/logs_aggregate_bucket.rb @@ -27,6 +27,8 @@ class LogsAggregateBucket # A map of the metric name -> value for regular compute or list of values for a timeseries attr_accessor :computes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsAggregateBucket` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsAggregateBucket`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'by') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && by == o.by && computes == o.computes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_aggregate_bucket_value_timeseries_point.rb b/lib/datadog_api_client/v2/models/logs_aggregate_bucket_value_timeseries_point.rb index c76c9b34a89d..ac6a355ab90d 100644 --- a/lib/datadog_api_client/v2/models/logs_aggregate_bucket_value_timeseries_point.rb +++ b/lib/datadog_api_client/v2/models/logs_aggregate_bucket_value_timeseries_point.rb @@ -27,6 +27,8 @@ class LogsAggregateBucketValueTimeseriesPoint # The value for this point attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsAggregateBucketValueTimeseriesPoint` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsAggregateBucketValueTimeseriesPoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && time == o.time && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_aggregate_request.rb b/lib/datadog_api_client/v2/models/logs_aggregate_request.rb index 07c214d00953..fbda2b8ea95a 100644 --- a/lib/datadog_api_client/v2/models/logs_aggregate_request.rb +++ b/lib/datadog_api_client/v2/models/logs_aggregate_request.rb @@ -37,6 +37,8 @@ class LogsAggregateRequest # Paging settings attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsAggregateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsAggregateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -102,6 +106,26 @@ 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 @@ -113,6 +137,7 @@ def ==(o) group_by == o.group_by && options == o.options && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_aggregate_request_page.rb b/lib/datadog_api_client/v2/models/logs_aggregate_request_page.rb index ec08449b13b2..466c5e7fe6dc 100644 --- a/lib/datadog_api_client/v2/models/logs_aggregate_request_page.rb +++ b/lib/datadog_api_client/v2/models/logs_aggregate_request_page.rb @@ -24,6 +24,8 @@ class LogsAggregateRequestPage # The returned paging point to use to get the next results. Note: at most 1000 results can be paged. attr_accessor :cursor + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsAggregateRequestPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsAggregateRequestPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && cursor == o.cursor + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_aggregate_response.rb b/lib/datadog_api_client/v2/models/logs_aggregate_response.rb index 7b18be28c598..f3f473842866 100644 --- a/lib/datadog_api_client/v2/models/logs_aggregate_response.rb +++ b/lib/datadog_api_client/v2/models/logs_aggregate_response.rb @@ -27,6 +27,8 @@ class LogsAggregateResponse # The metadata associated with a request attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsAggregateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsAggregateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_aggregate_response_data.rb b/lib/datadog_api_client/v2/models/logs_aggregate_response_data.rb index 4b63f0a5186a..c134501e76bf 100644 --- a/lib/datadog_api_client/v2/models/logs_aggregate_response_data.rb +++ b/lib/datadog_api_client/v2/models/logs_aggregate_response_data.rb @@ -24,6 +24,8 @@ class LogsAggregateResponseData # The list of matching buckets, one item per bucket attr_accessor :buckets + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsAggregateResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsAggregateResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'buckets') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && buckets == o.buckets + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_aggregate_sort.rb b/lib/datadog_api_client/v2/models/logs_aggregate_sort.rb index 4ec03bf432a8..28d993d807e2 100644 --- a/lib/datadog_api_client/v2/models/logs_aggregate_sort.rb +++ b/lib/datadog_api_client/v2/models/logs_aggregate_sort.rb @@ -33,6 +33,8 @@ class LogsAggregateSort # The type of sorting algorithm attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsAggregateSort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsAggregateSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) metric == o.metric && order == o.order && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive.rb b/lib/datadog_api_client/v2/models/logs_archive.rb index 5837d191d4ef..e90c25eb8395 100644 --- a/lib/datadog_api_client/v2/models/logs_archive.rb +++ b/lib/datadog_api_client/v2/models/logs_archive.rb @@ -24,6 +24,8 @@ class LogsArchive # The definition of an archive. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchive` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchive`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_attributes.rb b/lib/datadog_api_client/v2/models/logs_archive_attributes.rb index 1713a1fc7fec..7f926792fa8a 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_attributes.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_attributes.rb @@ -43,6 +43,8 @@ class LogsArchiveAttributes # The state of the archive. attr_accessor :state + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'destination') @@ -156,6 +160,26 @@ def query=(query) @query = query 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 @@ -169,6 +193,7 @@ def ==(o) rehydration_max_scan_size_in_gb == o.rehydration_max_scan_size_in_gb && rehydration_tags == o.rehydration_tags && state == o.state + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_create_request.rb b/lib/datadog_api_client/v2/models/logs_archive_create_request.rb index d83b5794eb94..7593255530dc 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_create_request.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_create_request.rb @@ -24,6 +24,8 @@ class LogsArchiveCreateRequest # The definition of an archive. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb b/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb index 164124b5ba3f..4bc705f1fbc0 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb @@ -40,6 +40,8 @@ class LogsArchiveCreateRequestAttributes # An array of tags to add to rehydrated logs from an archive. attr_accessor :rehydration_tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -82,12 +84,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveCreateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'destination') @@ -157,6 +161,26 @@ def query=(query) @query = query 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 @@ -169,6 +193,7 @@ def ==(o) query == o.query && rehydration_max_scan_size_in_gb == o.rehydration_max_scan_size_in_gb && rehydration_tags == o.rehydration_tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_create_request_definition.rb b/lib/datadog_api_client/v2/models/logs_archive_create_request_definition.rb index 555b6ab5b369..20f3a0d27a9b 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_create_request_definition.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_create_request_definition.rb @@ -27,6 +27,8 @@ class LogsArchiveCreateRequestDefinition # The type of the resource. The value should always be archives. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveCreateRequestDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveCreateRequestDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ def type=(type) @type = type 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_definition.rb b/lib/datadog_api_client/v2/models/logs_archive_definition.rb index 5440b53d7374..7d6711460c78 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_definition.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_definition.rb @@ -30,6 +30,8 @@ class LogsArchiveDefinition # The type of the resource. The value should always be archives. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_destination_azure.rb b/lib/datadog_api_client/v2/models/logs_archive_destination_azure.rb index d05ef42ed89e..ef38e7dfe4ea 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_destination_azure.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_destination_azure.rb @@ -39,6 +39,8 @@ class LogsArchiveDestinationAzure # Type of the Azure archive destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveDestinationAzure` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveDestinationAzure`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'container') @@ -157,6 +161,26 @@ def type=(type) @type = type 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 @@ -169,6 +193,7 @@ def ==(o) region == o.region && storage_account == o.storage_account && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_destination_gcs.rb b/lib/datadog_api_client/v2/models/logs_archive_destination_gcs.rb index 2041de968476..4703ef0fe9fa 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_destination_gcs.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_destination_gcs.rb @@ -33,6 +33,8 @@ class LogsArchiveDestinationGCS # Type of the GCS archive destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveDestinationGCS` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveDestinationGCS`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'bucket') @@ -128,6 +132,26 @@ def type=(type) @type = type 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 @@ -138,6 +162,7 @@ def ==(o) integration == o.integration && path == o.path && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_destination_s3.rb b/lib/datadog_api_client/v2/models/logs_archive_destination_s3.rb index a32297d5f9a3..3da43b725834 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_destination_s3.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_destination_s3.rb @@ -33,6 +33,8 @@ class LogsArchiveDestinationS3 # Type of the S3 archive destination. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveDestinationS3` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveDestinationS3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'bucket') @@ -128,6 +132,26 @@ def type=(type) @type = type 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 @@ -138,6 +162,7 @@ def ==(o) integration == o.integration && path == o.path && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_integration_azure.rb b/lib/datadog_api_client/v2/models/logs_archive_integration_azure.rb index da65f728925b..7aaa1c2229d5 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_integration_azure.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_integration_azure.rb @@ -27,6 +27,8 @@ class LogsArchiveIntegrationAzure # A tenant ID. attr_reader :tenant_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveIntegrationAzure` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveIntegrationAzure`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'client_id') @@ -99,6 +103,26 @@ def tenant_id=(tenant_id) @tenant_id = tenant_id 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && client_id == o.client_id && tenant_id == o.tenant_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb b/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb index fa8c2dca040d..bb570892796c 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb @@ -27,6 +27,8 @@ class LogsArchiveIntegrationGCS # A project ID. attr_accessor :project_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveIntegrationGCS` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveIntegrationGCS`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'client_email') @@ -88,6 +92,26 @@ def client_email=(client_email) @client_email = client_email 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && client_email == o.client_email && project_id == o.project_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_integration_s3.rb b/lib/datadog_api_client/v2/models/logs_archive_integration_s3.rb index 2c3f3246a08b..dc805933788d 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_integration_s3.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_integration_s3.rb @@ -27,6 +27,8 @@ class LogsArchiveIntegrationS3 # The path of the integration. attr_reader :role_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveIntegrationS3` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveIntegrationS3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_id') @@ -99,6 +103,26 @@ def role_name=(role_name) @role_name = role_name 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && account_id == o.account_id && role_name == o.role_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_order.rb b/lib/datadog_api_client/v2/models/logs_archive_order.rb index 34c3f306363b..2eb86fe1382d 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_order.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_order.rb @@ -24,6 +24,8 @@ class LogsArchiveOrder # The definition of an archive order. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveOrder` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_order_attributes.rb b/lib/datadog_api_client/v2/models/logs_archive_order_attributes.rb index 76f6b1638ab3..d6d8ef6c88be 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_order_attributes.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_order_attributes.rb @@ -25,6 +25,8 @@ class LogsArchiveOrderAttributes # define the overall archives order for Datadog. attr_reader :archive_ids + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveOrderAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveOrderAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'archive_ids') @@ -82,6 +86,26 @@ def archive_ids=(archive_ids) @archive_ids = archive_ids 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 @@ -89,6 +113,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && archive_ids == o.archive_ids + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archive_order_definition.rb b/lib/datadog_api_client/v2/models/logs_archive_order_definition.rb index b2b16a187511..e29f4edce297 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_order_definition.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_order_definition.rb @@ -27,6 +27,8 @@ class LogsArchiveOrderDefinition # Type of the archive order definition. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchiveOrderDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchiveOrderDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_archives.rb b/lib/datadog_api_client/v2/models/logs_archives.rb index f0c063dcf382..3a317a1384b5 100644 --- a/lib/datadog_api_client/v2/models/logs_archives.rb +++ b/lib/datadog_api_client/v2/models/logs_archives.rb @@ -24,6 +24,8 @@ class LogsArchives # A list of archives. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsArchives` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsArchives`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_compute.rb b/lib/datadog_api_client/v2/models/logs_compute.rb index f40742e5dddf..ea4413635cc9 100644 --- a/lib/datadog_api_client/v2/models/logs_compute.rb +++ b/lib/datadog_api_client/v2/models/logs_compute.rb @@ -34,6 +34,8 @@ class LogsCompute # The type of compute attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -107,6 +111,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -117,6 +141,7 @@ def ==(o) interval == o.interval && metric == o.metric && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_group_by.rb b/lib/datadog_api_client/v2/models/logs_group_by.rb index d71b02d4b34e..47532cf0ee8c 100644 --- a/lib/datadog_api_client/v2/models/logs_group_by.rb +++ b/lib/datadog_api_client/v2/models/logs_group_by.rb @@ -41,6 +41,8 @@ class LogsGroupBy # A resulting object to put the given computes in over all the matching records. attr_accessor :total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -75,12 +77,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -126,6 +130,26 @@ def facet=(facet) @facet = facet 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 @@ -138,6 +162,7 @@ def ==(o) missing == o.missing && sort == o.sort && total == o.total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_group_by_histogram.rb b/lib/datadog_api_client/v2/models/logs_group_by_histogram.rb index bea69e7f6c94..42f10dadb9f2 100644 --- a/lib/datadog_api_client/v2/models/logs_group_by_histogram.rb +++ b/lib/datadog_api_client/v2/models/logs_group_by_histogram.rb @@ -33,6 +33,8 @@ class LogsGroupByHistogram # (values smaller than this one are filtered out) attr_reader :min + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsGroupByHistogram` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsGroupByHistogram`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'interval') @@ -122,6 +126,26 @@ def min=(min) @min = min 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 @@ -131,6 +155,7 @@ def ==(o) interval == o.interval && max == o.max && min == o.min + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_list_request.rb b/lib/datadog_api_client/v2/models/logs_list_request.rb index bd2c31f6d19b..d4d25125a353 100644 --- a/lib/datadog_api_client/v2/models/logs_list_request.rb +++ b/lib/datadog_api_client/v2/models/logs_list_request.rb @@ -34,6 +34,8 @@ class LogsListRequest # Sort parameters when querying logs. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsListRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -89,6 +93,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) options == o.options && page == o.page && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_list_request_page.rb b/lib/datadog_api_client/v2/models/logs_list_request_page.rb index 445c9e68a294..f96c6646ec54 100644 --- a/lib/datadog_api_client/v2/models/logs_list_request_page.rb +++ b/lib/datadog_api_client/v2/models/logs_list_request_page.rb @@ -27,6 +27,8 @@ class LogsListRequestPage # Maximum number of logs in the response. attr_reader :limit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsListRequestPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsListRequestPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -88,6 +92,26 @@ def limit=(limit) @limit = limit 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && cursor == o.cursor && limit == o.limit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_list_response.rb b/lib/datadog_api_client/v2/models/logs_list_response.rb index b257feb8e822..396fde6e6065 100644 --- a/lib/datadog_api_client/v2/models/logs_list_response.rb +++ b/lib/datadog_api_client/v2/models/logs_list_response.rb @@ -30,6 +30,8 @@ class LogsListResponse # The metadata associated with a request attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_list_response_links.rb b/lib/datadog_api_client/v2/models/logs_list_response_links.rb index 803d74f2310b..89426a558899 100644 --- a/lib/datadog_api_client/v2/models/logs_list_response_links.rb +++ b/lib/datadog_api_client/v2/models/logs_list_response_links.rb @@ -25,6 +25,8 @@ class LogsListResponseLinks # POST endpoint. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsListResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsListResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_compute.rb b/lib/datadog_api_client/v2/models/logs_metric_compute.rb index e2ee8e59e85f..b67c04bc25a5 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_compute.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_compute.rb @@ -31,6 +31,8 @@ class LogsMetricCompute # The path to the value the log-based metric will aggregate on (only used if the aggregation type is a "distribution"). attr_accessor :path + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation_type') @@ -98,6 +102,26 @@ def aggregation_type=(aggregation_type) @aggregation_type = aggregation_type 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 @@ -107,6 +131,7 @@ def ==(o) aggregation_type == o.aggregation_type && include_percentiles == o.include_percentiles && path == o.path + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_create_attributes.rb b/lib/datadog_api_client/v2/models/logs_metric_create_attributes.rb index cf4ee35ff9a2..7068321a7eb8 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_create_attributes.rb @@ -30,6 +30,8 @@ class LogsMetricCreateAttributes # The rules for the group by. attr_accessor :group_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -99,6 +103,26 @@ def compute=(compute) @compute = compute 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 @@ -108,6 +132,7 @@ def ==(o) compute == o.compute && filter == o.filter && group_by == o.group_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_create_data.rb b/lib/datadog_api_client/v2/models/logs_metric_create_data.rb index fd501837a5f8..9e48db58c5df 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_create_data.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_create_data.rb @@ -30,6 +30,8 @@ class LogsMetricCreateData # The type of the resource. The value should always be logs_metrics. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_create_request.rb b/lib/datadog_api_client/v2/models/logs_metric_create_request.rb index b27680affdae..6fccdd1b530a 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_create_request.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_create_request.rb @@ -24,6 +24,8 @@ class LogsMetricCreateRequest # The new log-based metric properties. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_filter.rb b/lib/datadog_api_client/v2/models/logs_metric_filter.rb index fd38ecf14bee..88c624061a68 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_filter.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_filter.rb @@ -24,6 +24,8 @@ class LogsMetricFilter # The search query - following the log search syntax. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_group_by.rb b/lib/datadog_api_client/v2/models/logs_metric_group_by.rb index 877a3963e525..372e1963049d 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_group_by.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_group_by.rb @@ -27,6 +27,8 @@ class LogsMetricGroupBy # Eventual name of the tag that gets created. By default, the path attribute is used as the tag name. attr_accessor :tag_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'path') @@ -88,6 +92,26 @@ def path=(path) @path = path 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && path == o.path && tag_name == o.tag_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_response.rb b/lib/datadog_api_client/v2/models/logs_metric_response.rb index 8c530f5d5fed..f3b8450460a6 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_response.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_response.rb @@ -24,6 +24,8 @@ class LogsMetricResponse # The log-based metric properties. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_response_attributes.rb b/lib/datadog_api_client/v2/models/logs_metric_response_attributes.rb index 55b5fe9a4d6b..54c7fe792326 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_response_attributes.rb @@ -30,6 +30,8 @@ class LogsMetricResponseAttributes # The rules for the group by. attr_accessor :group_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) compute == o.compute && filter == o.filter && group_by == o.group_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_response_compute.rb b/lib/datadog_api_client/v2/models/logs_metric_response_compute.rb index ffe4e45dd1c8..b43708c7cc2f 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_response_compute.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_response_compute.rb @@ -31,6 +31,8 @@ class LogsMetricResponseCompute # The path to the value the log-based metric will aggregate on (only used if the aggregation type is a "distribution"). attr_accessor :path + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricResponseCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricResponseCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation_type') @@ -80,6 +84,26 @@ 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 @@ -89,6 +113,7 @@ def ==(o) aggregation_type == o.aggregation_type && include_percentiles == o.include_percentiles && path == o.path + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_response_data.rb b/lib/datadog_api_client/v2/models/logs_metric_response_data.rb index d4bf8adef71d..d8d948183f7e 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_response_data.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_response_data.rb @@ -30,6 +30,8 @@ class LogsMetricResponseData # The type of the resource. The value should always be logs_metrics. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_response_filter.rb b/lib/datadog_api_client/v2/models/logs_metric_response_filter.rb index 45b94ced8f50..74eeb71d1aea 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_response_filter.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_response_filter.rb @@ -24,6 +24,8 @@ class LogsMetricResponseFilter # The search query - following the log search syntax. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricResponseFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricResponseFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_response_group_by.rb b/lib/datadog_api_client/v2/models/logs_metric_response_group_by.rb index 2dc7b15c8b48..36480a12701f 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_response_group_by.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_response_group_by.rb @@ -27,6 +27,8 @@ class LogsMetricResponseGroupBy # Eventual name of the tag that gets created. By default, the path attribute is used as the tag name. attr_accessor :tag_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricResponseGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricResponseGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'path') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && path == o.path && tag_name == o.tag_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_update_attributes.rb b/lib/datadog_api_client/v2/models/logs_metric_update_attributes.rb index e9d32f0249c3..9f6c7df29c60 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_update_attributes.rb @@ -30,6 +30,8 @@ class LogsMetricUpdateAttributes # The rules for the group by. attr_accessor :group_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) compute == o.compute && filter == o.filter && group_by == o.group_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_update_compute.rb b/lib/datadog_api_client/v2/models/logs_metric_update_compute.rb index 65b39b37a686..47042092173b 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_update_compute.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_update_compute.rb @@ -25,6 +25,8 @@ class LogsMetricUpdateCompute # Only present when the `aggregation_type` is `distribution`. attr_accessor :include_percentiles + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricUpdateCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricUpdateCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'include_percentiles') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && include_percentiles == o.include_percentiles + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_update_data.rb b/lib/datadog_api_client/v2/models/logs_metric_update_data.rb index 1886cc9a7f23..8691f115a47c 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_update_data.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_update_data.rb @@ -27,6 +27,8 @@ class LogsMetricUpdateData # The type of the resource. The value should always be logs_metrics. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metric_update_request.rb b/lib/datadog_api_client/v2/models/logs_metric_update_request.rb index a2d4980f93f9..2ec0ee5d18f6 100644 --- a/lib/datadog_api_client/v2/models/logs_metric_update_request.rb +++ b/lib/datadog_api_client/v2/models/logs_metric_update_request.rb @@ -24,6 +24,8 @@ class LogsMetricUpdateRequest # The new log-based metric properties. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_metrics_response.rb b/lib/datadog_api_client/v2/models/logs_metrics_response.rb index 8b261898ef69..7bb1f58fd83e 100644 --- a/lib/datadog_api_client/v2/models/logs_metrics_response.rb +++ b/lib/datadog_api_client/v2/models/logs_metrics_response.rb @@ -24,6 +24,8 @@ class LogsMetricsResponse # A list of log-based metric objects. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsMetricsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsMetricsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_query_filter.rb b/lib/datadog_api_client/v2/models/logs_query_filter.rb index 57d2de8c36f7..206fe3982fe1 100644 --- a/lib/datadog_api_client/v2/models/logs_query_filter.rb +++ b/lib/datadog_api_client/v2/models/logs_query_filter.rb @@ -36,6 +36,8 @@ class LogsQueryFilter # The maximum time for the requested logs, supports date math and regular timestamps (milliseconds). attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsQueryFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsQueryFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -99,6 +103,26 @@ 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 @@ -110,6 +134,7 @@ def ==(o) query == o.query && storage_tier == o.storage_tier && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_query_options.rb b/lib/datadog_api_client/v2/models/logs_query_options.rb index 83a43b7f8fd7..31ea1a71e673 100644 --- a/lib/datadog_api_client/v2/models/logs_query_options.rb +++ b/lib/datadog_api_client/v2/models/logs_query_options.rb @@ -28,6 +28,8 @@ class LogsQueryOptions # The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsQueryOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsQueryOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time_offset') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && time_offset == o.time_offset && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_response_metadata.rb b/lib/datadog_api_client/v2/models/logs_response_metadata.rb index 78139eb13435..47bddc2b7224 100644 --- a/lib/datadog_api_client/v2/models/logs_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/logs_response_metadata.rb @@ -37,6 +37,8 @@ class LogsResponseMetadata # warnings are present in the response. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elapsed') @@ -100,6 +104,26 @@ 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 @@ -111,6 +135,7 @@ def ==(o) request_id == o.request_id && status == o.status && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_response_metadata_page.rb b/lib/datadog_api_client/v2/models/logs_response_metadata_page.rb index b274d0dcb972..3eaf3a778d51 100644 --- a/lib/datadog_api_client/v2/models/logs_response_metadata_page.rb +++ b/lib/datadog_api_client/v2/models/logs_response_metadata_page.rb @@ -25,6 +25,8 @@ class LogsResponseMetadataPage # parameters with the addition of the `page[cursor]`. attr_accessor :after + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsResponseMetadataPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsResponseMetadataPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'after') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && after == o.after + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/logs_warning.rb b/lib/datadog_api_client/v2/models/logs_warning.rb index 2614927ba05e..9293533c7f6f 100644 --- a/lib/datadog_api_client/v2/models/logs_warning.rb +++ b/lib/datadog_api_client/v2/models/logs_warning.rb @@ -30,6 +30,8 @@ class LogsWarning # A short human-readable summary of the warning attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LogsWarning` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::LogsWarning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) code == o.code && detail == o.detail && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric.rb b/lib/datadog_api_client/v2/models/metric.rb index 1c87171b2cb6..2603080317c5 100644 --- a/lib/datadog_api_client/v2/models/metric.rb +++ b/lib/datadog_api_client/v2/models/metric.rb @@ -27,6 +27,8 @@ class Metric # The metric resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Metric` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Metric`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_all_tags.rb b/lib/datadog_api_client/v2/models/metric_all_tags.rb index cd9d13cddfad..cea3b2611bbd 100644 --- a/lib/datadog_api_client/v2/models/metric_all_tags.rb +++ b/lib/datadog_api_client/v2/models/metric_all_tags.rb @@ -30,6 +30,8 @@ class MetricAllTags # The metric resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAllTags` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAllTags`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_all_tags_attributes.rb b/lib/datadog_api_client/v2/models/metric_all_tags_attributes.rb index 22dfbfffbe55..9e5f7824c115 100644 --- a/lib/datadog_api_client/v2/models/metric_all_tags_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_all_tags_attributes.rb @@ -24,6 +24,8 @@ class MetricAllTagsAttributes # List of indexed tag value pairs. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAllTagsAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAllTagsAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tags') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_all_tags_response.rb b/lib/datadog_api_client/v2/models/metric_all_tags_response.rb index 045859d314be..b0bf6f70c583 100644 --- a/lib/datadog_api_client/v2/models/metric_all_tags_response.rb +++ b/lib/datadog_api_client/v2/models/metric_all_tags_response.rb @@ -24,6 +24,8 @@ class MetricAllTagsResponse # Object for a single metric's indexed tags. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAllTagsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAllTagsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_attributes.rb b/lib/datadog_api_client/v2/models/metric_asset_attributes.rb index 0eb28a9488a0..ebbc04f67b82 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_attributes.rb @@ -24,6 +24,8 @@ class MetricAssetAttributes # Title of the asset. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'title') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb b/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb index b539f5158cd2..77b445c39024 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb @@ -27,6 +27,8 @@ class MetricAssetDashboardRelationship # Dashboard resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetDashboardRelationship` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetDashboardRelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb b/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb index 92e26b3dcc69..b95048faef74 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb @@ -24,6 +24,8 @@ class MetricAssetDashboardRelationships # A list of dashboards that can be referenced in the `included` data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetDashboardRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetDashboardRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb b/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb index 59f097644860..e4f59668f390 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb @@ -27,6 +27,8 @@ class MetricAssetMonitorRelationship # Monitor resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetMonitorRelationship` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetMonitorRelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb b/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb index b0da7dbf05a9..df0a5baa95d5 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb @@ -24,6 +24,8 @@ class MetricAssetMonitorRelationships # A list of monitors that can be referenced in the `included` data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetMonitorRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetMonitorRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb b/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb index 1919245ccbed..2860f78c97a9 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb @@ -27,6 +27,8 @@ class MetricAssetNotebookRelationship # Notebook resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetNotebookRelationship` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetNotebookRelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb b/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb index 551b8e58d85b..59ceadff7d4b 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb @@ -24,6 +24,8 @@ class MetricAssetNotebookRelationships # A list of notebooks that can be referenced in the `included` data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetNotebookRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetNotebookRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_response_data.rb b/lib/datadog_api_client/v2/models/metric_asset_response_data.rb index 72aab0bed719..9f2e48a3e72b 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_response_data.rb @@ -30,6 +30,8 @@ class MetricAssetResponseData # The metric resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb b/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb index 633408480416..cc98efa329d7 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb @@ -33,6 +33,8 @@ class MetricAssetResponseRelationships # An object containing a list of SLOs that can be referenced in the `included` data. attr_accessor :slos + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetResponseRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetResponseRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dashboards') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) monitors == o.monitors && notebooks == o.notebooks && slos == o.slos + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb b/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb index 24fd495f37c6..0f12bd4fc772 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb @@ -27,6 +27,8 @@ class MetricAssetSLORelationship # SLO resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetSLORelationship` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetSLORelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb b/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb index b01407460b0d..088778500e4b 100644 --- a/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +++ b/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb @@ -24,6 +24,8 @@ class MetricAssetSLORelationships # A list of SLOs that can be referenced in the `included` data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetSLORelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetSLORelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_assets_response.rb b/lib/datadog_api_client/v2/models/metric_assets_response.rb index feb3719d457a..197eee8c11e5 100644 --- a/lib/datadog_api_client/v2/models/metric_assets_response.rb +++ b/lib/datadog_api_client/v2/models/metric_assets_response.rb @@ -27,6 +27,8 @@ class MetricAssetsResponse # Array of objects related to the metric assets. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create.rb index 8125036969a2..065e3857a781 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create.rb @@ -30,6 +30,8 @@ class MetricBulkTagConfigCreate # The metric bulk configure tags resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb index f73b0921b06f..dd87cace3cd0 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb @@ -32,6 +32,8 @@ class MetricBulkTagConfigCreateAttributes # A list of tag names to apply to the configuration. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -60,12 +62,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'emails') @@ -85,6 +89,26 @@ 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 @@ -94,6 +118,7 @@ def ==(o) emails == o.emails && exclude_tags_mode == o.exclude_tags_mode && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_request.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_request.rb index 5170432d4cbb..68fbdb5d9937 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_request.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_request.rb @@ -24,6 +24,8 @@ class MetricBulkTagConfigCreateRequest # Request object to bulk configure tags for metrics matching the given prefix. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete.rb index 90c7e379a448..06844b0f3f90 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete.rb @@ -30,6 +30,8 @@ class MetricBulkTagConfigDelete # The metric bulk configure tags resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigDelete` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigDelete`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_attributes.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_attributes.rb index c512df7e6625..c57429754b3b 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_attributes.rb @@ -24,6 +24,8 @@ class MetricBulkTagConfigDeleteAttributes # A list of account emails to notify when the configuration is applied. attr_accessor :emails + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigDeleteAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigDeleteAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'emails') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && emails == o.emails + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_request.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_request.rb index 93e43b39aaff..727a0ffa138f 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_request.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_request.rb @@ -24,6 +24,8 @@ class MetricBulkTagConfigDeleteRequest # Request object to bulk delete all tag configurations for metrics matching the given prefix. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigDeleteRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_response.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_response.rb index eee737bfeed5..4d9d06d338f4 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_response.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_response.rb @@ -25,6 +25,8 @@ class MetricBulkTagConfigResponse # It contains the fields from the original request for reference. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status.rb index 11d8ec5ef220..be008570a176 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status.rb @@ -31,6 +31,8 @@ class MetricBulkTagConfigStatus # The metric bulk configure tags resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigStatus` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -109,6 +113,26 @@ def type=(type) @type = type 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 @@ -118,6 +142,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb index fd3407211fbe..e5627a997666 100644 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb @@ -34,6 +34,8 @@ class MetricBulkTagConfigStatusAttributes # A list of tag names to apply to the configuration. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigStatusAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricBulkTagConfigStatusAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'emails') @@ -93,6 +97,26 @@ 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 @@ -103,6 +127,7 @@ def ==(o) exclude_tags_mode == o.exclude_tags_mode && status == o.status && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_custom_aggregation.rb b/lib/datadog_api_client/v2/models/metric_custom_aggregation.rb index b05827edf81c..b504661b5398 100644 --- a/lib/datadog_api_client/v2/models/metric_custom_aggregation.rb +++ b/lib/datadog_api_client/v2/models/metric_custom_aggregation.rb @@ -27,6 +27,8 @@ class MetricCustomAggregation # A time aggregation for use in query. attr_reader :time + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricCustomAggregation` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricCustomAggregation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'space') @@ -99,6 +103,26 @@ def time=(time) @time = time 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && space == o.space && time == o.time + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb b/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb index 76f47b6133e7..a3abcde1c3df 100644 --- a/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +++ b/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb @@ -30,6 +30,8 @@ class MetricDashboardAsset # Dashboard resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricDashboardAsset` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricDashboardAsset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb b/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb index 916ec3208441..066e0f4fab80 100644 --- a/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb @@ -27,6 +27,8 @@ class MetricDashboardAttributes # Title of the asset. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricDashboardAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricDashboardAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'popularity') @@ -92,6 +96,26 @@ def popularity=(popularity) @popularity = popularity 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 @@ -100,6 +124,7 @@ def ==(o) self.class == o.class && popularity == o.popularity && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_distinct_volume.rb b/lib/datadog_api_client/v2/models/metric_distinct_volume.rb index f92c1aa24366..7c2988a491e6 100644 --- a/lib/datadog_api_client/v2/models/metric_distinct_volume.rb +++ b/lib/datadog_api_client/v2/models/metric_distinct_volume.rb @@ -30,6 +30,8 @@ class MetricDistinctVolume # The metric distinct volume type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricDistinctVolume` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricDistinctVolume`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_distinct_volume_attributes.rb b/lib/datadog_api_client/v2/models/metric_distinct_volume_attributes.rb index 0484fa7df344..da1f3622cb6c 100644 --- a/lib/datadog_api_client/v2/models/metric_distinct_volume_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_distinct_volume_attributes.rb @@ -24,6 +24,8 @@ class MetricDistinctVolumeAttributes # Distinct volume for the given metric. attr_accessor :distinct_volume + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricDistinctVolumeAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricDistinctVolumeAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'distinct_volume') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && distinct_volume == o.distinct_volume + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_estimate.rb b/lib/datadog_api_client/v2/models/metric_estimate.rb index 845c2ba306ba..6fd4365cfb6a 100644 --- a/lib/datadog_api_client/v2/models/metric_estimate.rb +++ b/lib/datadog_api_client/v2/models/metric_estimate.rb @@ -30,6 +30,8 @@ class MetricEstimate # The metric estimate resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricEstimate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricEstimate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_estimate_attributes.rb b/lib/datadog_api_client/v2/models/metric_estimate_attributes.rb index 0cf466629563..1b014794beb0 100644 --- a/lib/datadog_api_client/v2/models/metric_estimate_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_estimate_attributes.rb @@ -30,6 +30,8 @@ class MetricEstimateAttributes # Estimated cardinality of the metric based on the queried configuration. attr_accessor :estimated_output_series + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricEstimateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricEstimateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'estimate_type') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) estimate_type == o.estimate_type && estimated_at == o.estimated_at && estimated_output_series == o.estimated_output_series + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_estimate_response.rb b/lib/datadog_api_client/v2/models/metric_estimate_response.rb index badc3e9eaeef..48a3b5cf0c79 100644 --- a/lib/datadog_api_client/v2/models/metric_estimate_response.rb +++ b/lib/datadog_api_client/v2/models/metric_estimate_response.rb @@ -24,6 +24,8 @@ class MetricEstimateResponse # Object for a metric cardinality estimate. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricEstimateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricEstimateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_ingested_indexed_volume.rb b/lib/datadog_api_client/v2/models/metric_ingested_indexed_volume.rb index f0f857abca5d..11441c2fad1d 100644 --- a/lib/datadog_api_client/v2/models/metric_ingested_indexed_volume.rb +++ b/lib/datadog_api_client/v2/models/metric_ingested_indexed_volume.rb @@ -30,6 +30,8 @@ class MetricIngestedIndexedVolume # The metric ingested and indexed volume type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricIngestedIndexedVolume` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricIngestedIndexedVolume`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_ingested_indexed_volume_attributes.rb b/lib/datadog_api_client/v2/models/metric_ingested_indexed_volume_attributes.rb index 324fd174f926..5746d66c8d32 100644 --- a/lib/datadog_api_client/v2/models/metric_ingested_indexed_volume_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_ingested_indexed_volume_attributes.rb @@ -27,6 +27,8 @@ class MetricIngestedIndexedVolumeAttributes # Ingested volume for the given metric. attr_accessor :ingested_volume + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricIngestedIndexedVolumeAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricIngestedIndexedVolumeAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'indexed_volume') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && indexed_volume == o.indexed_volume && ingested_volume == o.ingested_volume + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_metadata.rb b/lib/datadog_api_client/v2/models/metric_metadata.rb index 138d6e37b560..d441501f4745 100644 --- a/lib/datadog_api_client/v2/models/metric_metadata.rb +++ b/lib/datadog_api_client/v2/models/metric_metadata.rb @@ -24,6 +24,8 @@ class MetricMetadata # Metric origin information. attr_accessor :origin + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'origin') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && origin == o.origin + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_monitor_asset.rb b/lib/datadog_api_client/v2/models/metric_monitor_asset.rb index a768ae1c7269..27af1af69127 100644 --- a/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +++ b/lib/datadog_api_client/v2/models/metric_monitor_asset.rb @@ -30,6 +30,8 @@ class MetricMonitorAsset # Monitor resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricMonitorAsset` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricMonitorAsset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_notebook_asset.rb b/lib/datadog_api_client/v2/models/metric_notebook_asset.rb index bb8086b11d45..cdc6c4c17668 100644 --- a/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +++ b/lib/datadog_api_client/v2/models/metric_notebook_asset.rb @@ -30,6 +30,8 @@ class MetricNotebookAsset # Notebook resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricNotebookAsset` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricNotebookAsset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_origin.rb b/lib/datadog_api_client/v2/models/metric_origin.rb index ef222851ec74..74ed1facea51 100644 --- a/lib/datadog_api_client/v2/models/metric_origin.rb +++ b/lib/datadog_api_client/v2/models/metric_origin.rb @@ -30,6 +30,8 @@ class MetricOrigin # The origin service code attr_reader :service + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricOrigin` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricOrigin`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'metric_type') @@ -119,6 +123,26 @@ def service=(service) @service = service 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 @@ -128,6 +152,7 @@ def ==(o) metric_type == o.metric_type && product == o.product && service == o.service + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_payload.rb b/lib/datadog_api_client/v2/models/metric_payload.rb index 1d327af00593..9f726ab051aa 100644 --- a/lib/datadog_api_client/v2/models/metric_payload.rb +++ b/lib/datadog_api_client/v2/models/metric_payload.rb @@ -24,6 +24,8 @@ class MetricPayload # A list of timeseries to submit to Datadog. attr_reader :series + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricPayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'series') @@ -81,6 +85,26 @@ def series=(series) @series = series 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && series == o.series + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_point.rb b/lib/datadog_api_client/v2/models/metric_point.rb index 34521aa24e47..28bf2d9de1d3 100644 --- a/lib/datadog_api_client/v2/models/metric_point.rb +++ b/lib/datadog_api_client/v2/models/metric_point.rb @@ -28,6 +28,8 @@ class MetricPoint # The numeric value format should be a 64bit float gauge-type value. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricPoint` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricPoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'timestamp') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && timestamp == o.timestamp && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_resource.rb b/lib/datadog_api_client/v2/models/metric_resource.rb index ce7aba3669a0..7d2435bc0e76 100644 --- a/lib/datadog_api_client/v2/models/metric_resource.rb +++ b/lib/datadog_api_client/v2/models/metric_resource.rb @@ -27,6 +27,8 @@ class MetricResource # The type of the resource. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricResource` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricResource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_series.rb b/lib/datadog_api_client/v2/models/metric_series.rb index 90029d9f06ba..3ac88a526c53 100644 --- a/lib/datadog_api_client/v2/models/metric_series.rb +++ b/lib/datadog_api_client/v2/models/metric_series.rb @@ -49,6 +49,8 @@ class MetricSeries # The unit of point value. attr_accessor :unit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -89,12 +91,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricSeries` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricSeries`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'interval') @@ -169,6 +173,26 @@ def points=(points) @points = points 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 @@ -184,6 +208,7 @@ def ==(o) tags == o.tags && type == o.type && unit == o.unit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_slo_asset.rb b/lib/datadog_api_client/v2/models/metric_slo_asset.rb index a333b49b523e..617c223ff578 100644 --- a/lib/datadog_api_client/v2/models/metric_slo_asset.rb +++ b/lib/datadog_api_client/v2/models/metric_slo_asset.rb @@ -30,6 +30,8 @@ class MetricSLOAsset # SLO resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricSLOAsset` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricSLOAsset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb b/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb index 7fa7fcbb2025..54db2a0c41e1 100644 --- a/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +++ b/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb @@ -30,6 +30,8 @@ class MetricSuggestedTagsAndAggregations # The metric actively queried configuration resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricSuggestedTagsAndAggregations` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricSuggestedTagsAndAggregations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb b/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb index b68d1462b71b..98571d229250 100644 --- a/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +++ b/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb @@ -24,6 +24,8 @@ class MetricSuggestedTagsAndAggregationsResponse # Object for a single metric's actively queried tags and aggregations. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricSuggestedTagsAndAggregationsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricSuggestedTagsAndAggregationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb b/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb index d5d66616bd1d..bd0f9c27a944 100644 --- a/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb @@ -27,6 +27,8 @@ class MetricSuggestedTagsAttributes # List of tag keys that have been actively queried. attr_accessor :active_tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricSuggestedTagsAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricSuggestedTagsAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'active_aggregations') @@ -74,6 +78,26 @@ 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 @@ -82,6 +106,7 @@ def ==(o) self.class == o.class && active_aggregations == o.active_aggregations && active_tags == o.active_tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration.rb index 66c93aed9fca..cff18367f3c8 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration.rb @@ -30,6 +30,8 @@ class MetricTagConfiguration # The metric tag configuration resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfiguration` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb index 9140dfde475a..59154b0d5973 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb @@ -60,6 +60,8 @@ class MetricTagConfigurationAttributes # List of tag keys on which to group. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -96,12 +98,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregations') @@ -137,6 +141,26 @@ 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 @@ -150,6 +174,7 @@ def ==(o) metric_type == o.metric_type && modified_at == o.modified_at && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb index 6271ea0ca74b..eee27d56415d 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb @@ -54,6 +54,8 @@ class MetricTagConfigurationCreateAttributes # A list of tag keys that will be queryable for your metric. attr_reader :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -86,12 +88,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregations') @@ -148,6 +152,26 @@ def tags=(tags) @tags = tags 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 @@ -159,6 +183,7 @@ def ==(o) include_percentiles == o.include_percentiles && metric_type == o.metric_type && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration_create_data.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration_create_data.rb index b7d49bfbe1d3..2ffc94fff8e7 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration_create_data.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration_create_data.rb @@ -30,6 +30,8 @@ class MetricTagConfigurationCreateData # The metric tag configuration resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration_create_request.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration_create_request.rb index cde5cbb8330a..aaae38173e18 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration_create_request.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration_create_request.rb @@ -24,6 +24,8 @@ class MetricTagConfigurationCreateRequest # Object for a single metric to be configure tags on. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration_response.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration_response.rb index 8737fad2c35f..686b0b6701b8 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration_response.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration_response.rb @@ -24,6 +24,8 @@ class MetricTagConfigurationResponse # Object for a single metric tag configuration. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb index 1e634ce3b1b1..09a40ecbce0f 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb @@ -51,6 +51,8 @@ class MetricTagConfigurationUpdateAttributes # A list of tag keys that will be queryable for your metric. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -81,12 +83,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregations') @@ -110,6 +114,26 @@ 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 @@ -120,6 +144,7 @@ def ==(o) exclude_tags_mode == o.exclude_tags_mode && include_percentiles == o.include_percentiles && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration_update_data.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration_update_data.rb index 36907296000e..08aacf00095d 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration_update_data.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration_update_data.rb @@ -30,6 +30,8 @@ class MetricTagConfigurationUpdateData # The metric tag configuration resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_tag_configuration_update_request.rb b/lib/datadog_api_client/v2/models/metric_tag_configuration_update_request.rb index 83149a1ddaae..2068820e2ad7 100644 --- a/lib/datadog_api_client/v2/models/metric_tag_configuration_update_request.rb +++ b/lib/datadog_api_client/v2/models/metric_tag_configuration_update_request.rb @@ -24,6 +24,8 @@ class MetricTagConfigurationUpdateRequest # Object for a single tag configuration to be edited. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricTagConfigurationUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricTagConfigurationUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metric_volumes_response.rb b/lib/datadog_api_client/v2/models/metric_volumes_response.rb index ee34275d90fe..eaf03f10c449 100644 --- a/lib/datadog_api_client/v2/models/metric_volumes_response.rb +++ b/lib/datadog_api_client/v2/models/metric_volumes_response.rb @@ -24,6 +24,8 @@ class MetricVolumesResponse # Possible response objects for a metric's volume. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricVolumesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricVolumesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metrics_and_metric_tag_configurations_response.rb b/lib/datadog_api_client/v2/models/metrics_and_metric_tag_configurations_response.rb index 1d75876108be..665a63af240e 100644 --- a/lib/datadog_api_client/v2/models/metrics_and_metric_tag_configurations_response.rb +++ b/lib/datadog_api_client/v2/models/metrics_and_metric_tag_configurations_response.rb @@ -24,6 +24,8 @@ class MetricsAndMetricTagConfigurationsResponse # Array of metrics and metric tag configurations. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricsAndMetricTagConfigurationsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricsAndMetricTagConfigurationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metrics_scalar_query.rb b/lib/datadog_api_client/v2/models/metrics_scalar_query.rb index 9a86164275c7..c8b52d116a3e 100644 --- a/lib/datadog_api_client/v2/models/metrics_scalar_query.rb +++ b/lib/datadog_api_client/v2/models/metrics_scalar_query.rb @@ -33,6 +33,8 @@ class MetricsScalarQuery # A classic metrics query string. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricsScalarQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricsScalarQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregator') @@ -128,6 +132,26 @@ def query=(query) @query = query 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 @@ -138,6 +162,7 @@ def ==(o) data_source == o.data_source && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb b/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb index 259c4f833d2a..0c2212647c03 100644 --- a/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb @@ -30,6 +30,8 @@ class MetricsTimeseriesQuery # A classic metrics query string. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricsTimeseriesQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricsTimeseriesQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data_source') @@ -108,6 +112,26 @@ def query=(query) @query = query 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 @@ -117,6 +141,7 @@ def ==(o) data_source == o.data_source && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb index d910ad9a664c..b908fdb03cea 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb @@ -27,6 +27,8 @@ class MonitorConfigPolicyAttributeCreateRequest # The monitor configuration policy type. attr_reader :policy_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'policy') @@ -99,6 +103,26 @@ def policy_type=(policy_type) @policy_type = policy_type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && policy == o.policy && policy_type == o.policy_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb index a9ca4072c11f..f16bcdfef208 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb @@ -27,6 +27,8 @@ class MonitorConfigPolicyAttributeEditRequest # The monitor configuration policy type. attr_reader :policy_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeEditRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeEditRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'policy') @@ -99,6 +103,26 @@ def policy_type=(policy_type) @policy_type = policy_type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && policy == o.policy && policy_type == o.policy_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb index 83bebc14e552..4d44fef542e2 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb @@ -27,6 +27,8 @@ class MonitorConfigPolicyAttributeResponse # The monitor configuration policy type. attr_accessor :policy_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'policy') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && policy == o.policy && policy_type == o.policy_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb index c7c03f73ed17..a2cdeaf5dedc 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb @@ -27,6 +27,8 @@ class MonitorConfigPolicyCreateData # Monitor configuration policy resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb index c00a8b616177..b876d4e038f9 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb @@ -24,6 +24,8 @@ class MonitorConfigPolicyCreateRequest # A monitor configuration policy data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb index 212db9d03f62..6bb811b0a186 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb @@ -30,6 +30,8 @@ class MonitorConfigPolicyEditData # Monitor configuration policy resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyEditData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyEditData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb index 3bd1b43d2fdc..94397121a82c 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb @@ -24,6 +24,8 @@ class MonitorConfigPolicyEditRequest # A monitor configuration policy data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyEditRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyEditRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb index bbe4326dc704..98602be75fea 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb @@ -24,6 +24,8 @@ class MonitorConfigPolicyListResponse # An array of monitor configuration policies. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb index 9a0aea38384d..88bc23210577 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb @@ -24,6 +24,8 @@ class MonitorConfigPolicyResponse # A monitor configuration policy data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb index 2124654f0e22..152fcef35f03 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb @@ -30,6 +30,8 @@ class MonitorConfigPolicyResponseData # Monitor configuration policy resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb index 7a04b55872bf..b2de29703b12 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb @@ -30,6 +30,8 @@ class MonitorConfigPolicyTagPolicy # Valid values for the tag. attr_accessor :valid_tag_values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyTagPolicy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyTagPolicy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tag_key') @@ -99,6 +103,26 @@ def tag_key=(tag_key) @tag_key = tag_key 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 @@ -108,6 +132,7 @@ def ==(o) tag_key == o.tag_key && tag_key_required == o.tag_key_required && valid_tag_values == o.valid_tag_values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb b/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb index e75051529566..c84c0d5eca0c 100644 --- a/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb +++ b/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb @@ -30,6 +30,8 @@ class MonitorConfigPolicyTagPolicyCreateRequest # Valid values for the tag. attr_reader :valid_tag_values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyTagPolicyCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyTagPolicyCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'tag_key') @@ -125,6 +129,26 @@ def valid_tag_values=(valid_tag_values) @valid_tag_values = valid_tag_values 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 @@ -134,6 +158,7 @@ def ==(o) tag_key == o.tag_key && tag_key_required == o.tag_key_required && valid_tag_values == o.valid_tag_values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_downtime_match_response.rb b/lib/datadog_api_client/v2/models/monitor_downtime_match_response.rb index 3809c5c8bf64..e483eb8c6ba0 100644 --- a/lib/datadog_api_client/v2/models/monitor_downtime_match_response.rb +++ b/lib/datadog_api_client/v2/models/monitor_downtime_match_response.rb @@ -27,6 +27,8 @@ class MonitorDowntimeMatchResponse # Pagination metadata returned by the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorDowntimeMatchResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorDowntimeMatchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_downtime_match_response_attributes.rb b/lib/datadog_api_client/v2/models/monitor_downtime_match_response_attributes.rb index 8a9af7adc878..718f8c40f959 100644 --- a/lib/datadog_api_client/v2/models/monitor_downtime_match_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/monitor_downtime_match_response_attributes.rb @@ -33,6 +33,8 @@ class MonitorDowntimeMatchResponseAttributes # The start of the downtime. attr_accessor :start + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorDowntimeMatchResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorDowntimeMatchResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_end') @@ -98,6 +102,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) groups == o.groups && scope == o.scope && start == o.start + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_downtime_match_response_data.rb b/lib/datadog_api_client/v2/models/monitor_downtime_match_response_data.rb index 0c493dc924bd..8308aa2401c6 100644 --- a/lib/datadog_api_client/v2/models/monitor_downtime_match_response_data.rb +++ b/lib/datadog_api_client/v2/models/monitor_downtime_match_response_data.rb @@ -30,6 +30,8 @@ class MonitorDowntimeMatchResponseData # Monitor Downtime Match resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorDowntimeMatchResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorDowntimeMatchResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -87,6 +91,26 @@ 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 @@ -96,6 +120,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monitor_type.rb b/lib/datadog_api_client/v2/models/monitor_type.rb index 5ccf59415513..3c7780c52ea7 100644 --- a/lib/datadog_api_client/v2/models/monitor_type.rb +++ b/lib/datadog_api_client/v2/models/monitor_type.rb @@ -54,6 +54,8 @@ class MonitorType # The monitor type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorType` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -173,6 +177,26 @@ def group_status=(group_status) @group_status = group_status 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 @@ -190,6 +214,7 @@ def ==(o) tags == o.tags && templated_name == o.templated_name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monthly_cost_attribution_attributes.rb b/lib/datadog_api_client/v2/models/monthly_cost_attribution_attributes.rb index c3ff3cee30fc..456caaa7f6be 100644 --- a/lib/datadog_api_client/v2/models/monthly_cost_attribution_attributes.rb +++ b/lib/datadog_api_client/v2/models/monthly_cost_attribution_attributes.rb @@ -45,6 +45,8 @@ class MonthlyCostAttributionAttributes # Fields in Cost Attribution by tag(s). Example: `infra_host_on_demand_cost`, `infra_host_committed_cost`, `infra_host_total_cost`, `infra_host_percentage_in_org`, `infra_host_percentage_in_account`. attr_accessor :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -89,12 +91,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonthlyCostAttributionAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonthlyCostAttributionAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'month') @@ -126,6 +130,26 @@ 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 @@ -139,6 +163,7 @@ def ==(o) tags == o.tags && updated_at == o.updated_at && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb b/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb index e30e5673da60..f09bed6c751e 100644 --- a/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb +++ b/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb @@ -30,6 +30,8 @@ class MonthlyCostAttributionBody # Type of cost attribution data. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonthlyCostAttributionBody` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonthlyCostAttributionBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb b/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb index 279485cdfe51..69e6a794d75e 100644 --- a/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb +++ b/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb @@ -27,6 +27,8 @@ class MonthlyCostAttributionMeta # The metadata for the current pagination. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonthlyCostAttributionMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonthlyCostAttributionMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregates') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && aggregates == o.aggregates && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb b/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb index dec51adb01fc..aa08a485f88a 100644 --- a/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb +++ b/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb @@ -24,6 +24,8 @@ class MonthlyCostAttributionPagination # The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of the `next_record_id`. attr_accessor :next_record_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonthlyCostAttributionPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonthlyCostAttributionPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'next_record_id') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && next_record_id == o.next_record_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb b/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb index a1c32c611566..c8f75d96a8ef 100644 --- a/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb +++ b/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb @@ -27,6 +27,8 @@ class MonthlyCostAttributionResponse # The object containing document metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonthlyCostAttributionResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonthlyCostAttributionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/nullable_relationship_to_user.rb b/lib/datadog_api_client/v2/models/nullable_relationship_to_user.rb index a304e9f8a208..54d6af14db8f 100644 --- a/lib/datadog_api_client/v2/models/nullable_relationship_to_user.rb +++ b/lib/datadog_api_client/v2/models/nullable_relationship_to_user.rb @@ -24,6 +24,8 @@ class NullableRelationshipToUser # Relationship to user object. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NullableRelationshipToUser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::NullableRelationshipToUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/nullable_relationship_to_user_data.rb b/lib/datadog_api_client/v2/models/nullable_relationship_to_user_data.rb index 6d0c23fc7d47..e555d470c5a6 100644 --- a/lib/datadog_api_client/v2/models/nullable_relationship_to_user_data.rb +++ b/lib/datadog_api_client/v2/models/nullable_relationship_to_user_data.rb @@ -27,6 +27,8 @@ class NullableRelationshipToUserData # Users resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NullableRelationshipToUserData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::NullableRelationshipToUserData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/nullable_user_relationship.rb b/lib/datadog_api_client/v2/models/nullable_user_relationship.rb index f1cfffa58227..5ff16102b043 100644 --- a/lib/datadog_api_client/v2/models/nullable_user_relationship.rb +++ b/lib/datadog_api_client/v2/models/nullable_user_relationship.rb @@ -24,6 +24,8 @@ class NullableUserRelationship # Relationship to user object. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NullableUserRelationship` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::NullableUserRelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -69,6 +73,26 @@ 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 @@ -76,6 +100,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb b/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb index e69e8cfd1472..6e81ced20d13 100644 --- a/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +++ b/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb @@ -27,6 +27,8 @@ class NullableUserRelationshipData # User resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NullableUserRelationshipData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::NullableUserRelationshipData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_account.rb b/lib/datadog_api_client/v2/models/okta_account.rb index 1d583e0a8b06..3ee96f7231c6 100644 --- a/lib/datadog_api_client/v2/models/okta_account.rb +++ b/lib/datadog_api_client/v2/models/okta_account.rb @@ -30,6 +30,8 @@ class OktaAccount # Account type for an Okta account. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccount` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_account_attributes.rb b/lib/datadog_api_client/v2/models/okta_account_attributes.rb index 4d4bc215a97f..b8b5891225db 100644 --- a/lib/datadog_api_client/v2/models/okta_account_attributes.rb +++ b/lib/datadog_api_client/v2/models/okta_account_attributes.rb @@ -39,6 +39,8 @@ class OktaAccountAttributes # The name of the Okta account. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -146,6 +150,26 @@ def name=(name) @name = name 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 @@ -158,6 +182,7 @@ def ==(o) client_secret == o.client_secret && domain == o.domain && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_account_request.rb b/lib/datadog_api_client/v2/models/okta_account_request.rb index f1ced6f6d2d2..0c9e11600407 100644 --- a/lib/datadog_api_client/v2/models/okta_account_request.rb +++ b/lib/datadog_api_client/v2/models/okta_account_request.rb @@ -24,6 +24,8 @@ class OktaAccountRequest # Schema for an Okta account. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_account_response.rb b/lib/datadog_api_client/v2/models/okta_account_response.rb index 49852dabb6da..ea7c2b0409b6 100644 --- a/lib/datadog_api_client/v2/models/okta_account_response.rb +++ b/lib/datadog_api_client/v2/models/okta_account_response.rb @@ -24,6 +24,8 @@ class OktaAccountResponse # Schema for an Okta account. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_account_response_data.rb b/lib/datadog_api_client/v2/models/okta_account_response_data.rb index 9f470388c921..d7f55c48ebc2 100644 --- a/lib/datadog_api_client/v2/models/okta_account_response_data.rb +++ b/lib/datadog_api_client/v2/models/okta_account_response_data.rb @@ -30,6 +30,8 @@ class OktaAccountResponseData # Account type for an Okta account. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_account_update_request.rb b/lib/datadog_api_client/v2/models/okta_account_update_request.rb index 08e6bc335bb0..37e1da80948d 100644 --- a/lib/datadog_api_client/v2/models/okta_account_update_request.rb +++ b/lib/datadog_api_client/v2/models/okta_account_update_request.rb @@ -24,6 +24,8 @@ class OktaAccountUpdateRequest # Data object for updating an Okta account. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb b/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb index 2ebfe0ee46f2..85dfa4a538b8 100644 --- a/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb @@ -36,6 +36,8 @@ class OktaAccountUpdateRequestAttributes # The domain associated with an Okta account. attr_reader :domain + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountUpdateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountUpdateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'api_key') @@ -126,6 +130,26 @@ def domain=(domain) @domain = domain 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 @@ -137,6 +161,7 @@ def ==(o) client_id == o.client_id && client_secret == o.client_secret && domain == o.domain + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb b/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb index 0c3057f492cd..409f8f98159b 100644 --- a/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb +++ b/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb @@ -27,6 +27,8 @@ class OktaAccountUpdateRequestData # Account type for an Okta account. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountUpdateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountUpdateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/okta_accounts_response.rb b/lib/datadog_api_client/v2/models/okta_accounts_response.rb index 074bb216b5ed..c9ab9f681f7c 100644 --- a/lib/datadog_api_client/v2/models/okta_accounts_response.rb +++ b/lib/datadog_api_client/v2/models/okta_accounts_response.rb @@ -24,6 +24,8 @@ class OktaAccountsResponse # List of Okta accounts. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAccountsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OktaAccountsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb b/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb index 35f6732d5c73..1b9bb913cb01 100644 --- a/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb +++ b/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb @@ -27,6 +27,8 @@ class OnDemandConcurrencyCap # On-demand concurrency cap type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnDemandConcurrencyCap` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OnDemandConcurrencyCap`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_attributes.rb b/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_attributes.rb index bcdca5e769af..a41651f8762d 100644 --- a/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_attributes.rb +++ b/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_attributes.rb @@ -24,6 +24,8 @@ class OnDemandConcurrencyCapAttributes # Value of the on-demand concurrency cap. attr_accessor :on_demand_concurrency_cap + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnDemandConcurrencyCapAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OnDemandConcurrencyCapAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'on_demand_concurrency_cap') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && on_demand_concurrency_cap == o.on_demand_concurrency_cap + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_response.rb b/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_response.rb index b237e0cf1cef..e759b6d1afcf 100644 --- a/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_response.rb +++ b/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_response.rb @@ -24,6 +24,8 @@ class OnDemandConcurrencyCapResponse # On-demand concurrency cap. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnDemandConcurrencyCapResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OnDemandConcurrencyCapResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/open_api_endpoint.rb b/lib/datadog_api_client/v2/models/open_api_endpoint.rb index 6fc8e94f10ad..39d0120a1c19 100644 --- a/lib/datadog_api_client/v2/models/open_api_endpoint.rb +++ b/lib/datadog_api_client/v2/models/open_api_endpoint.rb @@ -27,6 +27,8 @@ class OpenAPIEndpoint # The endpoint path. attr_accessor :path + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpenAPIEndpoint` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpenAPIEndpoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'method') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && method == o.method && path == o.path + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/open_api_file.rb b/lib/datadog_api_client/v2/models/open_api_file.rb index 90352108207d..78dfdeeedc98 100644 --- a/lib/datadog_api_client/v2/models/open_api_file.rb +++ b/lib/datadog_api_client/v2/models/open_api_file.rb @@ -24,6 +24,8 @@ class OpenAPIFile # Binary `OpenAPI` spec file attr_accessor :openapi_spec_file + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpenAPIFile` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpenAPIFile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'openapi_spec_file') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && openapi_spec_file == o.openapi_spec_file + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_create_attributes.rb b/lib/datadog_api_client/v2/models/opsgenie_service_create_attributes.rb index e099e5cfa327..7f02196026bc 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_create_attributes.rb @@ -33,6 +33,8 @@ class OpsgenieServiceCreateAttributes # The region for the Opsgenie service. attr_reader :region + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_url') @@ -128,6 +132,26 @@ def region=(region) @region = region 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 @@ -138,6 +162,7 @@ def ==(o) name == o.name && opsgenie_api_key == o.opsgenie_api_key && region == o.region + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_create_data.rb b/lib/datadog_api_client/v2/models/opsgenie_service_create_data.rb index 11810eff75b3..18f0a0583693 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_create_data.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_create_data.rb @@ -27,6 +27,8 @@ class OpsgenieServiceCreateData # Opsgenie service resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_create_request.rb b/lib/datadog_api_client/v2/models/opsgenie_service_create_request.rb index 16d5e5834792..8c7f6b2b82f4 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_create_request.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_create_request.rb @@ -24,6 +24,8 @@ class OpsgenieServiceCreateRequest # Opsgenie service data for a create request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_response.rb b/lib/datadog_api_client/v2/models/opsgenie_service_response.rb index 3cfc2792f040..6df3198bd84b 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_response.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_response.rb @@ -24,6 +24,8 @@ class OpsgenieServiceResponse # Opsgenie service data from a response. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_response_attributes.rb b/lib/datadog_api_client/v2/models/opsgenie_service_response_attributes.rb index 0c197e8dc00b..95e2184cd6c2 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_response_attributes.rb @@ -30,6 +30,8 @@ class OpsgenieServiceResponseAttributes # The region for the Opsgenie service. attr_accessor :region + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -66,12 +68,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_url') @@ -87,6 +91,26 @@ 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 @@ -96,6 +120,7 @@ def ==(o) custom_url == o.custom_url && name == o.name && region == o.region + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_response_data.rb b/lib/datadog_api_client/v2/models/opsgenie_service_response_data.rb index fb4a43db6643..1e1afb32c648 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_response_data.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_response_data.rb @@ -30,6 +30,8 @@ class OpsgenieServiceResponseData # Opsgenie service resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_update_attributes.rb b/lib/datadog_api_client/v2/models/opsgenie_service_update_attributes.rb index 46b181d8e362..053af4f1ac82 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_update_attributes.rb @@ -33,6 +33,8 @@ class OpsgenieServiceUpdateAttributes # The region for the Opsgenie service. attr_accessor :region + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom_url') @@ -96,6 +100,26 @@ 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 @@ -106,6 +130,7 @@ def ==(o) name == o.name && opsgenie_api_key == o.opsgenie_api_key && region == o.region + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_update_data.rb b/lib/datadog_api_client/v2/models/opsgenie_service_update_data.rb index 5c4ef3d9eafd..9348fc792de5 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_update_data.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_update_data.rb @@ -30,6 +30,8 @@ class OpsgenieServiceUpdateData # Opsgenie service resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_service_update_request.rb b/lib/datadog_api_client/v2/models/opsgenie_service_update_request.rb index 512987e01f28..6b03b8b1ab5b 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_service_update_request.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_service_update_request.rb @@ -24,6 +24,8 @@ class OpsgenieServiceUpdateRequest # Opsgenie service for an update request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServiceUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServiceUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/opsgenie_services_response.rb b/lib/datadog_api_client/v2/models/opsgenie_services_response.rb index 24ebe33ecc19..d0c5a8e5c7e4 100644 --- a/lib/datadog_api_client/v2/models/opsgenie_services_response.rb +++ b/lib/datadog_api_client/v2/models/opsgenie_services_response.rb @@ -24,6 +24,8 @@ class OpsgenieServicesResponse # An array of Opsgenie services. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpsgenieServicesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpsgenieServicesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/org_config_get_response.rb b/lib/datadog_api_client/v2/models/org_config_get_response.rb index 5f639f929476..fa9bc19f3821 100644 --- a/lib/datadog_api_client/v2/models/org_config_get_response.rb +++ b/lib/datadog_api_client/v2/models/org_config_get_response.rb @@ -24,6 +24,8 @@ class OrgConfigGetResponse # A single Org Config. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigGetResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/org_config_list_response.rb b/lib/datadog_api_client/v2/models/org_config_list_response.rb index a2533b184b1b..2f994daeaacc 100644 --- a/lib/datadog_api_client/v2/models/org_config_list_response.rb +++ b/lib/datadog_api_client/v2/models/org_config_list_response.rb @@ -24,6 +24,8 @@ class OrgConfigListResponse # An array of Org Configs. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/org_config_read.rb b/lib/datadog_api_client/v2/models/org_config_read.rb index 36a8f2e1a64e..8e80d7083907 100644 --- a/lib/datadog_api_client/v2/models/org_config_read.rb +++ b/lib/datadog_api_client/v2/models/org_config_read.rb @@ -30,6 +30,8 @@ class OrgConfigRead # Data type of an Org Config. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigRead` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/org_config_read_attributes.rb b/lib/datadog_api_client/v2/models/org_config_read_attributes.rb index 50bf484e7bff..37070861fa5c 100644 --- a/lib/datadog_api_client/v2/models/org_config_read_attributes.rb +++ b/lib/datadog_api_client/v2/models/org_config_read_attributes.rb @@ -36,6 +36,8 @@ class OrgConfigReadAttributes # The type of an Org Config value. attr_reader :value_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -76,12 +78,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigReadAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigReadAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -156,6 +160,26 @@ def value_type=(value_type) @value_type = value_type 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 @@ -167,6 +191,7 @@ def ==(o) name == o.name && value == o.value && value_type == o.value_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/org_config_write.rb b/lib/datadog_api_client/v2/models/org_config_write.rb index e4073065116b..b5e09d20f816 100644 --- a/lib/datadog_api_client/v2/models/org_config_write.rb +++ b/lib/datadog_api_client/v2/models/org_config_write.rb @@ -27,6 +27,8 @@ class OrgConfigWrite # Data type of an Org Config. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigWrite` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigWrite`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/org_config_write_attributes.rb b/lib/datadog_api_client/v2/models/org_config_write_attributes.rb index cd2d85bacdbc..acbb4c13a3dd 100644 --- a/lib/datadog_api_client/v2/models/org_config_write_attributes.rb +++ b/lib/datadog_api_client/v2/models/org_config_write_attributes.rb @@ -24,6 +24,8 @@ class OrgConfigWriteAttributes # The value of an Org Config. attr_reader :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigWriteAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigWriteAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'value') @@ -79,6 +83,26 @@ def value=(value) @value = value 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/org_config_write_request.rb b/lib/datadog_api_client/v2/models/org_config_write_request.rb index 4509f2db4cb4..4e843733dde4 100644 --- a/lib/datadog_api_client/v2/models/org_config_write_request.rb +++ b/lib/datadog_api_client/v2/models/org_config_write_request.rb @@ -24,6 +24,8 @@ class OrgConfigWriteRequest # An Org Config write operation. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigWriteRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigWriteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/organization.rb b/lib/datadog_api_client/v2/models/organization.rb index 5ce71a1a9ae3..5726ef2b9e0f 100644 --- a/lib/datadog_api_client/v2/models/organization.rb +++ b/lib/datadog_api_client/v2/models/organization.rb @@ -30,6 +30,8 @@ class Organization # Organizations resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Organization` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Organization`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/organization_attributes.rb b/lib/datadog_api_client/v2/models/organization_attributes.rb index f04c0c5ad0fe..5f8fb0d87b12 100644 --- a/lib/datadog_api_client/v2/models/organization_attributes.rb +++ b/lib/datadog_api_client/v2/models/organization_attributes.rb @@ -45,6 +45,8 @@ class OrganizationAttributes # URL of the site that this organization exists at. attr_accessor :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrganizationAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrganizationAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -124,6 +128,26 @@ 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 @@ -138,6 +162,7 @@ def ==(o) public_id == o.public_id && sharing == o.sharing && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_batch_attributes.rb b/lib/datadog_api_client/v2/models/outcomes_batch_attributes.rb index 162ac2ec1618..8fdfc9f770ac 100644 --- a/lib/datadog_api_client/v2/models/outcomes_batch_attributes.rb +++ b/lib/datadog_api_client/v2/models/outcomes_batch_attributes.rb @@ -24,6 +24,8 @@ class OutcomesBatchAttributes # Set of scorecard outcomes to update. attr_accessor :results + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'results') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && results == o.results + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_batch_request.rb b/lib/datadog_api_client/v2/models/outcomes_batch_request.rb index a190d012a8dc..802c6923e45b 100644 --- a/lib/datadog_api_client/v2/models/outcomes_batch_request.rb +++ b/lib/datadog_api_client/v2/models/outcomes_batch_request.rb @@ -24,6 +24,8 @@ class OutcomesBatchRequest # Scorecard outcomes batch request data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_batch_request_data.rb b/lib/datadog_api_client/v2/models/outcomes_batch_request_data.rb index ae03d2024e5d..ad01144362ac 100644 --- a/lib/datadog_api_client/v2/models/outcomes_batch_request_data.rb +++ b/lib/datadog_api_client/v2/models/outcomes_batch_request_data.rb @@ -27,6 +27,8 @@ class OutcomesBatchRequestData # The JSON:API type for scorecard outcomes. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_batch_request_item.rb b/lib/datadog_api_client/v2/models/outcomes_batch_request_item.rb index 4bc64ee2add6..c363d8f115d2 100644 --- a/lib/datadog_api_client/v2/models/outcomes_batch_request_item.rb +++ b/lib/datadog_api_client/v2/models/outcomes_batch_request_item.rb @@ -33,6 +33,8 @@ class OutcomesBatchRequestItem # The state of the rule evaluation. attr_reader :state + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchRequestItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchRequestItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'remarks') @@ -128,6 +132,26 @@ def state=(state) @state = state 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 @@ -138,6 +162,7 @@ def ==(o) rule_id == o.rule_id && service_name == o.service_name && state == o.state + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_batch_response.rb b/lib/datadog_api_client/v2/models/outcomes_batch_response.rb index b24d3e08a5a7..b6d3ac04a363 100644 --- a/lib/datadog_api_client/v2/models/outcomes_batch_response.rb +++ b/lib/datadog_api_client/v2/models/outcomes_batch_response.rb @@ -27,6 +27,8 @@ class OutcomesBatchResponse # Metadata pertaining to the bulk operation. attr_reader :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -101,6 +105,26 @@ def meta=(meta) @meta = meta 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 @@ -109,6 +133,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_batch_response_attributes.rb b/lib/datadog_api_client/v2/models/outcomes_batch_response_attributes.rb index 4906f8cdc27f..31daf1922e3e 100644 --- a/lib/datadog_api_client/v2/models/outcomes_batch_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/outcomes_batch_response_attributes.rb @@ -36,6 +36,8 @@ class OutcomesBatchResponseAttributes # The state of the rule evaluation. attr_accessor :state + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) remarks == o.remarks && service_name == o.service_name && state == o.state + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_batch_response_meta.rb b/lib/datadog_api_client/v2/models/outcomes_batch_response_meta.rb index 9a330f7b7f72..5ea0818992ce 100644 --- a/lib/datadog_api_client/v2/models/outcomes_batch_response_meta.rb +++ b/lib/datadog_api_client/v2/models/outcomes_batch_response_meta.rb @@ -27,6 +27,8 @@ class OutcomesBatchResponseMeta # Total number of scorecard results modified during the bulk operation. attr_accessor :total_updated + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_received') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && total_received == o.total_received && total_updated == o.total_updated + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_response.rb b/lib/datadog_api_client/v2/models/outcomes_response.rb index 3dc23b7be2f0..6d7ae708773d 100644 --- a/lib/datadog_api_client/v2/models/outcomes_response.rb +++ b/lib/datadog_api_client/v2/models/outcomes_response.rb @@ -30,6 +30,8 @@ class OutcomesResponse # Links attributes. attr_accessor :links + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) data == o.data && included == o.included && links == o.links + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_response_data_item.rb b/lib/datadog_api_client/v2/models/outcomes_response_data_item.rb index de3f783edf8d..f70ee26cac16 100644 --- a/lib/datadog_api_client/v2/models/outcomes_response_data_item.rb +++ b/lib/datadog_api_client/v2/models/outcomes_response_data_item.rb @@ -33,6 +33,8 @@ class OutcomesResponseDataItem # The JSON:API type for an outcome. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesResponseDataItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesResponseDataItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_response_included_item.rb b/lib/datadog_api_client/v2/models/outcomes_response_included_item.rb index 5c04abdbda2a..39fe4e1262c5 100644 --- a/lib/datadog_api_client/v2/models/outcomes_response_included_item.rb +++ b/lib/datadog_api_client/v2/models/outcomes_response_included_item.rb @@ -30,6 +30,8 @@ class OutcomesResponseIncludedItem # The JSON:API type for scorecard rules. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesResponseIncludedItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesResponseIncludedItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_response_included_rule_attributes.rb b/lib/datadog_api_client/v2/models/outcomes_response_included_rule_attributes.rb index 99109ab2de2c..18a0ac71b6bc 100644 --- a/lib/datadog_api_client/v2/models/outcomes_response_included_rule_attributes.rb +++ b/lib/datadog_api_client/v2/models/outcomes_response_included_rule_attributes.rb @@ -27,6 +27,8 @@ class OutcomesResponseIncludedRuleAttributes # The scorecard name to which this rule must belong. attr_accessor :scorecard_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesResponseIncludedRuleAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesResponseIncludedRuleAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && name == o.name && scorecard_name == o.scorecard_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/outcomes_response_links.rb b/lib/datadog_api_client/v2/models/outcomes_response_links.rb index 043c66bef334..c44f6a2bd30a 100644 --- a/lib/datadog_api_client/v2/models/outcomes_response_links.rb +++ b/lib/datadog_api_client/v2/models/outcomes_response_links.rb @@ -24,6 +24,8 @@ class OutcomesResponseLinks # Link for the next set of results. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/pagination.rb b/lib/datadog_api_client/v2/models/pagination.rb index 008a6b9f5c26..0666d289812f 100644 --- a/lib/datadog_api_client/v2/models/pagination.rb +++ b/lib/datadog_api_client/v2/models/pagination.rb @@ -27,6 +27,8 @@ class Pagination # Total count of elements matched by the filter. attr_accessor :total_filtered_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Pagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Pagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_count') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && total_count == o.total_count && total_filtered_count == o.total_filtered_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/partial_api_key.rb b/lib/datadog_api_client/v2/models/partial_api_key.rb index c5c2ca7fc3cb..64a7120cb52e 100644 --- a/lib/datadog_api_client/v2/models/partial_api_key.rb +++ b/lib/datadog_api_client/v2/models/partial_api_key.rb @@ -33,6 +33,8 @@ class PartialAPIKey # API Keys resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PartialAPIKey` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PartialAPIKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb b/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb index ebc7c0e5846e..030f6db1b590 100644 --- a/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb +++ b/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb @@ -39,6 +39,8 @@ class PartialAPIKeyAttributes # The remote config read enabled status. attr_accessor :remote_config_read_enabled + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PartialAPIKeyAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PartialAPIKeyAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'category') @@ -128,6 +132,26 @@ def last4=(last4) @last4 = last4 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 @@ -140,6 +164,7 @@ def ==(o) modified_at == o.modified_at && name == o.name && remote_config_read_enabled == o.remote_config_read_enabled + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/partial_application_key.rb b/lib/datadog_api_client/v2/models/partial_application_key.rb index f87ea524475e..5cc02c460156 100644 --- a/lib/datadog_api_client/v2/models/partial_application_key.rb +++ b/lib/datadog_api_client/v2/models/partial_application_key.rb @@ -33,6 +33,8 @@ class PartialApplicationKey # Application Keys resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PartialApplicationKey` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PartialApplicationKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb b/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb index bd0d221fc973..32916a42dc79 100644 --- a/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb +++ b/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb @@ -33,6 +33,8 @@ class PartialApplicationKeyAttributes # Array of scopes to grant the application key. attr_accessor :scopes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PartialApplicationKeyAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PartialApplicationKeyAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -120,6 +124,26 @@ def last4=(last4) @last4 = last4 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 @@ -130,6 +154,7 @@ def ==(o) last4 == o.last4 && name == o.name && scopes == o.scopes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/partial_application_key_response.rb b/lib/datadog_api_client/v2/models/partial_application_key_response.rb index af1624c80a6a..68548e761d47 100644 --- a/lib/datadog_api_client/v2/models/partial_application_key_response.rb +++ b/lib/datadog_api_client/v2/models/partial_application_key_response.rb @@ -27,6 +27,8 @@ class PartialApplicationKeyResponse # Array of objects related to the application key. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PartialApplicationKeyResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PartialApplicationKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/permission.rb b/lib/datadog_api_client/v2/models/permission.rb index e53c8dd142c4..a14c44b676c1 100644 --- a/lib/datadog_api_client/v2/models/permission.rb +++ b/lib/datadog_api_client/v2/models/permission.rb @@ -30,6 +30,8 @@ class Permission # Permissions resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Permission` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Permission`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/permission_attributes.rb b/lib/datadog_api_client/v2/models/permission_attributes.rb index af5247de8a84..a60b488c3ed1 100644 --- a/lib/datadog_api_client/v2/models/permission_attributes.rb +++ b/lib/datadog_api_client/v2/models/permission_attributes.rb @@ -42,6 +42,8 @@ class PermissionAttributes # Whether or not the permission is restricted. attr_accessor :restricted + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PermissionAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PermissionAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created') @@ -115,6 +119,26 @@ 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 @@ -128,6 +152,7 @@ def ==(o) group_name == o.group_name && name == o.name && restricted == o.restricted + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/permissions_response.rb b/lib/datadog_api_client/v2/models/permissions_response.rb index 01706fbbd721..f3fa2f918f2e 100644 --- a/lib/datadog_api_client/v2/models/permissions_response.rb +++ b/lib/datadog_api_client/v2/models/permissions_response.rb @@ -24,6 +24,8 @@ class PermissionsResponse # Array of permissions. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PermissionsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PermissionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack.rb b/lib/datadog_api_client/v2/models/powerpack.rb index 87b503cecf3b..316bf373d1dd 100644 --- a/lib/datadog_api_client/v2/models/powerpack.rb +++ b/lib/datadog_api_client/v2/models/powerpack.rb @@ -24,6 +24,8 @@ class Powerpack # Powerpack data object. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Powerpack` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Powerpack`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_attributes.rb b/lib/datadog_api_client/v2/models/powerpack_attributes.rb index 41e5f4410c90..aa145f9742e7 100644 --- a/lib/datadog_api_client/v2/models/powerpack_attributes.rb +++ b/lib/datadog_api_client/v2/models/powerpack_attributes.rb @@ -36,6 +36,8 @@ class PowerpackAttributes # List of template variables for this powerpack. attr_accessor :template_variables + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -141,6 +145,26 @@ def tags=(tags) @tags = tags 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 @@ -152,6 +176,7 @@ def ==(o) name == o.name && tags == o.tags && template_variables == o.template_variables + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_data.rb b/lib/datadog_api_client/v2/models/powerpack_data.rb index a2360a231b26..03d27c72e948 100644 --- a/lib/datadog_api_client/v2/models/powerpack_data.rb +++ b/lib/datadog_api_client/v2/models/powerpack_data.rb @@ -33,6 +33,8 @@ class PowerpackData # Type of widget, must be powerpack. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_group_widget.rb b/lib/datadog_api_client/v2/models/powerpack_group_widget.rb index 0649e61d5bdb..218f36a8eca9 100644 --- a/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +++ b/lib/datadog_api_client/v2/models/powerpack_group_widget.rb @@ -30,6 +30,8 @@ class PowerpackGroupWidget # The available timeframes depend on the widget you are using. attr_accessor :live_span + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackGroupWidget` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackGroupWidget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -97,6 +101,26 @@ def definition=(definition) @definition = definition 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 @@ -106,6 +130,7 @@ def ==(o) definition == o.definition && layout == o.layout && live_span == o.live_span + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb b/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb index a05f37864e77..f795f1225504 100644 --- a/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb +++ b/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb @@ -36,6 +36,8 @@ class PowerpackGroupWidgetDefinition # Widgets inside the powerpack. attr_reader :widgets + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackGroupWidgetDefinition` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackGroupWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'layout_type') @@ -139,6 +143,26 @@ def widgets=(widgets) @widgets = widgets 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 @@ -150,6 +174,7 @@ def ==(o) title == o.title && type == o.type && widgets == o.widgets + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb b/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb index bcbc053739d3..dd7e86b1257a 100644 --- a/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb +++ b/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb @@ -33,6 +33,8 @@ class PowerpackGroupWidgetLayout # The position of the widget on the y (vertical) axis. Should be a non-negative integer. attr_reader :y + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackGroupWidgetLayout` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackGroupWidgetLayout`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'height') @@ -155,6 +159,26 @@ def y=(y) @y = y 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 @@ -165,6 +189,7 @@ def ==(o) width == o.width && x == o.x && y == o.y + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb b/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb index b9fa8ec7c014..50ab168349d6 100644 --- a/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb +++ b/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb @@ -33,6 +33,8 @@ class PowerpackInnerWidgetLayout # The position of the widget on the y (vertical) axis. Should be a non-negative integer. attr_reader :y + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackInnerWidgetLayout` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackInnerWidgetLayout`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'height') @@ -155,6 +159,26 @@ def y=(y) @y = y 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 @@ -165,6 +189,7 @@ def ==(o) width == o.width && x == o.x && y == o.y + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb b/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb index 5201757dd135..0ec826ce6b39 100644 --- a/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb +++ b/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb @@ -27,6 +27,8 @@ class PowerpackInnerWidgets # Powerpack inner widget layout. attr_accessor :layout + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackInnerWidgets` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackInnerWidgets`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'definition') @@ -88,6 +92,26 @@ def definition=(definition) @definition = definition 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && definition == o.definition && layout == o.layout + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_relationships.rb b/lib/datadog_api_client/v2/models/powerpack_relationships.rb index 1a3250b620bf..04665fcce9b6 100644 --- a/lib/datadog_api_client/v2/models/powerpack_relationships.rb +++ b/lib/datadog_api_client/v2/models/powerpack_relationships.rb @@ -24,6 +24,8 @@ class PowerpackRelationships # Relationship to user. attr_accessor :author + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'author') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && author == o.author + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_response.rb b/lib/datadog_api_client/v2/models/powerpack_response.rb index 4ba5060ed2d4..507e0c0e0399 100644 --- a/lib/datadog_api_client/v2/models/powerpack_response.rb +++ b/lib/datadog_api_client/v2/models/powerpack_response.rb @@ -27,6 +27,8 @@ class PowerpackResponse # Array of objects related to the users. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_response_links.rb b/lib/datadog_api_client/v2/models/powerpack_response_links.rb index 6cf11c39002b..07f6c806eaca 100644 --- a/lib/datadog_api_client/v2/models/powerpack_response_links.rb +++ b/lib/datadog_api_client/v2/models/powerpack_response_links.rb @@ -36,6 +36,8 @@ class PowerpackResponseLinks # Link to current page. attr_accessor :_self + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -77,12 +79,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'first') @@ -106,6 +110,26 @@ 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 @@ -117,6 +141,7 @@ def ==(o) _next == o._next && prev == o.prev && _self == o._self + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpack_template_variable.rb b/lib/datadog_api_client/v2/models/powerpack_template_variable.rb index 226dab1f57d1..935824732b85 100644 --- a/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +++ b/lib/datadog_api_client/v2/models/powerpack_template_variable.rb @@ -27,6 +27,8 @@ class PowerpackTemplateVariable # The name of the variable. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpackTemplateVariable` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpackTemplateVariable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'defaults') @@ -90,6 +94,26 @@ def name=(name) @name = name 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && defaults == o.defaults && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb b/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb index 53858a5e8903..47e27f93ef74 100644 --- a/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb +++ b/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb @@ -24,6 +24,8 @@ class PowerpacksResponseMeta # Powerpack response pagination metadata. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpacksResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpacksResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb b/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb index 4d7b30bd697e..0776f7eb730f 100644 --- a/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +++ b/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb @@ -45,6 +45,8 @@ class PowerpacksResponseMetaPagination # Offset type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -91,12 +93,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PowerpacksResponseMetaPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::PowerpacksResponseMetaPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'first_offset') @@ -132,6 +136,26 @@ 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 @@ -146,6 +170,7 @@ def ==(o) prev_offset == o.prev_offset && total == o.total && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/process_summaries_meta.rb b/lib/datadog_api_client/v2/models/process_summaries_meta.rb index 9e3c59ca19ec..0413253a71f5 100644 --- a/lib/datadog_api_client/v2/models/process_summaries_meta.rb +++ b/lib/datadog_api_client/v2/models/process_summaries_meta.rb @@ -24,6 +24,8 @@ class ProcessSummariesMeta # Paging attributes. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProcessSummariesMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProcessSummariesMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/process_summaries_meta_page.rb b/lib/datadog_api_client/v2/models/process_summaries_meta_page.rb index 36c8ac59b0b9..c94a06bd2cc0 100644 --- a/lib/datadog_api_client/v2/models/process_summaries_meta_page.rb +++ b/lib/datadog_api_client/v2/models/process_summaries_meta_page.rb @@ -28,6 +28,8 @@ class ProcessSummariesMetaPage # Number of results returned. attr_reader :size + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProcessSummariesMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProcessSummariesMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'after') @@ -93,6 +97,26 @@ def size=(size) @size = size 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,6 +125,7 @@ def ==(o) self.class == o.class && after == o.after && size == o.size + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/process_summaries_response.rb b/lib/datadog_api_client/v2/models/process_summaries_response.rb index 02918009400a..a9fffc5346de 100644 --- a/lib/datadog_api_client/v2/models/process_summaries_response.rb +++ b/lib/datadog_api_client/v2/models/process_summaries_response.rb @@ -27,6 +27,8 @@ class ProcessSummariesResponse # Response metadata object. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProcessSummariesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProcessSummariesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/process_summary.rb b/lib/datadog_api_client/v2/models/process_summary.rb index 4317e4a6d755..de13ceeda81c 100644 --- a/lib/datadog_api_client/v2/models/process_summary.rb +++ b/lib/datadog_api_client/v2/models/process_summary.rb @@ -30,6 +30,8 @@ class ProcessSummary # Type of process summary. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProcessSummary` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProcessSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/process_summary_attributes.rb b/lib/datadog_api_client/v2/models/process_summary_attributes.rb index 81c00ecc63ab..bde735cf3dad 100644 --- a/lib/datadog_api_client/v2/models/process_summary_attributes.rb +++ b/lib/datadog_api_client/v2/models/process_summary_attributes.rb @@ -45,6 +45,8 @@ class ProcessSummaryAttributes # Process owner. attr_accessor :user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProcessSummaryAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProcessSummaryAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cmdline') @@ -126,6 +130,26 @@ 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 @@ -140,6 +164,7 @@ def ==(o) tags == o.tags && timestamp == o.timestamp && user == o.user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project.rb b/lib/datadog_api_client/v2/models/project.rb index 72bf895273d0..fdb2575d957d 100644 --- a/lib/datadog_api_client/v2/models/project.rb +++ b/lib/datadog_api_client/v2/models/project.rb @@ -33,6 +33,8 @@ class Project # Project resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Project` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Project`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -128,6 +132,26 @@ def type=(type) @type = type 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 @@ -138,6 +162,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project_attributes.rb b/lib/datadog_api_client/v2/models/project_attributes.rb index b72a7cb852de..4434a6afb3b2 100644 --- a/lib/datadog_api_client/v2/models/project_attributes.rb +++ b/lib/datadog_api_client/v2/models/project_attributes.rb @@ -27,6 +27,8 @@ class ProjectAttributes # Project's name attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'key') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && key == o.key && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project_create.rb b/lib/datadog_api_client/v2/models/project_create.rb index a65457e47b95..f92834681004 100644 --- a/lib/datadog_api_client/v2/models/project_create.rb +++ b/lib/datadog_api_client/v2/models/project_create.rb @@ -27,6 +27,8 @@ class ProjectCreate # Project resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project_create_attributes.rb b/lib/datadog_api_client/v2/models/project_create_attributes.rb index e09b498c32e4..3c99a7ad5dd6 100644 --- a/lib/datadog_api_client/v2/models/project_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/project_create_attributes.rb @@ -27,6 +27,8 @@ class ProjectCreateAttributes # name attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'key') @@ -99,6 +103,26 @@ def name=(name) @name = name 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && key == o.key && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project_create_request.rb b/lib/datadog_api_client/v2/models/project_create_request.rb index 76f6bee87fcd..464166815f6c 100644 --- a/lib/datadog_api_client/v2/models/project_create_request.rb +++ b/lib/datadog_api_client/v2/models/project_create_request.rb @@ -24,6 +24,8 @@ class ProjectCreateRequest # Project create attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project_relationship.rb b/lib/datadog_api_client/v2/models/project_relationship.rb index 5330d3b53cdb..d07d026f6e8a 100644 --- a/lib/datadog_api_client/v2/models/project_relationship.rb +++ b/lib/datadog_api_client/v2/models/project_relationship.rb @@ -24,6 +24,8 @@ class ProjectRelationship # Relationship to project object attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectRelationship` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectRelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project_relationship_data.rb b/lib/datadog_api_client/v2/models/project_relationship_data.rb index f6ed14822567..aeaf2b3d0f9b 100644 --- a/lib/datadog_api_client/v2/models/project_relationship_data.rb +++ b/lib/datadog_api_client/v2/models/project_relationship_data.rb @@ -27,6 +27,8 @@ class ProjectRelationshipData # Project resource type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectRelationshipData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectRelationshipData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project_relationships.rb b/lib/datadog_api_client/v2/models/project_relationships.rb index 74dc7ddc09bb..c6379ee7ec3d 100644 --- a/lib/datadog_api_client/v2/models/project_relationships.rb +++ b/lib/datadog_api_client/v2/models/project_relationships.rb @@ -27,6 +27,8 @@ class ProjectRelationships # Relationship to users. attr_accessor :member_user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'member_team') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && member_team == o.member_team && member_user == o.member_user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/project_response.rb b/lib/datadog_api_client/v2/models/project_response.rb index f59cc54805de..1ca981ed0dc7 100644 --- a/lib/datadog_api_client/v2/models/project_response.rb +++ b/lib/datadog_api_client/v2/models/project_response.rb @@ -24,6 +24,8 @@ class ProjectResponse # A Project attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/projected_cost.rb b/lib/datadog_api_client/v2/models/projected_cost.rb index 65137cbbffdd..672045715b7e 100644 --- a/lib/datadog_api_client/v2/models/projected_cost.rb +++ b/lib/datadog_api_client/v2/models/projected_cost.rb @@ -30,6 +30,8 @@ class ProjectedCost # Type of cost data. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectedCost` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectedCost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/projected_cost_attributes.rb b/lib/datadog_api_client/v2/models/projected_cost_attributes.rb index d9ffee23232f..473329b8c68c 100644 --- a/lib/datadog_api_client/v2/models/projected_cost_attributes.rb +++ b/lib/datadog_api_client/v2/models/projected_cost_attributes.rb @@ -45,6 +45,8 @@ class ProjectedCostAttributes # The region of the Datadog instance that the organization belongs to. attr_accessor :region + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectedCostAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectedCostAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'account_name') @@ -126,6 +130,26 @@ 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 @@ -140,6 +164,7 @@ def ==(o) projected_total_cost == o.projected_total_cost && public_id == o.public_id && region == o.region + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/projected_cost_response.rb b/lib/datadog_api_client/v2/models/projected_cost_response.rb index 8fcdf7bf51b9..8a6b2c0a346f 100644 --- a/lib/datadog_api_client/v2/models/projected_cost_response.rb +++ b/lib/datadog_api_client/v2/models/projected_cost_response.rb @@ -24,6 +24,8 @@ class ProjectedCostResponse # Response containing Projected Cost. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectedCostResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectedCostResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/projects_response.rb b/lib/datadog_api_client/v2/models/projects_response.rb index f6bb1ee0539e..2cd515f532f3 100644 --- a/lib/datadog_api_client/v2/models/projects_response.rb +++ b/lib/datadog_api_client/v2/models/projects_response.rb @@ -24,6 +24,8 @@ class ProjectsResponse # Projects response data attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ProjectsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/query_formula.rb b/lib/datadog_api_client/v2/models/query_formula.rb index 4bc25e7906d1..57841f45acbc 100644 --- a/lib/datadog_api_client/v2/models/query_formula.rb +++ b/lib/datadog_api_client/v2/models/query_formula.rb @@ -28,6 +28,8 @@ class QueryFormula # This limit is only for scalar queries and has no effect on timeseries queries. attr_accessor :limit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryFormula` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::QueryFormula`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'formula') @@ -89,6 +93,26 @@ def formula=(formula) @formula = formula 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 @@ -97,6 +121,7 @@ def ==(o) self.class == o.class && formula == o.formula && limit == o.limit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb index 196f47c6418a..422cd1903485 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb @@ -24,6 +24,8 @@ class RelationshipToIncidentAttachment # An array of incident attachments. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentAttachment` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentAttachment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb index 60472a655d7a..fbe5b857219e 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb @@ -27,6 +27,8 @@ class RelationshipToIncidentAttachmentData # The incident attachment resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentAttachmentData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentAttachmentData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb index dd8b14c3bf7f..c464e34ab22d 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb @@ -27,6 +27,8 @@ class RelationshipToIncidentImpactData # The incident impacts type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentImpactData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentImpactData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb index 44882bc46b89..9a7050f5e038 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb @@ -24,6 +24,8 @@ class RelationshipToIncidentImpacts # An array of incident impacts. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentImpacts` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentImpacts`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadata_data.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadata_data.rb index 530113df43c5..b155d8223486 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadata_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadata_data.rb @@ -27,6 +27,8 @@ class RelationshipToIncidentIntegrationMetadataData # Integration metadata resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentIntegrationMetadataData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentIntegrationMetadataData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadatas.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadatas.rb index 727b01e81878..ddc23a971082 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadatas.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadatas.rb @@ -24,6 +24,8 @@ class RelationshipToIncidentIntegrationMetadatas # Integration metadata relationship array attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentIntegrationMetadatas` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentIntegrationMetadatas`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_postmortem.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_postmortem.rb index 127e717057ba..b132646ed6aa 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_postmortem.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_postmortem.rb @@ -24,6 +24,8 @@ class RelationshipToIncidentPostmortem # The postmortem relationship data. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentPostmortem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentPostmortem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_postmortem_data.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_postmortem_data.rb index 3d05ec612fac..41203f1984ec 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_postmortem_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_postmortem_data.rb @@ -27,6 +27,8 @@ class RelationshipToIncidentPostmortemData # Incident postmortem resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentPostmortemData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentPostmortemData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb index 7d5703c07563..9553b0678b04 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb @@ -27,6 +27,8 @@ class RelationshipToIncidentResponderData # The incident responders type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentResponderData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentResponderData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb index 6238406cedbc..778600b2a7ef 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb @@ -24,6 +24,8 @@ class RelationshipToIncidentResponders # An array of incident responders. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentResponders` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentResponders`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb index f99fd1f5e3d6..53b3d96a1ef6 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb @@ -27,6 +27,8 @@ class RelationshipToIncidentUserDefinedFieldData # The incident user defined fields type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentUserDefinedFieldData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentUserDefinedFieldData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb b/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb index 5a1e82d0c1ef..f9254ef44fdc 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb @@ -24,6 +24,8 @@ class RelationshipToIncidentUserDefinedFields # An array of user defined fields. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToIncidentUserDefinedFields` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToIncidentUserDefinedFields`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_organization.rb b/lib/datadog_api_client/v2/models/relationship_to_organization.rb index f659dcec8fb0..dabc03a1a8de 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_organization.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_organization.rb @@ -24,6 +24,8 @@ class RelationshipToOrganization # Relationship to organization object. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToOrganization` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToOrganization`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_organization_data.rb b/lib/datadog_api_client/v2/models/relationship_to_organization_data.rb index 6d45ec27e1f7..8d8ba19feec9 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_organization_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_organization_data.rb @@ -27,6 +27,8 @@ class RelationshipToOrganizationData # Organizations resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToOrganizationData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToOrganizationData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_organizations.rb b/lib/datadog_api_client/v2/models/relationship_to_organizations.rb index c6276f4189d7..c3e051c7ab9a 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_organizations.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_organizations.rb @@ -24,6 +24,8 @@ class RelationshipToOrganizations # Relationships to organization objects. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToOrganizations` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToOrganizations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_outcome.rb b/lib/datadog_api_client/v2/models/relationship_to_outcome.rb index 392add15f294..be3d19633193 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_outcome.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_outcome.rb @@ -24,6 +24,8 @@ class RelationshipToOutcome # The JSON:API relationship to an outcome, which returns the related rule id. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToOutcome` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToOutcome`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_outcome_data.rb b/lib/datadog_api_client/v2/models/relationship_to_outcome_data.rb index cd2b550a4e74..d371dc3c76a6 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_outcome_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_outcome_data.rb @@ -27,6 +27,8 @@ class RelationshipToOutcomeData # The JSON:API type for scorecard rules. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToOutcomeData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToOutcomeData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_permission.rb b/lib/datadog_api_client/v2/models/relationship_to_permission.rb index 9074c97e1fd5..f84466c950b7 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_permission.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_permission.rb @@ -24,6 +24,8 @@ class RelationshipToPermission # Relationship to permission object. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToPermission` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToPermission`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_permission_data.rb b/lib/datadog_api_client/v2/models/relationship_to_permission_data.rb index a48beb294658..dfd2419646ef 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_permission_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_permission_data.rb @@ -27,6 +27,8 @@ class RelationshipToPermissionData # Permissions resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToPermissionData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToPermissionData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_permissions.rb b/lib/datadog_api_client/v2/models/relationship_to_permissions.rb index af33ba78f7fe..cf50ad252a38 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_permissions.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_permissions.rb @@ -24,6 +24,8 @@ class RelationshipToPermissions # Relationships to permission objects. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToPermissions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToPermissions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_role.rb b/lib/datadog_api_client/v2/models/relationship_to_role.rb index 3a0ee7e56541..aacda2dec221 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_role.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_role.rb @@ -24,6 +24,8 @@ class RelationshipToRole # Relationship to role object. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToRole` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_role_data.rb b/lib/datadog_api_client/v2/models/relationship_to_role_data.rb index 2591d0bd924a..d708817a92a1 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_role_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_role_data.rb @@ -27,6 +27,8 @@ class RelationshipToRoleData # Roles type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToRoleData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToRoleData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_roles.rb b/lib/datadog_api_client/v2/models/relationship_to_roles.rb index d5a4d84ff572..7b03468aff9f 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_roles.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_roles.rb @@ -24,6 +24,8 @@ class RelationshipToRoles # An array containing type and the unique identifier of a role. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToRoles` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToRoles`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_rule.rb b/lib/datadog_api_client/v2/models/relationship_to_rule.rb index b01ba1766cc8..4575177742bb 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_rule.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_rule.rb @@ -24,6 +24,8 @@ class RelationshipToRule # Relationship data for a rule. attr_accessor :scorecard + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToRule` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'scorecard') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && scorecard == o.scorecard + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_rule_data.rb b/lib/datadog_api_client/v2/models/relationship_to_rule_data.rb index 735981327f88..b468aceb663c 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_rule_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_rule_data.rb @@ -24,6 +24,8 @@ class RelationshipToRuleData # Rule relationship data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToRuleData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToRuleData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_rule_data_object.rb b/lib/datadog_api_client/v2/models/relationship_to_rule_data_object.rb index 3adbf49506fd..555373178643 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_rule_data_object.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_rule_data_object.rb @@ -27,6 +27,8 @@ class RelationshipToRuleDataObject # The JSON:API type for scorecard. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToRuleDataObject` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToRuleDataObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute.rb b/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute.rb index adfd6cc3d8e0..e533ad7516dc 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute.rb @@ -24,6 +24,8 @@ class RelationshipToSAMLAssertionAttribute # Data of AuthN Mapping relationship to SAML Assertion Attribute. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToSAMLAssertionAttribute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToSAMLAssertionAttribute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute_data.rb b/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute_data.rb index 45eca8f9603a..42672a5a9c8a 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute_data.rb @@ -27,6 +27,8 @@ class RelationshipToSAMLAssertionAttributeData # SAML assertion attributes resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToSAMLAssertionAttributeData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToSAMLAssertionAttributeData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_team.rb b/lib/datadog_api_client/v2/models/relationship_to_team.rb index 36edf6649265..70cab11457da 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_team.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_team.rb @@ -24,6 +24,8 @@ class RelationshipToTeam # Relationship to Team object. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToTeam` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_team_data.rb b/lib/datadog_api_client/v2/models/relationship_to_team_data.rb index 920954253e6c..80ad94e0575a 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_team_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_team_data.rb @@ -27,6 +27,8 @@ class RelationshipToTeamData # Team type attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToTeamData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToTeamData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_team_link_data.rb b/lib/datadog_api_client/v2/models/relationship_to_team_link_data.rb index 55783f329b7a..9d02fa725ffb 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_team_link_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_team_link_data.rb @@ -27,6 +27,8 @@ class RelationshipToTeamLinkData # Team link type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToTeamLinkData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToTeamLinkData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_team_links.rb b/lib/datadog_api_client/v2/models/relationship_to_team_links.rb index 65765cfae8fe..b66766eaf7bd 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_team_links.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_team_links.rb @@ -27,6 +27,8 @@ class RelationshipToTeamLinks # Links attributes. attr_accessor :links + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToTeamLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToTeamLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && links == o.links + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_user.rb b/lib/datadog_api_client/v2/models/relationship_to_user.rb index 93c7e4b1927d..fec9bfdda5ff 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_user.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_user.rb @@ -24,6 +24,8 @@ class RelationshipToUser # Relationship to user object. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_user_data.rb b/lib/datadog_api_client/v2/models/relationship_to_user_data.rb index 8221f72c0446..438568ea71a2 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_user_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_user_data.rb @@ -27,6 +27,8 @@ class RelationshipToUserData # Users resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUserData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUserData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb b/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb index 048e772e8df2..cd3be9d08337 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb @@ -27,6 +27,8 @@ class RelationshipToUserTeamPermission # Links attributes. attr_accessor :links + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUserTeamPermission` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUserTeamPermission`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && links == o.links + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_user_team_permission_data.rb b/lib/datadog_api_client/v2/models/relationship_to_user_team_permission_data.rb index 7411452a9fa8..00915d027049 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_user_team_permission_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_user_team_permission_data.rb @@ -27,6 +27,8 @@ class RelationshipToUserTeamPermissionData # User team permission type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUserTeamPermissionData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUserTeamPermissionData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb b/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb index e836b4ca9f30..c6690ef0fb61 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb @@ -24,6 +24,8 @@ class RelationshipToUserTeamTeam # The team associated with the membership attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUserTeamTeam` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUserTeamTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb b/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb index ac17ac4281bf..ec931318c453 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb @@ -27,6 +27,8 @@ class RelationshipToUserTeamTeamData # User team team type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUserTeamTeamData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUserTeamTeamData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_user_team_user.rb b/lib/datadog_api_client/v2/models/relationship_to_user_team_user.rb index fe3162558bb9..d51707514aac 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_user_team_user.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_user_team_user.rb @@ -24,6 +24,8 @@ class RelationshipToUserTeamUser # A user's relationship with a team attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUserTeamUser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUserTeamUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_user_team_user_data.rb b/lib/datadog_api_client/v2/models/relationship_to_user_team_user_data.rb index e867772bff61..1b159f0b682b 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_user_team_user_data.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_user_team_user_data.rb @@ -27,6 +27,8 @@ class RelationshipToUserTeamUserData # User team user type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUserTeamUserData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUserTeamUserData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/relationship_to_users.rb b/lib/datadog_api_client/v2/models/relationship_to_users.rb index 336a38597267..a3a159c2ad85 100644 --- a/lib/datadog_api_client/v2/models/relationship_to_users.rb +++ b/lib/datadog_api_client/v2/models/relationship_to_users.rb @@ -24,6 +24,8 @@ class RelationshipToUsers # Relationships to user objects. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RelationshipToUsers` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RelationshipToUsers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb b/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb index 65abcc88d961..2cd54eb39488 100644 --- a/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb +++ b/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb @@ -24,6 +24,8 @@ class ReorderRetentionFiltersRequest # A list of retention filters objects. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReorderRetentionFiltersRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ReorderRetentionFiltersRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/response_meta_attributes.rb b/lib/datadog_api_client/v2/models/response_meta_attributes.rb index 5686cc0ba4e5..e19de5445794 100644 --- a/lib/datadog_api_client/v2/models/response_meta_attributes.rb +++ b/lib/datadog_api_client/v2/models/response_meta_attributes.rb @@ -24,6 +24,8 @@ class ResponseMetaAttributes # Pagination object. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ResponseMetaAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ResponseMetaAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/restriction_policy.rb b/lib/datadog_api_client/v2/models/restriction_policy.rb index 4c7679a04b65..4766951a5204 100644 --- a/lib/datadog_api_client/v2/models/restriction_policy.rb +++ b/lib/datadog_api_client/v2/models/restriction_policy.rb @@ -30,6 +30,8 @@ class RestrictionPolicy # Restriction policy type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RestrictionPolicy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RestrictionPolicy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/restriction_policy_attributes.rb b/lib/datadog_api_client/v2/models/restriction_policy_attributes.rb index e782d277f8dd..ea0df9411c6a 100644 --- a/lib/datadog_api_client/v2/models/restriction_policy_attributes.rb +++ b/lib/datadog_api_client/v2/models/restriction_policy_attributes.rb @@ -24,6 +24,8 @@ class RestrictionPolicyAttributes # An array of bindings. attr_reader :bindings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RestrictionPolicyAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RestrictionPolicyAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'bindings') @@ -81,6 +85,26 @@ def bindings=(bindings) @bindings = bindings 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && bindings == o.bindings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/restriction_policy_binding.rb b/lib/datadog_api_client/v2/models/restriction_policy_binding.rb index b183849a77d0..23917da85db2 100644 --- a/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +++ b/lib/datadog_api_client/v2/models/restriction_policy_binding.rb @@ -30,6 +30,8 @@ class RestrictionPolicyBinding # The role/level of access. attr_reader :relation + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -56,12 +58,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RestrictionPolicyBinding` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RestrictionPolicyBinding`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'principals') @@ -104,6 +108,26 @@ def relation=(relation) @relation = relation 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 @@ -112,6 +136,7 @@ def ==(o) self.class == o.class && principals == o.principals && relation == o.relation + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/restriction_policy_response.rb b/lib/datadog_api_client/v2/models/restriction_policy_response.rb index cce3aa419286..8527cf7bc31e 100644 --- a/lib/datadog_api_client/v2/models/restriction_policy_response.rb +++ b/lib/datadog_api_client/v2/models/restriction_policy_response.rb @@ -24,6 +24,8 @@ class RestrictionPolicyResponse # Restriction policy object. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RestrictionPolicyResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RestrictionPolicyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/restriction_policy_update_request.rb b/lib/datadog_api_client/v2/models/restriction_policy_update_request.rb index bd0a85c8f386..ea529de2c738 100644 --- a/lib/datadog_api_client/v2/models/restriction_policy_update_request.rb +++ b/lib/datadog_api_client/v2/models/restriction_policy_update_request.rb @@ -24,6 +24,8 @@ class RestrictionPolicyUpdateRequest # Restriction policy object. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RestrictionPolicyUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RestrictionPolicyUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter.rb b/lib/datadog_api_client/v2/models/retention_filter.rb index b0c8f90ac9d9..0861510c9911 100644 --- a/lib/datadog_api_client/v2/models/retention_filter.rb +++ b/lib/datadog_api_client/v2/models/retention_filter.rb @@ -30,6 +30,8 @@ class RetentionFilter # The type of the resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_all.rb b/lib/datadog_api_client/v2/models/retention_filter_all.rb index 5cc896d195ef..dcf538faacc8 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_all.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_all.rb @@ -30,6 +30,8 @@ class RetentionFilterAll # The type of the resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterAll` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterAll`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb b/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb index e93319cd18fd..c48aafd0946e 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb @@ -55,6 +55,8 @@ class RetentionFilterAllAttributes # a value of 1.0 keeps all spans matching the query. attr_accessor :rate + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -99,12 +101,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterAllAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterAllAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -152,6 +156,26 @@ 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 @@ -169,6 +193,7 @@ def ==(o) modified_by == o.modified_by && name == o.name && rate == o.rate + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_attributes.rb b/lib/datadog_api_client/v2/models/retention_filter_attributes.rb index 0bc78699f955..c35d477e49ab 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_attributes.rb @@ -55,6 +55,8 @@ class RetentionFilterAttributes # a value of 1.0 keeps all spans matching the query. attr_accessor :rate + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -99,12 +101,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -152,6 +156,26 @@ 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 @@ -169,6 +193,7 @@ def ==(o) modified_by == o.modified_by && name == o.name && rate == o.rate + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb b/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb index 3853e03c6dbc..4523a48917ea 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb @@ -37,6 +37,8 @@ class RetentionFilterCreateAttributes # a value of 1.0 keeps all spans matching the query. attr_reader :rate + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -160,6 +164,26 @@ def rate=(rate) @rate = rate 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 @@ -171,6 +195,7 @@ def ==(o) filter_type == o.filter_type && name == o.name && rate == o.rate + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_create_data.rb b/lib/datadog_api_client/v2/models/retention_filter_create_data.rb index 50aa0b4d3812..341f65606b6d 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_create_data.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_create_data.rb @@ -27,6 +27,8 @@ class RetentionFilterCreateData # The type of the resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_create_request.rb b/lib/datadog_api_client/v2/models/retention_filter_create_request.rb index 0657c7319832..848aba61a317 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_create_request.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_create_request.rb @@ -24,6 +24,8 @@ class RetentionFilterCreateRequest # The body of the retention filter to be created. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_create_response.rb b/lib/datadog_api_client/v2/models/retention_filter_create_response.rb index 377d5770dab4..52f4e6c27df5 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_create_response.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_create_response.rb @@ -24,6 +24,8 @@ class RetentionFilterCreateResponse # The definition of the retention filter. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterCreateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_response.rb b/lib/datadog_api_client/v2/models/retention_filter_response.rb index 111cc64de73b..41825e4a1fcb 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_response.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_response.rb @@ -24,6 +24,8 @@ class RetentionFilterResponse # The definition of the retention filter. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb b/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb index 7a23fae490d4..22430337a593 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb @@ -37,6 +37,8 @@ class RetentionFilterUpdateAttributes # a value of 1.0 keeps all spans matching the query. attr_reader :rate + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'enabled') @@ -160,6 +164,26 @@ def rate=(rate) @rate = rate 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 @@ -171,6 +195,7 @@ def ==(o) filter_type == o.filter_type && name == o.name && rate == o.rate + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_update_data.rb b/lib/datadog_api_client/v2/models/retention_filter_update_data.rb index 5265422d7512..20bd99e96080 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_update_data.rb @@ -30,6 +30,8 @@ class RetentionFilterUpdateData # The type of the resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_update_request.rb b/lib/datadog_api_client/v2/models/retention_filter_update_request.rb index 464f9962a6e6..f4a80de96261 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_update_request.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_update_request.rb @@ -24,6 +24,8 @@ class RetentionFilterUpdateRequest # The body of the retention filter to be updated. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb b/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb index 8b832b80f8c4..69f53722f692 100644 --- a/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb +++ b/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb @@ -27,6 +27,8 @@ class RetentionFilterWithoutAttributes # The type of the resource. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterWithoutAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterWithoutAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/retention_filters_response.rb b/lib/datadog_api_client/v2/models/retention_filters_response.rb index 457dd66669a7..98d8f95d0ceb 100644 --- a/lib/datadog_api_client/v2/models/retention_filters_response.rb +++ b/lib/datadog_api_client/v2/models/retention_filters_response.rb @@ -24,6 +24,8 @@ class RetentionFiltersResponse # A list of retention filters objects. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFiltersResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFiltersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role.rb b/lib/datadog_api_client/v2/models/role.rb index 8cd6f21b6357..8c4df78b6226 100644 --- a/lib/datadog_api_client/v2/models/role.rb +++ b/lib/datadog_api_client/v2/models/role.rb @@ -33,6 +33,8 @@ class Role # Roles type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Role` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Role`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -106,6 +110,26 @@ def type=(type) @type = type 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 @@ -116,6 +140,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_attributes.rb b/lib/datadog_api_client/v2/models/role_attributes.rb index a51aa8aa26f3..c0e29cdee010 100644 --- a/lib/datadog_api_client/v2/models/role_attributes.rb +++ b/lib/datadog_api_client/v2/models/role_attributes.rb @@ -33,6 +33,8 @@ class RoleAttributes # Number of users with that role. attr_accessor :user_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) modified_at == o.modified_at && name == o.name && user_count == o.user_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_clone.rb b/lib/datadog_api_client/v2/models/role_clone.rb index ab6286c042df..89337d2f5938 100644 --- a/lib/datadog_api_client/v2/models/role_clone.rb +++ b/lib/datadog_api_client/v2/models/role_clone.rb @@ -27,6 +27,8 @@ class RoleClone # Roles type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleClone` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleClone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_clone_attributes.rb b/lib/datadog_api_client/v2/models/role_clone_attributes.rb index 84e34cb9c258..f849d1b073f4 100644 --- a/lib/datadog_api_client/v2/models/role_clone_attributes.rb +++ b/lib/datadog_api_client/v2/models/role_clone_attributes.rb @@ -24,6 +24,8 @@ class RoleCloneAttributes # Name of the new role that is cloned. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleCloneAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleCloneAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -79,6 +83,26 @@ def name=(name) @name = name 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_clone_request.rb b/lib/datadog_api_client/v2/models/role_clone_request.rb index 43306a5da108..c9d9e47a5a19 100644 --- a/lib/datadog_api_client/v2/models/role_clone_request.rb +++ b/lib/datadog_api_client/v2/models/role_clone_request.rb @@ -24,6 +24,8 @@ class RoleCloneRequest # Data for the clone role request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleCloneRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleCloneRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_create_attributes.rb b/lib/datadog_api_client/v2/models/role_create_attributes.rb index 836c2cef907c..13ad28649751 100644 --- a/lib/datadog_api_client/v2/models/role_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/role_create_attributes.rb @@ -30,6 +30,8 @@ class RoleCreateAttributes # Name of the role. attr_reader :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -97,6 +101,26 @@ def name=(name) @name = name 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 @@ -106,6 +130,7 @@ def ==(o) created_at == o.created_at && modified_at == o.modified_at && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_create_data.rb b/lib/datadog_api_client/v2/models/role_create_data.rb index 662159f110d9..26f34df67ef8 100644 --- a/lib/datadog_api_client/v2/models/role_create_data.rb +++ b/lib/datadog_api_client/v2/models/role_create_data.rb @@ -30,6 +30,8 @@ class RoleCreateData # Roles type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def attributes=(attributes) @attributes = attributes 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_create_request.rb b/lib/datadog_api_client/v2/models/role_create_request.rb index c1fb39c24b77..75138206aaaa 100644 --- a/lib/datadog_api_client/v2/models/role_create_request.rb +++ b/lib/datadog_api_client/v2/models/role_create_request.rb @@ -24,6 +24,8 @@ class RoleCreateRequest # Data related to the creation of a role. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_create_response.rb b/lib/datadog_api_client/v2/models/role_create_response.rb index df1de8bce22c..8e3e024bb548 100644 --- a/lib/datadog_api_client/v2/models/role_create_response.rb +++ b/lib/datadog_api_client/v2/models/role_create_response.rb @@ -24,6 +24,8 @@ class RoleCreateResponse # Role object returned by the API. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleCreateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_create_response_data.rb b/lib/datadog_api_client/v2/models/role_create_response_data.rb index 39f7f4d30ccc..4bd6abb0a421 100644 --- a/lib/datadog_api_client/v2/models/role_create_response_data.rb +++ b/lib/datadog_api_client/v2/models/role_create_response_data.rb @@ -33,6 +33,8 @@ class RoleCreateResponseData # Roles type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleCreateResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleCreateResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -106,6 +110,26 @@ def type=(type) @type = type 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 @@ -116,6 +140,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_relationships.rb b/lib/datadog_api_client/v2/models/role_relationships.rb index f6733988c928..1091fac689c1 100644 --- a/lib/datadog_api_client/v2/models/role_relationships.rb +++ b/lib/datadog_api_client/v2/models/role_relationships.rb @@ -24,6 +24,8 @@ class RoleRelationships # Relationship to multiple permissions objects. attr_accessor :permissions + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'permissions') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && permissions == o.permissions + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_response.rb b/lib/datadog_api_client/v2/models/role_response.rb index 1232f5a6175c..17eb79d8b58f 100644 --- a/lib/datadog_api_client/v2/models/role_response.rb +++ b/lib/datadog_api_client/v2/models/role_response.rb @@ -24,6 +24,8 @@ class RoleResponse # Role object returned by the API. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_response_relationships.rb b/lib/datadog_api_client/v2/models/role_response_relationships.rb index 6e46c4b48e7d..e023d5b0ddd7 100644 --- a/lib/datadog_api_client/v2/models/role_response_relationships.rb +++ b/lib/datadog_api_client/v2/models/role_response_relationships.rb @@ -24,6 +24,8 @@ class RoleResponseRelationships # Relationship to multiple permissions objects. attr_accessor :permissions + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleResponseRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleResponseRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'permissions') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && permissions == o.permissions + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_update_attributes.rb b/lib/datadog_api_client/v2/models/role_update_attributes.rb index 1a5c1438bfdf..98223dbbb795 100644 --- a/lib/datadog_api_client/v2/models/role_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/role_update_attributes.rb @@ -33,6 +33,8 @@ class RoleUpdateAttributes # The user count. attr_reader :user_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -106,6 +110,26 @@ def user_count=(user_count) @user_count = user_count 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 @@ -116,6 +140,7 @@ def ==(o) modified_at == o.modified_at && name == o.name && user_count == o.user_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_update_data.rb b/lib/datadog_api_client/v2/models/role_update_data.rb index 01265dc34bd0..51b54e728d73 100644 --- a/lib/datadog_api_client/v2/models/role_update_data.rb +++ b/lib/datadog_api_client/v2/models/role_update_data.rb @@ -33,6 +33,8 @@ class RoleUpdateData # Roles type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -128,6 +132,26 @@ def type=(type) @type = type 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 @@ -138,6 +162,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_update_request.rb b/lib/datadog_api_client/v2/models/role_update_request.rb index 3a5c17147537..cb04be8f5708 100644 --- a/lib/datadog_api_client/v2/models/role_update_request.rb +++ b/lib/datadog_api_client/v2/models/role_update_request.rb @@ -24,6 +24,8 @@ class RoleUpdateRequest # Data related to the update of a role. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_update_response.rb b/lib/datadog_api_client/v2/models/role_update_response.rb index f893d718a139..d7f9bb7769bf 100644 --- a/lib/datadog_api_client/v2/models/role_update_response.rb +++ b/lib/datadog_api_client/v2/models/role_update_response.rb @@ -24,6 +24,8 @@ class RoleUpdateResponse # Role object returned by the API. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleUpdateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/role_update_response_data.rb b/lib/datadog_api_client/v2/models/role_update_response_data.rb index 136d297ba73d..544e72297b8a 100644 --- a/lib/datadog_api_client/v2/models/role_update_response_data.rb +++ b/lib/datadog_api_client/v2/models/role_update_response_data.rb @@ -33,6 +33,8 @@ class RoleUpdateResponseData # Roles type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RoleUpdateResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RoleUpdateResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -106,6 +110,26 @@ def type=(type) @type = type 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 @@ -116,6 +140,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/roles_response.rb b/lib/datadog_api_client/v2/models/roles_response.rb index 56e9ba61aaf5..91ba466815ae 100644 --- a/lib/datadog_api_client/v2/models/roles_response.rb +++ b/lib/datadog_api_client/v2/models/roles_response.rb @@ -27,6 +27,8 @@ class RolesResponse # Object describing meta attributes of response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RolesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RolesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rule_attributes.rb b/lib/datadog_api_client/v2/models/rule_attributes.rb index cc56629cae19..a518c9c22db4 100644 --- a/lib/datadog_api_client/v2/models/rule_attributes.rb +++ b/lib/datadog_api_client/v2/models/rule_attributes.rb @@ -48,6 +48,8 @@ class RuleAttributes # The scorecard name to which this rule must belong. attr_accessor :scorecard_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RuleAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RuleAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'category') @@ -133,6 +137,26 @@ 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 @@ -148,6 +172,7 @@ def ==(o) name == o.name && owner == o.owner && scorecard_name == o.scorecard_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rule_outcome_relationships.rb b/lib/datadog_api_client/v2/models/rule_outcome_relationships.rb index ba324781a617..161fd9b0a134 100644 --- a/lib/datadog_api_client/v2/models/rule_outcome_relationships.rb +++ b/lib/datadog_api_client/v2/models/rule_outcome_relationships.rb @@ -24,6 +24,8 @@ class RuleOutcomeRelationships # The JSON:API relationship to a scorecard outcome. attr_accessor :rule + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RuleOutcomeRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RuleOutcomeRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'rule') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && rule == o.rule + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_aggregate_bucket_value_timeseries_point.rb b/lib/datadog_api_client/v2/models/rum_aggregate_bucket_value_timeseries_point.rb index 510a3dd25fa6..10dad6422c92 100644 --- a/lib/datadog_api_client/v2/models/rum_aggregate_bucket_value_timeseries_point.rb +++ b/lib/datadog_api_client/v2/models/rum_aggregate_bucket_value_timeseries_point.rb @@ -27,6 +27,8 @@ class RUMAggregateBucketValueTimeseriesPoint # The value for this point. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMAggregateBucketValueTimeseriesPoint` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMAggregateBucketValueTimeseriesPoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && time == o.time && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_aggregate_request.rb b/lib/datadog_api_client/v2/models/rum_aggregate_request.rb index 66a5c5c9f3d3..6fb4a567573a 100644 --- a/lib/datadog_api_client/v2/models/rum_aggregate_request.rb +++ b/lib/datadog_api_client/v2/models/rum_aggregate_request.rb @@ -37,6 +37,8 @@ class RUMAggregateRequest # Paging attributes for listing events. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMAggregateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMAggregateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -102,6 +106,26 @@ 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 @@ -113,6 +137,7 @@ def ==(o) group_by == o.group_by && options == o.options && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_aggregate_sort.rb b/lib/datadog_api_client/v2/models/rum_aggregate_sort.rb index 450cd3d8d508..7f81121f435f 100644 --- a/lib/datadog_api_client/v2/models/rum_aggregate_sort.rb +++ b/lib/datadog_api_client/v2/models/rum_aggregate_sort.rb @@ -33,6 +33,8 @@ class RUMAggregateSort # The type of sorting algorithm. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMAggregateSort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMAggregateSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) metric == o.metric && order == o.order && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_aggregation_buckets_response.rb b/lib/datadog_api_client/v2/models/rum_aggregation_buckets_response.rb index 46deebb09eb9..85ab5e0f0210 100644 --- a/lib/datadog_api_client/v2/models/rum_aggregation_buckets_response.rb +++ b/lib/datadog_api_client/v2/models/rum_aggregation_buckets_response.rb @@ -24,6 +24,8 @@ class RUMAggregationBucketsResponse # The list of matching buckets, one item per bucket. attr_accessor :buckets + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMAggregationBucketsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMAggregationBucketsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'buckets') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && buckets == o.buckets + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_analytics_aggregate_response.rb b/lib/datadog_api_client/v2/models/rum_analytics_aggregate_response.rb index 1d930b76dda1..7b99e54b060c 100644 --- a/lib/datadog_api_client/v2/models/rum_analytics_aggregate_response.rb +++ b/lib/datadog_api_client/v2/models/rum_analytics_aggregate_response.rb @@ -30,6 +30,8 @@ class RUMAnalyticsAggregateResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMAnalyticsAggregateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMAnalyticsAggregateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application.rb b/lib/datadog_api_client/v2/models/rum_application.rb index f551d4cdfbe4..7a314a50c8e7 100644 --- a/lib/datadog_api_client/v2/models/rum_application.rb +++ b/lib/datadog_api_client/v2/models/rum_application.rb @@ -30,6 +30,8 @@ class RUMApplication # RUM application response type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplication` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_attributes.rb index 789717978d99..04c1477e2dc1 100644 --- a/lib/datadog_api_client/v2/models/rum_application_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_attributes.rb @@ -54,6 +54,8 @@ class RUMApplicationAttributes # Handle of the updater user. attr_reader :updated_by_handle + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'application_id') @@ -261,6 +265,26 @@ def updated_by_handle=(updated_by_handle) @updated_by_handle = updated_by_handle 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 @@ -278,6 +302,7 @@ def ==(o) type == o.type && updated_at == o.updated_at && updated_by_handle == o.updated_by_handle + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_create.rb b/lib/datadog_api_client/v2/models/rum_application_create.rb index eb364f502066..68f20a9839d3 100644 --- a/lib/datadog_api_client/v2/models/rum_application_create.rb +++ b/lib/datadog_api_client/v2/models/rum_application_create.rb @@ -27,6 +27,8 @@ class RUMApplicationCreate # RUM application creation type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb index c2524d08923d..d3a496f36057 100644 --- a/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb @@ -27,6 +27,8 @@ class RUMApplicationCreateAttributes # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -88,6 +92,26 @@ def name=(name) @name = name 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_create_request.rb b/lib/datadog_api_client/v2/models/rum_application_create_request.rb index 35970e3cd0a5..ad7a55bdd6d1 100644 --- a/lib/datadog_api_client/v2/models/rum_application_create_request.rb +++ b/lib/datadog_api_client/v2/models/rum_application_create_request.rb @@ -24,6 +24,8 @@ class RUMApplicationCreateRequest # RUM application creation. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_list.rb b/lib/datadog_api_client/v2/models/rum_application_list.rb index 169d7b18978f..6e65862cfeb2 100644 --- a/lib/datadog_api_client/v2/models/rum_application_list.rb +++ b/lib/datadog_api_client/v2/models/rum_application_list.rb @@ -30,6 +30,8 @@ class RUMApplicationList # RUM application list type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationList` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb index c6bc12e48d56..5eae39c30461 100644 --- a/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb @@ -51,6 +51,8 @@ class RUMApplicationListAttributes # Handle of the updater user. attr_reader :updated_by_handle + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationListAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationListAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'application_id') @@ -241,6 +245,26 @@ def updated_by_handle=(updated_by_handle) @updated_by_handle = updated_by_handle 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 @@ -257,6 +281,7 @@ def ==(o) type == o.type && updated_at == o.updated_at && updated_by_handle == o.updated_by_handle + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_response.rb b/lib/datadog_api_client/v2/models/rum_application_response.rb index deaa3a4cf90d..34388b21ad84 100644 --- a/lib/datadog_api_client/v2/models/rum_application_response.rb +++ b/lib/datadog_api_client/v2/models/rum_application_response.rb @@ -24,6 +24,8 @@ class RUMApplicationResponse # RUM application. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_update.rb b/lib/datadog_api_client/v2/models/rum_application_update.rb index 7b232c882d22..01ae304d87b4 100644 --- a/lib/datadog_api_client/v2/models/rum_application_update.rb +++ b/lib/datadog_api_client/v2/models/rum_application_update.rb @@ -30,6 +30,8 @@ class RUMApplicationUpdate # RUM application update type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationUpdate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb index 1e806fc847a6..ef20a63bc912 100644 --- a/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb @@ -27,6 +27,8 @@ class RUMApplicationUpdateAttributes # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_application_update_request.rb b/lib/datadog_api_client/v2/models/rum_application_update_request.rb index 90ef02959dd2..5be324550c9b 100644 --- a/lib/datadog_api_client/v2/models/rum_application_update_request.rb +++ b/lib/datadog_api_client/v2/models/rum_application_update_request.rb @@ -24,6 +24,8 @@ class RUMApplicationUpdateRequest # RUM application update. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_applications_response.rb b/lib/datadog_api_client/v2/models/rum_applications_response.rb index 51e65ebfe28c..ef9cbbdeb566 100644 --- a/lib/datadog_api_client/v2/models/rum_applications_response.rb +++ b/lib/datadog_api_client/v2/models/rum_applications_response.rb @@ -24,6 +24,8 @@ class RUMApplicationsResponse # RUM applications array response. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_bucket_response.rb b/lib/datadog_api_client/v2/models/rum_bucket_response.rb index 6c2019216ac1..791864998712 100644 --- a/lib/datadog_api_client/v2/models/rum_bucket_response.rb +++ b/lib/datadog_api_client/v2/models/rum_bucket_response.rb @@ -27,6 +27,8 @@ class RUMBucketResponse # A map of the metric name to value for regular compute, or a list of values for a timeseries. attr_accessor :computes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMBucketResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMBucketResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'by') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && by == o.by && computes == o.computes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_compute.rb b/lib/datadog_api_client/v2/models/rum_compute.rb index 3a36028dbcda..1971e409cb88 100644 --- a/lib/datadog_api_client/v2/models/rum_compute.rb +++ b/lib/datadog_api_client/v2/models/rum_compute.rb @@ -34,6 +34,8 @@ class RUMCompute # The type of compute. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -107,6 +111,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -117,6 +141,7 @@ def ==(o) interval == o.interval && metric == o.metric && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_event.rb b/lib/datadog_api_client/v2/models/rum_event.rb index 308ca686d10d..7329eb406f1b 100644 --- a/lib/datadog_api_client/v2/models/rum_event.rb +++ b/lib/datadog_api_client/v2/models/rum_event.rb @@ -30,6 +30,8 @@ class RUMEvent # Type of the event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMEvent` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_event_attributes.rb b/lib/datadog_api_client/v2/models/rum_event_attributes.rb index 75f2f81f3d22..02e4f022da0e 100644 --- a/lib/datadog_api_client/v2/models/rum_event_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_event_attributes.rb @@ -35,6 +35,8 @@ class RUMEventAttributes # Timestamp of your event. attr_accessor :timestamp + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -65,12 +67,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMEventAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMEventAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -92,6 +96,26 @@ 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 @@ -102,6 +126,7 @@ def ==(o) service == o.service && tags == o.tags && timestamp == o.timestamp + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_events_response.rb b/lib/datadog_api_client/v2/models/rum_events_response.rb index 082787030832..215f6b81e309 100644 --- a/lib/datadog_api_client/v2/models/rum_events_response.rb +++ b/lib/datadog_api_client/v2/models/rum_events_response.rb @@ -30,6 +30,8 @@ class RUMEventsResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMEventsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMEventsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_group_by.rb b/lib/datadog_api_client/v2/models/rum_group_by.rb index 72a12a2ab02c..08b65ee88692 100644 --- a/lib/datadog_api_client/v2/models/rum_group_by.rb +++ b/lib/datadog_api_client/v2/models/rum_group_by.rb @@ -40,6 +40,8 @@ class RUMGroupBy # A resulting object to put the given computes in over all the matching records. attr_accessor :total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -74,12 +76,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -125,6 +129,26 @@ def facet=(facet) @facet = facet 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 @@ -137,6 +161,7 @@ def ==(o) missing == o.missing && sort == o.sort && total == o.total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_group_by_histogram.rb b/lib/datadog_api_client/v2/models/rum_group_by_histogram.rb index 325d2297e590..0cb875d5e49c 100644 --- a/lib/datadog_api_client/v2/models/rum_group_by_histogram.rb +++ b/lib/datadog_api_client/v2/models/rum_group_by_histogram.rb @@ -33,6 +33,8 @@ class RUMGroupByHistogram # (values smaller than this one are filtered out). attr_reader :min + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMGroupByHistogram` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMGroupByHistogram`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'interval') @@ -122,6 +126,26 @@ def min=(min) @min = min 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 @@ -131,6 +155,7 @@ def ==(o) interval == o.interval && max == o.max && min == o.min + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_query_filter.rb b/lib/datadog_api_client/v2/models/rum_query_filter.rb index ca8dd5270c6b..1e369efa8e6a 100644 --- a/lib/datadog_api_client/v2/models/rum_query_filter.rb +++ b/lib/datadog_api_client/v2/models/rum_query_filter.rb @@ -30,6 +30,8 @@ class RUMQueryFilter # The maximum time for the requested events; supports date (in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMQueryFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMQueryFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) from == o.from && query == o.query && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_query_options.rb b/lib/datadog_api_client/v2/models/rum_query_options.rb index 62758720ffb9..b6abb6c26941 100644 --- a/lib/datadog_api_client/v2/models/rum_query_options.rb +++ b/lib/datadog_api_client/v2/models/rum_query_options.rb @@ -28,6 +28,8 @@ class RUMQueryOptions # The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMQueryOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMQueryOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time_offset') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && time_offset == o.time_offset && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_query_page_options.rb b/lib/datadog_api_client/v2/models/rum_query_page_options.rb index e24f9e281c8e..6c92017a274f 100644 --- a/lib/datadog_api_client/v2/models/rum_query_page_options.rb +++ b/lib/datadog_api_client/v2/models/rum_query_page_options.rb @@ -27,6 +27,8 @@ class RUMQueryPageOptions # Maximum number of events in the response. attr_reader :limit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMQueryPageOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMQueryPageOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -88,6 +92,26 @@ def limit=(limit) @limit = limit 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && cursor == o.cursor && limit == o.limit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_response_links.rb b/lib/datadog_api_client/v2/models/rum_response_links.rb index eb4c3a385c0d..f478702c05ea 100644 --- a/lib/datadog_api_client/v2/models/rum_response_links.rb +++ b/lib/datadog_api_client/v2/models/rum_response_links.rb @@ -25,6 +25,8 @@ class RUMResponseLinks # POST endpoint. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_response_metadata.rb b/lib/datadog_api_client/v2/models/rum_response_metadata.rb index aab77cf45d94..f132ca797e55 100644 --- a/lib/datadog_api_client/v2/models/rum_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/rum_response_metadata.rb @@ -37,6 +37,8 @@ class RUMResponseMetadata # warnings are present in the response. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elapsed') @@ -100,6 +104,26 @@ 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 @@ -111,6 +135,7 @@ def ==(o) request_id == o.request_id && status == o.status && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_response_page.rb b/lib/datadog_api_client/v2/models/rum_response_page.rb index 52fef2e5e4c8..f218617b167e 100644 --- a/lib/datadog_api_client/v2/models/rum_response_page.rb +++ b/lib/datadog_api_client/v2/models/rum_response_page.rb @@ -24,6 +24,8 @@ class RUMResponsePage # The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]`. attr_accessor :after + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMResponsePage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMResponsePage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'after') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && after == o.after + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_search_events_request.rb b/lib/datadog_api_client/v2/models/rum_search_events_request.rb index dc80c4702d44..916dc7c7e123 100644 --- a/lib/datadog_api_client/v2/models/rum_search_events_request.rb +++ b/lib/datadog_api_client/v2/models/rum_search_events_request.rb @@ -34,6 +34,8 @@ class RUMSearchEventsRequest # Sort parameters when querying events. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMSearchEventsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMSearchEventsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -89,6 +93,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) options == o.options && page == o.page && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/rum_warning.rb b/lib/datadog_api_client/v2/models/rum_warning.rb index a2f9396e7f3b..93483b3f37d5 100644 --- a/lib/datadog_api_client/v2/models/rum_warning.rb +++ b/lib/datadog_api_client/v2/models/rum_warning.rb @@ -30,6 +30,8 @@ class RUMWarning # A short human-readable summary of the warning. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMWarning` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMWarning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) code == o.code && detail == o.detail && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/saml_assertion_attribute.rb b/lib/datadog_api_client/v2/models/saml_assertion_attribute.rb index bff289694fd0..6303a63f72a4 100644 --- a/lib/datadog_api_client/v2/models/saml_assertion_attribute.rb +++ b/lib/datadog_api_client/v2/models/saml_assertion_attribute.rb @@ -30,6 +30,8 @@ class SAMLAssertionAttribute # SAML assertion attributes resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SAMLAssertionAttribute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SAMLAssertionAttribute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/saml_assertion_attribute_attributes.rb b/lib/datadog_api_client/v2/models/saml_assertion_attribute_attributes.rb index e88265ff2a11..266d4a66ad95 100644 --- a/lib/datadog_api_client/v2/models/saml_assertion_attribute_attributes.rb +++ b/lib/datadog_api_client/v2/models/saml_assertion_attribute_attributes.rb @@ -27,6 +27,8 @@ class SAMLAssertionAttributeAttributes # Value portion of a key/value pair of the attribute sent from the Identity Provider. attr_accessor :attribute_value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SAMLAssertionAttributeAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SAMLAssertionAttributeAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attribute_key') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attribute_key == o.attribute_key && attribute_value == o.attribute_value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/scalar_formula_query_request.rb b/lib/datadog_api_client/v2/models/scalar_formula_query_request.rb index 4e26aecdb48f..873a7debc74a 100644 --- a/lib/datadog_api_client/v2/models/scalar_formula_query_request.rb +++ b/lib/datadog_api_client/v2/models/scalar_formula_query_request.rb @@ -24,6 +24,8 @@ class ScalarFormulaQueryRequest # A single scalar query to be executed. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScalarFormulaQueryRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarFormulaQueryRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/scalar_formula_query_response.rb b/lib/datadog_api_client/v2/models/scalar_formula_query_response.rb index e3927c97252a..b6893b8c9e68 100644 --- a/lib/datadog_api_client/v2/models/scalar_formula_query_response.rb +++ b/lib/datadog_api_client/v2/models/scalar_formula_query_response.rb @@ -27,6 +27,8 @@ class ScalarFormulaQueryResponse # An error generated when processing a request. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScalarFormulaQueryResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarFormulaQueryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/scalar_formula_request.rb b/lib/datadog_api_client/v2/models/scalar_formula_request.rb index 04cdbc7fb0b2..6d218654f918 100644 --- a/lib/datadog_api_client/v2/models/scalar_formula_request.rb +++ b/lib/datadog_api_client/v2/models/scalar_formula_request.rb @@ -27,6 +27,8 @@ class ScalarFormulaRequest # The type of the resource. The value should always be scalar_request. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScalarFormulaRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarFormulaRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/scalar_formula_request_attributes.rb b/lib/datadog_api_client/v2/models/scalar_formula_request_attributes.rb index 95341146b05f..a7b9d7362f9b 100644 --- a/lib/datadog_api_client/v2/models/scalar_formula_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/scalar_formula_request_attributes.rb @@ -33,6 +33,8 @@ class ScalarFormulaRequestAttributes # End date (exclusive) of the query in milliseconds since the Unix epoch. attr_reader :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScalarFormulaRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarFormulaRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'formulas') @@ -132,6 +136,26 @@ def to=(to) @to = to 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 @@ -142,6 +166,7 @@ def ==(o) from == o.from && queries == o.queries && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb b/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb index 18f622301c25..b261aec2eadf 100644 --- a/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb +++ b/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb @@ -24,6 +24,8 @@ class ScalarFormulaResponseAtrributes # List of response columns, each corresponding to an individual formula or query in the request and with values in parallel arrays matching the series list. attr_accessor :columns + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScalarFormulaResponseAtrributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarFormulaResponseAtrributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'columns') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && columns == o.columns + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/scalar_meta.rb b/lib/datadog_api_client/v2/models/scalar_meta.rb index f288a99ffa9a..87fa6073d5cc 100644 --- a/lib/datadog_api_client/v2/models/scalar_meta.rb +++ b/lib/datadog_api_client/v2/models/scalar_meta.rb @@ -27,6 +27,8 @@ class ScalarMeta # If the second element is not present, the API returns null. attr_accessor :unit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScalarMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'unit') @@ -74,6 +78,26 @@ 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 @@ -81,6 +105,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && unit == o.unit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/scalar_response.rb b/lib/datadog_api_client/v2/models/scalar_response.rb index b104730c1a1d..bc5774383f3e 100644 --- a/lib/datadog_api_client/v2/models/scalar_response.rb +++ b/lib/datadog_api_client/v2/models/scalar_response.rb @@ -27,6 +27,8 @@ class ScalarResponse # The type of the resource. The value should always be scalar_response. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScalarResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter.rb b/lib/datadog_api_client/v2/models/security_filter.rb index f135fdaab926..8bded6c2c26b 100644 --- a/lib/datadog_api_client/v2/models/security_filter.rb +++ b/lib/datadog_api_client/v2/models/security_filter.rb @@ -30,6 +30,8 @@ class SecurityFilter # The type of the resource. The value should always be `security_filters`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_attributes.rb b/lib/datadog_api_client/v2/models/security_filter_attributes.rb index 264a3508083b..651e5a4fe497 100644 --- a/lib/datadog_api_client/v2/models/security_filter_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_filter_attributes.rb @@ -42,6 +42,8 @@ class SecurityFilterAttributes # The version of the security filter. attr_reader :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'exclusion_filters') @@ -135,6 +139,26 @@ def version=(version) @version = version 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 @@ -148,6 +172,7 @@ def ==(o) name == o.name && query == o.query && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_create_attributes.rb b/lib/datadog_api_client/v2/models/security_filter_create_attributes.rb index ea79d9e44949..dd776256dde4 100644 --- a/lib/datadog_api_client/v2/models/security_filter_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_filter_create_attributes.rb @@ -36,6 +36,8 @@ class SecurityFilterCreateAttributes # The query of the security filter. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'exclusion_filters') @@ -161,6 +165,26 @@ def query=(query) @query = query 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 @@ -172,6 +196,7 @@ def ==(o) is_enabled == o.is_enabled && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_create_data.rb b/lib/datadog_api_client/v2/models/security_filter_create_data.rb index 48df58d6344c..50c4119f38a5 100644 --- a/lib/datadog_api_client/v2/models/security_filter_create_data.rb +++ b/lib/datadog_api_client/v2/models/security_filter_create_data.rb @@ -27,6 +27,8 @@ class SecurityFilterCreateData # The type of the resource. The value should always be `security_filters`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_create_request.rb b/lib/datadog_api_client/v2/models/security_filter_create_request.rb index 0ebe6a72a3e5..3bf509101f8f 100644 --- a/lib/datadog_api_client/v2/models/security_filter_create_request.rb +++ b/lib/datadog_api_client/v2/models/security_filter_create_request.rb @@ -24,6 +24,8 @@ class SecurityFilterCreateRequest # Object for a single security filter. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_exclusion_filter.rb b/lib/datadog_api_client/v2/models/security_filter_exclusion_filter.rb index f50c6ec52efc..f434df72cee0 100644 --- a/lib/datadog_api_client/v2/models/security_filter_exclusion_filter.rb +++ b/lib/datadog_api_client/v2/models/security_filter_exclusion_filter.rb @@ -27,6 +27,8 @@ class SecurityFilterExclusionFilter # Exclusion filter query. Logs that match this query are excluded from the security filter. attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterExclusionFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterExclusionFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -99,6 +103,26 @@ def query=(query) @query = query 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_exclusion_filter_response.rb b/lib/datadog_api_client/v2/models/security_filter_exclusion_filter_response.rb index 0c3b7dc5d3e4..5ff70889dc17 100644 --- a/lib/datadog_api_client/v2/models/security_filter_exclusion_filter_response.rb +++ b/lib/datadog_api_client/v2/models/security_filter_exclusion_filter_response.rb @@ -27,6 +27,8 @@ class SecurityFilterExclusionFilterResponse # The exclusion filter query. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterExclusionFilterResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterExclusionFilterResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_meta.rb b/lib/datadog_api_client/v2/models/security_filter_meta.rb index 9ab9a58609a8..db08a97ded94 100644 --- a/lib/datadog_api_client/v2/models/security_filter_meta.rb +++ b/lib/datadog_api_client/v2/models/security_filter_meta.rb @@ -24,6 +24,8 @@ class SecurityFilterMeta # A warning message. attr_accessor :warning + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'warning') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && warning == o.warning + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_response.rb b/lib/datadog_api_client/v2/models/security_filter_response.rb index e96606c03a38..0665aa4bf44c 100644 --- a/lib/datadog_api_client/v2/models/security_filter_response.rb +++ b/lib/datadog_api_client/v2/models/security_filter_response.rb @@ -27,6 +27,8 @@ class SecurityFilterResponse # Optional metadata associated to the response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_update_attributes.rb b/lib/datadog_api_client/v2/models/security_filter_update_attributes.rb index a014191ddab4..ad4aa4f93f59 100644 --- a/lib/datadog_api_client/v2/models/security_filter_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_filter_update_attributes.rb @@ -39,6 +39,8 @@ class SecurityFilterUpdateAttributes # The version of the security filter to update. attr_reader :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'exclusion_filters') @@ -126,6 +130,26 @@ def version=(version) @version = version 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 @@ -138,6 +162,7 @@ def ==(o) name == o.name && query == o.query && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_update_data.rb b/lib/datadog_api_client/v2/models/security_filter_update_data.rb index aa0d0a87c445..4e432931fbcb 100644 --- a/lib/datadog_api_client/v2/models/security_filter_update_data.rb +++ b/lib/datadog_api_client/v2/models/security_filter_update_data.rb @@ -27,6 +27,8 @@ class SecurityFilterUpdateData # The type of the resource. The value should always be `security_filters`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filter_update_request.rb b/lib/datadog_api_client/v2/models/security_filter_update_request.rb index 296ff73fc2fb..a4cdf354fd2b 100644 --- a/lib/datadog_api_client/v2/models/security_filter_update_request.rb +++ b/lib/datadog_api_client/v2/models/security_filter_update_request.rb @@ -24,6 +24,8 @@ class SecurityFilterUpdateRequest # The new security filter properties. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFilterUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFilterUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_filters_response.rb b/lib/datadog_api_client/v2/models/security_filters_response.rb index 1faaf989ca25..99b298c6f6e6 100644 --- a/lib/datadog_api_client/v2/models/security_filters_response.rb +++ b/lib/datadog_api_client/v2/models/security_filters_response.rb @@ -27,6 +27,8 @@ class SecurityFiltersResponse # Optional metadata associated to the response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityFiltersResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityFiltersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_filter.rb b/lib/datadog_api_client/v2/models/security_monitoring_filter.rb index dcb32ff5c79d..1c7c372ad4ab 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_filter.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_filter.rb @@ -27,6 +27,8 @@ class SecurityMonitoringFilter # Query for selecting logs to apply the filtering action. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'action') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && action == o.action && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb index b8d6d605e95a..11c072dcaeaa 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb @@ -27,6 +27,8 @@ class SecurityMonitoringListRulesResponse # Object describing meta attributes of response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringListRulesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringListRulesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb index a57769efb4c2..d2e76ca2a393 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb @@ -34,6 +34,8 @@ class SecurityMonitoringRuleCase # Severity of the Security Signal. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCase` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleCase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'condition') @@ -91,6 +95,26 @@ 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,6 +125,7 @@ def ==(o) name == o.name && notifications == o.notifications && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb index a92d83ee7ad6..f79eb84989d5 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb @@ -34,6 +34,8 @@ class SecurityMonitoringRuleCaseCreate # Severity of the Security Signal. attr_reader :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'condition') @@ -109,6 +113,26 @@ def status=(status) @status = status 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 @@ -119,6 +143,7 @@ def ==(o) name == o.name && notifications == o.notifications && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb index ae7af7f76018..2155e271daec 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb @@ -24,6 +24,8 @@ class SecurityMonitoringRuleConvertResponse # Terraform string as a result of converting the rule from JSON. attr_accessor :terraform_content + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleConvertResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleConvertResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'terraform_content') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && terraform_content == o.terraform_content + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_impossible_travel_options.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_impossible_travel_options.rb index d9518c9fd997..0e34ef33f38b 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_impossible_travel_options.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_impossible_travel_options.rb @@ -25,6 +25,8 @@ class SecurityMonitoringRuleImpossibleTravelOptions # access locations. This can be helpful to reduce noise and infer VPN usage or credentialed API access. attr_accessor :baseline_user_locations + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleImpossibleTravelOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleImpossibleTravelOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'baseline_user_locations') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && baseline_user_locations == o.baseline_user_locations + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb index ec7e9ece12ef..0cfd69c28e7c 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb @@ -34,6 +34,8 @@ class SecurityMonitoringRuleNewValueOptions # A number of occurrences after which signals will be generated for values that weren't learned. attr_accessor :learning_threshold + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'forget_after') @@ -89,6 +93,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) learning_duration == o.learning_duration && learning_method == o.learning_method && learning_threshold == o.learning_threshold + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb index 90a07affa430..cc566c33f703 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb @@ -58,6 +58,8 @@ class SecurityMonitoringRuleOptions # Options on third party rules. attr_accessor :third_party_rule_options + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -100,12 +102,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compliance_rule_options') @@ -149,6 +153,26 @@ 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 @@ -165,6 +189,7 @@ def ==(o) max_signal_duration == o.max_signal_duration && new_value_options == o.new_value_options && third_party_rule_options == o.third_party_rule_options + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload.rb index f1dfd081f507..9438c011df77 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload.rb @@ -30,6 +30,8 @@ class SecurityMonitoringRuleQueryPayload # Payload used to test the rule query. attr_accessor :payload + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleQueryPayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleQueryPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'expected_result') @@ -97,6 +101,26 @@ def index=(index) @index = index 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 @@ -106,6 +130,7 @@ def ==(o) expected_result == o.expected_result && index == o.index && payload == o.payload + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload_data.rb index fdde443476dc..08882dc98ac2 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload_data.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload_data.rb @@ -36,6 +36,8 @@ class SecurityMonitoringRuleQueryPayloadData # The name of the application or service generating the data. attr_accessor :service + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleQueryPayloadData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleQueryPayloadData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'ddsource') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) hostname == o.hostname && message == o.message && service == o.service + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_test_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_test_request.rb index 294f60e343a8..1818c0d17061 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_test_request.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_test_request.rb @@ -27,6 +27,8 @@ class SecurityMonitoringRuleTestRequest # Data payloads used to test rules query with the expected result. attr_accessor :rule_query_payloads + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleTestRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleTestRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'rule') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && rule == o.rule && rule_query_payloads == o.rule_query_payloads + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_test_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_test_response.rb index cd5dcf215e33..141174781415 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_test_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_test_response.rb @@ -26,6 +26,8 @@ class SecurityMonitoringRuleTestResponse # False otherwise. attr_accessor :results + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -50,12 +52,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleTestResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleTestResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'results') @@ -65,6 +69,26 @@ 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 @@ -72,6 +96,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && results == o.results + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb index a2a3c44470b0..0797b7466071 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb @@ -33,6 +33,8 @@ class SecurityMonitoringRuleThirdPartyOptions # A template for the signal title; if omitted, the title is generated based on the case name. attr_accessor :signal_title_template + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleThirdPartyOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleThirdPartyOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'default_notifications') @@ -92,6 +96,26 @@ 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 @@ -102,6 +126,7 @@ def ==(o) default_status == o.default_status && root_queries == o.root_queries && signal_title_template == o.signal_title_template + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb index 128261606d45..00f141cf8e0c 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb @@ -57,6 +57,8 @@ class SecurityMonitoringRuleUpdatePayload # The version of the rule being updated. attr_reader :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -103,12 +105,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -188,6 +192,26 @@ def version=(version) @version = version 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 @@ -206,6 +230,7 @@ def ==(o) tags == o.tags && third_party_cases == o.third_party_cases && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal.rb index 960821fee3a0..e2dbb9ddff9a 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal.rb @@ -31,6 +31,8 @@ class SecurityMonitoringSignal # The type of event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignal` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignal`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -80,6 +84,26 @@ 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 @@ -89,6 +113,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_attributes.rb index 8079d977fa6e..fa8c3a27d2bf 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_attributes.rb @@ -27,6 +27,8 @@ class SecurityMonitoringSignalAssigneeUpdateAttributes # Version of the updated signal. If server side version is higher, update will be rejected. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalAssigneeUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalAssigneeUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'assignee') @@ -88,6 +92,26 @@ def assignee=(assignee) @assignee = assignee 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && assignee == o.assignee && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_data.rb index 55aea689452e..d2f78a55ee5e 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_data.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_data.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSignalAssigneeUpdateData # Attributes describing the new assignee of a security signal. attr_reader :attributes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalAssigneeUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalAssigneeUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ def attributes=(attributes) @attributes = attributes 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_request.rb index d00d8327b5cd..106492836d6e 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_request.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_assignee_update_request.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSignalAssigneeUpdateRequest # Data containing the patch for changing the assignee of a signal. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalAssigneeUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalAssigneeUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb index 757185cfad15..be0ea4213f8f 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb @@ -34,6 +34,8 @@ class SecurityMonitoringSignalAttributes # The timestamp of the security signal. attr_accessor :timestamp + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'custom') @@ -91,6 +95,26 @@ 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,6 +125,7 @@ def ==(o) message == o.message && tags == o.tags && timestamp == o.timestamp + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_attributes.rb index 59a56e2da5dd..0acfec801e23 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_attributes.rb @@ -27,6 +27,8 @@ class SecurityMonitoringSignalIncidentsUpdateAttributes # Version of the updated signal. If server side version is higher, update will be rejected. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalIncidentsUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalIncidentsUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'incident_ids') @@ -90,6 +94,26 @@ def incident_ids=(incident_ids) @incident_ids = incident_ids 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 @@ -98,6 +122,7 @@ def ==(o) self.class == o.class && incident_ids == o.incident_ids && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_data.rb index fc3c6b359062..8fa4f3bda1a8 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_data.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_data.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSignalIncidentsUpdateData # Attributes describing the new list of related signals for a security signal. attr_reader :attributes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalIncidentsUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalIncidentsUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ def attributes=(attributes) @attributes = attributes 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_request.rb index f8ff483af829..cddacf7e1d87 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_request.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_incidents_update_request.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSignalIncidentsUpdateRequest # Data containing the patch for changing the related incidents of a signal. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalIncidentsUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalIncidentsUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb index 36ede89403f4..c8e30e93e0a3 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb @@ -30,6 +30,8 @@ class SecurityMonitoringSignalListRequest # The sort parameters used for querying security signals. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) filter == o.filter && page == o.page && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb index 4d123251b4ab..1baff08c3519 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb @@ -30,6 +30,8 @@ class SecurityMonitoringSignalListRequestFilter # The maximum timestamp for requested security signals. attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) from == o.from && query == o.query && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb index b80bf59bed96..cc04385fe110 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb @@ -27,6 +27,8 @@ class SecurityMonitoringSignalListRequestPage # The maximum number of security signals in the response. attr_reader :limit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -88,6 +92,26 @@ def limit=(limit) @limit = limit 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && cursor == o.cursor && limit == o.limit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_response.rb index 9edae88c9f24..6d72f00996c9 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_response.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSignalResponse # Object description of a security signal. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb index 812759b93e3e..d182ceda8194 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb @@ -51,6 +51,8 @@ class SecurityMonitoringSignalRuleCreatePayload # The rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalRuleCreatePayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalRuleCreatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -223,6 +227,26 @@ def queries=(queries) @queries = queries 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 @@ -239,6 +263,7 @@ def ==(o) queries == o.queries && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb index 10b62b036311..5c637281f164 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb @@ -51,6 +51,8 @@ class SecurityMonitoringSignalRulePayload # The rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -93,12 +95,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalRulePayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalRulePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -223,6 +227,26 @@ def queries=(queries) @queries = queries 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 @@ -239,6 +263,7 @@ def ==(o) queries == o.queries && tags == o.tags && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb index 870a6fbb237c..2e3521f3c809 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb @@ -39,6 +39,8 @@ class SecurityMonitoringSignalRuleQuery # Rule ID to match on signals. attr_reader :rule_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalRuleQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalRuleQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -139,6 +143,26 @@ def rule_id=(rule_id) @rule_id = rule_id 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 @@ -151,6 +175,7 @@ def ==(o) metrics == o.metrics && name == o.name && rule_id == o.rule_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb index 9ca9c8f91b6a..69c62470592e 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb @@ -75,6 +75,8 @@ class SecurityMonitoringSignalRuleResponse # The version of the rule. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -133,12 +135,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalRuleResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalRuleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -222,6 +226,26 @@ 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 @@ -246,6 +270,7 @@ def ==(o) type == o.type && update_author_id == o.update_author_id && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response_query.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response_query.rb index 4345ce272ec1..137dbe361678 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response_query.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response_query.rb @@ -48,6 +48,8 @@ class SecurityMonitoringSignalRuleResponseQuery # Rule ID to match on signals. attr_accessor :rule_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalRuleResponseQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalRuleResponseQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -159,6 +163,26 @@ def correlated_query_index=(correlated_query_index) @correlated_query_index = correlated_query_index 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 @@ -174,6 +198,7 @@ def ==(o) metrics == o.metrics && name == o.name && rule_id == o.rule_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_attributes.rb index a985c17e4d0c..904798e34daa 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_attributes.rb @@ -33,6 +33,8 @@ class SecurityMonitoringSignalStateUpdateAttributes # Version of the updated signal. If server side version is higher, update will be rejected. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalStateUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalStateUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'archive_comment') @@ -106,6 +110,26 @@ def state=(state) @state = state 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 @@ -116,6 +140,7 @@ def ==(o) archive_reason == o.archive_reason && state == o.state && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_data.rb index ac22ca16146a..2f64fc2341c1 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_data.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_data.rb @@ -30,6 +30,8 @@ class SecurityMonitoringSignalStateUpdateData # The type of event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalStateUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalStateUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def attributes=(attributes) @attributes = attributes 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_request.rb index 74d687a145dc..5a75e981fc6f 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_request.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_request.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSignalStateUpdateRequest # Data containing the patch for changing the state of a signal. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalStateUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalStateUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_attributes.rb index 0ccf225a871f..14908422f19e 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_attributes.rb @@ -48,6 +48,8 @@ class SecurityMonitoringSignalTriageAttributes # Object representing a given user entity. attr_accessor :state_update_user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -88,12 +90,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalTriageAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalTriageAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'archive_comment') @@ -197,6 +201,26 @@ def state_update_timestamp=(state_update_timestamp) @state_update_timestamp = state_update_timestamp 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 @@ -212,6 +236,7 @@ def ==(o) state == o.state && state_update_timestamp == o.state_update_timestamp && state_update_user == o.state_update_user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_data.rb index f37136e761b8..656b331fbcfb 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_data.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_data.rb @@ -30,6 +30,8 @@ class SecurityMonitoringSignalTriageUpdateData # The type of event. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalTriageUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalTriageUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_response.rb index 8632aedd0248..68fc34c55957 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_response.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSignalTriageUpdateResponse # Data containing the updated triage attributes of the signal. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalTriageUpdateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalTriageUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb index 74a3ba9e7110..288a440bd5cc 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb @@ -31,6 +31,8 @@ class SecurityMonitoringSignalsListResponse # Meta attributes. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -82,6 +86,26 @@ 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 @@ -91,6 +115,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb index 383bff98fc62..e4c93664687e 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb @@ -25,6 +25,8 @@ class SecurityMonitoringSignalsListResponseLinks # POST endpoint. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb index 7f0de2ae9daf..5bced72987aa 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSignalsListResponseMeta # Paging attributes. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb index f73fb0fe19c4..6303459cc260 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb @@ -25,6 +25,8 @@ class SecurityMonitoringSignalsListResponseMetaPage # parameters with the addition of the `page[cursor]`. attr_accessor :after + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'after') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && after == o.after + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb index a9c397eda832..5798c5ff87f4 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb @@ -54,6 +54,8 @@ class SecurityMonitoringStandardRuleCreatePayload # The rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -234,6 +238,26 @@ def queries=(queries) @queries = queries 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 @@ -251,6 +275,7 @@ def ==(o) tags == o.tags && third_party_cases == o.third_party_cases && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb index 6a2ffab60eac..f5d38deb0460 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb @@ -54,6 +54,8 @@ class SecurityMonitoringStandardRulePayload # The rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringStandardRulePayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringStandardRulePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -234,6 +238,26 @@ def queries=(queries) @queries = queries 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 @@ -251,6 +275,7 @@ def ==(o) tags == o.tags && third_party_cases == o.third_party_cases && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb index 6fecd4e778b5..6a3a79b2b355 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb @@ -46,6 +46,8 @@ class SecurityMonitoringStandardRuleQuery # Query to run on logs. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -84,12 +86,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -131,6 +135,26 @@ 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 @@ -145,6 +169,7 @@ def ==(o) metrics == o.metrics && name == o.name && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb index bc7d99581315..b83d203e192d 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb @@ -84,6 +84,8 @@ class SecurityMonitoringStandardRuleResponse # The version of the rule. attr_accessor :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -148,12 +150,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -253,6 +257,26 @@ 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 @@ -280,6 +304,7 @@ def ==(o) type == o.type && update_author_id == o.update_author_id && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb index 4b42a596b8cc..3d8420242ce1 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb @@ -54,6 +54,8 @@ class SecurityMonitoringStandardRuleTestPayload # The rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleTestPayload` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleTestPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cases') @@ -234,6 +238,26 @@ def queries=(queries) @queries = queries 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 @@ -251,6 +275,7 @@ def ==(o) tags == o.tags && third_party_cases == o.third_party_cases && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb index 2dfb73328df7..77cce9903688 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb @@ -30,6 +30,8 @@ class SecurityMonitoringSuppression # The type of the resource. The value should always be `suppressions`. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppression` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppression`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb index acbdde5db0cb..3b33b0f2fd1f 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb @@ -57,6 +57,8 @@ class SecurityMonitoringSuppressionAttributes # The version of the suppression rule; it starts at 1, and is incremented at each update. attr_reader :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -103,12 +105,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'creation_date') @@ -178,6 +182,26 @@ def version=(version) @version = version 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 @@ -196,6 +220,7 @@ def ==(o) update_date == o.update_date && updater == o.updater && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb index 37b5846cd5fd..a5f8430ede56 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb @@ -42,6 +42,8 @@ class SecurityMonitoringSuppressionCreateAttributes # The suppression query of the suppression rule. If a signal matches this query, it is suppressed and is not triggered. It uses the same syntax as the queries to search signals in the Signals Explorer. attr_accessor :suppression_query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data_exclusion_query') @@ -155,6 +159,26 @@ def rule_query=(rule_query) @rule_query = rule_query 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 @@ -168,6 +192,7 @@ def ==(o) name == o.name && rule_query == o.rule_query && suppression_query == o.suppression_query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb index 2f2c8ded5c2b..4431910474fe 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb @@ -27,6 +27,8 @@ class SecurityMonitoringSuppressionCreateData # The type of the resource. The value should always be `suppressions`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb index 0abd250c88ef..a92f181cb371 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSuppressionCreateRequest # Object for a single suppression rule. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb index f43709e35457..7a8fcf2e3254 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSuppressionResponse # The suppression rule's properties. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb index b0941cf0dd77..17243b502d7e 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb @@ -45,6 +45,8 @@ class SecurityMonitoringSuppressionUpdateAttributes # The current version of the suppression. This is optional, but it can help prevent concurrent modifications. attr_reader :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -91,12 +93,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data_exclusion_query') @@ -150,6 +154,26 @@ def version=(version) @version = version 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 @@ -164,6 +188,7 @@ def ==(o) rule_query == o.rule_query && suppression_query == o.suppression_query && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb index 580032dba2cc..6a17dc448979 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb @@ -27,6 +27,8 @@ class SecurityMonitoringSuppressionUpdateData # The type of the resource. The value should always be `suppressions`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb index 3ca3b366346b..006bb3be7920 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSuppressionUpdateRequest # The new suppression properties; partial updates are supported. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb index 4bd5337ec3a5..c4a5b413f762 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb @@ -24,6 +24,8 @@ class SecurityMonitoringSuppressionsResponse # A list of suppressions objects. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb b/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb index a246db0de0ce..dea2b8432fae 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb @@ -27,6 +27,8 @@ class SecurityMonitoringThirdPartyRootQuery # Query to run on logs. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRootQuery` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRootQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'group_by_fields') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && group_by_fields == o.group_by_fields && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb b/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb index 517e2cad5d6b..29b497cc5e66 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb @@ -33,6 +33,8 @@ class SecurityMonitoringThirdPartyRuleCase # Severity of the Security Signal. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRuleCase` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRuleCase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -90,6 +94,26 @@ 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 @@ -100,6 +124,7 @@ def ==(o) notifications == o.notifications && query == o.query && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb b/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb index 08df78506d1f..c48eb4289b53 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb @@ -33,6 +33,8 @@ class SecurityMonitoringThirdPartyRuleCaseCreate # Severity of the Security Signal. attr_reader :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRuleCaseCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringThirdPartyRuleCaseCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -108,6 +112,26 @@ def status=(status) @status = status 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 @@ -118,6 +142,7 @@ def ==(o) notifications == o.notifications && query == o.query && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb b/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb index 0b7ac35ffc7c..62e3da8de684 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb @@ -36,6 +36,8 @@ class SecurityMonitoringTriageUser # UUID assigned by Datadog to this user account. attr_reader :uuid + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -76,12 +78,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringTriageUser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringTriageUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'handle') @@ -123,6 +127,26 @@ def uuid=(uuid) @uuid = uuid 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 @@ -134,6 +158,7 @@ def ==(o) id == o.id && name == o.name && uuid == o.uuid + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/security_monitoring_user.rb b/lib/datadog_api_client/v2/models/security_monitoring_user.rb index 33e91538fd5a..e3b9ae49bfaa 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_user.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_user.rb @@ -27,6 +27,8 @@ class SecurityMonitoringUser # The name of the user. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringUser` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'handle') @@ -78,6 +82,26 @@ 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 @@ -86,6 +110,7 @@ def ==(o) self.class == o.class && handle == o.handle && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_config_request.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_config_request.rb index 76d71d4734c0..7336db7a0d47 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_config_request.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_config_request.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerConfigRequest # Meta payload containing information about the API. attr_reader :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerConfigRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerConfigRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -99,6 +103,26 @@ def meta=(meta) @meta = meta 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration.rb index 6156eed2595f..fdf7f25e782b 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerConfiguration # Sensitive Data Scanner configuration type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerConfiguration` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration_data.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration_data.rb index d5b705496c01..0b4fcc0fc2b4 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration_data.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration_data.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerConfigurationData # A Sensitive Data Scanner configuration. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerConfigurationData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerConfigurationData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration_relationships.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration_relationships.rb index 7f12f53283ee..10c965b51893 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration_relationships.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_configuration_relationships.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerConfigurationRelationships # List of groups, ordered. attr_accessor :groups + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerConfigurationRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerConfigurationRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'groups') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && groups == o.groups + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_create_group_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_create_group_response.rb index 6c1bebfb3603..f1a2ab99ff55 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_create_group_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_create_group_response.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerCreateGroupResponse # Meta payload containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerCreateGroupResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerCreateGroupResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_create_rule_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_create_rule_response.rb index 90756751dbab..f24fdbf6e3c9 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_create_rule_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_create_rule_response.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerCreateRuleResponse # Meta payload containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerCreateRuleResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerCreateRuleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_filter.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_filter.rb index 9f7811411473..169ced859746 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_filter.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_filter.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerFilter # Query to filter the events. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response.rb index 22a460303a76..3b852679a062 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response.rb @@ -30,6 +30,8 @@ class SensitiveDataScannerGetConfigResponse # Meta response containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGetConfigResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGetConfigResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response_data.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response_data.rb index 777a42c93010..85f8918da707 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response_data.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response_data.rb @@ -33,6 +33,8 @@ class SensitiveDataScannerGetConfigResponseData # Sensitive Data Scanner configuration type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGetConfigResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGetConfigResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group.rb index 05bd6e901266..7e4ebf2e7ac6 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerGroup # Sensitive Data Scanner group type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroup` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_attributes.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_attributes.rb index e0b34ed4372c..648940e094a0 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_attributes.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_attributes.rb @@ -36,6 +36,8 @@ class SensitiveDataScannerGroupAttributes # List of products the scanning group applies. attr_accessor :product_list + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -99,6 +103,26 @@ 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 @@ -110,6 +134,7 @@ def ==(o) is_enabled == o.is_enabled && name == o.name && product_list == o.product_list + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_create.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_create.rb index 3d3ccc743520..d065c3c93447 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_create.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_create.rb @@ -30,6 +30,8 @@ class SensitiveDataScannerGroupCreate # Sensitive Data Scanner group type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_create_request.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_create_request.rb index b068a59e84ed..9706cbb7ea93 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_create_request.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_create_request.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerGroupCreateRequest # Meta payload containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_data.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_data.rb index 5991818d7d2b..bf0663badc99 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_data.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_data.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerGroupData # A scanning group. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_delete_request.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_delete_request.rb index fc95c22beaf1..dfd590802a02 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_delete_request.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_delete_request.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerGroupDeleteRequest # Meta payload containing information about the API. attr_reader :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupDeleteRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -79,6 +83,26 @@ def meta=(meta) @meta = meta 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_delete_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_delete_response.rb index 8253adbc8a84..ae41e5e24e1c 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_delete_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_delete_response.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerGroupDeleteResponse # Meta payload containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupDeleteResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupDeleteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_included_item.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_included_item.rb index 9ece97564a9e..b75f64efc8e2 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_included_item.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_included_item.rb @@ -33,6 +33,8 @@ class SensitiveDataScannerGroupIncludedItem # Sensitive Data Scanner group type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupIncludedItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupIncludedItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_item.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_item.rb index 017d006dfab6..485c3e03a77b 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_item.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_item.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerGroupItem # Sensitive Data Scanner group type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_list.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_list.rb index 8dde9bbe05bf..4bd85c15e828 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_list.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_list.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerGroupList # List of groups. The order is important. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupList` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_relationships.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_relationships.rb index e804d08b5afb..a8ef4ba3182a 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_relationships.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_relationships.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerGroupRelationships # Rules included in the group. attr_accessor :rules + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'configuration') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && configuration == o.configuration && rules == o.rules + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_response.rb index 1f6eb7be8dc7..bf6cad7fa870 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_response.rb @@ -33,6 +33,8 @@ class SensitiveDataScannerGroupResponse # Sensitive Data Scanner group type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update.rb index 8846a733cc7c..0ea70688c409 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update.rb @@ -33,6 +33,8 @@ class SensitiveDataScannerGroupUpdate # Sensitive Data Scanner group type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupUpdate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update_request.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update_request.rb index a2bb6d39a519..ef2ef874fbb9 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update_request.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update_request.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerGroupUpdateRequest # Meta payload containing information about the API. attr_reader :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -99,6 +103,26 @@ def meta=(meta) @meta = meta 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update_response.rb index 2d321dd3dc4b..83316c067d42 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_update_response.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerGroupUpdateResponse # Meta payload containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerGroupUpdateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerGroupUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb index 44373a05cfa1..2f17967f9b02 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb @@ -32,6 +32,8 @@ class SensitiveDataScannerIncludedKeywordConfiguration # The number of keywords in the list must be less than or equal to 30. attr_reader :keywords + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerIncludedKeywordConfiguration` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerIncludedKeywordConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'character_count') @@ -114,6 +118,26 @@ def keywords=(keywords) @keywords = keywords 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 @@ -122,6 +146,7 @@ def ==(o) self.class == o.class && character_count == o.character_count && keywords == o.keywords + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb index 6a7e3a1efb6a..a4d52e965d1f 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb @@ -39,6 +39,8 @@ class SensitiveDataScannerMeta # Version of the API. attr_reader :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'count_limit') @@ -124,6 +128,26 @@ def version=(version) @version = version 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 @@ -136,6 +160,7 @@ def ==(o) has_multi_pass_enabled == o.has_multi_pass_enabled && is_pci_compliant == o.is_pci_compliant && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta_version_only.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta_version_only.rb index 425fe7e13b01..df4f93f50d50 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta_version_only.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta_version_only.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerMetaVersionOnly # Version of the API (optional). attr_reader :version + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerMetaVersionOnly` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerMetaVersionOnly`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'version') @@ -79,6 +83,26 @@ def version=(version) @version = version 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && version == o.version + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_reorder_config.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_reorder_config.rb index 1109a72c2922..d07c35e4e586 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_reorder_config.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_reorder_config.rb @@ -30,6 +30,8 @@ class SensitiveDataScannerReorderConfig # Sensitive Data Scanner configuration type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerReorderConfig` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerReorderConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_reorder_groups_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_reorder_groups_response.rb index c7d1e357454e..413d2cb6a6d2 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_reorder_groups_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_reorder_groups_response.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerReorderGroupsResponse # Meta response containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerReorderGroupsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerReorderGroupsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule.rb index d482f35b1a69..3c6d35515fae 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerRule # Sensitive Data Scanner rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRule` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb index fe956ce15565..daa2ab5c5bc2 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb @@ -55,6 +55,8 @@ class SensitiveDataScannerRuleAttributes # Object describing how the scanned event will be replaced. attr_accessor :text_replacement + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -97,12 +99,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -174,6 +178,26 @@ def priority=(priority) @priority = priority 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 @@ -190,6 +214,7 @@ def ==(o) priority == o.priority && tags == o.tags && text_replacement == o.text_replacement + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_create.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_create.rb index 072a13625cd3..17d1a764b027 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_create.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_create.rb @@ -30,6 +30,8 @@ class SensitiveDataScannerRuleCreate # Sensitive Data Scanner rule type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_create_request.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_create_request.rb index 7adfc4b7e653..c03636a8e000 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_create_request.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_create_request.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerRuleCreateRequest # Meta payload containing information about the API. attr_reader :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -99,6 +103,26 @@ def meta=(meta) @meta = meta 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_data.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_data.rb index bf999e0c7362..822d120b2dd3 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_data.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_data.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerRuleData # Rules included in the group. The order is important. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_delete_request.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_delete_request.rb index eb4c1e52d025..c806a8227473 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_delete_request.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_delete_request.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerRuleDeleteRequest # Meta payload containing information about the API. attr_reader :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleDeleteRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -79,6 +83,26 @@ def meta=(meta) @meta = meta 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_delete_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_delete_response.rb index f029a7e3a830..2388d3fe80a9 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_delete_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_delete_response.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerRuleDeleteResponse # Meta payload containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleDeleteResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleDeleteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_included_item.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_included_item.rb index b7e50bcf86bb..38b8e9640c6a 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_included_item.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_included_item.rb @@ -33,6 +33,8 @@ class SensitiveDataScannerRuleIncludedItem # Sensitive Data Scanner rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleIncludedItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleIncludedItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_relationships.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_relationships.rb index c520e3e8dd32..93b3457cb7bc 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_relationships.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_relationships.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerRuleRelationships # A standard pattern. attr_accessor :standard_pattern + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'group') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && group == o.group && standard_pattern == o.standard_pattern + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_response.rb index 0b22c7c51ae0..db589f559d22 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_response.rb @@ -33,6 +33,8 @@ class SensitiveDataScannerRuleResponse # Sensitive Data Scanner rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update.rb index e9aa91bbc01d..a81b8a4834fd 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update.rb @@ -33,6 +33,8 @@ class SensitiveDataScannerRuleUpdate # Sensitive Data Scanner rule type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleUpdate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update_request.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update_request.rb index e61932413670..763cd309bcc5 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update_request.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update_request.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerRuleUpdateRequest # Meta payload containing information about the API. attr_reader :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -99,6 +103,26 @@ def meta=(meta) @meta = meta 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update_response.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update_response.rb index 34e1064ae17c..db6a2dce542c 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update_response.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_update_response.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerRuleUpdateResponse # Meta payload containing information about the API. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerRuleUpdateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerRuleUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern.rb index d487867f542f..2e90772f4a3a 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern.rb @@ -27,6 +27,8 @@ class SensitiveDataScannerStandardPattern # Sensitive Data Scanner standard pattern type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerStandardPattern` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerStandardPattern`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb index e0b12352b2d2..3c2c805b66fc 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb @@ -39,6 +39,8 @@ class SensitiveDataScannerStandardPatternAttributes # List of tags. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerStandardPatternAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerStandardPatternAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'description') @@ -132,6 +136,26 @@ def priority=(priority) @priority = priority 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 @@ -144,6 +168,7 @@ def ==(o) pattern == o.pattern && priority == o.priority && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_data.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_data.rb index 6528a616d624..c7d20c16d8df 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_data.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_data.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerStandardPatternData # Data containing the standard pattern id. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerStandardPatternData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerStandardPatternData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_patterns_response_data.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_patterns_response_data.rb index eea16ba7b366..b86e70c0325b 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_patterns_response_data.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_patterns_response_data.rb @@ -24,6 +24,8 @@ class SensitiveDataScannerStandardPatternsResponseData # List Standard patterns response. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerStandardPatternsResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerStandardPatternsResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_patterns_response_item.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_patterns_response_item.rb index 2ab48d15b6b9..9c42b2894f79 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_patterns_response_item.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_patterns_response_item.rb @@ -30,6 +30,8 @@ class SensitiveDataScannerStandardPatternsResponseItem # Sensitive Data Scanner standard pattern type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerStandardPatternsResponseItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerStandardPatternsResponseItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/sensitive_data_scanner_text_replacement.rb b/lib/datadog_api_client/v2/models/sensitive_data_scanner_text_replacement.rb index 909bfddb4385..a8cdc559de9e 100644 --- a/lib/datadog_api_client/v2/models/sensitive_data_scanner_text_replacement.rb +++ b/lib/datadog_api_client/v2/models/sensitive_data_scanner_text_replacement.rb @@ -36,6 +36,8 @@ class SensitiveDataScannerTextReplacement # the end. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerTextReplacement` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerTextReplacement`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'number_of_chars') @@ -103,6 +107,26 @@ def number_of_chars=(number_of_chars) @number_of_chars = number_of_chars 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 @@ -112,6 +136,7 @@ def ==(o) number_of_chars == o.number_of_chars && replacement_string == o.replacement_string && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_account_create_attributes.rb b/lib/datadog_api_client/v2/models/service_account_create_attributes.rb index 2eff2215de39..04af35e547f0 100644 --- a/lib/datadog_api_client/v2/models/service_account_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/service_account_create_attributes.rb @@ -33,6 +33,8 @@ class ServiceAccountCreateAttributes # The title of the user. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceAccountCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceAccountCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -117,6 +121,26 @@ def service_account=(service_account) @service_account = service_account 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 @@ -127,6 +151,7 @@ def ==(o) name == o.name && service_account == o.service_account && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_account_create_data.rb b/lib/datadog_api_client/v2/models/service_account_create_data.rb index afcdc24644b7..2d71f08dfbb2 100644 --- a/lib/datadog_api_client/v2/models/service_account_create_data.rb +++ b/lib/datadog_api_client/v2/models/service_account_create_data.rb @@ -30,6 +30,8 @@ class ServiceAccountCreateData # Users resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceAccountCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceAccountCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_account_create_request.rb b/lib/datadog_api_client/v2/models/service_account_create_request.rb index 4efc9ab3bb26..10598811e01e 100644 --- a/lib/datadog_api_client/v2/models/service_account_create_request.rb +++ b/lib/datadog_api_client/v2/models/service_account_create_request.rb @@ -24,6 +24,8 @@ class ServiceAccountCreateRequest # Object to create a service account User. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceAccountCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceAccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_create_response.rb b/lib/datadog_api_client/v2/models/service_definition_create_response.rb index 4dc51dd144ce..a06d601dbef6 100644 --- a/lib/datadog_api_client/v2/models/service_definition_create_response.rb +++ b/lib/datadog_api_client/v2/models/service_definition_create_response.rb @@ -24,6 +24,8 @@ class ServiceDefinitionCreateResponse # Create service definitions response payload. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionCreateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_data.rb b/lib/datadog_api_client/v2/models/service_definition_data.rb index 1354c3299490..f084099216ef 100644 --- a/lib/datadog_api_client/v2/models/service_definition_data.rb +++ b/lib/datadog_api_client/v2/models/service_definition_data.rb @@ -30,6 +30,8 @@ class ServiceDefinitionData # Service definition type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb b/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb index a368d6648ce9..324f3c2f555f 100644 --- a/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb @@ -27,6 +27,8 @@ class ServiceDefinitionDataAttributes # Service definition schema. attr_accessor :schema + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && meta == o.meta && schema == o.schema + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_get_response.rb b/lib/datadog_api_client/v2/models/service_definition_get_response.rb index 15b33b599507..4730ce5b48ef 100644 --- a/lib/datadog_api_client/v2/models/service_definition_get_response.rb +++ b/lib/datadog_api_client/v2/models/service_definition_get_response.rb @@ -24,6 +24,8 @@ class ServiceDefinitionGetResponse # Service definition data. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionGetResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_meta.rb b/lib/datadog_api_client/v2/models/service_definition_meta.rb index e99299834cc4..4883ad96b5e4 100644 --- a/lib/datadog_api_client/v2/models/service_definition_meta.rb +++ b/lib/datadog_api_client/v2/models/service_definition_meta.rb @@ -42,6 +42,8 @@ class ServiceDefinitionMeta # A list of schema validation warnings. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -78,12 +80,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'github_html_url') @@ -117,6 +121,26 @@ 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 @@ -130,6 +154,7 @@ def ==(o) origin == o.origin && origin_detail == o.origin_detail && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_meta_warnings.rb b/lib/datadog_api_client/v2/models/service_definition_meta_warnings.rb index 6b2da6ceaf83..935476d52cd6 100644 --- a/lib/datadog_api_client/v2/models/service_definition_meta_warnings.rb +++ b/lib/datadog_api_client/v2/models/service_definition_meta_warnings.rb @@ -30,6 +30,8 @@ class ServiceDefinitionMetaWarnings # The warning message. attr_accessor :message + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionMetaWarnings` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionMetaWarnings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'instance_location') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) instance_location == o.instance_location && keyword_location == o.keyword_location && message == o.message + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v1.rb b/lib/datadog_api_client/v2/models/service_definition_v1.rb index f5968c1971a6..13cbf877f2f5 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1.rb @@ -47,6 +47,8 @@ class ServiceDefinitionV1 # A set of custom tags. attr_accessor :tags + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -86,12 +88,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV1` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contact') @@ -160,6 +164,26 @@ def schema_version=(schema_version) @schema_version = schema_version 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 @@ -174,6 +198,7 @@ def ==(o) org == o.org && schema_version == o.schema_version && tags == o.tags + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb b/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb index 96c9dc857025..c32276fbdc1d 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb @@ -27,6 +27,8 @@ class ServiceDefinitionV1Contact # Service owner’s Slack channel. attr_accessor :slack + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV1Contact` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Contact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && email == o.email && slack == o.slack + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_info.rb b/lib/datadog_api_client/v2/models/service_definition_v1_info.rb index 2c3966939749..e01bfc316894 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_info.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_info.rb @@ -33,6 +33,8 @@ class ServiceDefinitionV1Info # Service tier. attr_accessor :service_tier + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV1Info` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Info`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'dd_service') @@ -106,6 +110,26 @@ def dd_service=(dd_service) @dd_service = dd_service 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 @@ -116,6 +140,7 @@ def ==(o) description == o.description && display_name == o.display_name && service_tier == o.service_tier + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb b/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb index 96cec0e96bb1..ef8135a2b5b5 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb @@ -24,6 +24,8 @@ class ServiceDefinitionV1Integrations # PagerDuty service URL for the service. attr_accessor :pagerduty + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV1Integrations` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Integrations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagerduty') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagerduty == o.pagerduty + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_org.rb b/lib/datadog_api_client/v2/models/service_definition_v1_org.rb index 91e668ad7dc8..ac28a480a749 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_org.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_org.rb @@ -27,6 +27,8 @@ class ServiceDefinitionV1Org # Team that owns the service. attr_accessor :team + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV1Org` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Org`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'application') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && application == o.application && team == o.team + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb b/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb index 61278a81caca..2f19c1227ecb 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV1Resource # Link URL. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV1Resource` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Resource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -119,6 +123,26 @@ def url=(url) @url = url 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 @@ -128,6 +152,7 @@ def ==(o) name == o.name && type == o.type && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2.rb b/lib/datadog_api_client/v2/models/service_definition_v2.rb index 6a0791b2f123..00b6a757179c 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2.rb @@ -54,6 +54,8 @@ class ServiceDefinitionV2 # Team that owns the service. attr_accessor :team + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -98,12 +100,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contacts') @@ -190,6 +194,26 @@ def schema_version=(schema_version) @schema_version = schema_version 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 @@ -207,6 +231,7 @@ def ==(o) schema_version == o.schema_version && tags == o.tags && team == o.team + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb b/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb index b250aac65666..0c6301871b81 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Doc # Document URL. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Doc` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Doc`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -108,6 +112,26 @@ def url=(url) @url = url 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 @@ -117,6 +141,7 @@ def ==(o) name == o.name && provider == o.provider && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot1.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot1.rb index 504a37eb6bcb..7b30bb7e3282 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot1.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot1.rb @@ -57,6 +57,8 @@ class ServiceDefinitionV2Dot1 # Importance of the service. attr_accessor :tier + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -103,12 +105,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'application') @@ -195,6 +199,26 @@ def schema_version=(schema_version) @schema_version = schema_version 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 @@ -213,6 +237,7 @@ def ==(o) tags == o.tags && team == o.team && tier == o.tier + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_email.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_email.rb index 4e3532f8f561..b67cd0185b77 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_email.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_email.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Dot1Email # Contact type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Email` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Email`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contact') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) contact == o.contact && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_integrations.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_integrations.rb index cd360b7c3570..f9a8bcbc6f2c 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_integrations.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_integrations.rb @@ -27,6 +27,8 @@ class ServiceDefinitionV2Dot1Integrations # PagerDuty integration for the service. attr_accessor :pagerduty + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Integrations` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Integrations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'opsgenie') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && opsgenie == o.opsgenie && pagerduty == o.pagerduty + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_link.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_link.rb index 14200f4e1552..f11229c13ee6 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_link.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_link.rb @@ -33,6 +33,8 @@ class ServiceDefinitionV2Dot1Link # Link URL. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Link` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Link`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -128,6 +132,26 @@ def url=(url) @url = url 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 @@ -138,6 +162,7 @@ def ==(o) provider == o.provider && type == o.type && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_ms_teams.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_ms_teams.rb index 3eb83679098a..9ceb76f556f4 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_ms_teams.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_ms_teams.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Dot1MSTeams # Contact type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1MSTeams` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1MSTeams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contact') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) contact == o.contact && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_opsgenie.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_opsgenie.rb index 8dab4befeda6..c1dfe45f8a6c 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_opsgenie.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_opsgenie.rb @@ -27,6 +27,8 @@ class ServiceDefinitionV2Dot1Opsgenie # Opsgenie service url. attr_reader :service_url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Opsgenie` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Opsgenie`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'region') @@ -88,6 +92,26 @@ def service_url=(service_url) @service_url = service_url 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && region == o.region && service_url == o.service_url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_pagerduty.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_pagerduty.rb index 5dbe80d703d9..5373e2b7b5f9 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_pagerduty.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_pagerduty.rb @@ -24,6 +24,8 @@ class ServiceDefinitionV2Dot1Pagerduty # PagerDuty service url. attr_accessor :service_url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Pagerduty` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Pagerduty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'service_url') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && service_url == o.service_url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_slack.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_slack.rb index 06bc2fb8c1b8..a9fcba7a0cb1 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot1_slack.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot1_slack.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Dot1Slack # Contact type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Slack` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot1Slack`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contact') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) contact == o.contact && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb index 819803972e13..3a808ec66897 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb @@ -66,6 +66,8 @@ class ServiceDefinitionV2Dot2 # The type of service. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -118,12 +120,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'application') @@ -226,6 +230,26 @@ def schema_version=(schema_version) @schema_version = schema_version 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 @@ -247,6 +271,7 @@ def ==(o) team == o.team && tier == o.tier && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb index 5d435713f3bc..a91cfe863940 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Dot2Contact # Contact type. Datadog recognizes the following types: `email`, `slack`, and `microsoft-teams`. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Contact` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Contact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contact') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) contact == o.contact && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb index 1a024097fb3e..812eaa1ab22a 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb @@ -27,6 +27,8 @@ class ServiceDefinitionV2Dot2Integrations # PagerDuty integration for the service. attr_accessor :pagerduty + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Integrations` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Integrations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'opsgenie') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && opsgenie == o.opsgenie && pagerduty == o.pagerduty + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb index 40a9f38b4228..144c829b00a2 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb @@ -33,6 +33,8 @@ class ServiceDefinitionV2Dot2Link # Link URL. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Link` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Link`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -128,6 +132,26 @@ def url=(url) @url = url 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 @@ -138,6 +162,7 @@ def ==(o) provider == o.provider && type == o.type && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb index 948629b50929..b08c2b57007f 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb @@ -27,6 +27,8 @@ class ServiceDefinitionV2Dot2Opsgenie # Opsgenie service url. attr_reader :service_url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Opsgenie` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Opsgenie`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'region') @@ -88,6 +92,26 @@ def service_url=(service_url) @service_url = service_url 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && region == o.region && service_url == o.service_url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb index 0c5a69711c63..4e0d4a94b5dd 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb @@ -24,6 +24,8 @@ class ServiceDefinitionV2Dot2Pagerduty # PagerDuty service url. attr_accessor :service_url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Pagerduty` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Dot2Pagerduty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'service_url') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && service_url == o.service_url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_email.rb b/lib/datadog_api_client/v2/models/service_definition_v2_email.rb index 753b60608dce..eabadf3d6b74 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_email.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_email.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Email # Contact type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Email` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Email`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contact') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) contact == o.contact && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb b/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb index 361aad6fd645..e36d66280c43 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb @@ -27,6 +27,8 @@ class ServiceDefinitionV2Integrations # PagerDuty service URL for the service. attr_accessor :pagerduty + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Integrations` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Integrations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'opsgenie') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && opsgenie == o.opsgenie && pagerduty == o.pagerduty + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_link.rb b/lib/datadog_api_client/v2/models/service_definition_v2_link.rb index 4a32b3df7c20..9ac4f14086ba 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_link.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_link.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Link # Link URL. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Link` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Link`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -119,6 +123,26 @@ def url=(url) @url = url 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 @@ -128,6 +152,7 @@ def ==(o) name == o.name && type == o.type && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_ms_teams.rb b/lib/datadog_api_client/v2/models/service_definition_v2_ms_teams.rb index 02b24a32ce57..9cdda8c3630c 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_ms_teams.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_ms_teams.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2MSTeams # Contact type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2MSTeams` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2MSTeams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contact') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) contact == o.contact && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb b/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb index 229df2edf39b..193c10ec34ce 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb @@ -27,6 +27,8 @@ class ServiceDefinitionV2Opsgenie # Opsgenie service url. attr_reader :service_url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Opsgenie` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Opsgenie`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'region') @@ -88,6 +92,26 @@ def service_url=(service_url) @service_url = service_url 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && region == o.region && service_url == o.service_url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb b/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb index 9fd55bd151bb..308f46431f4c 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Repo # Repository URL. attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Repo` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Repo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'name') @@ -108,6 +112,26 @@ def url=(url) @url = url 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 @@ -117,6 +141,7 @@ def ==(o) name == o.name && provider == o.provider && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb b/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb index 8e4c66485b86..544f59402d9b 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb @@ -30,6 +30,8 @@ class ServiceDefinitionV2Slack # Contact type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV2Slack` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Slack`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'contact') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) contact == o.contact && name == o.name && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_definitions_list_response.rb b/lib/datadog_api_client/v2/models/service_definitions_list_response.rb index 8901488821f1..465e5092d435 100644 --- a/lib/datadog_api_client/v2/models/service_definitions_list_response.rb +++ b/lib/datadog_api_client/v2/models/service_definitions_list_response.rb @@ -24,6 +24,8 @@ class ServiceDefinitionsListResponse # Data representing service definitions. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionsListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionsListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_now_ticket.rb b/lib/datadog_api_client/v2/models/service_now_ticket.rb index b6cef1a4e26f..43a48349f859 100644 --- a/lib/datadog_api_client/v2/models/service_now_ticket.rb +++ b/lib/datadog_api_client/v2/models/service_now_ticket.rb @@ -27,6 +27,8 @@ class ServiceNowTicket # Case status attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceNowTicket` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceNowTicket`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'result') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && result == o.result && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/service_now_ticket_result.rb b/lib/datadog_api_client/v2/models/service_now_ticket_result.rb index d59d9b9941ea..1b0503f7687c 100644 --- a/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +++ b/lib/datadog_api_client/v2/models/service_now_ticket_result.rb @@ -24,6 +24,8 @@ class ServiceNowTicketResult # Link to the Incident created on ServiceNow attr_accessor :sys_target_link + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceNowTicketResult` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceNowTicketResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'sys_target_link') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && sys_target_link == o.sys_target_link + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slack_integration_metadata.rb b/lib/datadog_api_client/v2/models/slack_integration_metadata.rb index e233969c78db..02877873af92 100644 --- a/lib/datadog_api_client/v2/models/slack_integration_metadata.rb +++ b/lib/datadog_api_client/v2/models/slack_integration_metadata.rb @@ -24,6 +24,8 @@ class SlackIntegrationMetadata # Array of Slack channels in this integration metadata. attr_reader :channels + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SlackIntegrationMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SlackIntegrationMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'channels') @@ -81,6 +85,26 @@ def channels=(channels) @channels = channels 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && channels == o.channels + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slack_integration_metadata_channel_item.rb b/lib/datadog_api_client/v2/models/slack_integration_metadata_channel_item.rb index 84e6e976ad53..8f85970f61c7 100644 --- a/lib/datadog_api_client/v2/models/slack_integration_metadata_channel_item.rb +++ b/lib/datadog_api_client/v2/models/slack_integration_metadata_channel_item.rb @@ -33,6 +33,8 @@ class SlackIntegrationMetadataChannelItem # Slack team ID. attr_accessor :team_id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SlackIntegrationMetadataChannelItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SlackIntegrationMetadataChannelItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'channel_id') @@ -128,6 +132,26 @@ def redirect_url=(redirect_url) @redirect_url = redirect_url 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 @@ -138,6 +162,7 @@ def ==(o) channel_name == o.channel_name && redirect_url == o.redirect_url && team_id == o.team_id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slo_report_create_request.rb b/lib/datadog_api_client/v2/models/slo_report_create_request.rb index d5851c86b234..061d105453d1 100644 --- a/lib/datadog_api_client/v2/models/slo_report_create_request.rb +++ b/lib/datadog_api_client/v2/models/slo_report_create_request.rb @@ -24,6 +24,8 @@ class SloReportCreateRequest # The data portion of the SLO report request. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SloReportCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SloReportCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb b/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb index f0ae9d943344..891cac21793d 100644 --- a/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb @@ -36,6 +36,8 @@ class SloReportCreateRequestAttributes # The `to` timestamp for the report in epoch seconds. attr_reader :to_ts + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SloReportCreateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SloReportCreateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from_ts') @@ -137,6 +141,26 @@ def to_ts=(to_ts) @to_ts = to_ts 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 @@ -148,6 +172,7 @@ def ==(o) query == o.query && timezone == o.timezone && to_ts == o.to_ts + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slo_report_create_request_data.rb b/lib/datadog_api_client/v2/models/slo_report_create_request_data.rb index 4b04fdc909c9..20018059e8cd 100644 --- a/lib/datadog_api_client/v2/models/slo_report_create_request_data.rb +++ b/lib/datadog_api_client/v2/models/slo_report_create_request_data.rb @@ -24,6 +24,8 @@ class SloReportCreateRequestData # The attributes portion of the SLO report request. attr_reader :attributes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SloReportCreateRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SloReportCreateRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ def attributes=(attributes) @attributes = attributes 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slo_report_post_response.rb b/lib/datadog_api_client/v2/models/slo_report_post_response.rb index bd2127a2ae51..f5e5a1381545 100644 --- a/lib/datadog_api_client/v2/models/slo_report_post_response.rb +++ b/lib/datadog_api_client/v2/models/slo_report_post_response.rb @@ -24,6 +24,8 @@ class SLOReportPostResponse # The data portion of the SLO report response. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SLOReportPostResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SLOReportPostResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb b/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb index b414b0bbd4c7..3606c3a983db 100644 --- a/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb +++ b/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb @@ -27,6 +27,8 @@ class SLOReportPostResponseData # The type of ID. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SLOReportPostResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SLOReportPostResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb b/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb index 907b271b7b86..094196042c7c 100644 --- a/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb +++ b/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb @@ -24,6 +24,8 @@ class SLOReportStatusGetResponse # The data portion of the SLO report status response. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SLOReportStatusGetResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SLOReportStatusGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb b/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb index f272b1eb2cf8..b82df4d0ccf0 100644 --- a/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb @@ -24,6 +24,8 @@ class SLOReportStatusGetResponseAttributes # The status of the SLO report job. attr_accessor :status + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SLOReportStatusGetResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SLOReportStatusGetResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'status') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && status == o.status + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb b/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb index 8e86c34c52df..bf556b62b850 100644 --- a/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb +++ b/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb @@ -30,6 +30,8 @@ class SLOReportStatusGetResponseData # The type of ID. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SLOReportStatusGetResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SLOReportStatusGetResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/span.rb b/lib/datadog_api_client/v2/models/span.rb index 915bd6854fa9..cabcadfd4af9 100644 --- a/lib/datadog_api_client/v2/models/span.rb +++ b/lib/datadog_api_client/v2/models/span.rb @@ -30,6 +30,8 @@ class Span # Type of the span. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Span` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Span`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_bucket.rb b/lib/datadog_api_client/v2/models/spans_aggregate_bucket.rb index 9bcb56e2e530..4126c23b3b96 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_bucket.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_bucket.rb @@ -30,6 +30,8 @@ class SpansAggregateBucket # The spans aggregate bucket type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateBucket` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateBucket`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_bucket_attributes.rb b/lib/datadog_api_client/v2/models/spans_aggregate_bucket_attributes.rb index 22441c4d7c0c..3d82be50b8bc 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_bucket_attributes.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_bucket_attributes.rb @@ -30,6 +30,8 @@ class SpansAggregateBucketAttributes # A map of the metric name -> value for regular compute or list of values for a timeseries. attr_accessor :computes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateBucketAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateBucketAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'by') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) by == o.by && compute == o.compute && computes == o.computes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value_timeseries_point.rb b/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value_timeseries_point.rb index ffe09cda512e..e931308bebc7 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value_timeseries_point.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value_timeseries_point.rb @@ -27,6 +27,8 @@ class SpansAggregateBucketValueTimeseriesPoint # The value for this point. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateBucketValueTimeseriesPoint` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateBucketValueTimeseriesPoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && time == o.time && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_data.rb b/lib/datadog_api_client/v2/models/spans_aggregate_data.rb index c684a399c2cb..67fb9451f377 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_data.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_data.rb @@ -27,6 +27,8 @@ class SpansAggregateData # The type of resource. The value should always be aggregate_request. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_request.rb b/lib/datadog_api_client/v2/models/spans_aggregate_request.rb index 548afddc8fb1..145a0c944194 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_request.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_request.rb @@ -24,6 +24,8 @@ class SpansAggregateRequest # The object containing the query content. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_request_attributes.rb b/lib/datadog_api_client/v2/models/spans_aggregate_request_attributes.rb index 180b41a6b07a..e88d07e66ab3 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_request_attributes.rb @@ -34,6 +34,8 @@ class SpansAggregateRequestAttributes # Note: You should only supply timezone or time offset but not both otherwise the query will fail. attr_accessor :options + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -93,6 +97,26 @@ 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 @@ -103,6 +127,7 @@ def ==(o) filter == o.filter && group_by == o.group_by && options == o.options + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_response.rb b/lib/datadog_api_client/v2/models/spans_aggregate_response.rb index b555fc65bed2..a86d8a8de453 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_response.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_response.rb @@ -27,6 +27,8 @@ class SpansAggregateResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_response_metadata.rb b/lib/datadog_api_client/v2/models/spans_aggregate_response_metadata.rb index d0f6f147bfae..ec23c01e36c6 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_response_metadata.rb @@ -34,6 +34,8 @@ class SpansAggregateResponseMetadata # warnings are present in the response. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elapsed') @@ -91,6 +95,26 @@ 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,6 +125,7 @@ def ==(o) request_id == o.request_id && status == o.status && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_aggregate_sort.rb b/lib/datadog_api_client/v2/models/spans_aggregate_sort.rb index 76af6a1e2439..203f73a2bb5b 100644 --- a/lib/datadog_api_client/v2/models/spans_aggregate_sort.rb +++ b/lib/datadog_api_client/v2/models/spans_aggregate_sort.rb @@ -33,6 +33,8 @@ class SpansAggregateSort # The type of sorting algorithm. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateSort` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) metric == o.metric && order == o.order && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_attributes.rb b/lib/datadog_api_client/v2/models/spans_attributes.rb index ade96beef54b..e0d32b8548ea 100644 --- a/lib/datadog_api_client/v2/models/spans_attributes.rb +++ b/lib/datadog_api_client/v2/models/spans_attributes.rb @@ -74,6 +74,8 @@ class SpansAttributes # The type of the span. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -130,12 +132,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -209,6 +213,26 @@ 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 @@ -232,6 +256,7 @@ def ==(o) tags == o.tags && trace_id == o.trace_id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_compute.rb b/lib/datadog_api_client/v2/models/spans_compute.rb index 0bbe035c42e6..080097c19f84 100644 --- a/lib/datadog_api_client/v2/models/spans_compute.rb +++ b/lib/datadog_api_client/v2/models/spans_compute.rb @@ -34,6 +34,8 @@ class SpansCompute # The type of compute. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation') @@ -107,6 +111,26 @@ def aggregation=(aggregation) @aggregation = aggregation 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 @@ -117,6 +141,7 @@ def ==(o) interval == o.interval && metric == o.metric && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_filter.rb b/lib/datadog_api_client/v2/models/spans_filter.rb index a7dc300b07b1..1dda6e9e23c2 100644 --- a/lib/datadog_api_client/v2/models/spans_filter.rb +++ b/lib/datadog_api_client/v2/models/spans_filter.rb @@ -24,6 +24,8 @@ class SpansFilter # The search query - following the [span search syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax/). attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_filter_create.rb b/lib/datadog_api_client/v2/models/spans_filter_create.rb index 7fb34cd4fd2e..99e3fd636f04 100644 --- a/lib/datadog_api_client/v2/models/spans_filter_create.rb +++ b/lib/datadog_api_client/v2/models/spans_filter_create.rb @@ -24,6 +24,8 @@ class SpansFilterCreate # The search query - following the [span search syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax/). attr_reader :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansFilterCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansFilterCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -79,6 +83,26 @@ def query=(query) @query = query 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_group_by.rb b/lib/datadog_api_client/v2/models/spans_group_by.rb index 30180a9fef23..c59d0c716ad7 100644 --- a/lib/datadog_api_client/v2/models/spans_group_by.rb +++ b/lib/datadog_api_client/v2/models/spans_group_by.rb @@ -40,6 +40,8 @@ class SpansGroupBy # A resulting object to put the given computes in over all the matching records. attr_accessor :total + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -74,12 +76,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'facet') @@ -125,6 +129,26 @@ def facet=(facet) @facet = facet 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 @@ -137,6 +161,7 @@ def ==(o) missing == o.missing && sort == o.sort && total == o.total + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_group_by_histogram.rb b/lib/datadog_api_client/v2/models/spans_group_by_histogram.rb index bcd9e0ea5342..b127b4ccfdc1 100644 --- a/lib/datadog_api_client/v2/models/spans_group_by_histogram.rb +++ b/lib/datadog_api_client/v2/models/spans_group_by_histogram.rb @@ -33,6 +33,8 @@ class SpansGroupByHistogram # (values smaller than this one are filtered out). attr_reader :min + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansGroupByHistogram` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansGroupByHistogram`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'interval') @@ -122,6 +126,26 @@ def min=(min) @min = min 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 @@ -131,6 +155,7 @@ def ==(o) interval == o.interval && max == o.max && min == o.min + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_list_request.rb b/lib/datadog_api_client/v2/models/spans_list_request.rb index 0306cb4f8fd8..25d9835ddcbc 100644 --- a/lib/datadog_api_client/v2/models/spans_list_request.rb +++ b/lib/datadog_api_client/v2/models/spans_list_request.rb @@ -24,6 +24,8 @@ class SpansListRequest # The object containing the query content. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansListRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_list_request_attributes.rb b/lib/datadog_api_client/v2/models/spans_list_request_attributes.rb index 3d60bddea7a7..4d40785c143c 100644 --- a/lib/datadog_api_client/v2/models/spans_list_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/spans_list_request_attributes.rb @@ -34,6 +34,8 @@ class SpansListRequestAttributes # Sort parameters when querying spans. attr_accessor :sort + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -64,12 +66,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansListRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansListRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'filter') @@ -89,6 +93,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) options == o.options && page == o.page && sort == o.sort + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_list_request_data.rb b/lib/datadog_api_client/v2/models/spans_list_request_data.rb index 8c49401a9032..3b7aeb4e4efe 100644 --- a/lib/datadog_api_client/v2/models/spans_list_request_data.rb +++ b/lib/datadog_api_client/v2/models/spans_list_request_data.rb @@ -27,6 +27,8 @@ class SpansListRequestData # The type of resource. The value should always be search_request. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansListRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansListRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_list_request_page.rb b/lib/datadog_api_client/v2/models/spans_list_request_page.rb index f9453fb893b5..34663d15be6d 100644 --- a/lib/datadog_api_client/v2/models/spans_list_request_page.rb +++ b/lib/datadog_api_client/v2/models/spans_list_request_page.rb @@ -27,6 +27,8 @@ class SpansListRequestPage # Maximum number of spans in the response. attr_reader :limit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansListRequestPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansListRequestPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'cursor') @@ -88,6 +92,26 @@ def limit=(limit) @limit = limit 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && cursor == o.cursor && limit == o.limit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_list_response.rb b/lib/datadog_api_client/v2/models/spans_list_response.rb index 735a87509439..4e1c1a095748 100644 --- a/lib/datadog_api_client/v2/models/spans_list_response.rb +++ b/lib/datadog_api_client/v2/models/spans_list_response.rb @@ -30,6 +30,8 @@ class SpansListResponse # The metadata associated with a request. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansListResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) data == o.data && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_list_response_links.rb b/lib/datadog_api_client/v2/models/spans_list_response_links.rb index 582e93fc0782..43d910386f7c 100644 --- a/lib/datadog_api_client/v2/models/spans_list_response_links.rb +++ b/lib/datadog_api_client/v2/models/spans_list_response_links.rb @@ -25,6 +25,8 @@ class SpansListResponseLinks # POST endpoint. attr_accessor :_next + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansListResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansListResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'_next') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && _next == o._next + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_list_response_metadata.rb b/lib/datadog_api_client/v2/models/spans_list_response_metadata.rb index fe2b5c17170a..c799a21bc0ea 100644 --- a/lib/datadog_api_client/v2/models/spans_list_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/spans_list_response_metadata.rb @@ -37,6 +37,8 @@ class SpansListResponseMetadata # warnings are present in the response. attr_accessor :warnings + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansListResponseMetadata` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansListResponseMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'elapsed') @@ -100,6 +104,26 @@ 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 @@ -111,6 +135,7 @@ def ==(o) request_id == o.request_id && status == o.status && warnings == o.warnings + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_compute.rb b/lib/datadog_api_client/v2/models/spans_metric_compute.rb index f0870829e56f..c6ef1aef3d11 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_compute.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_compute.rb @@ -31,6 +31,8 @@ class SpansMetricCompute # The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). attr_accessor :path + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation_type') @@ -98,6 +102,26 @@ def aggregation_type=(aggregation_type) @aggregation_type = aggregation_type 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 @@ -107,6 +131,7 @@ def ==(o) aggregation_type == o.aggregation_type && include_percentiles == o.include_percentiles && path == o.path + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_create_attributes.rb b/lib/datadog_api_client/v2/models/spans_metric_create_attributes.rb index c94e4fdc26e6..8125d129a04e 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_create_attributes.rb @@ -30,6 +30,8 @@ class SpansMetricCreateAttributes # The rules for the group by. attr_accessor :group_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -99,6 +103,26 @@ def compute=(compute) @compute = compute 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 @@ -108,6 +132,7 @@ def ==(o) compute == o.compute && filter == o.filter && group_by == o.group_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_create_data.rb b/lib/datadog_api_client/v2/models/spans_metric_create_data.rb index f80938da03e8..5cfb6ed71155 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_create_data.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_create_data.rb @@ -30,6 +30,8 @@ class SpansMetricCreateData # The type of resource. The value should always be spans_metrics. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_create_request.rb b/lib/datadog_api_client/v2/models/spans_metric_create_request.rb index b9b161e73dbe..241238825236 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_create_request.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_create_request.rb @@ -24,6 +24,8 @@ class SpansMetricCreateRequest # The new span-based metric properties. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_filter.rb b/lib/datadog_api_client/v2/models/spans_metric_filter.rb index c9b50ed71b18..10689fbcea6a 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_filter.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_filter.rb @@ -24,6 +24,8 @@ class SpansMetricFilter # The search query - following the span search syntax. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_group_by.rb b/lib/datadog_api_client/v2/models/spans_metric_group_by.rb index 2442e8cb61c9..1f66e33249be 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_group_by.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_group_by.rb @@ -27,6 +27,8 @@ class SpansMetricGroupBy # Eventual name of the tag that gets created. By default, the path attribute is used as the tag name. attr_accessor :tag_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'path') @@ -88,6 +92,26 @@ def path=(path) @path = path 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && path == o.path && tag_name == o.tag_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_response.rb b/lib/datadog_api_client/v2/models/spans_metric_response.rb index 8f9fc0edf5ac..9e0017f0dc87 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_response.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_response.rb @@ -24,6 +24,8 @@ class SpansMetricResponse # The span-based metric properties. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_response_attributes.rb b/lib/datadog_api_client/v2/models/spans_metric_response_attributes.rb index cb18633714cf..8a6f1eb2ab01 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_response_attributes.rb @@ -30,6 +30,8 @@ class SpansMetricResponseAttributes # The rules for the group by. attr_accessor :group_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) compute == o.compute && filter == o.filter && group_by == o.group_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_response_compute.rb b/lib/datadog_api_client/v2/models/spans_metric_response_compute.rb index 30ba422107be..dae2e559e488 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_response_compute.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_response_compute.rb @@ -31,6 +31,8 @@ class SpansMetricResponseCompute # The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). attr_accessor :path + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -59,12 +61,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricResponseCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricResponseCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'aggregation_type') @@ -80,6 +84,26 @@ 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 @@ -89,6 +113,7 @@ def ==(o) aggregation_type == o.aggregation_type && include_percentiles == o.include_percentiles && path == o.path + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_response_data.rb b/lib/datadog_api_client/v2/models/spans_metric_response_data.rb index ff6271ee6771..febffe5d8fa2 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_response_data.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_response_data.rb @@ -30,6 +30,8 @@ class SpansMetricResponseData # The type of resource. The value should always be spans_metrics. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_response_filter.rb b/lib/datadog_api_client/v2/models/spans_metric_response_filter.rb index e73c23d9e5a4..1b9699bfa452 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_response_filter.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_response_filter.rb @@ -24,6 +24,8 @@ class SpansMetricResponseFilter # The search query - following the span search syntax. attr_accessor :query + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricResponseFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricResponseFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'query') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && query == o.query + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_response_group_by.rb b/lib/datadog_api_client/v2/models/spans_metric_response_group_by.rb index 265b0e2d593b..cdd7f71982cf 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_response_group_by.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_response_group_by.rb @@ -27,6 +27,8 @@ class SpansMetricResponseGroupBy # Eventual name of the tag that gets created. By default, the path attribute is used as the tag name. attr_accessor :tag_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricResponseGroupBy` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricResponseGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'path') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && path == o.path && tag_name == o.tag_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_update_attributes.rb b/lib/datadog_api_client/v2/models/spans_metric_update_attributes.rb index f69233584a3a..923b85e95558 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_update_attributes.rb @@ -30,6 +30,8 @@ class SpansMetricUpdateAttributes # The rules for the group by. attr_accessor :group_by + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'compute') @@ -81,6 +85,26 @@ 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 @@ -90,6 +114,7 @@ def ==(o) compute == o.compute && filter == o.filter && group_by == o.group_by + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_update_compute.rb b/lib/datadog_api_client/v2/models/spans_metric_update_compute.rb index d92cb3eb07f8..b4e05371dd03 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_update_compute.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_update_compute.rb @@ -25,6 +25,8 @@ class SpansMetricUpdateCompute # Only present when the `aggregation_type` is `distribution`. attr_accessor :include_percentiles + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricUpdateCompute` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricUpdateCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'include_percentiles') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && include_percentiles == o.include_percentiles + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_update_data.rb b/lib/datadog_api_client/v2/models/spans_metric_update_data.rb index 869bd22298a7..0ec2abbf03d3 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_update_data.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_update_data.rb @@ -27,6 +27,8 @@ class SpansMetricUpdateData # The type of resource. The value should always be spans_metrics. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metric_update_request.rb b/lib/datadog_api_client/v2/models/spans_metric_update_request.rb index 8dad5ff8a334..338ff5dd6402 100644 --- a/lib/datadog_api_client/v2/models/spans_metric_update_request.rb +++ b/lib/datadog_api_client/v2/models/spans_metric_update_request.rb @@ -24,6 +24,8 @@ class SpansMetricUpdateRequest # The new span-based metric properties. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_metrics_response.rb b/lib/datadog_api_client/v2/models/spans_metrics_response.rb index 57f0cbecf8bd..07d056573e3d 100644 --- a/lib/datadog_api_client/v2/models/spans_metrics_response.rb +++ b/lib/datadog_api_client/v2/models/spans_metrics_response.rb @@ -24,6 +24,8 @@ class SpansMetricsResponse # A list of span-based metric objects. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansMetricsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansMetricsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_query_filter.rb b/lib/datadog_api_client/v2/models/spans_query_filter.rb index c04e8c29cef7..69f736b85798 100644 --- a/lib/datadog_api_client/v2/models/spans_query_filter.rb +++ b/lib/datadog_api_client/v2/models/spans_query_filter.rb @@ -30,6 +30,8 @@ class SpansQueryFilter # The maximum time for the requested spans, supports date-time ISO8601, date math, and regular timestamps (milliseconds). attr_accessor :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansQueryFilter` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansQueryFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'from') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) from == o.from && query == o.query && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_query_options.rb b/lib/datadog_api_client/v2/models/spans_query_options.rb index e4ca98013891..634efa14cd98 100644 --- a/lib/datadog_api_client/v2/models/spans_query_options.rb +++ b/lib/datadog_api_client/v2/models/spans_query_options.rb @@ -28,6 +28,8 @@ class SpansQueryOptions # The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). attr_accessor :timezone + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -54,12 +56,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansQueryOptions` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansQueryOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'time_offset') @@ -71,6 +75,26 @@ 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 @@ -79,6 +103,7 @@ def ==(o) self.class == o.class && time_offset == o.time_offset && timezone == o.timezone + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_response_metadata_page.rb b/lib/datadog_api_client/v2/models/spans_response_metadata_page.rb index 5c369634dc40..a0bf243e62a4 100644 --- a/lib/datadog_api_client/v2/models/spans_response_metadata_page.rb +++ b/lib/datadog_api_client/v2/models/spans_response_metadata_page.rb @@ -25,6 +25,8 @@ class SpansResponseMetadataPage # parameters with the addition of the `page[cursor]`. attr_accessor :after + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -49,12 +51,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansResponseMetadataPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansResponseMetadataPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'after') @@ -62,6 +66,26 @@ 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 @@ -69,6 +93,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && after == o.after + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/spans_warning.rb b/lib/datadog_api_client/v2/models/spans_warning.rb index ac37c1c7246e..ebc08de2b7ad 100644 --- a/lib/datadog_api_client/v2/models/spans_warning.rb +++ b/lib/datadog_api_client/v2/models/spans_warning.rb @@ -30,6 +30,8 @@ class SpansWarning # A short human-readable summary of the warning. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansWarning` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansWarning`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'code') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) code == o.code && detail == o.detail && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team.rb b/lib/datadog_api_client/v2/models/team.rb index 4291582a03d8..ee4fbfd93847 100644 --- a/lib/datadog_api_client/v2/models/team.rb +++ b/lib/datadog_api_client/v2/models/team.rb @@ -33,6 +33,8 @@ class Team # Team type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Team` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Team`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -128,6 +132,26 @@ def type=(type) @type = type 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 @@ -138,6 +162,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_attributes.rb b/lib/datadog_api_client/v2/models/team_attributes.rb index 38223f0f8f27..df66d4cb6e2e 100644 --- a/lib/datadog_api_client/v2/models/team_attributes.rb +++ b/lib/datadog_api_client/v2/models/team_attributes.rb @@ -57,6 +57,8 @@ class TeamAttributes # Collection of visible modules for the team attr_accessor :visible_modules + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -114,12 +116,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'avatar') @@ -245,6 +249,26 @@ def user_count=(user_count) @user_count = user_count 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 @@ -263,6 +287,7 @@ def ==(o) summary == o.summary && user_count == o.user_count && visible_modules == o.visible_modules + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_create.rb b/lib/datadog_api_client/v2/models/team_create.rb index 747cb60d868a..4850da551abe 100644 --- a/lib/datadog_api_client/v2/models/team_create.rb +++ b/lib/datadog_api_client/v2/models/team_create.rb @@ -30,6 +30,8 @@ class TeamCreate # Team type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_create_attributes.rb b/lib/datadog_api_client/v2/models/team_create_attributes.rb index 19058e787b6b..eef50aa2f117 100644 --- a/lib/datadog_api_client/v2/models/team_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/team_create_attributes.rb @@ -42,6 +42,8 @@ class TeamCreateAttributes # Collection of visible modules for the team attr_accessor :visible_modules + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -87,12 +89,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'avatar') @@ -165,6 +169,26 @@ def name=(name) @name = name 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 @@ -178,6 +202,7 @@ def ==(o) hidden_modules == o.hidden_modules && name == o.name && visible_modules == o.visible_modules + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_create_relationships.rb b/lib/datadog_api_client/v2/models/team_create_relationships.rb index 5d489e0aee13..5a8fceb1ee2f 100644 --- a/lib/datadog_api_client/v2/models/team_create_relationships.rb +++ b/lib/datadog_api_client/v2/models/team_create_relationships.rb @@ -24,6 +24,8 @@ class TeamCreateRelationships # Relationship to users. attr_accessor :users + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamCreateRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamCreateRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'users') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && users == o.users + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_create_request.rb b/lib/datadog_api_client/v2/models/team_create_request.rb index 2cbabf39db7a..8f3f64841549 100644 --- a/lib/datadog_api_client/v2/models/team_create_request.rb +++ b/lib/datadog_api_client/v2/models/team_create_request.rb @@ -24,6 +24,8 @@ class TeamCreateRequest # Team create attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_link.rb b/lib/datadog_api_client/v2/models/team_link.rb index e0c0d09b0e48..354b57ae00bd 100644 --- a/lib/datadog_api_client/v2/models/team_link.rb +++ b/lib/datadog_api_client/v2/models/team_link.rb @@ -30,6 +30,8 @@ class TeamLink # Team link type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamLink` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamLink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_link_attributes.rb b/lib/datadog_api_client/v2/models/team_link_attributes.rb index 0acb805e596e..54133b6163fb 100644 --- a/lib/datadog_api_client/v2/models/team_link_attributes.rb +++ b/lib/datadog_api_client/v2/models/team_link_attributes.rb @@ -33,6 +33,8 @@ class TeamLinkAttributes # The URL for the link attr_reader :url + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamLinkAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamLinkAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'label') @@ -132,6 +136,26 @@ def url=(url) @url = url 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 @@ -142,6 +166,7 @@ def ==(o) position == o.position && team_id == o.team_id && url == o.url + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_link_create.rb b/lib/datadog_api_client/v2/models/team_link_create.rb index 6466dbfda1a9..c78c86a985d6 100644 --- a/lib/datadog_api_client/v2/models/team_link_create.rb +++ b/lib/datadog_api_client/v2/models/team_link_create.rb @@ -27,6 +27,8 @@ class TeamLinkCreate # Team link type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamLinkCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamLinkCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_link_create_request.rb b/lib/datadog_api_client/v2/models/team_link_create_request.rb index 4ce9fe2fec3f..ccbb4a91e3a7 100644 --- a/lib/datadog_api_client/v2/models/team_link_create_request.rb +++ b/lib/datadog_api_client/v2/models/team_link_create_request.rb @@ -24,6 +24,8 @@ class TeamLinkCreateRequest # Team link create attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamLinkCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamLinkCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_link_response.rb b/lib/datadog_api_client/v2/models/team_link_response.rb index 22d6e4422246..73f448f2ccfb 100644 --- a/lib/datadog_api_client/v2/models/team_link_response.rb +++ b/lib/datadog_api_client/v2/models/team_link_response.rb @@ -24,6 +24,8 @@ class TeamLinkResponse # Team link attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamLinkResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamLinkResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_links_response.rb b/lib/datadog_api_client/v2/models/team_links_response.rb index 6742a09d284e..d28d2b3f68d3 100644 --- a/lib/datadog_api_client/v2/models/team_links_response.rb +++ b/lib/datadog_api_client/v2/models/team_links_response.rb @@ -24,6 +24,8 @@ class TeamLinksResponse # Team links response data attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamLinksResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamLinksResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_permission_setting.rb b/lib/datadog_api_client/v2/models/team_permission_setting.rb index 3abf8e917b43..27fa3b9568d8 100644 --- a/lib/datadog_api_client/v2/models/team_permission_setting.rb +++ b/lib/datadog_api_client/v2/models/team_permission_setting.rb @@ -30,6 +30,8 @@ class TeamPermissionSetting # Team permission setting type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamPermissionSetting` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamPermissionSetting`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_permission_setting_attributes.rb b/lib/datadog_api_client/v2/models/team_permission_setting_attributes.rb index 6949be957ade..59292c7d23a3 100644 --- a/lib/datadog_api_client/v2/models/team_permission_setting_attributes.rb +++ b/lib/datadog_api_client/v2/models/team_permission_setting_attributes.rb @@ -36,6 +36,8 @@ class TeamPermissionSettingAttributes # What type of user is allowed to perform the specified action attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamPermissionSettingAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamPermissionSettingAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'action') @@ -99,6 +103,26 @@ 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 @@ -110,6 +134,7 @@ def ==(o) options == o.options && title == o.title && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_permission_setting_response.rb b/lib/datadog_api_client/v2/models/team_permission_setting_response.rb index 452776e17c32..45a3fd7fb700 100644 --- a/lib/datadog_api_client/v2/models/team_permission_setting_response.rb +++ b/lib/datadog_api_client/v2/models/team_permission_setting_response.rb @@ -24,6 +24,8 @@ class TeamPermissionSettingResponse # Team permission setting attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamPermissionSettingResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamPermissionSettingResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_permission_setting_update.rb b/lib/datadog_api_client/v2/models/team_permission_setting_update.rb index 6c169250da1c..b3a4c28b5261 100644 --- a/lib/datadog_api_client/v2/models/team_permission_setting_update.rb +++ b/lib/datadog_api_client/v2/models/team_permission_setting_update.rb @@ -27,6 +27,8 @@ class TeamPermissionSettingUpdate # Team permission setting type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamPermissionSettingUpdate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamPermissionSettingUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ def type=(type) @type = type 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_permission_setting_update_attributes.rb b/lib/datadog_api_client/v2/models/team_permission_setting_update_attributes.rb index 70027f72af28..3a6e0f02288f 100644 --- a/lib/datadog_api_client/v2/models/team_permission_setting_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/team_permission_setting_update_attributes.rb @@ -24,6 +24,8 @@ class TeamPermissionSettingUpdateAttributes # What type of user is allowed to perform the specified action attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamPermissionSettingUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamPermissionSettingUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'value') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_permission_setting_update_request.rb b/lib/datadog_api_client/v2/models/team_permission_setting_update_request.rb index ec00fadb975d..650c13465fd3 100644 --- a/lib/datadog_api_client/v2/models/team_permission_setting_update_request.rb +++ b/lib/datadog_api_client/v2/models/team_permission_setting_update_request.rb @@ -24,6 +24,8 @@ class TeamPermissionSettingUpdateRequest # Team permission setting update attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamPermissionSettingUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamPermissionSettingUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_permission_settings_response.rb b/lib/datadog_api_client/v2/models/team_permission_settings_response.rb index 4789ba474b97..474145882c88 100644 --- a/lib/datadog_api_client/v2/models/team_permission_settings_response.rb +++ b/lib/datadog_api_client/v2/models/team_permission_settings_response.rb @@ -24,6 +24,8 @@ class TeamPermissionSettingsResponse # Team permission settings response data attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamPermissionSettingsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamPermissionSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_relationships.rb b/lib/datadog_api_client/v2/models/team_relationships.rb index 7709ad84faeb..bcd521b1916e 100644 --- a/lib/datadog_api_client/v2/models/team_relationships.rb +++ b/lib/datadog_api_client/v2/models/team_relationships.rb @@ -27,6 +27,8 @@ class TeamRelationships # Relationship between a user team permission and a team attr_accessor :user_team_permissions + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'team_links') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && team_links == o.team_links && user_team_permissions == o.user_team_permissions + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_relationships_links.rb b/lib/datadog_api_client/v2/models/team_relationships_links.rb index fcb9f37b66a5..a3898b6219e6 100644 --- a/lib/datadog_api_client/v2/models/team_relationships_links.rb +++ b/lib/datadog_api_client/v2/models/team_relationships_links.rb @@ -24,6 +24,8 @@ class TeamRelationshipsLinks # Related link. attr_accessor :related + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamRelationshipsLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamRelationshipsLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'related') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && related == o.related + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_response.rb b/lib/datadog_api_client/v2/models/team_response.rb index acd78cf90218..cc100360ade7 100644 --- a/lib/datadog_api_client/v2/models/team_response.rb +++ b/lib/datadog_api_client/v2/models/team_response.rb @@ -24,6 +24,8 @@ class TeamResponse # A team attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_update.rb b/lib/datadog_api_client/v2/models/team_update.rb index 9a61fd31dc3c..25d56989c757 100644 --- a/lib/datadog_api_client/v2/models/team_update.rb +++ b/lib/datadog_api_client/v2/models/team_update.rb @@ -30,6 +30,8 @@ class TeamUpdate # Team type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamUpdate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_update_attributes.rb b/lib/datadog_api_client/v2/models/team_update_attributes.rb index a187dac1a63c..ff188cc581ad 100644 --- a/lib/datadog_api_client/v2/models/team_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/team_update_attributes.rb @@ -45,6 +45,8 @@ class TeamUpdateAttributes # Collection of visible modules for the team attr_accessor :visible_modules + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -92,12 +94,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'avatar') @@ -189,6 +193,26 @@ def name=(name) @name = name 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 @@ -203,6 +227,7 @@ def ==(o) hidden_modules == o.hidden_modules && name == o.name && visible_modules == o.visible_modules + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_update_relationships.rb b/lib/datadog_api_client/v2/models/team_update_relationships.rb index 3665f4a88c36..74c6e29fff9c 100644 --- a/lib/datadog_api_client/v2/models/team_update_relationships.rb +++ b/lib/datadog_api_client/v2/models/team_update_relationships.rb @@ -24,6 +24,8 @@ class TeamUpdateRelationships # Relationship between a team and a team link attr_accessor :team_links + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamUpdateRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamUpdateRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'team_links') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && team_links == o.team_links + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/team_update_request.rb b/lib/datadog_api_client/v2/models/team_update_request.rb index 68bd8ee1b22e..5769778f2af1 100644 --- a/lib/datadog_api_client/v2/models/team_update_request.rb +++ b/lib/datadog_api_client/v2/models/team_update_request.rb @@ -24,6 +24,8 @@ class TeamUpdateRequest # Team update request attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/teams_response.rb b/lib/datadog_api_client/v2/models/teams_response.rb index ab8464ab3203..4637c2ac8bfd 100644 --- a/lib/datadog_api_client/v2/models/teams_response.rb +++ b/lib/datadog_api_client/v2/models/teams_response.rb @@ -33,6 +33,8 @@ class TeamsResponse # Teams response metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -92,6 +96,26 @@ 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 @@ -102,6 +126,7 @@ def ==(o) included == o.included && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/teams_response_links.rb b/lib/datadog_api_client/v2/models/teams_response_links.rb index 6166a90a2aa5..d6971279fe85 100644 --- a/lib/datadog_api_client/v2/models/teams_response_links.rb +++ b/lib/datadog_api_client/v2/models/teams_response_links.rb @@ -36,6 +36,8 @@ class TeamsResponseLinks # Current link. attr_accessor :_self + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -77,12 +79,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamsResponseLinks` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamsResponseLinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'first') @@ -106,6 +110,26 @@ 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 @@ -117,6 +141,7 @@ def ==(o) _next == o._next && prev == o.prev && _self == o._self + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/teams_response_meta.rb b/lib/datadog_api_client/v2/models/teams_response_meta.rb index 8768e9ba2727..d0df35cf4663 100644 --- a/lib/datadog_api_client/v2/models/teams_response_meta.rb +++ b/lib/datadog_api_client/v2/models/teams_response_meta.rb @@ -24,6 +24,8 @@ class TeamsResponseMeta # Teams response metadata. attr_accessor :pagination + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamsResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamsResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'pagination') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && pagination == o.pagination + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/teams_response_meta_pagination.rb b/lib/datadog_api_client/v2/models/teams_response_meta_pagination.rb index a62d4c2962a3..d169f3dd87dd 100644 --- a/lib/datadog_api_client/v2/models/teams_response_meta_pagination.rb +++ b/lib/datadog_api_client/v2/models/teams_response_meta_pagination.rb @@ -45,6 +45,8 @@ class TeamsResponseMetaPagination # Offset type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -83,12 +85,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamsResponseMetaPagination` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamsResponseMetaPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'first_offset') @@ -124,6 +128,26 @@ 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 @@ -138,6 +162,7 @@ def ==(o) prev_offset == o.prev_offset && total == o.total && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/timeseries_formula_query_request.rb b/lib/datadog_api_client/v2/models/timeseries_formula_query_request.rb index 58e2cd3e636d..15f6c2d157fa 100644 --- a/lib/datadog_api_client/v2/models/timeseries_formula_query_request.rb +++ b/lib/datadog_api_client/v2/models/timeseries_formula_query_request.rb @@ -24,6 +24,8 @@ class TimeseriesFormulaQueryRequest # A single timeseries query to be executed. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TimeseriesFormulaQueryRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TimeseriesFormulaQueryRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/timeseries_formula_query_response.rb b/lib/datadog_api_client/v2/models/timeseries_formula_query_response.rb index b172743e1b51..fc593b0ea1a9 100644 --- a/lib/datadog_api_client/v2/models/timeseries_formula_query_response.rb +++ b/lib/datadog_api_client/v2/models/timeseries_formula_query_response.rb @@ -27,6 +27,8 @@ class TimeseriesFormulaQueryResponse # The error generated by the request. attr_accessor :errors + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TimeseriesFormulaQueryResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TimeseriesFormulaQueryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && data == o.data && errors == o.errors + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/timeseries_formula_request.rb b/lib/datadog_api_client/v2/models/timeseries_formula_request.rb index 5252894a6792..d2cc1099759d 100644 --- a/lib/datadog_api_client/v2/models/timeseries_formula_request.rb +++ b/lib/datadog_api_client/v2/models/timeseries_formula_request.rb @@ -27,6 +27,8 @@ class TimeseriesFormulaRequest # The type of the resource. The value should always be timeseries_request. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TimeseriesFormulaRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TimeseriesFormulaRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/timeseries_formula_request_attributes.rb b/lib/datadog_api_client/v2/models/timeseries_formula_request_attributes.rb index bd9a1ca2093a..e7aae8a68e2c 100644 --- a/lib/datadog_api_client/v2/models/timeseries_formula_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/timeseries_formula_request_attributes.rb @@ -39,6 +39,8 @@ class TimeseriesFormulaRequestAttributes # End date (exclusive) of the query in milliseconds since the Unix epoch. attr_reader :to + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -71,12 +73,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'formulas') @@ -144,6 +148,26 @@ def to=(to) @to = to 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 @@ -155,6 +179,7 @@ def ==(o) interval == o.interval && queries == o.queries && to == o.to + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/timeseries_response.rb b/lib/datadog_api_client/v2/models/timeseries_response.rb index 482e51b92a6b..1608be3a93f9 100644 --- a/lib/datadog_api_client/v2/models/timeseries_response.rb +++ b/lib/datadog_api_client/v2/models/timeseries_response.rb @@ -27,6 +27,8 @@ class TimeseriesResponse # The type of the resource. The value should always be timeseries_response. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TimeseriesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TimeseriesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/timeseries_response_attributes.rb b/lib/datadog_api_client/v2/models/timeseries_response_attributes.rb index 46108bad5776..f94629c3924e 100644 --- a/lib/datadog_api_client/v2/models/timeseries_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/timeseries_response_attributes.rb @@ -30,6 +30,8 @@ class TimeseriesResponseAttributes # Array of value-arrays. The index here corresponds to the index in the `formulas` or `queries` array from the request. attr_accessor :values + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TimeseriesResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TimeseriesResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'series') @@ -85,6 +89,26 @@ 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 @@ -94,6 +118,7 @@ def ==(o) series == o.series && times == o.times && values == o.values + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/timeseries_response_series.rb b/lib/datadog_api_client/v2/models/timeseries_response_series.rb index 6fa14f84eb08..2d4e27c32ff2 100644 --- a/lib/datadog_api_client/v2/models/timeseries_response_series.rb +++ b/lib/datadog_api_client/v2/models/timeseries_response_series.rb @@ -33,6 +33,8 @@ class TimeseriesResponseSeries # If the second element is not present, the API returns null. attr_accessor :unit + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TimeseriesResponseSeries` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TimeseriesResponseSeries`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'group_tags') @@ -112,6 +116,26 @@ def query_index=(query_index) @query_index = query_index 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 @@ -121,6 +145,7 @@ def ==(o) group_tags == o.group_tags && query_index == o.query_index && unit == o.unit + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/unit.rb b/lib/datadog_api_client/v2/models/unit.rb index 6c1ad7637690..6fd70417303d 100644 --- a/lib/datadog_api_client/v2/models/unit.rb +++ b/lib/datadog_api_client/v2/models/unit.rb @@ -36,6 +36,8 @@ class Unit # Abbreviation of the unit. attr_accessor :short_name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -68,12 +70,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Unit` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::Unit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'family') @@ -97,6 +101,26 @@ 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 @@ -108,6 +132,7 @@ def ==(o) plural == o.plural && scale_factor == o.scale_factor && short_name == o.short_name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/update_open_api_response.rb b/lib/datadog_api_client/v2/models/update_open_api_response.rb index 20e0e7ead141..4fdbd9cf62d6 100644 --- a/lib/datadog_api_client/v2/models/update_open_api_response.rb +++ b/lib/datadog_api_client/v2/models/update_open_api_response.rb @@ -24,6 +24,8 @@ class UpdateOpenAPIResponse # Data envelope for `UpdateOpenAPIResponse`. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateOpenAPIResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UpdateOpenAPIResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb b/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb index 7bfcd0127dd7..ab4aee9e5a6a 100644 --- a/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb @@ -24,6 +24,8 @@ class UpdateOpenAPIResponseAttributes # List of endpoints which couldn't be parsed. attr_accessor :failed_endpoints + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateOpenAPIResponseAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UpdateOpenAPIResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'failed_endpoints') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && failed_endpoints == o.failed_endpoints + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/update_open_api_response_data.rb b/lib/datadog_api_client/v2/models/update_open_api_response_data.rb index 0179ae6dd147..f1b577e82717 100644 --- a/lib/datadog_api_client/v2/models/update_open_api_response_data.rb +++ b/lib/datadog_api_client/v2/models/update_open_api_response_data.rb @@ -27,6 +27,8 @@ class UpdateOpenAPIResponseData # API identifier. attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateOpenAPIResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UpdateOpenAPIResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/update_rule_request.rb b/lib/datadog_api_client/v2/models/update_rule_request.rb index a96618136374..3710a4709c95 100644 --- a/lib/datadog_api_client/v2/models/update_rule_request.rb +++ b/lib/datadog_api_client/v2/models/update_rule_request.rb @@ -24,6 +24,8 @@ class UpdateRuleRequest # Data for the request to update a scorecard rule. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateRuleRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UpdateRuleRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/update_rule_request_data.rb b/lib/datadog_api_client/v2/models/update_rule_request_data.rb index 0343d81c1f06..871c17d4b4dc 100644 --- a/lib/datadog_api_client/v2/models/update_rule_request_data.rb +++ b/lib/datadog_api_client/v2/models/update_rule_request_data.rb @@ -27,6 +27,8 @@ class UpdateRuleRequestData # The JSON:API type for scorecard rules. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateRuleRequestData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UpdateRuleRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/update_rule_response.rb b/lib/datadog_api_client/v2/models/update_rule_response.rb index e901769379ba..19d4dcaeba1c 100644 --- a/lib/datadog_api_client/v2/models/update_rule_response.rb +++ b/lib/datadog_api_client/v2/models/update_rule_response.rb @@ -24,6 +24,8 @@ class UpdateRuleResponse # The data for a rule update response. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateRuleResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UpdateRuleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/update_rule_response_data.rb b/lib/datadog_api_client/v2/models/update_rule_response_data.rb index 67b6c00c200e..bac908be502d 100644 --- a/lib/datadog_api_client/v2/models/update_rule_response_data.rb +++ b/lib/datadog_api_client/v2/models/update_rule_response_data.rb @@ -33,6 +33,8 @@ class UpdateRuleResponseData # The JSON:API type for scorecard rules. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateRuleResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UpdateRuleResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/usage_application_security_monitoring_response.rb b/lib/datadog_api_client/v2/models/usage_application_security_monitoring_response.rb index e4fe1f6de3d5..a590953f4b4e 100644 --- a/lib/datadog_api_client/v2/models/usage_application_security_monitoring_response.rb +++ b/lib/datadog_api_client/v2/models/usage_application_security_monitoring_response.rb @@ -24,6 +24,8 @@ class UsageApplicationSecurityMonitoringResponse # Response containing Application Security Monitoring usage. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UsageApplicationSecurityMonitoringResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UsageApplicationSecurityMonitoringResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/usage_attributes_object.rb b/lib/datadog_api_client/v2/models/usage_attributes_object.rb index 436676fc256a..ffd8644c4e96 100644 --- a/lib/datadog_api_client/v2/models/usage_attributes_object.rb +++ b/lib/datadog_api_client/v2/models/usage_attributes_object.rb @@ -39,6 +39,8 @@ class UsageAttributesObject # Usage type that is being measured. attr_accessor :usage_type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -73,12 +75,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UsageAttributesObject` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UsageAttributesObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'org_name') @@ -108,6 +112,26 @@ 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 @@ -120,6 +144,7 @@ def ==(o) region == o.region && timeseries == o.timeseries && usage_type == o.usage_type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/usage_data_object.rb b/lib/datadog_api_client/v2/models/usage_data_object.rb index 63d99db2568d..0aab723fc922 100644 --- a/lib/datadog_api_client/v2/models/usage_data_object.rb +++ b/lib/datadog_api_client/v2/models/usage_data_object.rb @@ -30,6 +30,8 @@ class UsageDataObject # Type of usage data. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UsageDataObject` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UsageDataObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/usage_lambda_traced_invocations_response.rb b/lib/datadog_api_client/v2/models/usage_lambda_traced_invocations_response.rb index 0367732c8791..84960bdb2747 100644 --- a/lib/datadog_api_client/v2/models/usage_lambda_traced_invocations_response.rb +++ b/lib/datadog_api_client/v2/models/usage_lambda_traced_invocations_response.rb @@ -24,6 +24,8 @@ class UsageLambdaTracedInvocationsResponse # Response containing Lambda Traced Invocations usage. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UsageLambdaTracedInvocationsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UsageLambdaTracedInvocationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/usage_observability_pipelines_response.rb b/lib/datadog_api_client/v2/models/usage_observability_pipelines_response.rb index a7a3a1fac5be..260323100be3 100644 --- a/lib/datadog_api_client/v2/models/usage_observability_pipelines_response.rb +++ b/lib/datadog_api_client/v2/models/usage_observability_pipelines_response.rb @@ -24,6 +24,8 @@ class UsageObservabilityPipelinesResponse # Response containing Observability Pipelines usage. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UsageObservabilityPipelinesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UsageObservabilityPipelinesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/usage_time_series_object.rb b/lib/datadog_api_client/v2/models/usage_time_series_object.rb index 555c488da0a8..7f123cf073de 100644 --- a/lib/datadog_api_client/v2/models/usage_time_series_object.rb +++ b/lib/datadog_api_client/v2/models/usage_time_series_object.rb @@ -27,6 +27,8 @@ class UsageTimeSeriesObject # Contains the number measured for the given usage_type during the hour. attr_accessor :value + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -61,12 +63,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UsageTimeSeriesObject` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UsageTimeSeriesObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'timestamp') @@ -78,6 +82,26 @@ 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 @@ -86,6 +110,7 @@ def ==(o) self.class == o.class && timestamp == o.timestamp && value == o.value + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user.rb b/lib/datadog_api_client/v2/models/user.rb index 1da7e912be5b..57cf97829f91 100644 --- a/lib/datadog_api_client/v2/models/user.rb +++ b/lib/datadog_api_client/v2/models/user.rb @@ -33,6 +33,8 @@ class User # Users resource type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::User` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::User`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_attributes.rb b/lib/datadog_api_client/v2/models/user_attributes.rb index 41fda9d781bc..91d8aa455c80 100644 --- a/lib/datadog_api_client/v2/models/user_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_attributes.rb @@ -57,6 +57,8 @@ class UserAttributes # Whether the user is verified. attr_accessor :verified + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -112,12 +114,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -169,6 +173,26 @@ 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 @@ -187,6 +211,7 @@ def ==(o) status == o.status && title == o.title && verified == o.verified + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_create_attributes.rb b/lib/datadog_api_client/v2/models/user_create_attributes.rb index 1965e05bf90a..cafc4cfd157f 100644 --- a/lib/datadog_api_client/v2/models/user_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_create_attributes.rb @@ -30,6 +30,8 @@ class UserCreateAttributes # The title of the user. attr_accessor :title + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserCreateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'email') @@ -97,6 +101,26 @@ def email=(email) @email = email 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 @@ -106,6 +130,7 @@ def ==(o) email == o.email && name == o.name && title == o.title + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_create_data.rb b/lib/datadog_api_client/v2/models/user_create_data.rb index 87cc6812961f..1405f7caaf47 100644 --- a/lib/datadog_api_client/v2/models/user_create_data.rb +++ b/lib/datadog_api_client/v2/models/user_create_data.rb @@ -30,6 +30,8 @@ class UserCreateData # Users resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserCreateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_create_request.rb b/lib/datadog_api_client/v2/models/user_create_request.rb index cd6428a5fb1b..29507599b0c3 100644 --- a/lib/datadog_api_client/v2/models/user_create_request.rb +++ b/lib/datadog_api_client/v2/models/user_create_request.rb @@ -24,6 +24,8 @@ class UserCreateRequest # Object to create a user. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_invitation_data.rb b/lib/datadog_api_client/v2/models/user_invitation_data.rb index d1a120cf9eec..27859d19db8e 100644 --- a/lib/datadog_api_client/v2/models/user_invitation_data.rb +++ b/lib/datadog_api_client/v2/models/user_invitation_data.rb @@ -27,6 +27,8 @@ class UserInvitationData # User invitations type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserInvitationData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserInvitationData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'relationships') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_invitation_data_attributes.rb b/lib/datadog_api_client/v2/models/user_invitation_data_attributes.rb index cf6dcc4d068c..b87669c46036 100644 --- a/lib/datadog_api_client/v2/models/user_invitation_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_invitation_data_attributes.rb @@ -33,6 +33,8 @@ class UserInvitationDataAttributes # UUID of the user invitation. attr_accessor :uuid + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserInvitationDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserInvitationDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'created_at') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) expires_at == o.expires_at && invite_type == o.invite_type && uuid == o.uuid + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_invitation_relationships.rb b/lib/datadog_api_client/v2/models/user_invitation_relationships.rb index d1b4e3c3db6e..26af6f9c6f59 100644 --- a/lib/datadog_api_client/v2/models/user_invitation_relationships.rb +++ b/lib/datadog_api_client/v2/models/user_invitation_relationships.rb @@ -24,6 +24,8 @@ class UserInvitationRelationships # Relationship to user. attr_reader :user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserInvitationRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserInvitationRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'user') @@ -79,6 +83,26 @@ def user=(user) @user = user 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && user == o.user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_invitation_response.rb b/lib/datadog_api_client/v2/models/user_invitation_response.rb index 60118b47a394..7fef94878fcf 100644 --- a/lib/datadog_api_client/v2/models/user_invitation_response.rb +++ b/lib/datadog_api_client/v2/models/user_invitation_response.rb @@ -24,6 +24,8 @@ class UserInvitationResponse # Object of a user invitation returned by the API. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserInvitationResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserInvitationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_invitation_response_data.rb b/lib/datadog_api_client/v2/models/user_invitation_response_data.rb index 825c98744d69..c50ed06b362c 100644 --- a/lib/datadog_api_client/v2/models/user_invitation_response_data.rb +++ b/lib/datadog_api_client/v2/models/user_invitation_response_data.rb @@ -33,6 +33,8 @@ class UserInvitationResponseData # User invitations type. attr_accessor :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserInvitationResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserInvitationResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_invitations_request.rb b/lib/datadog_api_client/v2/models/user_invitations_request.rb index dd5ecd2adbf8..f755d91d5bc0 100644 --- a/lib/datadog_api_client/v2/models/user_invitations_request.rb +++ b/lib/datadog_api_client/v2/models/user_invitations_request.rb @@ -24,6 +24,8 @@ class UserInvitationsRequest # List of user invitations. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserInvitationsRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserInvitationsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_invitations_response.rb b/lib/datadog_api_client/v2/models/user_invitations_response.rb index a3be7d3831be..47c1cceb2f2b 100644 --- a/lib/datadog_api_client/v2/models/user_invitations_response.rb +++ b/lib/datadog_api_client/v2/models/user_invitations_response.rb @@ -24,6 +24,8 @@ class UserInvitationsResponse # Array of user invitations. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserInvitationsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserInvitationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -63,6 +67,26 @@ 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 @@ -70,6 +94,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_relationship_data.rb b/lib/datadog_api_client/v2/models/user_relationship_data.rb index 86ea0cd21af3..5b12437600f8 100644 --- a/lib/datadog_api_client/v2/models/user_relationship_data.rb +++ b/lib/datadog_api_client/v2/models/user_relationship_data.rb @@ -27,6 +27,8 @@ class UserRelationshipData # User resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserRelationshipData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserRelationshipData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -99,6 +103,26 @@ def type=(type) @type = type 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 @@ -107,6 +131,7 @@ def ==(o) self.class == o.class && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_relationships.rb b/lib/datadog_api_client/v2/models/user_relationships.rb index efd9637da6ce..2950c9e65bb0 100644 --- a/lib/datadog_api_client/v2/models/user_relationships.rb +++ b/lib/datadog_api_client/v2/models/user_relationships.rb @@ -24,6 +24,8 @@ class UserRelationships # Relationship to roles. attr_accessor :roles + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'roles') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && roles == o.roles + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_response.rb b/lib/datadog_api_client/v2/models/user_response.rb index c19119feac43..1b78dd68ad6b 100644 --- a/lib/datadog_api_client/v2/models/user_response.rb +++ b/lib/datadog_api_client/v2/models/user_response.rb @@ -27,6 +27,8 @@ class UserResponse # Array of objects related to the user. attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_response_relationships.rb b/lib/datadog_api_client/v2/models/user_response_relationships.rb index ff8bfcd13405..d8f4e91f6eda 100644 --- a/lib/datadog_api_client/v2/models/user_response_relationships.rb +++ b/lib/datadog_api_client/v2/models/user_response_relationships.rb @@ -33,6 +33,8 @@ class UserResponseRelationships # Relationship to roles. attr_accessor :roles + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserResponseRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserResponseRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'org') @@ -88,6 +92,26 @@ 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 @@ -98,6 +122,7 @@ def ==(o) other_orgs == o.other_orgs && other_users == o.other_users && roles == o.roles + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team.rb b/lib/datadog_api_client/v2/models/user_team.rb index dcf51ff182ba..962bfe24746f 100644 --- a/lib/datadog_api_client/v2/models/user_team.rb +++ b/lib/datadog_api_client/v2/models/user_team.rb @@ -33,6 +33,8 @@ class UserTeam # Team membership type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeam` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -117,6 +121,26 @@ def type=(type) @type = type 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 @@ -127,6 +151,7 @@ def ==(o) id == o.id && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_attributes.rb b/lib/datadog_api_client/v2/models/user_team_attributes.rb index bafbd73723fb..a7ffec1bd835 100644 --- a/lib/datadog_api_client/v2/models/user_team_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_team_attributes.rb @@ -31,6 +31,8 @@ class UserTeamAttributes # The user's role within the team attr_accessor :role + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -69,12 +71,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'provisioned_by') @@ -90,6 +94,26 @@ 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 @@ -99,6 +123,7 @@ def ==(o) provisioned_by == o.provisioned_by && provisioned_by_id == o.provisioned_by_id && role == o.role + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_create.rb b/lib/datadog_api_client/v2/models/user_team_create.rb index f2795c0de283..2fe95f61e066 100644 --- a/lib/datadog_api_client/v2/models/user_team_create.rb +++ b/lib/datadog_api_client/v2/models/user_team_create.rb @@ -30,6 +30,8 @@ class UserTeamCreate # Team membership type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamCreate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -97,6 +101,26 @@ def type=(type) @type = type 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 @@ -106,6 +130,7 @@ def ==(o) attributes == o.attributes && relationships == o.relationships && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_permission.rb b/lib/datadog_api_client/v2/models/user_team_permission.rb index 76d574e17f50..7660fce9739c 100644 --- a/lib/datadog_api_client/v2/models/user_team_permission.rb +++ b/lib/datadog_api_client/v2/models/user_team_permission.rb @@ -30,6 +30,8 @@ class UserTeamPermission # User team permission type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamPermission` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamPermission`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -108,6 +112,26 @@ def type=(type) @type = type 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 @@ -117,6 +141,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb b/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb index 4b740ca01b6f..968d897bdce5 100644 --- a/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb @@ -24,6 +24,8 @@ class UserTeamPermissionAttributes # Object of team permission actions and boolean values that a logged in user can perform on this team. attr_accessor :permissions + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamPermissionAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamPermissionAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'permissions') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && permissions == o.permissions + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_relationships.rb b/lib/datadog_api_client/v2/models/user_team_relationships.rb index 6217ee82aa28..a525edfdff45 100644 --- a/lib/datadog_api_client/v2/models/user_team_relationships.rb +++ b/lib/datadog_api_client/v2/models/user_team_relationships.rb @@ -27,6 +27,8 @@ class UserTeamRelationships # Relationship between team membership and user attr_accessor :user + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamRelationships` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'team') @@ -70,6 +74,26 @@ 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 @@ -78,6 +102,7 @@ def ==(o) self.class == o.class && team == o.team && user == o.user + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_request.rb b/lib/datadog_api_client/v2/models/user_team_request.rb index 4164755f2ba6..e8e512616fcc 100644 --- a/lib/datadog_api_client/v2/models/user_team_request.rb +++ b/lib/datadog_api_client/v2/models/user_team_request.rb @@ -24,6 +24,8 @@ class UserTeamRequest # A user's relationship with a team attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_response.rb b/lib/datadog_api_client/v2/models/user_team_response.rb index a334add88fc0..21e33e7053f9 100644 --- a/lib/datadog_api_client/v2/models/user_team_response.rb +++ b/lib/datadog_api_client/v2/models/user_team_response.rb @@ -27,6 +27,8 @@ class UserTeamResponse # Resources related to the team memberships attr_accessor :included + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && included == o.included + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_update.rb b/lib/datadog_api_client/v2/models/user_team_update.rb index 004e28fc3b13..bfdff8f07829 100644 --- a/lib/datadog_api_client/v2/models/user_team_update.rb +++ b/lib/datadog_api_client/v2/models/user_team_update.rb @@ -27,6 +27,8 @@ class UserTeamUpdate # Team membership type attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamUpdate` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -88,6 +92,26 @@ def type=(type) @type = type 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 @@ -96,6 +120,7 @@ def ==(o) self.class == o.class && attributes == o.attributes && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_team_update_request.rb b/lib/datadog_api_client/v2/models/user_team_update_request.rb index 37cf23f6a8e7..f13ccb41ad42 100644 --- a/lib/datadog_api_client/v2/models/user_team_update_request.rb +++ b/lib/datadog_api_client/v2/models/user_team_update_request.rb @@ -24,6 +24,8 @@ class UserTeamUpdateRequest # A user's relationship with a team attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_teams_response.rb b/lib/datadog_api_client/v2/models/user_teams_response.rb index 2730a9c655d6..2e0d377121cc 100644 --- a/lib/datadog_api_client/v2/models/user_teams_response.rb +++ b/lib/datadog_api_client/v2/models/user_teams_response.rb @@ -33,6 +33,8 @@ class UserTeamsResponse # Teams response metadata. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -63,12 +65,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserTeamsResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserTeamsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -92,6 +96,26 @@ 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 @@ -102,6 +126,7 @@ def ==(o) included == o.included && links == o.links && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_update_attributes.rb b/lib/datadog_api_client/v2/models/user_update_attributes.rb index 6c400aad691a..b1680102e00a 100644 --- a/lib/datadog_api_client/v2/models/user_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_update_attributes.rb @@ -30,6 +30,8 @@ class UserUpdateAttributes # The name of the user. attr_accessor :name + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserUpdateAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'disabled') @@ -79,6 +83,26 @@ 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 @@ -88,6 +112,7 @@ def ==(o) disabled == o.disabled && email == o.email && name == o.name + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_update_data.rb b/lib/datadog_api_client/v2/models/user_update_data.rb index 2580e8f709ba..44dd7992737d 100644 --- a/lib/datadog_api_client/v2/models/user_update_data.rb +++ b/lib/datadog_api_client/v2/models/user_update_data.rb @@ -30,6 +30,8 @@ class UserUpdateData # Users resource type. attr_reader :type + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserUpdateData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserUpdateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -119,6 +123,26 @@ def type=(type) @type = type 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 @@ -128,6 +152,7 @@ def ==(o) attributes == o.attributes && id == o.id && type == o.type + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/user_update_request.rb b/lib/datadog_api_client/v2/models/user_update_request.rb index 530e7024d54b..3041665e48b7 100644 --- a/lib/datadog_api_client/v2/models/user_update_request.rb +++ b/lib/datadog_api_client/v2/models/user_update_request.rb @@ -24,6 +24,8 @@ class UserUpdateRequest # Object to update a user. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UserUpdateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UserUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -79,6 +83,26 @@ def data=(data) @data = data 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 @@ -86,6 +110,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/users_relationship.rb b/lib/datadog_api_client/v2/models/users_relationship.rb index e2258ebd7dbc..cadff8079b12 100644 --- a/lib/datadog_api_client/v2/models/users_relationship.rb +++ b/lib/datadog_api_client/v2/models/users_relationship.rb @@ -24,6 +24,8 @@ class UsersRelationship # Relationships to user objects. attr_reader :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UsersRelationship` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UsersRelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -81,6 +85,26 @@ def data=(data) @data = data 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 @@ -88,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/users_response.rb b/lib/datadog_api_client/v2/models/users_response.rb index 49df9c4231a0..8f07c4f366e4 100644 --- a/lib/datadog_api_client/v2/models/users_response.rb +++ b/lib/datadog_api_client/v2/models/users_response.rb @@ -30,6 +30,8 @@ class UsersResponse # Object describing meta attributes of response. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -58,12 +60,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UsersResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::UsersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -83,6 +87,26 @@ 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 @@ -92,6 +116,7 @@ def ==(o) data == o.data && included == o.included && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/workflow_instance_create_meta.rb b/lib/datadog_api_client/v2/models/workflow_instance_create_meta.rb index 2d5d5f878946..6f4f75633a5e 100644 --- a/lib/datadog_api_client/v2/models/workflow_instance_create_meta.rb +++ b/lib/datadog_api_client/v2/models/workflow_instance_create_meta.rb @@ -24,6 +24,8 @@ class WorkflowInstanceCreateMeta # The input parameters to the workflow. attr_accessor :payload + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorkflowInstanceCreateMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorkflowInstanceCreateMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'payload') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && payload == o.payload + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/workflow_instance_create_request.rb b/lib/datadog_api_client/v2/models/workflow_instance_create_request.rb index 3d03180c601a..208a8b2ddd96 100644 --- a/lib/datadog_api_client/v2/models/workflow_instance_create_request.rb +++ b/lib/datadog_api_client/v2/models/workflow_instance_create_request.rb @@ -24,6 +24,8 @@ class WorkflowInstanceCreateRequest # Additional information for creating a workflow instance. attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorkflowInstanceCreateRequest` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorkflowInstanceCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'meta') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/workflow_instance_create_response.rb b/lib/datadog_api_client/v2/models/workflow_instance_create_response.rb index 1a2e146f56cd..6754c213474a 100644 --- a/lib/datadog_api_client/v2/models/workflow_instance_create_response.rb +++ b/lib/datadog_api_client/v2/models/workflow_instance_create_response.rb @@ -24,6 +24,8 @@ class WorkflowInstanceCreateResponse # Data about the created workflow instance. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorkflowInstanceCreateResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorkflowInstanceCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/workflow_instance_create_response_data.rb b/lib/datadog_api_client/v2/models/workflow_instance_create_response_data.rb index 7f8df4428071..2fc0ffdb64de 100644 --- a/lib/datadog_api_client/v2/models/workflow_instance_create_response_data.rb +++ b/lib/datadog_api_client/v2/models/workflow_instance_create_response_data.rb @@ -24,6 +24,8 @@ class WorkflowInstanceCreateResponseData # The ID of the workflow execution. It can be used to fetch the execution status. attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorkflowInstanceCreateResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorkflowInstanceCreateResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/workflow_instance_list_item.rb b/lib/datadog_api_client/v2/models/workflow_instance_list_item.rb index e9022e95798e..90c62aa8e9c0 100644 --- a/lib/datadog_api_client/v2/models/workflow_instance_list_item.rb +++ b/lib/datadog_api_client/v2/models/workflow_instance_list_item.rb @@ -24,6 +24,8 @@ class WorkflowInstanceListItem # The ID of the workflow instance attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorkflowInstanceListItem` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorkflowInstanceListItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/workflow_list_instances_response.rb b/lib/datadog_api_client/v2/models/workflow_list_instances_response.rb index 5a689281833d..068f01c6d868 100644 --- a/lib/datadog_api_client/v2/models/workflow_list_instances_response.rb +++ b/lib/datadog_api_client/v2/models/workflow_list_instances_response.rb @@ -27,6 +27,8 @@ class WorkflowListInstancesResponse # Metadata about the instances list attr_accessor :meta + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -53,12 +55,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorkflowListInstancesResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorkflowListInstancesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -72,6 +76,26 @@ 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 @@ -80,6 +104,7 @@ def ==(o) self.class == o.class && data == o.data && meta == o.meta + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta.rb b/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta.rb index ac01b0240af7..c87b95937492 100644 --- a/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta.rb +++ b/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta.rb @@ -24,6 +24,8 @@ class WorkflowListInstancesResponseMeta # Page information for the list instances response. attr_accessor :page + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorkflowListInstancesResponseMeta` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorkflowListInstancesResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'page') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && page == o.page + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta_page.rb b/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta_page.rb index e759faa9c6b5..e8c8407c75ad 100644 --- a/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta_page.rb +++ b/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta_page.rb @@ -24,6 +24,8 @@ class WorkflowListInstancesResponseMetaPage # The total count of items. attr_accessor :total_count + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorkflowListInstancesResponseMetaPage` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorkflowListInstancesResponseMetaPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'total_count') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && total_count == o.total_count + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response.rb b/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response.rb index 190744b33f10..bc20541c8452 100644 --- a/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response.rb +++ b/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response.rb @@ -24,6 +24,8 @@ class WorklflowCancelInstanceResponse # Data about the canceled instance. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorklflowCancelInstanceResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorklflowCancelInstanceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response_data.rb b/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response_data.rb index 90778d38c378..c659bc1418bc 100644 --- a/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response_data.rb +++ b/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response_data.rb @@ -24,6 +24,8 @@ class WorklflowCancelInstanceResponseData # The id of the canceled instance attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorklflowCancelInstanceResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorklflowCancelInstanceResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/worklflow_get_instance_response.rb b/lib/datadog_api_client/v2/models/worklflow_get_instance_response.rb index 08d13771eb3e..03fca32146da 100644 --- a/lib/datadog_api_client/v2/models/worklflow_get_instance_response.rb +++ b/lib/datadog_api_client/v2/models/worklflow_get_instance_response.rb @@ -24,6 +24,8 @@ class WorklflowGetInstanceResponse # The data of the instance response. attr_accessor :data + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorklflowGetInstanceResponse` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorklflowGetInstanceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'data') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data.rb b/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data.rb index 87cc84301eae..81006e7e2814 100644 --- a/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data.rb +++ b/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data.rb @@ -24,6 +24,8 @@ class WorklflowGetInstanceResponseData # The attributes of the instance response data. attr_accessor :attributes + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorklflowGetInstanceResponseData` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorklflowGetInstanceResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'attributes') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes + additional_properties == o.additional_properties end # Calculates hash code according to all attributes. diff --git a/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data_attributes.rb b/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data_attributes.rb index fe8e61c96251..512e22305e25 100644 --- a/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data_attributes.rb @@ -24,6 +24,8 @@ class WorklflowGetInstanceResponseDataAttributes # The id of the instance. attr_accessor :id + attr_accessor :additional_properties + # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -48,12 +50,14 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WorklflowGetInstanceResponseDataAttributes` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::WorklflowGetInstanceResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v end - h[k.to_sym] = v } if attributes.key?(:'id') @@ -61,6 +65,26 @@ 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 @@ -68,6 +92,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id + additional_properties == o.additional_properties end # Calculates hash code according to all attributes.