Class: MicrosoftGraph::Models::Place
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/place.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#address ⇒ Object
Gets the address property value.
-
#address=(value) ⇒ Object
Sets the address property value.
-
#display_name ⇒ Object
Gets the displayName property value.
-
#display_name=(value) ⇒ Object
Sets the displayName property value.
-
#geo_coordinates ⇒ Object
Gets the geoCoordinates property value.
-
#geo_coordinates=(value) ⇒ Object
Sets the geoCoordinates property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new place and sets the default values.
-
#phone ⇒ Object
Gets the phone property value.
-
#phone=(value) ⇒ Object
Sets the phone property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new place and sets the default values.
40 41 42 |
# File 'lib/models/place.rb', line 40 def initialize() super end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/models/place.rb', line 48 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.room" return Room.new when "#microsoft.graph.roomList" return RoomList.new end end return Place.new end |
Instance Method Details
#address ⇒ Object
Gets the address property value. The street address of the place.
25 26 27 |
# File 'lib/models/place.rb', line 25 def address return @address end |
#address=(value) ⇒ Object
Sets the address property value. The street address of the place.
33 34 35 |
# File 'lib/models/place.rb', line 33 def address=(value) @address = value end |
#display_name ⇒ Object
Gets the displayName property value. The name associated with the place.
66 67 68 |
# File 'lib/models/place.rb', line 66 def display_name return @display_name end |
#display_name=(value) ⇒ Object
Sets the displayName property value. The name associated with the place.
74 75 76 |
# File 'lib/models/place.rb', line 74 def display_name=(value) @display_name = value end |
#geo_coordinates ⇒ Object
Gets the geoCoordinates property value. Specifies the place location in latitude, longitude and (optionally) altitude coordinates.
81 82 83 |
# File 'lib/models/place.rb', line 81 def geo_coordinates return @geo_coordinates end |
#geo_coordinates=(value) ⇒ Object
Sets the geoCoordinates property value. Specifies the place location in latitude, longitude and (optionally) altitude coordinates.
89 90 91 |
# File 'lib/models/place.rb', line 89 def geo_coordinates=(value) @geo_coordinates = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
96 97 98 99 100 101 102 103 |
# File 'lib/models/place.rb', line 96 def get_field_deserializers() return super.merge({ "address" => lambda {|n| @address = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PhysicalAddress.create_from_discriminator_value(pn) }) }, "displayName" => lambda {|n| @display_name = n.get_string_value() }, "geoCoordinates" => lambda {|n| @geo_coordinates = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OutlookGeoCoordinates.create_from_discriminator_value(pn) }) }, "phone" => lambda {|n| @phone = n.get_string_value() }, }) end |
#phone ⇒ Object
Gets the phone property value. The phone number of the place.
108 109 110 |
# File 'lib/models/place.rb', line 108 def phone return @phone end |
#phone=(value) ⇒ Object
Sets the phone property value. The phone number of the place.
116 117 118 |
# File 'lib/models/place.rb', line 116 def phone=(value) @phone = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
124 125 126 127 128 129 130 131 |
# File 'lib/models/place.rb', line 124 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("address", @address) writer.write_string_value("displayName", @display_name) writer.write_object_value("geoCoordinates", @geo_coordinates) writer.write_string_value("phone", @phone) end |