Class: MicrosoftGraph::Models::Place

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/place.rb

Direct Known Subclasses

Room, RoomList

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

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

Raises:

  • (StandardError)


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

#addressObject

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_nameObject

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_coordinatesObject

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_deserializersObject

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

#phoneObject

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

Raises:

  • (StandardError)


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