Class: BotFramework::GeoCoordinates

Inherits:
Base
  • Object
show all
Defined in:
lib/bot_framework/models/geo_coordinates.rb

Overview

GeoCoordinates (entity type: "schema.org/GeoCoordinates")

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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

#elevationObject

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

#latitudeObject

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

#longitudeObject

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

#nameObject

The name of the thing



17
18
19
# File 'lib/bot_framework/models/geo_coordinates.rb', line 17

def name
  @name
end

#typeObject

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_typesObject

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