Class: MicrosoftGraph::Models::Printer

Inherits:
PrinterBase show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/printer.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PrinterBase

#capabilities, #capabilities=, #defaults, #defaults=, #display_name, #display_name=, #is_accepting_jobs, #is_accepting_jobs=, #jobs, #jobs=, #location, #location=, #manufacturer, #manufacturer=, #model, #model=, #status, #status=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new printer and sets the default values.



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

def initialize()
    super
    @odata_type = "#microsoft.graph.printer"
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Raises:

  • (StandardError)


59
60
61
62
# File 'lib/models/printer.rb', line 59

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

Instance Method Details

#connectorsObject

Gets the connectors property value. The connectors that are associated with the printer.



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

def connectors
    return @connectors
end

#connectors=(value) ⇒ Object

Sets the connectors property value. The connectors that are associated with the printer.



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

def connectors=(value)
    @connectors = value
end

#get_field_deserializersObject

The deserialization information for the current model



67
68
69
70
71
72
73
74
75
76
77
# File 'lib/models/printer.rb', line 67

def get_field_deserializers()
    return super.merge({
        "connectors" => lambda {|n| @connectors = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PrintConnector.create_from_discriminator_value(pn) }) },
        "hasPhysicalDevice" => lambda {|n| @has_physical_device = n.get_boolean_value() },
        "isShared" => lambda {|n| @is_shared = n.get_boolean_value() },
        "lastSeenDateTime" => lambda {|n| @last_seen_date_time = n.get_date_time_value() },
        "registeredDateTime" => lambda {|n| @registered_date_time = n.get_date_time_value() },
        "shares" => lambda {|n| @shares = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PrinterShare.create_from_discriminator_value(pn) }) },
        "taskTriggers" => lambda {|n| @task_triggers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PrintTaskTrigger.create_from_discriminator_value(pn) }) },
    })
end

#has_physical_deviceObject

Gets the hasPhysicalDevice property value. True if the printer has a physical device for printing. Read-only.



82
83
84
# File 'lib/models/printer.rb', line 82

def has_physical_device
    return @has_physical_device
end

#has_physical_device=(value) ⇒ Object

Sets the hasPhysicalDevice property value. True if the printer has a physical device for printing. Read-only.



90
91
92
# File 'lib/models/printer.rb', line 90

def has_physical_device=(value)
    @has_physical_device = value
end

#is_sharedObject

Gets the isShared property value. True if the printer is shared; false otherwise. Read-only.



97
98
99
# File 'lib/models/printer.rb', line 97

def is_shared
    return @is_shared
end

#is_shared=(value) ⇒ Object

Sets the isShared property value. True if the printer is shared; false otherwise. Read-only.



105
106
107
# File 'lib/models/printer.rb', line 105

def is_shared=(value)
    @is_shared = value
end

#last_seen_date_timeObject

Gets the lastSeenDateTime property value. The most recent dateTimeOffset when a printer interacted with Universal Print. Read-only.



112
113
114
# File 'lib/models/printer.rb', line 112

def last_seen_date_time
    return @last_seen_date_time
end

#last_seen_date_time=(value) ⇒ Object

Sets the lastSeenDateTime property value. The most recent dateTimeOffset when a printer interacted with Universal Print. Read-only.



120
121
122
# File 'lib/models/printer.rb', line 120

def last_seen_date_time=(value)
    @last_seen_date_time = value
end

#registered_date_timeObject

Gets the registeredDateTime property value. The DateTimeOffset when the printer was registered. Read-only.



127
128
129
# File 'lib/models/printer.rb', line 127

def registered_date_time
    return @registered_date_time
end

#registered_date_time=(value) ⇒ Object

Sets the registeredDateTime property value. The DateTimeOffset when the printer was registered. Read-only.



135
136
137
# File 'lib/models/printer.rb', line 135

def registered_date_time=(value)
    @registered_date_time = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Raises:

  • (StandardError)


143
144
145
146
147
148
149
150
151
152
153
# File 'lib/models/printer.rb', line 143

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("connectors", @connectors)
    writer.write_boolean_value("hasPhysicalDevice", @has_physical_device)
    writer.write_boolean_value("isShared", @is_shared)
    writer.write_date_time_value("lastSeenDateTime", @last_seen_date_time)
    writer.write_date_time_value("registeredDateTime", @registered_date_time)
    writer.write_collection_of_object_values("shares", @shares)
    writer.write_collection_of_object_values("taskTriggers", @task_triggers)
end

#sharesObject

Gets the shares property value. The list of printerShares that are associated with the printer. Currently, only one printerShare can be associated with the printer. Read-only. Nullable.



158
159
160
# File 'lib/models/printer.rb', line 158

def shares
    return @shares
end

#shares=(value) ⇒ Object

Sets the shares property value. The list of printerShares that are associated with the printer. Currently, only one printerShare can be associated with the printer. Read-only. Nullable.



166
167
168
# File 'lib/models/printer.rb', line 166

def shares=(value)
    @shares = value
end

#task_triggersObject

Gets the taskTriggers property value. A list of task triggers that are associated with the printer.



173
174
175
# File 'lib/models/printer.rb', line 173

def task_triggers
    return @task_triggers
end

#task_triggers=(value) ⇒ Object

Sets the taskTriggers property value. A list of task triggers that are associated with the printer.



181
182
183
# File 'lib/models/printer.rb', line 181

def task_triggers=(value)
    @task_triggers = value
end