lib/clever-ruby/models/teachers_deleted.rb in clever-ruby-1.2.5 vs lib/clever-ruby/models/teachers_deleted.rb in clever-ruby-2.0.0
- old
+ new
@@ -1,39 +1,48 @@
=begin
#Clever API
#The Clever API
-OpenAPI spec version: 1.2.0
+OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
+Swagger Codegen version: 2.3.0-SNAPSHOT
=end
require 'date'
require File.expand_path('../event.rb', __FILE__)
module Clever
class TeachersDeleted < Event
+ attr_accessor :created
+
+ attr_accessor :id
+
+ attr_accessor :type
+
attr_accessor :data
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'type' => :'type',
+ :'created' => :'created',
:'id' => :'id',
+ :'type' => :'type',
:'data' => :'data'
}
end
# Attribute type mapping.
def self.swagger_types
{
- :'type' => :'String',
+ :'created' => :'String',
:'id' => :'String',
+ :'type' => :'String',
:'data' => :'TeacherObject'
}
end
# Initializes the object
@@ -42,18 +51,22 @@
return unless attributes.is_a?(Hash)
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
- if attributes.has_key?(:'type')
- self.type = attributes[:'type']
+ if attributes.has_key?(:'created')
+ self.created = attributes[:'created']
end
if attributes.has_key?(:'id')
self.id = attributes[:'id']
end
+ if attributes.has_key?(:'type')
+ self.type = attributes[:'type']
+ end
+
if attributes.has_key?(:'data')
self.data = attributes[:'data']
end
end
@@ -79,12 +92,13 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
- type == o.type &&
+ created == o.created &&
id == o.id &&
+ type == o.type &&
data == o.data
end
# @see the `==` method
# @param [Object] Object to be compared
@@ -93,10 +107,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [type, id, data].hash
+ [created, id, type, data].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself