Class: MicrosoftGraph::Models::PrinterDefaults

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new printerDefaults and sets the default values.



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

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 printer_defaults

Raises:

  • (StandardError)


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

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

    Value to set for the additionalData property.

Returns:

  • a void



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

def additional_data=(value)
    @additional_data = value
end

#color_modeObject

Gets the colorMode property value. The default color mode to use when printing the document. Valid values are described in the following table.

Returns:

  • a print_color_mode



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

def color_mode
    return @color_mode
end

#color_mode=(value) ⇒ Object

Sets the colorMode property value. The default color mode to use when printing the document. Valid values are described in the following table.

Parameters:

  • value

    Value to set for the colorMode property.

Returns:

  • a void



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

def color_mode=(value)
    @color_mode = value
end

#content_typeObject

Gets the contentType property value. The default content (MIME) type to use when processing documents.

Returns:

  • a string



107
108
109
# File 'lib/models/printer_defaults.rb', line 107

def content_type
    return @content_type
end

#content_type=(value) ⇒ Object

Sets the contentType property value. The default content (MIME) type to use when processing documents.

Parameters:

  • value

    Value to set for the contentType property.

Returns:

  • a void



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

def content_type=(value)
    @content_type = value
end

#copies_per_jobObject

Gets the copiesPerJob property value. The default number of copies printed per job.

Returns:

  • a integer



122
123
124
# File 'lib/models/printer_defaults.rb', line 122

def copies_per_job
    return @copies_per_job
end

#copies_per_job=(value) ⇒ Object

Sets the copiesPerJob property value. The default number of copies printed per job.

Parameters:

  • value

    Value to set for the copiesPerJob property.

Returns:

  • a void



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

def copies_per_job=(value)
    @copies_per_job = value
end

#dpiObject

Gets the dpi property value. The default resolution in DPI to use when printing the job.

Returns:

  • a integer



146
147
148
# File 'lib/models/printer_defaults.rb', line 146

def dpi
    return @dpi
end

#dpi=(value) ⇒ Object

Sets the dpi property value. The default resolution in DPI to use when printing the job.

Parameters:

  • value

    Value to set for the dpi property.

Returns:

  • a void



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

def dpi=(value)
    @dpi = value
end

#duplex_modeObject

Gets the duplexMode property value. The default duplex (double-sided) configuration to use when printing a document. Valid values are described in the following table.

Returns:

  • a print_duplex_mode



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

def duplex_mode
    return @duplex_mode
end

#duplex_mode=(value) ⇒ Object

Sets the duplexMode property value. The default duplex (double-sided) configuration to use when printing a document. Valid values are described in the following table.

Parameters:

  • value

    Value to set for the duplexMode property.

Returns:

  • a void



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

def duplex_mode=(value)
    @duplex_mode = value
end

#finishingsObject

Gets the finishings property value. The default set of finishings to apply to print jobs. Valid values are described in the following table.

Returns:

  • a print_finishing



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

def finishings
    return @finishings
end

#finishings=(value) ⇒ Object

Sets the finishings property value. The default set of finishings to apply to print jobs. Valid values are described in the following table.

Parameters:

  • value

    Value to set for the finishings property.

Returns:

  • a void



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

def finishings=(value)
    @finishings = value
end

#fit_pdf_to_pageObject

Gets the fitPdfToPage property value. The default fitPdfToPage setting. True to fit each page of a PDF document to a physical sheet of media; false to let the printer decide how to lay out impressions.

Returns:

  • a boolean



191
192
193
# File 'lib/models/printer_defaults.rb', line 191

def fit_pdf_to_page
    return @fit_pdf_to_page
end

#fit_pdf_to_page=(value) ⇒ Object

Sets the fitPdfToPage property value. The default fitPdfToPage setting. True to fit each page of a PDF document to a physical sheet of media; false to let the printer decide how to lay out impressions.

Parameters:

  • value

    Value to set for the fitPdfToPage property.

Returns:

  • a void



199
200
201
# File 'lib/models/printer_defaults.rb', line 199

def fit_pdf_to_page=(value)
    @fit_pdf_to_page = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/models/printer_defaults.rb', line 206

def get_field_deserializers()
    return {
        "colorMode" => lambda {|n| @color_mode = n.get_enum_value(MicrosoftGraph::Models::PrintColorMode) },
        "contentType" => lambda {|n| @content_type = n.get_string_value() },
        "copiesPerJob" => lambda {|n| @copies_per_job = n.get_number_value() },
        "dpi" => lambda {|n| @dpi = n.get_number_value() },
        "duplexMode" => lambda {|n| @duplex_mode = n.get_enum_value(MicrosoftGraph::Models::PrintDuplexMode) },
        "finishings" => lambda {|n| @finishings = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PrintFinishing.create_from_discriminator_value(pn) }) },
        "fitPdfToPage" => lambda {|n| @fit_pdf_to_page = n.get_boolean_value() },
        "inputBin" => lambda {|n| @input_bin = n.get_string_value() },
        "mediaColor" => lambda {|n| @media_color = n.get_string_value() },
        "mediaSize" => lambda {|n| @media_size = n.get_string_value() },
        "mediaType" => lambda {|n| @media_type = n.get_string_value() },
        "multipageLayout" => lambda {|n| @multipage_layout = n.get_enum_value(MicrosoftGraph::Models::PrintMultipageLayout) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "orientation" => lambda {|n| @orientation = n.get_enum_value(MicrosoftGraph::Models::PrintOrientation) },
        "outputBin" => lambda {|n| @output_bin = n.get_string_value() },
        "pagesPerSheet" => lambda {|n| @pages_per_sheet = n.get_number_value() },
        "quality" => lambda {|n| @quality = n.get_enum_value(MicrosoftGraph::Models::PrintQuality) },
        "scaling" => lambda {|n| @scaling = n.get_enum_value(MicrosoftGraph::Models::PrintScaling) },
    }
end

#input_binObject

Gets the inputBin property value. The inputBin property

Returns:

  • a string



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

def input_bin
    return @input_bin
end

#input_bin=(value) ⇒ Object

Sets the inputBin property value. The inputBin property

Parameters:

  • value

    Value to set for the inputBin property.

Returns:

  • a void



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

def input_bin=(value)
    @input_bin = value
end

#media_colorObject

Gets the mediaColor property value. The default media (such as paper) color to print the document on.

Returns:

  • a string



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

def media_color
    return @media_color
end

#media_color=(value) ⇒ Object

Sets the mediaColor property value. The default media (such as paper) color to print the document on.

Parameters:

  • value

    Value to set for the mediaColor property.

Returns:

  • a void



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

def media_color=(value)
    @media_color = value
end

#media_sizeObject

Gets the mediaSize property value. The default media size to use. Supports standard size names for ISO and ANSI media sizes. Valid values are listed in the printerCapabilities topic.

Returns:

  • a string



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

def media_size
    return @media_size
end

#media_size=(value) ⇒ Object

Sets the mediaSize property value. The default media size to use. Supports standard size names for ISO and ANSI media sizes. Valid values are listed in the printerCapabilities topic.

Parameters:

  • value

    Value to set for the mediaSize property.

Returns:

  • a void



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

def media_size=(value)
    @media_size = value
end

#media_typeObject

Gets the mediaType property value. The default media (such as paper) type to print the document on.

Returns:

  • a string



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

def media_type
    return @media_type
end

#media_type=(value) ⇒ Object

Sets the mediaType property value. The default media (such as paper) type to print the document on.

Parameters:

  • value

    Value to set for the mediaType property.

Returns:

  • a void



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

def media_type=(value)
    @media_type = value
end

#multipage_layoutObject

Gets the multipageLayout property value. The default direction to lay out pages when multiple pages are being printed per sheet. Valid values are described in the following table.

Returns:

  • a print_multipage_layout



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

def multipage_layout
    return @multipage_layout
end

#multipage_layout=(value) ⇒ Object

Sets the multipageLayout property value. The default direction to lay out pages when multiple pages are being printed per sheet. Valid values are described in the following table.

Parameters:

  • value

    Value to set for the multipageLayout property.

Returns:

  • a void



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

def multipage_layout=(value)
    @multipage_layout = value
end

#odata_typeObject

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

Returns:

  • a string



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

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



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

def odata_type=(value)
    @odata_type = value
end

#orientationObject

Gets the orientation property value. The default orientation to use when printing the document. Valid values are described in the following table.

Returns:

  • a print_orientation



322
323
324
# File 'lib/models/printer_defaults.rb', line 322

def orientation
    return @orientation
end

#orientation=(value) ⇒ Object

Sets the orientation property value. The default orientation to use when printing the document. Valid values are described in the following table.

Parameters:

  • value

    Value to set for the orientation property.

Returns:

  • a void



330
331
332
# File 'lib/models/printer_defaults.rb', line 330

def orientation=(value)
    @orientation = value
end

#output_binObject

Gets the outputBin property value. The default output bin to place completed prints into. See the printer’s capabilities for a list of supported output bins.

Returns:

  • a string



337
338
339
# File 'lib/models/printer_defaults.rb', line 337

def output_bin
    return @output_bin
end

#output_bin=(value) ⇒ Object

Sets the outputBin property value. The default output bin to place completed prints into. See the printer’s capabilities for a list of supported output bins.

Parameters:

  • value

    Value to set for the outputBin property.

Returns:

  • a void



345
346
347
# File 'lib/models/printer_defaults.rb', line 345

def output_bin=(value)
    @output_bin = value
end

#pages_per_sheetObject

Gets the pagesPerSheet property value. The default number of document pages to print on each sheet.

Returns:

  • a integer



352
353
354
# File 'lib/models/printer_defaults.rb', line 352

def pages_per_sheet
    return @pages_per_sheet
end

#pages_per_sheet=(value) ⇒ Object

Sets the pagesPerSheet property value. The default number of document pages to print on each sheet.

Parameters:

  • value

    Value to set for the pagesPerSheet property.

Returns:

  • a void



360
361
362
# File 'lib/models/printer_defaults.rb', line 360

def pages_per_sheet=(value)
    @pages_per_sheet = value
end

#qualityObject

Gets the quality property value. The default quality to use when printing the document. Valid values are described in the following table.

Returns:

  • a print_quality



367
368
369
# File 'lib/models/printer_defaults.rb', line 367

def quality
    return @quality
end

#quality=(value) ⇒ Object

Sets the quality property value. The default quality to use when printing the document. Valid values are described in the following table.

Parameters:

  • value

    Value to set for the quality property.

Returns:

  • a void



375
376
377
# File 'lib/models/printer_defaults.rb', line 375

def quality=(value)
    @quality = value
end

#scalingObject

Gets the scaling property value. Specifies how the printer scales the document data to fit the requested media. Valid values are described in the following table.

Returns:

  • a print_scaling



382
383
384
# File 'lib/models/printer_defaults.rb', line 382

def scaling
    return @scaling
end

#scaling=(value) ⇒ Object

Sets the scaling property value. Specifies how the printer scales the document data to fit the requested media. Valid values are described in the following table.

Parameters:

  • value

    Value to set for the scaling property.

Returns:

  • a void



390
391
392
# File 'lib/models/printer_defaults.rb', line 390

def scaling=(value)
    @scaling = 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)


398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/models/printer_defaults.rb', line 398

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_enum_value("colorMode", @color_mode)
    writer.write_string_value("contentType", @content_type)
    writer.write_number_value("copiesPerJob", @copies_per_job)
    writer.write_number_value("dpi", @dpi)
    writer.write_enum_value("duplexMode", @duplex_mode)
    writer.write_collection_of_object_values("finishings", @finishings)
    writer.write_boolean_value("fitPdfToPage", @fit_pdf_to_page)
    writer.write_string_value("inputBin", @input_bin)
    writer.write_string_value("mediaColor", @media_color)
    writer.write_string_value("mediaSize", @media_size)
    writer.write_string_value("mediaType", @media_type)
    writer.write_enum_value("multipageLayout", @multipage_layout)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_enum_value("orientation", @orientation)
    writer.write_string_value("outputBin", @output_bin)
    writer.write_number_value("pagesPerSheet", @pages_per_sheet)
    writer.write_enum_value("quality", @quality)
    writer.write_enum_value("scaling", @scaling)
    writer.write_additional_data(@additional_data)
end