Class: BotFramework::Place
- Defined in:
- lib/bot_framework/models/place.rb
Overview
Place (entity type: "schema.org/Place")
Instance Attribute Summary collapse
-
#address ⇒ Object
Address of the place (may be ‘string` or complex object of type `PostalAddress`).
-
#geo ⇒ Object
Geo coordinates of the place (may be complex object of type ‘GeoCoordinates` or `GeoShape`).
-
#has_map ⇒ Object
Map to the place (may be ‘string` (URL) or complex object of type `Map`).
-
#name ⇒ Object
The name of the thing.
-
#type ⇒ Object
The type of the thing.
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Place
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
Methods inherited from Base
#==, #_deserialize, #_to_hash, #as_json, attr_accessor, attribute_map, #attributes, #attributes_hash, #build_from_hash, #compact_attributes_hash, #eql?, #hash, #to_body, #to_hash, #to_json, #to_s, #valid?
Constructor Details
#initialize(attributes = {}) ⇒ Place
Initializes the object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/bot_framework/models/place.rb', line 32 def initialize(attributes = {}) 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 } self.address = attributes[:address] if attributes.key?(:address) self.geo = attributes[:geo] if attributes.key?(:geo) self.has_map = attributes[:hasMap] if attributes.key?(:hasMap) self.type = attributes[:type] if attributes.key?(:type) self.name = attributes[:name] if attributes.key?(:name) end |
Instance Attribute Details
#address ⇒ Object
Address of the place (may be ‘string` or complex object of type `PostalAddress`)
5 6 7 |
# File 'lib/bot_framework/models/place.rb', line 5 def address @address end |
#geo ⇒ Object
Geo coordinates of the place (may be complex object of type ‘GeoCoordinates` or `GeoShape`)
8 9 10 |
# File 'lib/bot_framework/models/place.rb', line 8 def geo @geo end |
#has_map ⇒ Object
Map to the place (may be ‘string` (URL) or complex object of type `Map`)
11 12 13 |
# File 'lib/bot_framework/models/place.rb', line 11 def has_map @has_map end |
#name ⇒ Object
The name of the thing
17 18 19 |
# File 'lib/bot_framework/models/place.rb', line 17 def name @name end |
#type ⇒ Object
The type of the thing
14 15 16 |
# File 'lib/bot_framework/models/place.rb', line 14 def type @type end |
Class Method Details
.swagger_types ⇒ Object
Attribute type mapping.
20 21 22 23 24 25 26 27 28 |
# File 'lib/bot_framework/models/place.rb', line 20 def self.swagger_types { address: :Object, geo: :Object, has_map: :Object, type: :String, name: :String } end |
Instance Method Details
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
51 52 53 54 |
# File 'lib/bot_framework/models/place.rb', line 51 def list_invalid_properties invalid_properties = [] invalid_properties end |