Class: MistApi::ResponseVirtualChassisConfig
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseVirtualChassisConfig
- Defined in:
- lib/mist_api/models/response_virtual_chassis_config.rb
Overview
ResponseVirtualChassisConfig Model.
Instance Attribute Summary collapse
-
#config_type ⇒ String
TODO: Write general description for this method.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#locating ⇒ TrueClass | FalseClass
Unique ID of the object instance in the Mist Organization.
-
#mac ⇒ String
Unique ID of the object instance in the Mist Organization.
-
#members ⇒ Array[StatsSwitchModuleStatItem]
Unique ID of the object instance in the Mist Organization.
-
#model ⇒ String
Unique ID of the object instance in the Mist Organization.
-
#num_routing_engines ⇒ Integer
routing-engine count.
-
#org_id ⇒ UUID | String
routing-engine count.
-
#serial ⇒ String
routing-engine count.
-
#site_id ⇒ UUID | String
routing-engine count.
-
#status ⇒ String
routing-engine count.
-
#type ⇒ String
routing-engine count.
-
#vc_mac ⇒ String
routing-engine count.
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(config_type = SKIP, id = SKIP, locating = SKIP, mac = SKIP, members = SKIP, model = SKIP, num_routing_engines = SKIP, org_id = SKIP, serial = SKIP, site_id = SKIP, status = SKIP, type = SKIP, vc_mac = SKIP) ⇒ ResponseVirtualChassisConfig
constructor
A new instance of ResponseVirtualChassisConfig.
-
#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(config_type = SKIP, id = SKIP, locating = SKIP, mac = SKIP, members = SKIP, model = SKIP, num_routing_engines = SKIP, org_id = SKIP, serial = SKIP, site_id = SKIP, status = SKIP, type = SKIP, vc_mac = SKIP) ⇒ ResponseVirtualChassisConfig
Returns a new instance of ResponseVirtualChassisConfig.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 107 def initialize(config_type = SKIP, id = SKIP, locating = SKIP, mac = SKIP, members = SKIP, model = SKIP, num_routing_engines = SKIP, org_id = SKIP, serial = SKIP, site_id = SKIP, status = SKIP, type = SKIP, vc_mac = SKIP) @config_type = config_type unless config_type == SKIP @id = id unless id == SKIP @locating = locating unless locating == SKIP @mac = mac unless mac == SKIP @members = members unless members == SKIP @model = model unless model == SKIP @num_routing_engines = num_routing_engines unless num_routing_engines == SKIP @org_id = org_id unless org_id == SKIP @serial = serial unless serial == SKIP @site_id = site_id unless site_id == SKIP @status = status unless status == SKIP @type = type unless type == SKIP @vc_mac = vc_mac unless vc_mac == SKIP end |
Instance Attribute Details
#config_type ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 14 def config_type @config_type end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
18 19 20 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 18 def id @id end |
#locating ⇒ TrueClass | FalseClass
Unique ID of the object instance in the Mist Organization
22 23 24 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 22 def locating @locating end |
#mac ⇒ String
Unique ID of the object instance in the Mist Organization
26 27 28 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 26 def mac @mac end |
#members ⇒ Array[StatsSwitchModuleStatItem]
Unique ID of the object instance in the Mist Organization
30 31 32 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 30 def members @members end |
#model ⇒ String
Unique ID of the object instance in the Mist Organization
34 35 36 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 34 def model @model end |
#num_routing_engines ⇒ Integer
routing-engine count
38 39 40 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 38 def num_routing_engines @num_routing_engines end |
#org_id ⇒ UUID | String
routing-engine count
42 43 44 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 42 def org_id @org_id end |
#serial ⇒ String
routing-engine count
46 47 48 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 46 def serial @serial end |
#site_id ⇒ UUID | String
routing-engine count
50 51 52 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 50 def site_id @site_id end |
#status ⇒ String
routing-engine count
54 55 56 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 54 def status @status end |
#type ⇒ String
routing-engine count
58 59 60 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 58 def type @type end |
#vc_mac ⇒ String
routing-engine count
62 63 64 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 62 def vc_mac @vc_mac 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 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 127 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. config_type = hash.key?('config_type') ? hash['config_type'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP locating = hash.key?('locating') ? hash['locating'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP # Parameter is an array, so we need to iterate through it members = nil unless hash['members'].nil? members = [] hash['members'].each do |structure| members << (StatsSwitchModuleStatItem.from_hash(structure) if structure) end end members = SKIP unless hash.key?('members') model = hash.key?('model') ? hash['model'] : SKIP num_routing_engines = hash.key?('num_routing_engines') ? hash['num_routing_engines'] : 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 status = hash.key?('status') ? hash['status'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP vc_mac = hash.key?('vc_mac') ? hash['vc_mac'] : SKIP # Create object from extracted values. ResponseVirtualChassisConfig.new(config_type, id, locating, mac, members, model, num_routing_engines, org_id, serial, site_id, status, type, vc_mac) 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/response_virtual_chassis_config.rb', line 65 def self.names @_hash = {} if @_hash.nil? @_hash['config_type'] = 'config_type' @_hash['id'] = 'id' @_hash['locating'] = 'locating' @_hash['mac'] = 'mac' @_hash['members'] = 'members' @_hash['model'] = 'model' @_hash['num_routing_engines'] = 'num_routing_engines' @_hash['org_id'] = 'org_id' @_hash['serial'] = 'serial' @_hash['site_id'] = 'site_id' @_hash['status'] = 'status' @_hash['type'] = 'type' @_hash['vc_mac'] = 'vc_mac' @_hash end |
.nullables ⇒ Object
An array for nullable fields
103 104 105 |
# File 'lib/mist_api/models/response_virtual_chassis_config.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/response_virtual_chassis_config.rb', line 84 def self.optionals %w[ config_type id locating mac members model num_routing_engines org_id serial site_id status type vc_mac ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
181 182 183 184 185 186 187 188 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 181 def inspect class_name = self.class.name.split('::').last "<#{class_name} config_type: #{@config_type.inspect}, id: #{@id.inspect}, locating:"\ " #{@locating.inspect}, mac: #{@mac.inspect}, members: #{@members.inspect}, model:"\ " #{@model.inspect}, num_routing_engines: #{@num_routing_engines.inspect}, org_id:"\ " #{@org_id.inspect}, serial: #{@serial.inspect}, site_id: #{@site_id.inspect}, status:"\ " #{@status.inspect}, type: #{@type.inspect}, vc_mac: #{@vc_mac.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
172 173 174 175 176 177 178 |
# File 'lib/mist_api/models/response_virtual_chassis_config.rb', line 172 def to_s class_name = self.class.name.split('::').last "<#{class_name} config_type: #{@config_type}, id: #{@id}, locating: #{@locating}, mac:"\ " #{@mac}, members: #{@members}, model: #{@model}, num_routing_engines:"\ " #{@num_routing_engines}, org_id: #{@org_id}, serial: #{@serial}, site_id: #{@site_id},"\ " status: #{@status}, type: #{@type}, vc_mac: #{@vc_mac}>" end |