lib/purecloud/models/location.rb in purecloud-0.57.1 vs lib/purecloud/models/location.rb in purecloud-0.58.1
- old
+ new
@@ -16,68 +16,45 @@
require 'date'
module PureCloud
class Location
- # The globally unique identifier for the object.
attr_accessor :id
- attr_accessor :name
+ attr_accessor :floorplan_id
- attr_accessor :address
+ attr_accessor :coordinates
- attr_accessor :address_verified
+ attr_accessor :notes
- attr_accessor :emergency_number
+ attr_accessor :location_definition
- # Current activity status of the location.
- attr_accessor :state
-
- attr_accessor :version
-
- attr_accessor :path
-
- # The URI for this object
- attr_accessor :self_uri
-
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'id' => :'id',
- :'name' => :'name',
+ :'floorplan_id' => :'floorplanId',
- :'address' => :'address',
+ :'coordinates' => :'coordinates',
- :'address_verified' => :'addressVerified',
+ :'notes' => :'notes',
- :'emergency_number' => :'emergencyNumber',
+ :'location_definition' => :'locationDefinition'
- :'state' => :'state',
-
- :'version' => :'version',
-
- :'path' => :'path',
-
- :'self_uri' => :'selfUri'
-
}
end
# Attribute type mapping.
def self.swagger_types
{
:'id' => :'String',
- :'name' => :'String',
- :'address' => :'LocationAddress',
- :'address_verified' => :'BOOLEAN',
- :'emergency_number' => :'LocationEmergencyNumber',
- :'state' => :'String',
- :'version' => :'Integer',
- :'path' => :'Array<String>',
- :'self_uri' => :'String'
+ :'floorplan_id' => :'String',
+ :'coordinates' => :'Hash<String, Float>',
+ :'notes' => :'String',
+ :'location_definition' => :'LocationDefinition'
}
end
def initialize(attributes = {})
@@ -89,79 +66,48 @@
if attributes[:'id']
self.id = attributes[:'id']
end
- if attributes[:'name']
- self.name = attributes[:'name']
+ if attributes[:'floorplanId']
+ self.floorplan_id = attributes[:'floorplanId']
end
- if attributes[:'address']
- self.address = attributes[:'address']
+ if attributes[:'coordinates']
+ if (value = attributes[:'coordinates']).is_a?(Array)
+ self.coordinates = value
+ end
end
- if attributes[:'addressVerified']
- self.address_verified = attributes[:'addressVerified']
- else
- self.address_verified = false
+ if attributes[:'notes']
+ self.notes = attributes[:'notes']
end
- if attributes[:'emergencyNumber']
- self.emergency_number = attributes[:'emergencyNumber']
+ if attributes[:'locationDefinition']
+ self.location_definition = attributes[:'locationDefinition']
end
- if attributes[:'state']
- self.state = attributes[:'state']
- end
-
- if attributes[:'version']
- self.version = attributes[:'version']
- end
-
- if attributes[:'path']
- if (value = attributes[:'path']).is_a?(Array)
- self.path = value
- end
- end
-
- if attributes[:'selfUri']
- self.self_uri = attributes[:'selfUri']
- end
-
end
- # Custom attribute writer method checking allowed values (enum).
- def state=(state)
- allowed_values = ["active", "deleted"]
- if state && !allowed_values.include?(state)
- fail "invalid value for 'state', must be one of #{allowed_values}"
- end
- @state = state
- end
-
# Check equality by comparing each attribute.
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
id == o.id &&
- name == o.name &&
- address == o.address &&
- address_verified == o.address_verified &&
- emergency_number == o.emergency_number &&
- state == o.state &&
- version == o.version &&
- path == o.path &&
- self_uri == o.self_uri
+ floorplan_id == o.floorplan_id &&
+ coordinates == o.coordinates &&
+ notes == o.notes &&
+ location_definition == o.location_definition
end
# @see the `==` method
def eql?(o)
self == o
end
# Calculate hash code according to all attributes.
def hash
- [id, name, address, address_verified, emergency_number, state, version, path, self_uri].hash
+ [id, floorplan_id, coordinates, notes, location_definition].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)