Class: MicrosoftGraph::Models::PrintTaskDefinition

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/print_task_definition.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 printTaskDefinition and sets the default values.



22
23
24
# File 'lib/models/print_task_definition.rb', line 22

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_task_definition

Raises:

  • (StandardError)


45
46
47
48
# File 'lib/models/print_task_definition.rb', line 45

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

Instance Method Details

#created_byObject

Gets the createdBy property value. The createdBy property

Returns:

  • a app_identity



29
30
31
# File 'lib/models/print_task_definition.rb', line 29

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



37
38
39
# File 'lib/models/print_task_definition.rb', line 37

def created_by=(value)
    @created_by = value
end

#display_nameObject

Gets the displayName property value. The name of the printTaskDefinition.

Returns:

  • a string



53
54
55
# File 'lib/models/print_task_definition.rb', line 53

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the printTaskDefinition.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



61
62
63
# File 'lib/models/print_task_definition.rb', line 61

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



68
69
70
71
72
73
74
# File 'lib/models/print_task_definition.rb', line 68

def get_field_deserializers()
    return super.merge({
        "createdBy" => lambda {|n| @created_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AppIdentity.create_from_discriminator_value(pn) }) },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "tasks" => lambda {|n| @tasks = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PrintTask.create_from_discriminator_value(pn) }) },
    })
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


80
81
82
83
84
85
86
# File 'lib/models/print_task_definition.rb', line 80

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("createdBy", @created_by)
    writer.write_string_value("displayName", @display_name)
    writer.write_collection_of_object_values("tasks", @tasks)
end

#tasksObject

Gets the tasks property value. A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only.

Returns:

  • a print_task



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

def tasks
    return @tasks
end

#tasks=(value) ⇒ Object

Sets the tasks property value. A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only.

Parameters:

  • value

    Value to set for the tasks property.

Returns:

  • a void



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

def tasks=(value)
    @tasks = value
end