lib/hubspot/codegen/crm/contacts/models/value_with_timestamp.rb in hubspot-api-client-17.2.0 vs lib/hubspot/codegen/crm/contacts/models/value_with_timestamp.rb in hubspot-api-client-18.0.0
- old
+ new
@@ -15,31 +15,31 @@
module Hubspot
module Crm
module Contacts
class ValueWithTimestamp
- attr_accessor :value
+ attr_accessor :source_id
- attr_accessor :timestamp
-
attr_accessor :source_type
- attr_accessor :source_id
-
attr_accessor :source_label
attr_accessor :updated_by_user_id
+ attr_accessor :value
+
+ attr_accessor :timestamp
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'value' => :'value',
- :'timestamp' => :'timestamp',
- :'source_type' => :'sourceType',
:'source_id' => :'sourceId',
+ :'source_type' => :'sourceType',
:'source_label' => :'sourceLabel',
- :'updated_by_user_id' => :'updatedByUserId'
+ :'updated_by_user_id' => :'updatedByUserId',
+ :'value' => :'value',
+ :'timestamp' => :'timestamp'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -47,16 +47,16 @@
end
# Attribute type mapping.
def self.openapi_types
{
- :'value' => :'String',
- :'timestamp' => :'Time',
- :'source_type' => :'String',
:'source_id' => :'String',
+ :'source_type' => :'String',
:'source_label' => :'String',
- :'updated_by_user_id' => :'Integer'
+ :'updated_by_user_id' => :'Integer',
+ :'value' => :'String',
+ :'timestamp' => :'Time'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -77,74 +77,74 @@
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Contacts::ValueWithTimestamp`. 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?(:'value')
- self.value = attributes[:'value']
+ if attributes.key?(:'source_id')
+ self.source_id = attributes[:'source_id']
end
- if attributes.key?(:'timestamp')
- self.timestamp = attributes[:'timestamp']
- end
-
if attributes.key?(:'source_type')
self.source_type = attributes[:'source_type']
end
- if attributes.key?(:'source_id')
- self.source_id = attributes[:'source_id']
- end
-
if attributes.key?(:'source_label')
self.source_label = attributes[:'source_label']
end
if attributes.key?(:'updated_by_user_id')
self.updated_by_user_id = attributes[:'updated_by_user_id']
end
+
+ if attributes.key?(:'value')
+ self.value = attributes[:'value']
+ end
+
+ if attributes.key?(:'timestamp')
+ self.timestamp = attributes[:'timestamp']
+ 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 @source_type.nil?
+ invalid_properties.push('invalid value for "source_type", source_type cannot be nil.')
+ end
+
if @value.nil?
invalid_properties.push('invalid value for "value", value cannot be nil.')
end
if @timestamp.nil?
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
end
- if @source_type.nil?
- invalid_properties.push('invalid value for "source_type", source_type 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 @source_type.nil?
return false if @value.nil?
return false if @timestamp.nil?
- return false if @source_type.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 &&
- value == o.value &&
- timestamp == o.timestamp &&
- source_type == o.source_type &&
source_id == o.source_id &&
+ source_type == o.source_type &&
source_label == o.source_label &&
- updated_by_user_id == o.updated_by_user_id
+ updated_by_user_id == o.updated_by_user_id &&
+ value == o.value &&
+ timestamp == o.timestamp
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -152,10 +152,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [value, timestamp, source_type, source_id, source_label, updated_by_user_id].hash
+ [source_id, source_type, source_label, updated_by_user_id, value, timestamp].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself