Class: MistApi::JsInventoryItem
- Defined in:
- lib/mist_api/models/js_inventory_item.rb
Overview
JsInventoryItem Model.
Instance Attribute Summary collapse
-
#claimed ⇒ TrueClass | FalseClass
Indicates if the device is claimed by any org.
-
#device_name ⇒ String
Name of the device.
-
#eol_psn ⇒ String
EOL PSN.
-
#eol_time ⇒ Integer
End of life time.
-
#eos_time ⇒ Integer
End of support time.
-
#has_support ⇒ TrueClass | FalseClass
Indicates if the device is covered under active support contract.
-
#master ⇒ TrueClass | FalseClass
Indicates whether it is Master.
-
#model ⇒ String
Model of the install base inventory.
-
#org_id ⇒ UUID | String
Model of the install base inventory.
-
#serial ⇒ String
Serial Number of the inventory.
-
#sku ⇒ String
Serviceable device stock.
-
#status ⇒ String
Status of the connected device.
-
#suggested_version ⇒ String
Suggested SW version.
-
#type ⇒ DeviceTypeEnum
enum: ‘ap`, `gateway`, `switch`.
-
#version ⇒ String
SW version running.
-
#version_description ⇒ String
Version description.
-
#version_eos_time ⇒ Integer
End of Service of version.
-
#version_time ⇒ Integer
FRS date of the version.
-
#warranty ⇒ String
warranty description.
-
#warranty_time ⇒ Integer
Time when warranty needs to be renewed.
-
#warranty_type ⇒ JsiWarrantyTypeEnum
Warranty type for Juniper Support Insight (JSI) devices.
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(claimed = SKIP, device_name = SKIP, eol_psn = SKIP, eol_time = SKIP, eos_time = SKIP, has_support = SKIP, master = SKIP, model = SKIP, org_id = SKIP, serial = SKIP, sku = SKIP, status = SKIP, suggested_version = SKIP, type = SKIP, version = SKIP, version_description = SKIP, version_eos_time = SKIP, version_time = SKIP, warranty = SKIP, warranty_time = SKIP, warranty_type = SKIP) ⇒ JsInventoryItem
constructor
A new instance of JsInventoryItem.
-
#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(claimed = SKIP, device_name = SKIP, eol_psn = SKIP, eol_time = SKIP, eos_time = SKIP, has_support = SKIP, master = SKIP, model = SKIP, org_id = SKIP, serial = SKIP, sku = SKIP, status = SKIP, suggested_version = SKIP, type = SKIP, version = SKIP, version_description = SKIP, version_eos_time = SKIP, version_time = SKIP, warranty = SKIP, warranty_time = SKIP, warranty_type = SKIP) ⇒ JsInventoryItem
Returns a new instance of JsInventoryItem.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 168 def initialize(claimed = SKIP, device_name = SKIP, eol_psn = SKIP, eol_time = SKIP, eos_time = SKIP, has_support = SKIP, master = SKIP, model = SKIP, org_id = SKIP, serial = SKIP, sku = SKIP, status = SKIP, suggested_version = SKIP, type = SKIP, version = SKIP, version_description = SKIP, version_eos_time = SKIP, version_time = SKIP, warranty = SKIP, warranty_time = SKIP, warranty_type = SKIP) @claimed = claimed unless claimed == SKIP @device_name = device_name unless device_name == SKIP @eol_psn = eol_psn unless eol_psn == SKIP @eol_time = eol_time unless eol_time == SKIP @eos_time = eos_time unless eos_time == SKIP @has_support = has_support unless has_support == SKIP @master = master unless master == SKIP @model = model unless model == SKIP @org_id = org_id unless org_id == SKIP @serial = serial unless serial == SKIP @sku = sku unless sku == SKIP @status = status unless status == SKIP @suggested_version = suggested_version unless suggested_version == SKIP @type = type unless type == SKIP @version = version unless version == SKIP @version_description = version_description unless version_description == SKIP @version_eos_time = version_eos_time unless version_eos_time == SKIP @version_time = version_time unless version_time == SKIP @warranty = warranty unless warranty == SKIP @warranty_time = warranty_time unless warranty_time == SKIP @warranty_type = warranty_type unless warranty_type == SKIP end |
Instance Attribute Details
#claimed ⇒ TrueClass | FalseClass
Indicates if the device is claimed by any org
14 15 16 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 14 def claimed @claimed end |
#device_name ⇒ String
Name of the device
18 19 20 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 18 def device_name @device_name end |
#eol_psn ⇒ String
EOL PSN
22 23 24 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 22 def eol_psn @eol_psn end |
#eol_time ⇒ Integer
End of life time
26 27 28 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 26 def eol_time @eol_time end |
#eos_time ⇒ Integer
End of support time
30 31 32 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 30 def eos_time @eos_time end |
#has_support ⇒ TrueClass | FalseClass
Indicates if the device is covered under active support contract
34 35 36 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 34 def has_support @has_support end |
#master ⇒ TrueClass | FalseClass
Indicates whether it is Master
38 39 40 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 38 def master @master end |
#model ⇒ String
Model of the install base inventory
42 43 44 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 42 def model @model end |
#org_id ⇒ UUID | String
Model of the install base inventory
46 47 48 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 46 def org_id @org_id end |
#serial ⇒ String
Serial Number of the inventory
50 51 52 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 50 def serial @serial end |
#sku ⇒ String
Serviceable device stock
54 55 56 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 54 def sku @sku end |
#status ⇒ String
Status of the connected device
58 59 60 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 58 def status @status end |
#suggested_version ⇒ String
Suggested SW version
62 63 64 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 62 def suggested_version @suggested_version end |
#type ⇒ DeviceTypeEnum
enum: ‘ap`, `gateway`, `switch`
66 67 68 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 66 def type @type end |
#version ⇒ String
SW version running
70 71 72 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 70 def version @version end |
#version_description ⇒ String
Version description
74 75 76 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 74 def version_description @version_description end |
#version_eos_time ⇒ Integer
End of Service of version
78 79 80 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 78 def version_eos_time @version_eos_time end |
#version_time ⇒ Integer
FRS date of the version
82 83 84 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 82 def version_time @version_time end |
#warranty ⇒ String
warranty description
86 87 88 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 86 def warranty @warranty end |
#warranty_time ⇒ Integer
Time when warranty needs to be renewed
90 91 92 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 90 def warranty_time @warranty_time end |
#warranty_type ⇒ JsiWarrantyTypeEnum
Warranty type for Juniper Support Insight (JSI) devices. The warranty type is used to determine the support level and duration of the warranty for the device. enum:
* WTY00001: Standard Hardware Warranty
* WTY00002: Enhanced Hardware Warranty
* WTY00003: Dead On Arrival Warranty
* WTY00004: Limited Lifetime Warranty
* WTY00005: Software Warranty
* WTY00006: Limited Lifetime Warranty for WLA
* WTY00007: Warranty-JCPO EOL (DOA Not Included)
* WTY00008: MIST Enhanced Hardware Warranty
* WTY00009: MIST Standard Warranty
* WTY00099: Determine Lifetime warranty
107 108 109 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 107 def warranty_type @warranty_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 199 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. claimed = hash.key?('claimed') ? hash['claimed'] : SKIP device_name = hash.key?('device_name') ? hash['device_name'] : SKIP eol_psn = hash.key?('eol_psn') ? hash['eol_psn'] : SKIP eol_time = hash.key?('eol_time') ? hash['eol_time'] : SKIP eos_time = hash.key?('eos_time') ? hash['eos_time'] : SKIP has_support = hash.key?('has_support') ? hash['has_support'] : SKIP master = hash.key?('master') ? hash['master'] : SKIP model = hash.key?('model') ? hash['model'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP serial = hash.key?('serial') ? hash['serial'] : SKIP sku = hash.key?('sku') ? hash['sku'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP suggested_version = hash.key?('suggested_version') ? hash['suggested_version'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP version_description = hash.key?('version_description') ? hash['version_description'] : SKIP version_eos_time = hash.key?('version_eos_time') ? hash['version_eos_time'] : SKIP version_time = hash.key?('version_time') ? hash['version_time'] : SKIP warranty = hash.key?('warranty') ? hash['warranty'] : SKIP warranty_time = hash.key?('warranty_time') ? hash['warranty_time'] : SKIP warranty_type = hash.key?('warranty_type') ? hash['warranty_type'] : SKIP # Create object from extracted values. JsInventoryItem.new(claimed, device_name, eol_psn, eol_time, eos_time, has_support, master, model, org_id, serial, sku, status, suggested_version, type, version, version_description, version_eos_time, version_time, warranty, warranty_time, warranty_type) end |
.names ⇒ Object
A mapping from model property names to API property names.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 110 def self.names @_hash = {} if @_hash.nil? @_hash['claimed'] = 'claimed' @_hash['device_name'] = 'device_name' @_hash['eol_psn'] = 'eol_psn' @_hash['eol_time'] = 'eol_time' @_hash['eos_time'] = 'eos_time' @_hash['has_support'] = 'has_support' @_hash['master'] = 'master' @_hash['model'] = 'model' @_hash['org_id'] = 'org_id' @_hash['serial'] = 'serial' @_hash['sku'] = 'sku' @_hash['status'] = 'status' @_hash['suggested_version'] = 'suggested_version' @_hash['type'] = 'type' @_hash['version'] = 'version' @_hash['version_description'] = 'version_description' @_hash['version_eos_time'] = 'version_eos_time' @_hash['version_time'] = 'version_time' @_hash['warranty'] = 'warranty' @_hash['warranty_time'] = 'warranty_time' @_hash['warranty_type'] = 'warranty_type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
164 165 166 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 164 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 137 def self.optionals %w[ claimed device_name eol_psn eol_time eos_time has_support master model org_id serial sku status suggested_version type version version_description version_eos_time version_time warranty warranty_time warranty_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 265 def inspect class_name = self.class.name.split('::').last "<#{class_name} claimed: #{@claimed.inspect}, device_name: #{@device_name.inspect},"\ " eol_psn: #{@eol_psn.inspect}, eol_time: #{@eol_time.inspect}, eos_time:"\ " #{@eos_time.inspect}, has_support: #{@has_support.inspect}, master: #{@master.inspect},"\ " model: #{@model.inspect}, org_id: #{@org_id.inspect}, serial: #{@serial.inspect}, sku:"\ " #{@sku.inspect}, status: #{@status.inspect}, suggested_version:"\ " #{@suggested_version.inspect}, type: #{@type.inspect}, version: #{@version.inspect},"\ " version_description: #{@version_description.inspect}, version_eos_time:"\ " #{@version_eos_time.inspect}, version_time: #{@version_time.inspect}, warranty:"\ " #{@warranty.inspect}, warranty_time: #{@warranty_time.inspect}, warranty_type:"\ " #{@warranty_type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
253 254 255 256 257 258 259 260 261 262 |
# File 'lib/mist_api/models/js_inventory_item.rb', line 253 def to_s class_name = self.class.name.split('::').last "<#{class_name} claimed: #{@claimed}, device_name: #{@device_name}, eol_psn: #{@eol_psn},"\ " eol_time: #{@eol_time}, eos_time: #{@eos_time}, has_support: #{@has_support}, master:"\ " #{@master}, model: #{@model}, org_id: #{@org_id}, serial: #{@serial}, sku: #{@sku},"\ " status: #{@status}, suggested_version: #{@suggested_version}, type: #{@type}, version:"\ " #{@version}, version_description: #{@version_description}, version_eos_time:"\ " #{@version_eos_time}, version_time: #{@version_time}, warranty: #{@warranty},"\ " warranty_time: #{@warranty_time}, warranty_type: #{@warranty_type}>" end |