Class: MicrosoftGraph::Models::ArchivedPrintJob

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new archivedPrintJob and sets the default values.



110
111
112
# File 'lib/models/archived_print_job.rb', line 110

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 archived_print_job

Raises:

  • (StandardError)


163
164
165
166
# File 'lib/models/archived_print_job.rb', line 163

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

Instance Method Details

#acquired_by_printerObject

Gets the acquiredByPrinter property value. True if the job was acquired by a printer; false otherwise. Read-only.

Returns:

  • a boolean



50
51
52
# File 'lib/models/archived_print_job.rb', line 50

def acquired_by_printer
    return @acquired_by_printer
end

#acquired_by_printer=(value) ⇒ Object

Sets the acquiredByPrinter property value. True if the job was acquired by a printer; false otherwise. Read-only.

Parameters:

  • value

    Value to set for the acquiredByPrinter property.

Returns:

  • a void



58
59
60
# File 'lib/models/archived_print_job.rb', line 58

def acquired_by_printer=(value)
    @acquired_by_printer = value
end

#acquired_date_timeObject

Gets the acquiredDateTime property value. The dateTimeOffset when the job was acquired by the printer, if any. Read-only.

Returns:

  • a date_time



65
66
67
# File 'lib/models/archived_print_job.rb', line 65

def acquired_date_time
    return @acquired_date_time
end

#acquired_date_time=(value) ⇒ Object

Sets the acquiredDateTime property value. The dateTimeOffset when the job was acquired by the printer, if any. Read-only.

Parameters:

  • value

    Value to set for the acquiredDateTime property.

Returns:

  • a void



73
74
75
# File 'lib/models/archived_print_job.rb', line 73

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



80
81
82
# File 'lib/models/archived_print_job.rb', line 80

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



88
89
90
# File 'lib/models/archived_print_job.rb', line 88

def additional_data=(value)
    @additional_data = value
end

#completion_date_timeObject

Gets the completionDateTime property value. The dateTimeOffset when the job was completed, canceled or aborted. Read-only.

Returns:

  • a date_time



95
96
97
# File 'lib/models/archived_print_job.rb', line 95

def completion_date_time
    return @completion_date_time
end

#completion_date_time=(value) ⇒ Object

Sets the completionDateTime property value. The dateTimeOffset when the job was completed, canceled or aborted. Read-only.

Parameters:

  • value

    Value to set for the completionDateTime property.

Returns:

  • a void



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

def completion_date_time=(value)
    @completion_date_time = value
end

#copies_printedObject

Gets the copiesPrinted property value. The number of copies that were printed. Read-only.

Returns:

  • a integer



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

def copies_printed
    return @copies_printed
end

#copies_printed=(value) ⇒ Object

Sets the copiesPrinted property value. The number of copies that were printed. Read-only.

Parameters:

  • value

    Value to set for the copiesPrinted property.

Returns:

  • a void



125
126
127
# File 'lib/models/archived_print_job.rb', line 125

def copies_printed=(value)
    @copies_printed = value
end

#created_byObject

Gets the createdBy property value. The user who created the print job. Read-only.

Returns:

  • a user_identity



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

def created_by
    return @created_by
end

#created_by=(value) ⇒ Object

Sets the createdBy property value. The user who created the print job. Read-only.

Parameters:

  • value

    Value to set for the createdBy property.

Returns:

  • a void



140
141
142
# File 'lib/models/archived_print_job.rb', line 140

def created_by=(value)
    @created_by = value
end

#created_date_timeObject

Gets the createdDateTime property value. The dateTimeOffset when the job was created. Read-only.

Returns:

  • a date_time



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

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The dateTimeOffset when the job was created. Read-only.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



155
156
157
# File 'lib/models/archived_print_job.rb', line 155

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/models/archived_print_job.rb', line 171

def get_field_deserializers()
    return {
        "acquiredByPrinter" => lambda {|n| @acquired_by_printer = n.get_boolean_value() },
        "acquiredDateTime" => lambda {|n| @acquired_date_time = n.get_date_time_value() },
        "completionDateTime" => lambda {|n| @completion_date_time = n.get_date_time_value() },
        "copiesPrinted" => lambda {|n| @copies_printed = n.get_number_value() },
        "createdBy" => lambda {|n| @created_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::UserIdentity.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "id" => lambda {|n| @id = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "printerId" => lambda {|n| @printer_id = n.get_string_value() },
        "printerName" => lambda {|n| @printer_name = n.get_string_value() },
        "processingState" => lambda {|n| @processing_state = n.get_enum_value(MicrosoftGraph::Models::PrintJobProcessingState) },
    }
end

#idObject

Gets the id property value. The archived print job’s GUID. Read-only.

Returns:

  • a string



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

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. The archived print job’s GUID. Read-only.

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



198
199
200
# File 'lib/models/archived_print_job.rb', line 198

def id=(value)
    @id = value
end

#odata_typeObject

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

Returns:

  • a string



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

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



213
214
215
# File 'lib/models/archived_print_job.rb', line 213

def odata_type=(value)
    @odata_type = value
end

#printer_idObject

Gets the printerId property value. The printer ID that the job was queued for. Read-only.

Returns:

  • a string



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

def printer_id
    return @printer_id
end

#printer_id=(value) ⇒ Object

Sets the printerId property value. The printer ID that the job was queued for. Read-only.

Parameters:

  • value

    Value to set for the printerId property.

Returns:

  • a void



228
229
230
# File 'lib/models/archived_print_job.rb', line 228

def printer_id=(value)
    @printer_id = value
end

#printer_nameObject

Gets the printerName property value. The printer name that the job was queued for. Read-only.

Returns:

  • a string



235
236
237
# File 'lib/models/archived_print_job.rb', line 235

def printer_name
    return @printer_name
end

#printer_name=(value) ⇒ Object

Sets the printerName property value. The printer name that the job was queued for. Read-only.

Parameters:

  • value

    Value to set for the printerName property.

Returns:

  • a void



243
244
245
# File 'lib/models/archived_print_job.rb', line 243

def printer_name=(value)
    @printer_name = value
end

#processing_stateObject

Gets the processingState property value. The processingState property

Returns:

  • a print_job_processing_state



250
251
252
# File 'lib/models/archived_print_job.rb', line 250

def processing_state
    return @processing_state
end

#processing_state=(value) ⇒ Object

Sets the processingState property value. The processingState property

Parameters:

  • value

    Value to set for the processingState property.

Returns:

  • a void



258
259
260
# File 'lib/models/archived_print_job.rb', line 258

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


266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/models/archived_print_job.rb', line 266

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("acquiredByPrinter", @acquired_by_printer)
    writer.write_date_time_value("acquiredDateTime", @acquired_date_time)
    writer.write_date_time_value("completionDateTime", @completion_date_time)
    writer.write_number_value("copiesPrinted", @copies_printed)
    writer.write_object_value("createdBy", @created_by)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("id", @id)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("printerId", @printer_id)
    writer.write_string_value("printerName", @printer_name)
    writer.write_enum_value("processingState", @processing_state)
    writer.write_additional_data(@additional_data)
end