Class: MistApi::DeviceOther
- Defined in:
- lib/mist_api/models/device_other.rb
Overview
DeviceOther Model.
Instance Attribute Summary collapse
-
#created_time ⇒ Float
When the object has been created, in epoch.
-
#device_mac ⇒ String
When the object has been created, in epoch.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#mac ⇒ String
Unique ID of the object instance in the Mist Organization.
-
#model ⇒ String
Unique ID of the object instance in the Mist Organization.
-
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch.
-
#name ⇒ String
When the object has been modified for the last time, in epoch.
-
#org_id ⇒ UUID | String
When the object has been modified for the last time, in epoch.
-
#serial ⇒ String
When the object has been modified for the last time, in epoch.
-
#site_id ⇒ UUID | String
When the object has been modified for the last time, in epoch.
-
#state ⇒ String
When the object has been modified for the last time, in epoch.
-
#vendor ⇒ String
When the object has been modified for the last time, in epoch.
-
#vendor_api_id ⇒ String
When the object has been modified for the last time, in epoch.
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(created_time = SKIP, device_mac = SKIP, id = SKIP, mac = SKIP, model = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, serial = SKIP, site_id = SKIP, state = SKIP, vendor = SKIP, vendor_api_id = SKIP) ⇒ DeviceOther
constructor
A new instance of DeviceOther.
-
#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(created_time = SKIP, device_mac = SKIP, id = SKIP, mac = SKIP, model = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, serial = SKIP, site_id = SKIP, state = SKIP, vendor = SKIP, vendor_api_id = SKIP) ⇒ DeviceOther
Returns a new instance of DeviceOther.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/mist_api/models/device_other.rb', line 107 def initialize(created_time = SKIP, device_mac = SKIP, id = SKIP, mac = SKIP, model = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, serial = SKIP, site_id = SKIP, state = SKIP, vendor = SKIP, vendor_api_id = SKIP) @created_time = created_time unless created_time == SKIP @device_mac = device_mac unless device_mac == SKIP @id = id unless id == SKIP @mac = mac unless mac == SKIP @model = model unless model == SKIP @modified_time = modified_time unless modified_time == SKIP @name = name unless name == SKIP @org_id = org_id unless org_id == SKIP @serial = serial unless serial == SKIP @site_id = site_id unless site_id == SKIP @state = state unless state == SKIP @vendor = vendor unless vendor == SKIP @vendor_api_id = vendor_api_id unless vendor_api_id == SKIP end |
Instance Attribute Details
#created_time ⇒ Float
When the object has been created, in epoch
14 15 16 |
# File 'lib/mist_api/models/device_other.rb', line 14 def created_time @created_time end |
#device_mac ⇒ String
When the object has been created, in epoch
18 19 20 |
# File 'lib/mist_api/models/device_other.rb', line 18 def device_mac @device_mac end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
22 23 24 |
# File 'lib/mist_api/models/device_other.rb', line 22 def id @id end |
#mac ⇒ String
Unique ID of the object instance in the Mist Organization
26 27 28 |
# File 'lib/mist_api/models/device_other.rb', line 26 def mac @mac end |
#model ⇒ String
Unique ID of the object instance in the Mist Organization
30 31 32 |
# File 'lib/mist_api/models/device_other.rb', line 30 def model @model end |
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch
34 35 36 |
# File 'lib/mist_api/models/device_other.rb', line 34 def modified_time @modified_time end |
#name ⇒ String
When the object has been modified for the last time, in epoch
38 39 40 |
# File 'lib/mist_api/models/device_other.rb', line 38 def name @name end |
#org_id ⇒ UUID | String
When the object has been modified for the last time, in epoch
42 43 44 |
# File 'lib/mist_api/models/device_other.rb', line 42 def org_id @org_id end |
#serial ⇒ String
When the object has been modified for the last time, in epoch
46 47 48 |
# File 'lib/mist_api/models/device_other.rb', line 46 def serial @serial end |
#site_id ⇒ UUID | String
When the object has been modified for the last time, in epoch
50 51 52 |
# File 'lib/mist_api/models/device_other.rb', line 50 def site_id @site_id end |
#state ⇒ String
When the object has been modified for the last time, in epoch
54 55 56 |
# File 'lib/mist_api/models/device_other.rb', line 54 def state @state end |
#vendor ⇒ String
When the object has been modified for the last time, in epoch
58 59 60 |
# File 'lib/mist_api/models/device_other.rb', line 58 def vendor @vendor end |
#vendor_api_id ⇒ String
When the object has been modified for the last time, in epoch
62 63 64 |
# File 'lib/mist_api/models/device_other.rb', line 62 def vendor_api_id @vendor_api_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/mist_api/models/device_other.rb', line 127 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. created_time = hash.key?('created_time') ? hash['created_time'] : SKIP device_mac = hash.key?('device_mac') ? hash['device_mac'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP model = hash.key?('model') ? hash['model'] : SKIP modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP serial = hash.key?('serial') ? hash['serial'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP vendor = hash.key?('vendor') ? hash['vendor'] : SKIP vendor_api_id = hash.key?('vendor_api_id') ? hash['vendor_api_id'] : SKIP # Create object from extracted values. DeviceOther.new(created_time, device_mac, id, mac, model, modified_time, name, org_id, serial, site_id, state, vendor, vendor_api_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/device_other.rb', line 65 def self.names @_hash = {} if @_hash.nil? @_hash['created_time'] = 'created_time' @_hash['device_mac'] = 'device_mac' @_hash['id'] = 'id' @_hash['mac'] = 'mac' @_hash['model'] = 'model' @_hash['modified_time'] = 'modified_time' @_hash['name'] = 'name' @_hash['org_id'] = 'org_id' @_hash['serial'] = 'serial' @_hash['site_id'] = 'site_id' @_hash['state'] = 'state' @_hash['vendor'] = 'vendor' @_hash['vendor_api_id'] = 'vendor_api_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
103 104 105 |
# File 'lib/mist_api/models/device_other.rb', line 103 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/mist_api/models/device_other.rb', line 84 def self.optionals %w[ created_time device_mac id mac model modified_time name org_id serial site_id state vendor vendor_api_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
171 172 173 174 175 176 177 178 |
# File 'lib/mist_api/models/device_other.rb', line 171 def inspect class_name = self.class.name.split('::').last "<#{class_name} created_time: #{@created_time.inspect}, device_mac: #{@device_mac.inspect},"\ " id: #{@id.inspect}, mac: #{@mac.inspect}, model: #{@model.inspect}, modified_time:"\ " #{@modified_time.inspect}, name: #{@name.inspect}, org_id: #{@org_id.inspect}, serial:"\ " #{@serial.inspect}, site_id: #{@site_id.inspect}, state: #{@state.inspect}, vendor:"\ " #{@vendor.inspect}, vendor_api_id: #{@vendor_api_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
162 163 164 165 166 167 168 |
# File 'lib/mist_api/models/device_other.rb', line 162 def to_s class_name = self.class.name.split('::').last "<#{class_name} created_time: #{@created_time}, device_mac: #{@device_mac}, id: #{@id},"\ " mac: #{@mac}, model: #{@model}, modified_time: #{@modified_time}, name: #{@name}, org_id:"\ " #{@org_id}, serial: #{@serial}, site_id: #{@site_id}, state: #{@state}, vendor:"\ " #{@vendor}, vendor_api_id: #{@vendor_api_id}>" end |