Class: BotFramework::Place

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

Overview

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

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, #to_body, #to_hash, #to_json, #to_s, #valid?

Constructor Details

#initialize(attributes = {}) ⇒ Place

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/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

#addressObject

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

#geoObject

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_mapObject

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

#nameObject

The name of the thing



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

def name
  @name
end

#typeObject

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_typesObject

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_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properies with the reasons



51
52
53
54
# File 'lib/bot_framework/models/place.rb', line 51

def list_invalid_properties
  invalid_properties = []
  invalid_properties
end