Class: MicrosoftGraph::Models::PrinterLocation

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new printerLocation and sets the default values.



130
131
132
# File 'lib/models/printer_location.rb', line 130

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:

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

Returns:

  • a printer_location

Raises:



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

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



70
71
72
# File 'lib/models/printer_location.rb', line 70

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 to set for the AdditionalData property.

Returns:

  • a void



78
79
80
# File 'lib/models/printer_location.rb', line 78

def additional_data=(value)
    @additional_data = value
end

#altitude_in_metersObject

Gets the altitudeInMeters property value. The altitude, in meters, that the printer is located at.

Returns:

  • a integer



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

def altitude_in_meters
    return @altitude_in_meters
end

#altitude_in_meters=(value) ⇒ Object

Sets the altitudeInMeters property value. The altitude, in meters, that the printer is located at.

Parameters:

  • Value to set for the altitude_in_meters property.

Returns:

  • a void



93
94
95
# File 'lib/models/printer_location.rb', line 93

def altitude_in_meters=(value)
    @altitude_in_meters = value
end

#buildingObject

Gets the building property value. The building that the printer is located in.

Returns:

  • a string



100
101
102
# File 'lib/models/printer_location.rb', line 100

def building
    return @building
end

#building=(value) ⇒ Object

Sets the building property value. The building that the printer is located in.

Parameters:

  • Value to set for the building property.

Returns:

  • a void



108
109
110
# File 'lib/models/printer_location.rb', line 108

def building=(value)
    @building = value
end

#cityObject

Gets the city property value. The city that the printer is located in.

Returns:

  • a string



115
116
117
# File 'lib/models/printer_location.rb', line 115

def city
    return @city
end

#city=(value) ⇒ Object

Sets the city property value. The city that the printer is located in.

Parameters:

  • Value to set for the city property.

Returns:

  • a void



123
124
125
# File 'lib/models/printer_location.rb', line 123

def city=(value)
    @city = value
end

#country_or_regionObject

Gets the countryOrRegion property value. The country or region that the printer is located in.

Returns:

  • a string



137
138
139
# File 'lib/models/printer_location.rb', line 137

def country_or_region
    return @country_or_region
end

#country_or_region=(value) ⇒ Object

Sets the countryOrRegion property value. The country or region that the printer is located in.

Parameters:

  • Value to set for the country_or_region property.

Returns:

  • a void



145
146
147
# File 'lib/models/printer_location.rb', line 145

def country_or_region=(value)
    @country_or_region = value
end

#floorObject

Gets the floor property value. The floor that the printer is located on. Only numerical values are supported right now.

Returns:

  • a string



161
162
163
# File 'lib/models/printer_location.rb', line 161

def floor
    return @floor
end

#floor=(value) ⇒ Object

Sets the floor property value. The floor that the printer is located on. Only numerical values are supported right now.

Parameters:

  • Value to set for the floor property.

Returns:

  • a void



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

def floor=(value)
    @floor = value
end

#floor_descriptionObject

Gets the floorDescription property value. The description of the floor that the printer is located on.

Returns:

  • a string



176
177
178
# File 'lib/models/printer_location.rb', line 176

def floor_description
    return @floor_description
end

#floor_description=(value) ⇒ Object

Sets the floorDescription property value. The description of the floor that the printer is located on.

Parameters:

  • Value to set for the floor_description property.

Returns:

  • a void



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

def floor_description=(value)
    @floor_description = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/models/printer_location.rb', line 191

def get_field_deserializers()
    return {
        "altitudeInMeters" => lambda {|n| @altitude_in_meters = n.get_number_value() },
        "building" => lambda {|n| @building = n.get_string_value() },
        "city" => lambda {|n| @city = n.get_string_value() },
        "countryOrRegion" => lambda {|n| @country_or_region = n.get_string_value() },
        "floor" => lambda {|n| @floor = n.get_string_value() },
        "floorDescription" => lambda {|n| @floor_description = n.get_string_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() },
        "organization" => lambda {|n| @organization = n.get_collection_of_primitive_values(String) },
        "postalCode" => lambda {|n| @postal_code = n.get_string_value() },
        "roomDescription" => lambda {|n| @room_description = n.get_string_value() },
        "roomName" => lambda {|n| @room_name = n.get_string_value() },
        "site" => lambda {|n| @site = n.get_string_value() },
        "stateOrProvince" => lambda {|n| @state_or_province = n.get_string_value() },
        "streetAddress" => lambda {|n| @street_address = n.get_string_value() },
        "subdivision" => lambda {|n| @subdivision = n.get_collection_of_primitive_values(String) },
        "subunit" => lambda {|n| @subunit = n.get_collection_of_primitive_values(String) },
    }
end

#latitudeObject

Gets the latitude property value. The latitude that the printer is located at.

Returns:

  • a double



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

def latitude
    return @latitude
end

#latitude=(value) ⇒ Object

Sets the latitude property value. The latitude that the printer is located at.

Parameters:

  • Value to set for the latitude property.

Returns:

  • a void



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

def latitude=(value)
    @latitude = value
end

#longitudeObject

Gets the longitude property value. The longitude that the printer is located at.

Returns:

  • a double



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

def longitude
    return @longitude
end

#longitude=(value) ⇒ Object

Sets the longitude property value. The longitude that the printer is located at.

Parameters:

  • Value to set for the longitude property.

Returns:

  • a void



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

def longitude=(value)
    @longitude = value
end

#odata_typeObject

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

Returns:

  • a string



247
248
249
# File 'lib/models/printer_location.rb', line 247

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

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

Parameters:

  • Value to set for the odata_type property.

Returns:

  • a void



255
256
257
# File 'lib/models/printer_location.rb', line 255

def odata_type=(value)
    @odata_type = value
end

#organizationObject

Gets the organization property value. The organizational hierarchy that the printer belongs to. The elements should be in hierarchical order.

Returns:

  • a string



262
263
264
# File 'lib/models/printer_location.rb', line 262

def organization
    return @organization
end

#organization=(value) ⇒ Object

Sets the organization property value. The organizational hierarchy that the printer belongs to. The elements should be in hierarchical order.

Parameters:

  • Value to set for the organization property.

Returns:

  • a void



270
271
272
# File 'lib/models/printer_location.rb', line 270

def organization=(value)
    @organization = value
end

#postal_codeObject

Gets the postalCode property value. The postal code that the printer is located in.

Returns:

  • a string



277
278
279
# File 'lib/models/printer_location.rb', line 277

def postal_code
    return @postal_code
end

#postal_code=(value) ⇒ Object

Sets the postalCode property value. The postal code that the printer is located in.

Parameters:

  • Value to set for the postal_code property.

Returns:

  • a void



285
286
287
# File 'lib/models/printer_location.rb', line 285

def postal_code=(value)
    @postal_code = value
end

#room_descriptionObject

Gets the roomDescription property value. The description of the room that the printer is located in.

Returns:

  • a string



292
293
294
# File 'lib/models/printer_location.rb', line 292

def room_description
    return @room_description
end

#room_description=(value) ⇒ Object

Sets the roomDescription property value. The description of the room that the printer is located in.

Parameters:

  • Value to set for the room_description property.

Returns:

  • a void



300
301
302
# File 'lib/models/printer_location.rb', line 300

def room_description=(value)
    @room_description = value
end

#room_nameObject

Gets the roomName property value. The room that the printer is located in. Only numerical values are supported right now.

Returns:

  • a string



307
308
309
# File 'lib/models/printer_location.rb', line 307

def room_name
    return @room_name
end

#room_name=(value) ⇒ Object

Sets the roomName property value. The room that the printer is located in. Only numerical values are supported right now.

Parameters:

  • Value to set for the room_name property.

Returns:

  • a void



315
316
317
# File 'lib/models/printer_location.rb', line 315

def room_name=(value)
    @room_name = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • Serialization writer to use to serialize this model

Returns:

  • a void

Raises:



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/models/printer_location.rb', line 323

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("altitudeInMeters", @altitude_in_meters)
    writer.write_string_value("building", @building)
    writer.write_string_value("city", @city)
    writer.write_string_value("countryOrRegion", @country_or_region)
    writer.write_string_value("floor", @floor)
    writer.write_string_value("floorDescription", @floor_description)
    writer.write_object_value("latitude", @latitude)
    writer.write_object_value("longitude", @longitude)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_collection_of_primitive_values("organization", @organization)
    writer.write_string_value("postalCode", @postal_code)
    writer.write_string_value("roomDescription", @room_description)
    writer.write_string_value("roomName", @room_name)
    writer.write_string_value("site", @site)
    writer.write_string_value("stateOrProvince", @state_or_province)
    writer.write_string_value("streetAddress", @street_address)
    writer.write_collection_of_primitive_values("subdivision", @subdivision)
    writer.write_collection_of_primitive_values("subunit", @subunit)
    writer.write_additional_data(@additional_data)
end

#siteObject

Gets the site property value. The site that the printer is located in.

Returns:

  • a string



349
350
351
# File 'lib/models/printer_location.rb', line 349

def site
    return @site
end

#site=(value) ⇒ Object

Sets the site property value. The site that the printer is located in.

Parameters:

  • Value to set for the site property.

Returns:

  • a void



357
358
359
# File 'lib/models/printer_location.rb', line 357

def site=(value)
    @site = value
end

#state_or_provinceObject

Gets the stateOrProvince property value. The state or province that the printer is located in.

Returns:

  • a string



364
365
366
# File 'lib/models/printer_location.rb', line 364

def state_or_province
    return @state_or_province
end

#state_or_province=(value) ⇒ Object

Sets the stateOrProvince property value. The state or province that the printer is located in.

Parameters:

  • Value to set for the state_or_province property.

Returns:

  • a void



372
373
374
# File 'lib/models/printer_location.rb', line 372

def state_or_province=(value)
    @state_or_province = value
end

#street_addressObject

Gets the streetAddress property value. The street address where the printer is located.

Returns:

  • a string



379
380
381
# File 'lib/models/printer_location.rb', line 379

def street_address
    return @street_address
end

#street_address=(value) ⇒ Object

Sets the streetAddress property value. The street address where the printer is located.

Parameters:

  • Value to set for the street_address property.

Returns:

  • a void



387
388
389
# File 'lib/models/printer_location.rb', line 387

def street_address=(value)
    @street_address = value
end

#subdivisionObject

Gets the subdivision property value. The subdivision that the printer is located in. The elements should be in hierarchical order.

Returns:

  • a string



394
395
396
# File 'lib/models/printer_location.rb', line 394

def subdivision
    return @subdivision
end

#subdivision=(value) ⇒ Object

Sets the subdivision property value. The subdivision that the printer is located in. The elements should be in hierarchical order.

Parameters:

  • Value to set for the subdivision property.

Returns:

  • a void



402
403
404
# File 'lib/models/printer_location.rb', line 402

def subdivision=(value)
    @subdivision = value
end

#subunitObject

Gets the subunit property value. The subunit property

Returns:

  • a string



409
410
411
# File 'lib/models/printer_location.rb', line 409

def subunit
    return @subunit
end

#subunit=(value) ⇒ Object

Sets the subunit property value. The subunit property

Parameters:

  • Value to set for the subunit property.

Returns:

  • a void



417
418
419
# File 'lib/models/printer_location.rb', line 417

def subunit=(value)
    @subunit = value
end