lib/phrase/models/comment.rb in phrase-2.13.0 vs lib/phrase/models/comment.rb in phrase-2.14.0
- old
+ new
@@ -4,39 +4,47 @@
class Comment
attr_accessor :id
attr_accessor :message
+ attr_accessor :has_replies
+
attr_accessor :user
attr_accessor :created_at
attr_accessor :updated_at
attr_accessor :mentioned_users
+ attr_accessor :locales
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'id' => :'id',
:'message' => :'message',
+ :'has_replies' => :'has_replies',
:'user' => :'user',
:'created_at' => :'created_at',
:'updated_at' => :'updated_at',
- :'mentioned_users' => :'mentioned_users'
+ :'mentioned_users' => :'mentioned_users',
+ :'locales' => :'locales'
}
end
# Attribute type mapping.
def self.openapi_types
{
:'id' => :'String',
:'message' => :'String',
+ :'has_replies' => :'Boolean',
:'user' => :'UserPreview',
:'created_at' => :'DateTime',
:'updated_at' => :'DateTime',
- :'mentioned_users' => :'Array<UserPreview>'
+ :'mentioned_users' => :'Array<UserPreview>',
+ :'locales' => :'Array<LocalePreview>'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -65,10 +73,14 @@
if attributes.key?(:'message')
self.message = attributes[:'message']
end
+ if attributes.key?(:'has_replies')
+ self.has_replies = attributes[:'has_replies']
+ end
+
if attributes.key?(:'user')
self.user = attributes[:'user']
end
if attributes.key?(:'created_at')
@@ -82,10 +94,16 @@
if attributes.key?(:'mentioned_users')
if (value = attributes[:'mentioned_users']).is_a?(Array)
self.mentioned_users = value
end
end
+
+ if attributes.key?(:'locales')
+ if (value = attributes[:'locales']).is_a?(Array)
+ self.locales = 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
@@ -104,14 +122,16 @@
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
id == o.id &&
message == o.message &&
+ has_replies == o.has_replies &&
user == o.user &&
created_at == o.created_at &&
updated_at == o.updated_at &&
- mentioned_users == o.mentioned_users
+ mentioned_users == o.mentioned_users &&
+ locales == o.locales
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -119,10 +139,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, message, user, created_at, updated_at, mentioned_users].hash
+ [id, message, has_replies, user, created_at, updated_at, mentioned_users, locales].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself