Class: MistApi::ResponseMspInventoryDevice
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseMspInventoryDevice
- Defined in:
- lib/mist_api/models/response_msp_inventory_device.rb
Overview
ResponseMspInventoryDevice Model.
Instance Attribute Summary collapse
-
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#mac ⇒ String
TODO: Write general description for this method.
-
#model ⇒ String
TODO: Write general description for this method.
-
#org_id ⇒ UUID | String
TODO: Write general description for this method.
-
#serial ⇒ String
TODO: Write general description for this method.
-
#site_id ⇒ UUID | String
TODO: Write general description for this method.
-
#type ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(mac = nil, model = nil, org_id = nil, serial = nil, site_id = nil, type = nil, for_site = SKIP) ⇒ ResponseMspInventoryDevice
constructor
A new instance of ResponseMspInventoryDevice.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(mac = nil, model = nil, org_id = nil, serial = nil, site_id = nil, type = nil, for_site = SKIP) ⇒ ResponseMspInventoryDevice
Returns a new instance of ResponseMspInventoryDevice.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 65 def initialize(mac = nil, model = nil, org_id = nil, serial = nil, site_id = nil, type = nil, for_site = SKIP) @for_site = for_site unless for_site == SKIP @mac = mac @model = model @org_id = org_id @serial = serial @site_id = site_id @type = type end |
Instance Attribute Details
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 14 def for_site @for_site end |
#mac ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 18 def mac @mac end |
#model ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 22 def model @model end |
#org_id ⇒ UUID | String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 26 def org_id @org_id end |
#serial ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 30 def serial @serial end |
#site_id ⇒ UUID | String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 34 def site_id @site_id end |
#type ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 38 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 77 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mac = hash.key?('mac') ? hash['mac'] : nil model = hash.key?('model') ? hash['model'] : nil org_id = hash.key?('org_id') ? hash['org_id'] : nil serial = hash.key?('serial') ? hash['serial'] : nil site_id = hash.key?('site_id') ? hash['site_id'] : nil type = hash.key?('type') ? hash['type'] : nil for_site = hash.key?('for_site') ? hash['for_site'] : SKIP # Create object from extracted values. ResponseMspInventoryDevice.new(mac, model, org_id, serial, site_id, type, for_site) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['for_site'] = 'for_site' @_hash['mac'] = 'mac' @_hash['model'] = 'model' @_hash['org_id'] = 'org_id' @_hash['serial'] = 'serial' @_hash['site_id'] = 'site_id' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 54 def self.optionals %w[ for_site ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
107 108 109 110 111 112 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 107 def inspect class_name = self.class.name.split('::').last "<#{class_name} for_site: #{@for_site.inspect}, mac: #{@mac.inspect}, model:"\ " #{@model.inspect}, org_id: #{@org_id.inspect}, serial: #{@serial.inspect}, site_id:"\ " #{@site_id.inspect}, type: #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
100 101 102 103 104 |
# File 'lib/mist_api/models/response_msp_inventory_device.rb', line 100 def to_s class_name = self.class.name.split('::').last "<#{class_name} for_site: #{@for_site}, mac: #{@mac}, model: #{@model}, org_id: #{@org_id},"\ " serial: #{@serial}, site_id: #{@site_id}, type: #{@type}>" end |