lib/phrase/models/branch.rb in phrase-2.0.0 vs lib/phrase/models/branch.rb in phrase-2.1.0
- old
+ new
@@ -1,9 +1,13 @@
require 'date'
module Phrase
class Branch
+ attr_accessor :base_project_id
+
+ attr_accessor :branch_project_id
+
attr_accessor :name
attr_accessor :created_at
attr_accessor :updated_at
@@ -17,10 +21,12 @@
attr_accessor :state
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'base_project_id' => :'base_project_id',
+ :'branch_project_id' => :'branch_project_id',
:'name' => :'name',
:'created_at' => :'created_at',
:'updated_at' => :'updated_at',
:'merged_at' => :'merged_at',
:'merged_by' => :'merged_by',
@@ -30,10 +36,12 @@
end
# Attribute type mapping.
def self.openapi_types
{
+ :'base_project_id' => :'String',
+ :'branch_project_id' => :'String',
:'name' => :'String',
:'created_at' => :'DateTime',
:'updated_at' => :'DateTime',
:'merged_at' => :'DateTime',
:'merged_by' => :'UserPreview',
@@ -61,10 +69,18 @@
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::Branch`. 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?(:'base_project_id')
+ self.base_project_id = attributes[:'base_project_id']
+ end
+
+ if attributes.key?(:'branch_project_id')
+ self.branch_project_id = attributes[:'branch_project_id']
+ end
+
if attributes.key?(:'name')
self.name = attributes[:'name']
end
if attributes.key?(:'created_at')
@@ -108,10 +124,12 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ base_project_id == o.base_project_id &&
+ branch_project_id == o.branch_project_id &&
name == o.name &&
created_at == o.created_at &&
updated_at == o.updated_at &&
merged_at == o.merged_at &&
merged_by == o.merged_by &&
@@ -126,10 +144,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [name, created_at, updated_at, merged_at, merged_by, created_by, state].hash
+ [base_project_id, branch_project_id, name, created_at, updated_at, merged_at, merged_by, created_by, state].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself