Class: MicrosoftGraph::Models::PrintUsageByPrinter

Inherits:
PrintUsage show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/print_usage_by_printer.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PrintUsage

#black_and_white_page_count, #black_and_white_page_count=, #color_page_count, #color_page_count=, #completed_black_and_white_job_count, #completed_black_and_white_job_count=, #completed_color_job_count, #completed_color_job_count=, #completed_job_count, #completed_job_count=, #double_sided_sheet_count, #double_sided_sheet_count=, #incomplete_job_count, #incomplete_job_count=, #media_sheet_count, #media_sheet_count=, #page_count, #page_count=, #single_sided_sheet_count, #single_sided_sheet_count=, #usage_date, #usage_date=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new printUsageByPrinter and sets the default values.



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

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



36
37
38
39
40
41
# File 'lib/models/print_usage_by_printer.rb', line 36

def get_field_deserializers()
    return super.merge({
        "printerId" => lambda {|n| @printer_id = n.get_string_value() },
        "printerName" => lambda {|n| @printer_name = n.get_string_value() },
    })
end

#printer_idObject

Gets the printerId property value. The printerId property

Returns:

  • a string



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

def printer_id
    return @printer_id
end

#printer_id=(value) ⇒ Object

Sets the printerId property value. The printerId property

Parameters:

  • value

    Value to set for the printerId property.

Returns:

  • a void



54
55
56
# File 'lib/models/print_usage_by_printer.rb', line 54

def printer_id=(value)
    @printer_id = value
end

#printer_nameObject

Gets the printerName property value. The name of the printer represented by these statistics.

Returns:

  • a string



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

def printer_name
    return @printer_name
end

#printer_name=(value) ⇒ Object

Sets the printerName property value. The name of the printer represented by these statistics.

Parameters:

  • value

    Value to set for the printerName property.

Returns:

  • a void



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

def printer_name=(value)
    @printer_name = 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/print_usage_by_printer.rb', line 77

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("printerId", @printer_id)
    writer.write_string_value("printerName", @printer_name)
end