Class: MicrosoftGraph::Models::PrinterCreateOperation

Inherits:
PrintOperation show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/printer_create_operation.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PrintOperation

#created_date_time, #created_date_time=, #status, #status=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new printerCreateOperation and sets the default values.



34
35
36
37
# File 'lib/models/printer_create_operation.rb', line 34

def initialize()
    super
    @odata_type = "#microsoft.graph.printerCreateOperation"
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_create_operation

Raises:

  • (StandardError)


43
44
45
46
# File 'lib/models/printer_create_operation.rb', line 43

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

Instance Method Details

#certificateObject

Gets the certificate property value. The signed certificate created during the registration process. Read-only.

Returns:

  • a string



19
20
21
# File 'lib/models/printer_create_operation.rb', line 19

def certificate
    return @certificate
end

#certificate=(value) ⇒ Object

Sets the certificate property value. The signed certificate created during the registration process. Read-only.

Parameters:

  • value

    Value to set for the certificate property.

Returns:

  • a void



27
28
29
# File 'lib/models/printer_create_operation.rb', line 27

def certificate=(value)
    @certificate = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



51
52
53
54
55
56
# File 'lib/models/printer_create_operation.rb', line 51

def get_field_deserializers()
    return super.merge({
        "certificate" => lambda {|n| @certificate = n.get_string_value() },
        "printer" => lambda {|n| @printer = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Printer.create_from_discriminator_value(pn) }) },
    })
end

#printerObject

Gets the printer property value. The created printer entity. Read-only.

Returns:

  • a printer



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

def printer
    return @printer
end

#printer=(value) ⇒ Object

Sets the printer property value. The created printer entity. Read-only.

Parameters:

  • value

    Value to set for the printer property.

Returns:

  • a void



69
70
71
# File 'lib/models/printer_create_operation.rb', line 69

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


77
78
79
80
81
82
# File 'lib/models/printer_create_operation.rb', line 77

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("certificate", @certificate)
    writer.write_object_value("printer", @printer)
end