Class: MicrosoftGraph::Models::DeviceGeoLocation

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

Overview

Device location

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new deviceGeoLocation and sets the default values.



76
77
78
# File 'lib/models/device_geo_location.rb', line 76

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 device_geo_location

Raises:

  • (StandardError)


84
85
86
87
# File 'lib/models/device_geo_location.rb', line 84

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return DeviceGeoLocation.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



46
47
48
# File 'lib/models/device_geo_location.rb', line 46

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



54
55
56
# File 'lib/models/device_geo_location.rb', line 54

def additional_data=(value)
    @additional_data = value
end

#altitudeObject

Gets the altitude property value. Altitude, given in meters above sea level

Returns:

  • a double



61
62
63
# File 'lib/models/device_geo_location.rb', line 61

def altitude
    return @altitude
end

#altitude=(value) ⇒ Object

Sets the altitude property value. Altitude, given in meters above sea level

Parameters:

  • value

    Value to set for the altitude property.

Returns:

  • a void



69
70
71
# File 'lib/models/device_geo_location.rb', line 69

def altitude=(value)
    @altitude = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/models/device_geo_location.rb', line 92

def get_field_deserializers()
    return {
        "altitude" => lambda {|n| @altitude = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "heading" => lambda {|n| @heading = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "horizontalAccuracy" => lambda {|n| @horizontal_accuracy = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "lastCollectedDateTime" => lambda {|n| @last_collected_date_time = n.get_date_time_value() },
        "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() },
        "speed" => lambda {|n| @speed = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "verticalAccuracy" => lambda {|n| @vertical_accuracy = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
    }
end

#headingObject

Gets the heading property value. Heading in degrees from true north

Returns:

  • a double



109
110
111
# File 'lib/models/device_geo_location.rb', line 109

def heading
    return @heading
end

#heading=(value) ⇒ Object

Sets the heading property value. Heading in degrees from true north

Parameters:

  • value

    Value to set for the heading property.

Returns:

  • a void



117
118
119
# File 'lib/models/device_geo_location.rb', line 117

def heading=(value)
    @heading = value
end

#horizontal_accuracyObject

Gets the horizontalAccuracy property value. Accuracy of longitude and latitude in meters

Returns:

  • a double



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

def horizontal_accuracy
    return @horizontal_accuracy
end

#horizontal_accuracy=(value) ⇒ Object

Sets the horizontalAccuracy property value. Accuracy of longitude and latitude in meters

Parameters:

  • value

    Value to set for the horizontalAccuracy property.

Returns:

  • a void



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

def horizontal_accuracy=(value)
    @horizontal_accuracy = value
end

#last_collected_date_timeObject

Gets the lastCollectedDateTime property value. Time at which location was recorded, relative to UTC

Returns:

  • a date_time



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

def last_collected_date_time
    return @last_collected_date_time
end

#last_collected_date_time=(value) ⇒ Object

Sets the lastCollectedDateTime property value. Time at which location was recorded, relative to UTC

Parameters:

  • value

    Value to set for the lastCollectedDateTime property.

Returns:

  • a void



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

def last_collected_date_time=(value)
    @last_collected_date_time = value
end

#latitudeObject

Gets the latitude property value. Latitude coordinate of the device’s location

Returns:

  • a double



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

def latitude
    return @latitude
end

#latitude=(value) ⇒ Object

Sets the latitude property value. Latitude coordinate of the device’s location

Parameters:

  • value

    Value to set for the latitude property.

Returns:

  • a void



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

def latitude=(value)
    @latitude = value
end

#longitudeObject

Gets the longitude property value. Longitude coordinate of the device’s location

Returns:

  • a double



169
170
171
# File 'lib/models/device_geo_location.rb', line 169

def longitude
    return @longitude
end

#longitude=(value) ⇒ Object

Sets the longitude property value. Longitude coordinate of the device’s location

Parameters:

  • value

    Value to set for the longitude property.

Returns:

  • a void



177
178
179
# File 'lib/models/device_geo_location.rb', line 177

def longitude=(value)
    @longitude = value
end

#odata_typeObject

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

Returns:

  • a string



184
185
186
# File 'lib/models/device_geo_location.rb', line 184

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



192
193
194
# File 'lib/models/device_geo_location.rb', line 192

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)


200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/models/device_geo_location.rb', line 200

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("altitude", @altitude)
    writer.write_object_value("heading", @heading)
    writer.write_object_value("horizontalAccuracy", @horizontal_accuracy)
    writer.write_date_time_value("lastCollectedDateTime", @last_collected_date_time)
    writer.write_object_value("latitude", @latitude)
    writer.write_object_value("longitude", @longitude)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_object_value("speed", @speed)
    writer.write_object_value("verticalAccuracy", @vertical_accuracy)
    writer.write_additional_data(@additional_data)
end

#speedObject

Gets the speed property value. Speed the device is traveling in meters per second

Returns:

  • a double



217
218
219
# File 'lib/models/device_geo_location.rb', line 217

def speed
    return @speed
end

#speed=(value) ⇒ Object

Sets the speed property value. Speed the device is traveling in meters per second

Parameters:

  • value

    Value to set for the speed property.

Returns:

  • a void



225
226
227
# File 'lib/models/device_geo_location.rb', line 225

def speed=(value)
    @speed = value
end

#vertical_accuracyObject

Gets the verticalAccuracy property value. Accuracy of altitude in meters

Returns:

  • a double



232
233
234
# File 'lib/models/device_geo_location.rb', line 232

def vertical_accuracy
    return @vertical_accuracy
end

#vertical_accuracy=(value) ⇒ Object

Sets the verticalAccuracy property value. Accuracy of altitude in meters

Parameters:

  • value

    Value to set for the verticalAccuracy property.

Returns:

  • a void



240
241
242
# File 'lib/models/device_geo_location.rb', line 240

def vertical_accuracy=(value)
    @vertical_accuracy = value
end