Class: MistApi::ModuleStatItemVcLinksItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ModuleStatItemVcLinksItem
- Defined in:
- lib/mist_api/models/module_stat_item_vc_links_item.rb
Overview
ModuleStatItemVcLinksItem Model.
Instance Attribute Summary collapse
-
#neighbor_module_idx ⇒ Integer
TODO: Write general description for this method.
-
#neighbor_port_id ⇒ String
TODO: Write general description for this method.
-
#port_id ⇒ 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(neighbor_module_idx = SKIP, neighbor_port_id = SKIP, port_id = SKIP) ⇒ ModuleStatItemVcLinksItem
constructor
A new instance of ModuleStatItemVcLinksItem.
-
#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(neighbor_module_idx = SKIP, neighbor_port_id = SKIP, port_id = SKIP) ⇒ ModuleStatItemVcLinksItem
Returns a new instance of ModuleStatItemVcLinksItem.
47 48 49 50 51 52 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 47 def initialize(neighbor_module_idx = SKIP, neighbor_port_id = SKIP, port_id = SKIP) @neighbor_module_idx = neighbor_module_idx unless neighbor_module_idx == SKIP @neighbor_port_id = neighbor_port_id unless neighbor_port_id == SKIP @port_id = port_id unless port_id == SKIP end |
Instance Attribute Details
#neighbor_module_idx ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 14 def neighbor_module_idx @neighbor_module_idx end |
#neighbor_port_id ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 18 def neighbor_port_id @neighbor_port_id end |
#port_id ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 22 def port_id @port_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. neighbor_module_idx = hash.key?('neighbor_module_idx') ? hash['neighbor_module_idx'] : SKIP neighbor_port_id = hash.key?('neighbor_port_id') ? hash['neighbor_port_id'] : SKIP port_id = hash.key?('port_id') ? hash['port_id'] : SKIP # Create object from extracted values. ModuleStatItemVcLinksItem.new(neighbor_module_idx, neighbor_port_id, port_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['neighbor_module_idx'] = 'neighbor_module_idx' @_hash['neighbor_port_id'] = 'neighbor_port_id' @_hash['port_id'] = 'port_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 34 def self.optionals %w[ neighbor_module_idx neighbor_port_id port_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
79 80 81 82 83 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 79 def inspect class_name = self.class.name.split('::').last "<#{class_name} neighbor_module_idx: #{@neighbor_module_idx.inspect}, neighbor_port_id:"\ " #{@neighbor_port_id.inspect}, port_id: #{@port_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
72 73 74 75 76 |
# File 'lib/mist_api/models/module_stat_item_vc_links_item.rb', line 72 def to_s class_name = self.class.name.split('::').last "<#{class_name} neighbor_module_idx: #{@neighbor_module_idx}, neighbor_port_id:"\ " #{@neighbor_port_id}, port_id: #{@port_id}>" end |