Class: BotFramework::GeoCoordinates
- Defined in:
- lib/bot_framework/models/geo_coordinates.rb
Overview
GeoCoordinates (entity type: "schema.org/GeoCoordinates")
Instance Attribute Summary collapse
-
#elevation ⇒ Object
Elevation of the location [WGS 84](en.wikipedia.org/wiki/World_Geodetic_System).
-
#latitude ⇒ Object
Latitude of the location [WGS 84](en.wikipedia.org/wiki/World_Geodetic_System).
-
#longitude ⇒ Object
Longitude of the location [WGS 84](en.wikipedia.org/wiki/World_Geodetic_System).
-
#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 = {}) ⇒ GeoCoordinates
constructor
Initializes the object.
Methods inherited from Base
#==, #_deserialize, #_to_hash, #as_json, attr_accessor, attribute_map, #attributes, #attributes_hash, #build_from_hash, #compact_attributes_hash, #eql?, #hash, #list_invalid_properties, #to_body, #to_hash, #to_json, #to_s, #valid?
Constructor Details
#initialize(attributes = {}) ⇒ GeoCoordinates
Initializes the object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/bot_framework/models/geo_coordinates.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.elevation = attributes[:elevation] if attributes.key?(:elevation) self.latitude = attributes[:latitude] if attributes.key?(:latitude) self.longitude = attributes[:longitude] if attributes.key?(:longitude) self.type = attributes[:type] if attributes.key?(:type) self.name = attributes[:name] if attributes.key?(:name) end |
Instance Attribute Details
#elevation ⇒ Object
Elevation of the location [WGS 84](en.wikipedia.org/wiki/World_Geodetic_System)
5 6 7 |
# File 'lib/bot_framework/models/geo_coordinates.rb', line 5 def elevation @elevation end |
#latitude ⇒ Object
Latitude of the location [WGS 84](en.wikipedia.org/wiki/World_Geodetic_System)
8 9 10 |
# File 'lib/bot_framework/models/geo_coordinates.rb', line 8 def latitude @latitude end |
#longitude ⇒ Object
Longitude of the location [WGS 84](en.wikipedia.org/wiki/World_Geodetic_System)
11 12 13 |
# File 'lib/bot_framework/models/geo_coordinates.rb', line 11 def longitude @longitude end |
#name ⇒ Object
The name of the thing
17 18 19 |
# File 'lib/bot_framework/models/geo_coordinates.rb', line 17 def name @name end |
#type ⇒ Object
The type of the thing
14 15 16 |
# File 'lib/bot_framework/models/geo_coordinates.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/geo_coordinates.rb', line 20 def self.swagger_types { elevation: :Float, latitude: :Float, longitude: :Float, type: :String, name: :String } end |