Class: MistApi::VirtualChassisConfigMember
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::VirtualChassisConfigMember
- Defined in:
- lib/mist_api/models/virtual_chassis_config_member.rb
Overview
VirtualChassisConfigMember Model.
Instance Attribute Summary collapse
-
#locating ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#mac ⇒ String
fpc0, same as the mac of device_id.
-
#member_id ⇒ Integer
For preprovisionned virtual chassis.
-
#vc_ports ⇒ Array[String]
For preprovisionned virtual chassis.
-
#vc_role ⇒ VirtualChassisConfigMemberVcRoleEnum
enum: ‘backup`, `linecard`, `master`.
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, vc_role = nil, locating = SKIP, member_id = SKIP, vc_ports = SKIP) ⇒ VirtualChassisConfigMember
constructor
A new instance of VirtualChassisConfigMember.
-
#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, vc_role = nil, locating = SKIP, member_id = SKIP, vc_ports = SKIP) ⇒ VirtualChassisConfigMember
Returns a new instance of VirtualChassisConfigMember.
57 58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 57 def initialize(mac = nil, vc_role = nil, locating = SKIP, member_id = SKIP, vc_ports = SKIP) @locating = locating unless locating == SKIP @mac = mac @member_id = member_id unless member_id == SKIP @vc_ports = vc_ports unless vc_ports == SKIP @vc_role = vc_role end |
Instance Attribute Details
#locating ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 14 def locating @locating end |
#mac ⇒ String
fpc0, same as the mac of device_id
18 19 20 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 18 def mac @mac end |
#member_id ⇒ Integer
For preprovisionned virtual chassis
22 23 24 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 22 def member_id @member_id end |
#vc_ports ⇒ Array[String]
For preprovisionned virtual chassis
26 27 28 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 26 def vc_ports @vc_ports end |
#vc_role ⇒ VirtualChassisConfigMemberVcRoleEnum
enum: ‘backup`, `linecard`, `master`
30 31 32 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 30 def vc_role @vc_role end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 67 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mac = hash.key?('mac') ? hash['mac'] : nil vc_role = hash.key?('vc_role') ? hash['vc_role'] : nil locating = hash.key?('locating') ? hash['locating'] : SKIP member_id = hash.key?('member_id') ? hash['member_id'] : SKIP vc_ports = hash.key?('vc_ports') ? hash['vc_ports'] : SKIP # Create object from extracted values. VirtualChassisConfigMember.new(mac, vc_role, locating, member_id, vc_ports) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['locating'] = 'locating' @_hash['mac'] = 'mac' @_hash['member_id'] = 'member_id' @_hash['vc_ports'] = 'vc_ports' @_hash['vc_role'] = 'vc_role' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 44 def self.optionals %w[ locating member_id vc_ports ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
93 94 95 96 97 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 93 def inspect class_name = self.class.name.split('::').last "<#{class_name} locating: #{@locating.inspect}, mac: #{@mac.inspect}, member_id:"\ " #{@member_id.inspect}, vc_ports: #{@vc_ports.inspect}, vc_role: #{@vc_role.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
86 87 88 89 90 |
# File 'lib/mist_api/models/virtual_chassis_config_member.rb', line 86 def to_s class_name = self.class.name.split('::').last "<#{class_name} locating: #{@locating}, mac: #{@mac}, member_id: #{@member_id}, vc_ports:"\ " #{@vc_ports}, vc_role: #{@vc_role}>" end |