Class: MicrosoftGraph::Models::OutlookGeoCoordinates

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new outlookGeoCoordinates and sets the default values.



94
95
96
# File 'lib/models/outlook_geo_coordinates.rb', line 94

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 outlook_geo_coordinates

Raises:

  • (StandardError)


102
103
104
105
# File 'lib/models/outlook_geo_coordinates.rb', line 102

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return OutlookGeoCoordinates.new
end

Instance Method Details

#accuracyObject

Gets the accuracy property value. The accuracy of the latitude and longitude. As an example, the accuracy can be measured in meters, such as the latitude and longitude are accurate to within 50 meters.

Returns:

  • a double



34
35
36
# File 'lib/models/outlook_geo_coordinates.rb', line 34

def accuracy
    return @accuracy
end

#accuracy=(value) ⇒ Object

Sets the accuracy property value. The accuracy of the latitude and longitude. As an example, the accuracy can be measured in meters, such as the latitude and longitude are accurate to within 50 meters.

Parameters:

  • value

    Value to set for the accuracy property.

Returns:

  • a void



42
43
44
# File 'lib/models/outlook_geo_coordinates.rb', line 42

def accuracy=(value)
    @accuracy = value
end

#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



49
50
51
# File 'lib/models/outlook_geo_coordinates.rb', line 49

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



57
58
59
# File 'lib/models/outlook_geo_coordinates.rb', line 57

def additional_data=(value)
    @additional_data = value
end

#altitudeObject

Gets the altitude property value. The altitude of the location.

Returns:

  • a double



64
65
66
# File 'lib/models/outlook_geo_coordinates.rb', line 64

def altitude
    return @altitude
end

#altitude=(value) ⇒ Object

Sets the altitude property value. The altitude of the location.

Parameters:

  • value

    Value to set for the altitude property.

Returns:

  • a void



72
73
74
# File 'lib/models/outlook_geo_coordinates.rb', line 72

def altitude=(value)
    @altitude = value
end

#altitude_accuracyObject

Gets the altitudeAccuracy property value. The accuracy of the altitude.

Returns:

  • a double



79
80
81
# File 'lib/models/outlook_geo_coordinates.rb', line 79

def altitude_accuracy
    return @altitude_accuracy
end

#altitude_accuracy=(value) ⇒ Object

Sets the altitudeAccuracy property value. The accuracy of the altitude.

Parameters:

  • value

    Value to set for the altitudeAccuracy property.

Returns:

  • a void



87
88
89
# File 'lib/models/outlook_geo_coordinates.rb', line 87

def altitude_accuracy=(value)
    @altitude_accuracy = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



110
111
112
113
114
115
116
117
118
119
# File 'lib/models/outlook_geo_coordinates.rb', line 110

def get_field_deserializers()
    return {
        "accuracy" => lambda {|n| @accuracy = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "altitude" => lambda {|n| @altitude = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "altitudeAccuracy" => lambda {|n| @altitude_accuracy = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "latitude" => lambda {|n| @latitude = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "longitude" => lambda {|n| @longitude = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
    }
end

#latitudeObject

Gets the latitude property value. The latitude of the location.

Returns:

  • a double



124
125
126
# File 'lib/models/outlook_geo_coordinates.rb', line 124

def latitude
    return @latitude
end

#latitude=(value) ⇒ Object

Sets the latitude property value. The latitude of the location.

Parameters:

  • value

    Value to set for the latitude property.

Returns:

  • a void



132
133
134
# File 'lib/models/outlook_geo_coordinates.rb', line 132

def latitude=(value)
    @latitude = value
end

#longitudeObject

Gets the longitude property value. The longitude of the location.

Returns:

  • a double



139
140
141
# File 'lib/models/outlook_geo_coordinates.rb', line 139

def longitude
    return @longitude
end

#longitude=(value) ⇒ Object

Sets the longitude property value. The longitude of the location.

Parameters:

  • value

    Value to set for the longitude property.

Returns:

  • a void



147
148
149
# File 'lib/models/outlook_geo_coordinates.rb', line 147

def longitude=(value)
    @longitude = value
end

#odata_typeObject

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

Returns:

  • a string



154
155
156
# File 'lib/models/outlook_geo_coordinates.rb', line 154

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



162
163
164
# File 'lib/models/outlook_geo_coordinates.rb', line 162

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)


170
171
172
173
174
175
176
177
178
179
# File 'lib/models/outlook_geo_coordinates.rb', line 170

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("accuracy", @accuracy)
    writer.write_object_value("altitude", @altitude)
    writer.write_object_value("altitudeAccuracy", @altitude_accuracy)
    writer.write_object_value("latitude", @latitude)
    writer.write_object_value("longitude", @longitude)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_additional_data(@additional_data)
end