lib/hubspot/codegen/cms/site_search/models/indexed_field.rb in hubspot-api-client-17.2.0 vs lib/hubspot/codegen/cms/site_search/models/indexed_field.rb in hubspot-api-client-18.0.0
- old
+ new
@@ -15,24 +15,24 @@
module Hubspot
module Cms
module SiteSearch
class IndexedField
+ attr_accessor :values
+
attr_accessor :name
attr_accessor :value
- attr_accessor :values
-
attr_accessor :metadata_field
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'values' => :'values',
:'name' => :'name',
:'value' => :'value',
- :'values' => :'values',
:'metadata_field' => :'metadataField'
}
end
# Returns all the JSON keys this model knows about
@@ -41,13 +41,13 @@
end
# Attribute type mapping.
def self.openapi_types
{
+ :'values' => :'Array<Object>',
:'name' => :'String',
:'value' => :'Object',
- :'values' => :'Array<Object>',
:'metadata_field' => :'Boolean'
}
end
# List of attributes with nullable: true
@@ -69,70 +69,70 @@
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::SiteSearch::IndexedField`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
+ if attributes.key?(:'values')
+ if (value = attributes[:'values']).is_a?(Array)
+ self.values = value
+ end
+ end
+
if attributes.key?(:'name')
self.name = attributes[:'name']
end
if attributes.key?(:'value')
self.value = attributes[:'value']
end
- if attributes.key?(:'values')
- if (value = attributes[:'values']).is_a?(Array)
- self.values = value
- end
- end
-
if attributes.key?(:'metadata_field')
self.metadata_field = attributes[:'metadata_field']
end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
+ if @values.nil?
+ invalid_properties.push('invalid value for "values", values cannot be nil.')
+ end
+
if @name.nil?
invalid_properties.push('invalid value for "name", name cannot be nil.')
end
if @value.nil?
invalid_properties.push('invalid value for "value", value cannot be nil.')
end
- if @values.nil?
- invalid_properties.push('invalid value for "values", values cannot be nil.')
- end
-
if @metadata_field.nil?
invalid_properties.push('invalid value for "metadata_field", metadata_field cannot be nil.')
end
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
+ return false if @values.nil?
return false if @name.nil?
return false if @value.nil?
- return false if @values.nil?
return false if @metadata_field.nil?
true
end
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ values == o.values &&
name == o.name &&
value == o.value &&
- values == o.values &&
metadata_field == o.metadata_field
end
# @see the `==` method
# @param [Object] Object to be compared
@@ -141,10 +141,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [name, value, values, metadata_field].hash
+ [values, name, value, metadata_field].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself