Class: MicrosoftGraph::Models::PrintJobConfiguration

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new printJobConfiguration and sets the default values.



121
122
123
# File 'lib/models/print_job_configuration.rb', line 121

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 print_job_configuration

Raises:

  • (StandardError)


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

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



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

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



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

def additional_data=(value)
    @additional_data = value
end

#collateObject

Gets the collate property value. Whether the printer should collate pages wehen printing multiple copies of a multi-page document.

Returns:

  • a boolean



91
92
93
# File 'lib/models/print_job_configuration.rb', line 91

def collate
    return @collate
end

#collate=(value) ⇒ Object

Sets the collate property value. Whether the printer should collate pages wehen printing multiple copies of a multi-page document.

Parameters:

  • value

    Value to set for the collate property.

Returns:

  • a void



99
100
101
# File 'lib/models/print_job_configuration.rb', line 99

def collate=(value)
    @collate = value
end

#color_modeObject

Gets the colorMode property value. The color mode the printer should use to print the job. Valid values are described in the table below. Read-only.

Returns:

  • a print_color_mode



106
107
108
# File 'lib/models/print_job_configuration.rb', line 106

def color_mode
    return @color_mode
end

#color_mode=(value) ⇒ Object

Sets the colorMode property value. The color mode the printer should use to print the job. Valid values are described in the table below. Read-only.

Parameters:

  • value

    Value to set for the colorMode property.

Returns:

  • a void



114
115
116
# File 'lib/models/print_job_configuration.rb', line 114

def color_mode=(value)
    @color_mode = value
end

#copiesObject

Gets the copies property value. The number of copies that should be printed. Read-only.

Returns:

  • a integer



128
129
130
# File 'lib/models/print_job_configuration.rb', line 128

def copies
    return @copies
end

#copies=(value) ⇒ Object

Sets the copies property value. The number of copies that should be printed. Read-only.

Parameters:

  • value

    Value to set for the copies property.

Returns:

  • a void



136
137
138
# File 'lib/models/print_job_configuration.rb', line 136

def copies=(value)
    @copies = value
end

#dpiObject

Gets the dpi property value. The resolution to use when printing the job, expressed in dots per inch (DPI). Read-only.

Returns:

  • a integer



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

def dpi
    return @dpi
end

#dpi=(value) ⇒ Object

Sets the dpi property value. The resolution to use when printing the job, expressed in dots per inch (DPI). Read-only.

Parameters:

  • value

    Value to set for the dpi property.

Returns:

  • a void



160
161
162
# File 'lib/models/print_job_configuration.rb', line 160

def dpi=(value)
    @dpi = value
end

#duplex_modeObject

Gets the duplexMode property value. The duplex mode the printer should use when printing the job. Valid values are described in the table below. Read-only.

Returns:

  • a print_duplex_mode



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

def duplex_mode
    return @duplex_mode
end

#duplex_mode=(value) ⇒ Object

Sets the duplexMode property value. The duplex mode the printer should use when printing the job. Valid values are described in the table below. Read-only.

Parameters:

  • value

    Value to set for the duplexMode property.

Returns:

  • a void



175
176
177
# File 'lib/models/print_job_configuration.rb', line 175

def duplex_mode=(value)
    @duplex_mode = value
end

#feed_orientationObject

Gets the feedOrientation property value. The orientation to use when feeding media into the printer. Valid values are described in the following table. Read-only.

Returns:

  • a printer_feed_orientation



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

def feed_orientation
    return @feed_orientation
end

#feed_orientation=(value) ⇒ Object

Sets the feedOrientation property value. The orientation to use when feeding media into the printer. Valid values are described in the following table. Read-only.

Parameters:

  • value

    Value to set for the feedOrientation property.

Returns:

  • a void



190
191
192
# File 'lib/models/print_job_configuration.rb', line 190

def feed_orientation=(value)
    @feed_orientation = value
end

#finishingsObject

Gets the finishings property value. Finishing processes to use when printing.

Returns:

  • a print_finishing



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

def finishings
    return @finishings
end

#finishings=(value) ⇒ Object

Sets the finishings property value. Finishing processes to use when printing.

Parameters:

  • value

    Value to set for the finishings property.

Returns:

  • a void



205
206
207
# File 'lib/models/print_job_configuration.rb', line 205

def finishings=(value)
    @finishings = value
end

#fit_pdf_to_pageObject

Gets the fitPdfToPage property value. The fitPdfToPage property

Returns:

  • a boolean



212
213
214
# File 'lib/models/print_job_configuration.rb', line 212

def fit_pdf_to_page
    return @fit_pdf_to_page
end

#fit_pdf_to_page=(value) ⇒ Object

Sets the fitPdfToPage property value. The fitPdfToPage property

Parameters:

  • value

    Value to set for the fitPdfToPage property.

Returns:

  • a void



220
221
222
# File 'lib/models/print_job_configuration.rb', line 220

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



227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/models/print_job_configuration.rb', line 227

def get_field_deserializers()
    return {
        "collate" => lambda {|n| @collate = n.get_boolean_value() },
        "colorMode" => lambda {|n| @color_mode = n.get_enum_value(MicrosoftGraph::Models::PrintColorMode) },
        "copies" => lambda {|n| @copies = n.get_number_value() },
        "dpi" => lambda {|n| @dpi = n.get_number_value() },
        "duplexMode" => lambda {|n| @duplex_mode = n.get_enum_value(MicrosoftGraph::Models::PrintDuplexMode) },
        "feedOrientation" => lambda {|n| @feed_orientation = n.get_enum_value(MicrosoftGraph::Models::PrinterFeedOrientation) },
        "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() },
        "margin" => lambda {|n| @margin = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PrintMargin.create_from_discriminator_value(pn) }) },
        "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() },
        "pageRanges" => lambda {|n| @page_ranges = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::IntegerRange.create_from_discriminator_value(pn) }) },
        "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 input bin (tray) to use when printing. See the printer’s capabilities for a list of supported input bins.

Returns:

  • a string



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

def input_bin
    return @input_bin
end

#input_bin=(value) ⇒ Object

Sets the inputBin property value. The input bin (tray) to use when printing. See the printer’s capabilities for a list of supported input bins.

Parameters:

  • value

    Value to set for the inputBin property.

Returns:

  • a void



263
264
265
# File 'lib/models/print_job_configuration.rb', line 263

def input_bin=(value)
    @input_bin = value
end

#marginObject

Gets the margin property value. The margin settings to use when printing.

Returns:

  • a print_margin



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

def margin
    return @margin
end

#margin=(value) ⇒ Object

Sets the margin property value. The margin settings to use when printing.

Parameters:

  • value

    Value to set for the margin property.

Returns:

  • a void



278
279
280
# File 'lib/models/print_job_configuration.rb', line 278

def margin=(value)
    @margin = value
end

#media_sizeObject

Gets the mediaSize property value. The media size to use when printing. Supports standard size names for ISO and ANSI media sizes.

Returns:

  • a string



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

def media_size
    return @media_size
end

#media_size=(value) ⇒ Object

Sets the mediaSize property value. The media size to use when printing. Supports standard size names for ISO and ANSI media sizes.

Parameters:

  • value

    Value to set for the mediaSize property.

Returns:

  • a void



293
294
295
# File 'lib/models/print_job_configuration.rb', line 293

def media_size=(value)
    @media_size = value
end

#media_typeObject

Gets the mediaType property value. The mediaType property

Returns:

  • a string



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

def media_type
    return @media_type
end

#media_type=(value) ⇒ Object

Sets the mediaType property value. The mediaType property

Parameters:

  • value

    Value to set for the mediaType property.

Returns:

  • a void



308
309
310
# File 'lib/models/print_job_configuration.rb', line 308

def media_type=(value)
    @media_type = value
end

#multipage_layoutObject

Gets the multipageLayout property value. The multipageLayout property

Returns:

  • a print_multipage_layout



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

def multipage_layout
    return @multipage_layout
end

#multipage_layout=(value) ⇒ Object

Sets the multipageLayout property value. The multipageLayout property

Parameters:

  • value

    Value to set for the multipageLayout property.

Returns:

  • a void



323
324
325
# File 'lib/models/print_job_configuration.rb', line 323

def multipage_layout=(value)
    @multipage_layout = value
end

#odata_typeObject

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

Returns:

  • a string



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

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



338
339
340
# File 'lib/models/print_job_configuration.rb', line 338

def odata_type=(value)
    @odata_type = value
end

#orientationObject

Gets the orientation property value. The orientation property

Returns:

  • a print_orientation



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

def orientation
    return @orientation
end

#orientation=(value) ⇒ Object

Sets the orientation property value. The orientation property

Parameters:

  • value

    Value to set for the orientation property.

Returns:

  • a void



353
354
355
# File 'lib/models/print_job_configuration.rb', line 353

def orientation=(value)
    @orientation = value
end

#output_binObject

Gets the outputBin property value. The outputBin property

Returns:

  • a string



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

def output_bin
    return @output_bin
end

#output_bin=(value) ⇒ Object

Sets the outputBin property value. The outputBin property

Parameters:

  • value

    Value to set for the outputBin property.

Returns:

  • a void



368
369
370
# File 'lib/models/print_job_configuration.rb', line 368

def output_bin=(value)
    @output_bin = value
end

#page_rangesObject

Gets the pageRanges property value. The pageRanges property

Returns:

  • a integer_range



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

def page_ranges
    return @page_ranges
end

#page_ranges=(value) ⇒ Object

Sets the pageRanges property value. The pageRanges property

Parameters:

  • value

    Value to set for the pageRanges property.

Returns:

  • a void



383
384
385
# File 'lib/models/print_job_configuration.rb', line 383

def page_ranges=(value)
    @page_ranges = value
end

#pages_per_sheetObject

Gets the pagesPerSheet property value. The pagesPerSheet property

Returns:

  • a integer



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

def pages_per_sheet
    return @pages_per_sheet
end

#pages_per_sheet=(value) ⇒ Object

Sets the pagesPerSheet property value. The pagesPerSheet property

Parameters:

  • value

    Value to set for the pagesPerSheet property.

Returns:

  • a void



398
399
400
# File 'lib/models/print_job_configuration.rb', line 398

def pages_per_sheet=(value)
    @pages_per_sheet = value
end

#qualityObject

Gets the quality property value. The quality property

Returns:

  • a print_quality



405
406
407
# File 'lib/models/print_job_configuration.rb', line 405

def quality
    return @quality
end

#quality=(value) ⇒ Object

Sets the quality property value. The quality property

Parameters:

  • value

    Value to set for the quality property.

Returns:

  • a void



413
414
415
# File 'lib/models/print_job_configuration.rb', line 413

def quality=(value)
    @quality = value
end

#scalingObject

Gets the scaling property value. The scaling property

Returns:

  • a print_scaling



420
421
422
# File 'lib/models/print_job_configuration.rb', line 420

def scaling
    return @scaling
end

#scaling=(value) ⇒ Object

Sets the scaling property value. The scaling property

Parameters:

  • value

    Value to set for the scaling property.

Returns:

  • a void



428
429
430
# File 'lib/models/print_job_configuration.rb', line 428

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)


436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/models/print_job_configuration.rb', line 436

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("collate", @collate)
    writer.write_enum_value("colorMode", @color_mode)
    writer.write_number_value("copies", @copies)
    writer.write_number_value("dpi", @dpi)
    writer.write_enum_value("duplexMode", @duplex_mode)
    writer.write_enum_value("feedOrientation", @feed_orientation)
    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_object_value("margin", @margin)
    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_collection_of_object_values("pageRanges", @page_ranges)
    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