lib/phrase/models/comment.rb in phrase-2.0.0 vs lib/phrase/models/comment.rb in phrase-2.1.0
- old
+ new
@@ -10,29 +10,33 @@
attr_accessor :created_at
attr_accessor :updated_at
+ attr_accessor :mentioned_users
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'id' => :'id',
:'message' => :'message',
:'user' => :'user',
:'created_at' => :'created_at',
- :'updated_at' => :'updated_at'
+ :'updated_at' => :'updated_at',
+ :'mentioned_users' => :'mentioned_users'
}
end
# Attribute type mapping.
def self.openapi_types
{
:'id' => :'String',
:'message' => :'String',
:'user' => :'UserPreview',
:'created_at' => :'DateTime',
- :'updated_at' => :'DateTime'
+ :'updated_at' => :'DateTime',
+ :'mentioned_users' => :'Array<UserPreview>'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -72,10 +76,16 @@
end
if attributes.key?(:'updated_at')
self.updated_at = attributes[:'updated_at']
end
+
+ if attributes.key?(:'mentioned_users')
+ if (value = attributes[:'mentioned_users']).is_a?(Array)
+ self.mentioned_users = value
+ end
+ 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
@@ -96,11 +106,12 @@
self.class == o.class &&
id == o.id &&
message == o.message &&
user == o.user &&
created_at == o.created_at &&
- updated_at == o.updated_at
+ updated_at == o.updated_at &&
+ mentioned_users == o.mentioned_users
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -108,10 +119,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, message, user, created_at, updated_at].hash
+ [id, message, user, created_at, updated_at, mentioned_users].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself