Class: MicrosoftGraph::Models::Location

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/location.rb

Direct Known Subclasses

LocationConstraintItem

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new location and sets the default values.



73
74
75
# File 'lib/models/location.rb', line 73

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a location

Raises:

  • (StandardError)


96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/models/location.rb', line 96

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.locationConstraintItem"
                return LocationConstraintItem.new
        end
    end
    return Location.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



43
44
45
# File 'lib/models/location.rb', line 43

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



51
52
53
# File 'lib/models/location.rb', line 51

def additional_data=(value)
    @additional_data = value
end

#addressObject

Gets the address property value. The street address of the location.

Returns:

  • a physical_address



58
59
60
# File 'lib/models/location.rb', line 58

def address
    return @address
end

#address=(value) ⇒ Object

Sets the address property value. The street address of the location.

Parameters:

  • value

    Value to set for the address property.

Returns:

  • a void



66
67
68
# File 'lib/models/location.rb', line 66

def address=(value)
    @address = value
end

#coordinatesObject

Gets the coordinates property value. The geographic coordinates and elevation of the location.

Returns:

  • a outlook_geo_coordinates



80
81
82
# File 'lib/models/location.rb', line 80

def coordinates
    return @coordinates
end

#coordinates=(value) ⇒ Object

Sets the coordinates property value. The geographic coordinates and elevation of the location.

Parameters:

  • value

    Value to set for the coordinates property.

Returns:

  • a void



88
89
90
# File 'lib/models/location.rb', line 88

def coordinates=(value)
    @coordinates = value
end

#display_nameObject

Gets the displayName property value. The name associated with the location.

Returns:

  • a string



112
113
114
# File 'lib/models/location.rb', line 112

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name associated with the location.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



120
121
122
# File 'lib/models/location.rb', line 120

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/models/location.rb', line 127

def get_field_deserializers()
    return {
        "address" => lambda {|n| @address = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PhysicalAddress.create_from_discriminator_value(pn) }) },
        "coordinates" => lambda {|n| @coordinates = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OutlookGeoCoordinates.create_from_discriminator_value(pn) }) },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "locationEmailAddress" => lambda {|n| @location_email_address = n.get_string_value() },
        "locationType" => lambda {|n| @location_type = n.get_enum_value(MicrosoftGraph::Models::LocationType) },
        "locationUri" => lambda {|n| @location_uri = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "uniqueId" => lambda {|n| @unique_id = n.get_string_value() },
        "uniqueIdType" => lambda {|n| @unique_id_type = n.get_enum_value(MicrosoftGraph::Models::LocationUniqueIdType) },
    }
end

#location_email_addressObject

Gets the locationEmailAddress property value. Optional email address of the location.

Returns:

  • a string



144
145
146
# File 'lib/models/location.rb', line 144

def location_email_address
    return @location_email_address
end

#location_email_address=(value) ⇒ Object

Sets the locationEmailAddress property value. Optional email address of the location.

Parameters:

  • value

    Value to set for the locationEmailAddress property.

Returns:

  • a void



152
153
154
# File 'lib/models/location.rb', line 152

def location_email_address=(value)
    @location_email_address = value
end

#location_typeObject

Gets the locationType property value. The type of location. The possible values are: default, conferenceRoom, homeAddress, businessAddress,geoCoordinates, streetAddress, hotel, restaurant, localBusiness, postalAddress. Read-only.

Returns:

  • a location_type



159
160
161
# File 'lib/models/location.rb', line 159

def location_type
    return @location_type
end

#location_type=(value) ⇒ Object

Sets the locationType property value. The type of location. The possible values are: default, conferenceRoom, homeAddress, businessAddress,geoCoordinates, streetAddress, hotel, restaurant, localBusiness, postalAddress. Read-only.

Parameters:

  • value

    Value to set for the locationType property.

Returns:

  • a void



167
168
169
# File 'lib/models/location.rb', line 167

def location_type=(value)
    @location_type = value
end

#location_uriObject

Gets the locationUri property value. Optional URI representing the location.

Returns:

  • a string



174
175
176
# File 'lib/models/location.rb', line 174

def location_uri
    return @location_uri
end

#location_uri=(value) ⇒ Object

Sets the locationUri property value. Optional URI representing the location.

Parameters:

  • value

    Value to set for the locationUri property.

Returns:

  • a void



182
183
184
# File 'lib/models/location.rb', line 182

def location_uri=(value)
    @location_uri = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



189
190
191
# File 'lib/models/location.rb', line 189

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



197
198
199
# File 'lib/models/location.rb', line 197

def odata_type=(value)
    @odata_type = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/models/location.rb', line 205

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("address", @address)
    writer.write_object_value("coordinates", @coordinates)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("locationEmailAddress", @location_email_address)
    writer.write_enum_value("locationType", @location_type)
    writer.write_string_value("locationUri", @location_uri)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("uniqueId", @unique_id)
    writer.write_enum_value("uniqueIdType", @unique_id_type)
    writer.write_additional_data(@additional_data)
end

#unique_idObject

Gets the uniqueId property value. For internal use only.

Returns:

  • a string



222
223
224
# File 'lib/models/location.rb', line 222

def unique_id
    return @unique_id
end

#unique_id=(value) ⇒ Object

Sets the uniqueId property value. For internal use only.

Parameters:

  • value

    Value to set for the uniqueId property.

Returns:

  • a void



230
231
232
# File 'lib/models/location.rb', line 230

def unique_id=(value)
    @unique_id = value
end

#unique_id_typeObject

Gets the uniqueIdType property value. For internal use only.

Returns:

  • a location_unique_id_type



237
238
239
# File 'lib/models/location.rb', line 237

def unique_id_type
    return @unique_id_type
end

#unique_id_type=(value) ⇒ Object

Sets the uniqueIdType property value. For internal use only.

Parameters:

  • value

    Value to set for the uniqueIdType property.

Returns:

  • a void



245
246
247
# File 'lib/models/location.rb', line 245

def unique_id_type=(value)
    @unique_id_type = value
end