lib/phrase/models/repo_sync_event.rb in phrase-3.2.1 vs lib/phrase/models/repo_sync_event.rb in phrase-3.3.0
- old
+ new
@@ -1,9 +1,11 @@
require 'date'
module Phrase
class RepoSyncEvent
+ attr_accessor :id
+
attr_accessor :event_type
attr_accessor :created_at
attr_accessor :status
@@ -40,10 +42,11 @@
end
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'id' => :'id',
:'event_type' => :'event_type',
:'created_at' => :'created_at',
:'status' => :'status',
:'pull_request_url' => :'pull_request_url',
:'auto_import' => :'auto_import',
@@ -52,10 +55,11 @@
end
# Attribute type mapping.
def self.openapi_types
{
+ :'id' => :'String',
:'event_type' => :'String',
:'created_at' => :'DateTime',
:'status' => :'String',
:'pull_request_url' => :'String',
:'auto_import' => :'Boolean',
@@ -82,10 +86,14 @@
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::RepoSyncEvent`. 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?(:'id')
+ self.id = attributes[:'id']
+ end
+
if attributes.key?(:'event_type')
self.event_type = attributes[:'event_type']
end
if attributes.key?(:'created_at')
@@ -151,10 +159,11 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ id == o.id &&
event_type == o.event_type &&
created_at == o.created_at &&
status == o.status &&
pull_request_url == o.pull_request_url &&
auto_import == o.auto_import &&
@@ -168,10 +177,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [event_type, created_at, status, pull_request_url, auto_import, errors].hash
+ [id, event_type, created_at, status, pull_request_url, auto_import, errors].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself