Class: MicrosoftGraph::Models::PrinterBase
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/printer_base.rb
Direct Known Subclasses
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#capabilities ⇒ Object
Gets the capabilities property value.
-
#capabilities=(value) ⇒ Object
Sets the capabilities property value.
-
#defaults ⇒ Object
Gets the defaults property value.
-
#defaults=(value) ⇒ Object
Sets the defaults property value.
-
#display_name ⇒ Object
Gets the displayName property value.
-
#display_name=(value) ⇒ Object
Sets the displayName property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new printerBase and sets the default values.
-
#is_accepting_jobs ⇒ Object
Gets the isAcceptingJobs property value.
-
#is_accepting_jobs=(value) ⇒ Object
Sets the isAcceptingJobs property value.
-
#jobs ⇒ Object
Gets the jobs property value.
-
#jobs=(value) ⇒ Object
Sets the jobs property value.
-
#location ⇒ Object
Gets the location property value.
-
#location=(value) ⇒ Object
Sets the location property value.
-
#manufacturer ⇒ Object
Gets the manufacturer property value.
-
#manufacturer=(value) ⇒ Object
Sets the manufacturer property value.
-
#model ⇒ Object
Gets the model property value.
-
#model=(value) ⇒ Object
Sets the model property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#status ⇒ Object
Gets the status property value.
-
#status=(value) ⇒ Object
Sets the status property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new printerBase and sets the default values.
55 56 57 |
# File 'lib/models/printer_base.rb', line 55 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
63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/models/printer_base.rb', line 63 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.printer" return Printer.new when "#microsoft.graph.printerShare" return PrinterShare.new end end return PrinterBase.new end |
Instance Method Details
#capabilities ⇒ Object
Gets the capabilities property value. The capabilities of the printer/printerShare.
40 41 42 |
# File 'lib/models/printer_base.rb', line 40 def capabilities return @capabilities end |
#capabilities=(value) ⇒ Object
Sets the capabilities property value. The capabilities of the printer/printerShare.
48 49 50 |
# File 'lib/models/printer_base.rb', line 48 def capabilities=(value) @capabilities = value end |
#defaults ⇒ Object
Gets the defaults property value. The default print settings of printer/printerShare.
81 82 83 |
# File 'lib/models/printer_base.rb', line 81 def defaults return @defaults end |
#defaults=(value) ⇒ Object
Sets the defaults property value. The default print settings of printer/printerShare.
89 90 91 |
# File 'lib/models/printer_base.rb', line 89 def defaults=(value) @defaults = value end |
#display_name ⇒ Object
Gets the displayName property value. The name of the printer/printerShare.
96 97 98 |
# File 'lib/models/printer_base.rb', line 96 def display_name return @display_name end |
#display_name=(value) ⇒ Object
Sets the displayName property value. The name of the printer/printerShare.
104 105 106 |
# File 'lib/models/printer_base.rb', line 104 def display_name=(value) @display_name = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/models/printer_base.rb', line 111 def get_field_deserializers() return super.merge({ "capabilities" => lambda {|n| @capabilities = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PrinterCapabilities.create_from_discriminator_value(pn) }) }, "defaults" => lambda {|n| @defaults = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PrinterDefaults.create_from_discriminator_value(pn) }) }, "displayName" => lambda {|n| @display_name = n.get_string_value() }, "isAcceptingJobs" => lambda {|n| @is_accepting_jobs = n.get_boolean_value() }, "jobs" => lambda {|n| @jobs = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PrintJob.create_from_discriminator_value(pn) }) }, "location" => lambda {|n| @location = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PrinterLocation.create_from_discriminator_value(pn) }) }, "manufacturer" => lambda {|n| @manufacturer = n.get_string_value() }, "model" => lambda {|n| @model = n.get_string_value() }, "status" => lambda {|n| @status = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PrinterStatus.create_from_discriminator_value(pn) }) }, }) end |
#is_accepting_jobs ⇒ Object
Gets the isAcceptingJobs property value. Whether the printer/printerShare is currently accepting new print jobs.
128 129 130 |
# File 'lib/models/printer_base.rb', line 128 def is_accepting_jobs return @is_accepting_jobs end |
#is_accepting_jobs=(value) ⇒ Object
Sets the isAcceptingJobs property value. Whether the printer/printerShare is currently accepting new print jobs.
136 137 138 |
# File 'lib/models/printer_base.rb', line 136 def is_accepting_jobs=(value) @is_accepting_jobs = value end |
#jobs ⇒ Object
Gets the jobs property value. The list of jobs that are queued for printing by the printer/printerShare.
143 144 145 |
# File 'lib/models/printer_base.rb', line 143 def jobs return @jobs end |
#jobs=(value) ⇒ Object
Sets the jobs property value. The list of jobs that are queued for printing by the printer/printerShare.
151 152 153 |
# File 'lib/models/printer_base.rb', line 151 def jobs=(value) @jobs = value end |
#location ⇒ Object
Gets the location property value. The physical and/or organizational location of the printer/printerShare.
158 159 160 |
# File 'lib/models/printer_base.rb', line 158 def location return @location end |
#location=(value) ⇒ Object
Sets the location property value. The physical and/or organizational location of the printer/printerShare.
166 167 168 |
# File 'lib/models/printer_base.rb', line 166 def location=(value) @location = value end |
#manufacturer ⇒ Object
Gets the manufacturer property value. The manufacturer of the printer/printerShare.
173 174 175 |
# File 'lib/models/printer_base.rb', line 173 def manufacturer return @manufacturer end |
#manufacturer=(value) ⇒ Object
Sets the manufacturer property value. The manufacturer of the printer/printerShare.
181 182 183 |
# File 'lib/models/printer_base.rb', line 181 def manufacturer=(value) @manufacturer = value end |
#model ⇒ Object
Gets the model property value. The model name of the printer/printerShare.
188 189 190 |
# File 'lib/models/printer_base.rb', line 188 def model return @model end |
#model=(value) ⇒ Object
Sets the model property value. The model name of the printer/printerShare.
196 197 198 |
# File 'lib/models/printer_base.rb', line 196 def model=(value) @model = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/models/printer_base.rb', line 204 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("capabilities", @capabilities) writer.write_object_value("defaults", @defaults) writer.write_string_value("displayName", @display_name) writer.write_boolean_value("isAcceptingJobs", @is_accepting_jobs) writer.write_collection_of_object_values("jobs", @jobs) writer.write_object_value("location", @location) writer.write_string_value("manufacturer", @manufacturer) writer.write_string_value("model", @model) writer.write_object_value("status", @status) end |
#status ⇒ Object
Gets the status property value. The status property
221 222 223 |
# File 'lib/models/printer_base.rb', line 221 def status return @status end |
#status=(value) ⇒ Object
Sets the status property value. The status property
229 230 231 |
# File 'lib/models/printer_base.rb', line 229 def status=(value) @status = value end |