Class: MicrosoftGraph::Models::PrintJob

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/print_job.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new printJob and sets the default values.



56
57
58
# File 'lib/models/print_job.rb', line 56

def initialize()
    super
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

Raises:

  • (StandardError)


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

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

Instance Method Details

#configurationObject

Gets the configuration property value. The configuration property

Returns:

  • a print_job_configuration



41
42
43
# File 'lib/models/print_job.rb', line 41

def configuration
    return @configuration
end

#configuration=(value) ⇒ Object

Sets the configuration property value. The configuration property

Parameters:

  • value

    Value to set for the configuration property.

Returns:

  • a void



49
50
51
# File 'lib/models/print_job.rb', line 49

def configuration=(value)
    @configuration = value
end

#created_byObject

Gets the createdBy property value. The createdBy property

Returns:

  • a user_identity



63
64
65
# File 'lib/models/print_job.rb', line 63

def created_by
    return @created_by
end

#created_by=(value) ⇒ Object

Sets the createdBy property value. The createdBy property

Parameters:

  • value

    Value to set for the createdBy property.

Returns:

  • a void



71
72
73
# File 'lib/models/print_job.rb', line 71

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



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

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



86
87
88
# File 'lib/models/print_job.rb', line 86

def created_date_time=(value)
    @created_date_time = value
end

#documentsObject

Gets the documents property value. The documents property

Returns:

  • a print_document



102
103
104
# File 'lib/models/print_job.rb', line 102

def documents
    return @documents
end

#documents=(value) ⇒ Object

Sets the documents property value. The documents property

Parameters:

  • value

    Value to set for the documents property.

Returns:

  • a void



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

def documents=(value)
    @documents = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/models/print_job.rb', line 117

def get_field_deserializers()
    return super.merge({
        "configuration" => lambda {|n| @configuration = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PrintJobConfiguration.create_from_discriminator_value(pn) }) },
        "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() },
        "documents" => lambda {|n| @documents = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PrintDocument.create_from_discriminator_value(pn) }) },
        "isFetchable" => lambda {|n| @is_fetchable = n.get_boolean_value() },
        "redirectedFrom" => lambda {|n| @redirected_from = n.get_string_value() },
        "redirectedTo" => lambda {|n| @redirected_to = n.get_string_value() },
        "status" => lambda {|n| @status = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PrintJobStatus.create_from_discriminator_value(pn) }) },
        "tasks" => lambda {|n| @tasks = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PrintTask.create_from_discriminator_value(pn) }) },
    })
end

#is_fetchableObject

Gets the isFetchable property value. If true, document can be fetched by printer.

Returns:

  • a boolean



134
135
136
# File 'lib/models/print_job.rb', line 134

def is_fetchable
    return @is_fetchable
end

#is_fetchable=(value) ⇒ Object

Sets the isFetchable property value. If true, document can be fetched by printer.

Parameters:

  • value

    Value to set for the isFetchable property.

Returns:

  • a void



142
143
144
# File 'lib/models/print_job.rb', line 142

def is_fetchable=(value)
    @is_fetchable = value
end

#redirected_fromObject

Gets the redirectedFrom property value. Contains the source job URL, if the job has been redirected from another printer.

Returns:

  • a string



149
150
151
# File 'lib/models/print_job.rb', line 149

def redirected_from
    return @redirected_from
end

#redirected_from=(value) ⇒ Object

Sets the redirectedFrom property value. Contains the source job URL, if the job has been redirected from another printer.

Parameters:

  • value

    Value to set for the redirectedFrom property.

Returns:

  • a void



157
158
159
# File 'lib/models/print_job.rb', line 157

def redirected_from=(value)
    @redirected_from = value
end

#redirected_toObject

Gets the redirectedTo property value. Contains the destination job URL, if the job has been redirected to another printer.

Returns:

  • a string



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

def redirected_to
    return @redirected_to
end

#redirected_to=(value) ⇒ Object

Sets the redirectedTo property value. Contains the destination job URL, if the job has been redirected to another printer.

Parameters:

  • value

    Value to set for the redirectedTo property.

Returns:

  • a void



172
173
174
# File 'lib/models/print_job.rb', line 172

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


180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/models/print_job.rb', line 180

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("configuration", @configuration)
    writer.write_object_value("createdBy", @created_by)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_collection_of_object_values("documents", @documents)
    writer.write_boolean_value("isFetchable", @is_fetchable)
    writer.write_string_value("redirectedFrom", @redirected_from)
    writer.write_string_value("redirectedTo", @redirected_to)
    writer.write_object_value("status", @status)
    writer.write_collection_of_object_values("tasks", @tasks)
end

#statusObject

Gets the status property value. The status property

Returns:

  • a print_job_status



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

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. The status property

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



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

def status=(value)
    @status = value
end

#tasksObject

Gets the tasks property value. A list of printTasks that were triggered by this print job.

Returns:

  • a print_task



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

def tasks
    return @tasks
end

#tasks=(value) ⇒ Object

Sets the tasks property value. A list of printTasks that were triggered by this print job.

Parameters:

  • value

    Value to set for the tasks property.

Returns:

  • a void



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

def tasks=(value)
    @tasks = value
end