Class: MistApi::StatsMxedgePortStatSfp
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::StatsMxedgePortStatSfp
- Defined in:
- lib/mist_api/models/stats_mxedge_port_stat_sfp.rb
Overview
StatsMxedgePortStatSfp Model.
Instance Attribute Summary collapse
-
#codes ⇒ String
TODO: Write general description for this method.
-
#mbps ⇒ Integer
TODO: Write general description for this method.
-
#part_no ⇒ String
TODO: Write general description for this method.
-
#serial_no ⇒ String
TODO: Write general description for this method.
-
#type ⇒ Integer
TODO: Write general description for this method.
-
#vendor ⇒ 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(codes = SKIP, mbps = SKIP, part_no = SKIP, serial_no = SKIP, type = SKIP, vendor = SKIP) ⇒ StatsMxedgePortStatSfp
constructor
A new instance of StatsMxedgePortStatSfp.
-
#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(codes = SKIP, mbps = SKIP, part_no = SKIP, serial_no = SKIP, type = SKIP, vendor = SKIP) ⇒ StatsMxedgePortStatSfp
Returns a new instance of StatsMxedgePortStatSfp.
65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 65 def initialize(codes = SKIP, mbps = SKIP, part_no = SKIP, serial_no = SKIP, type = SKIP, vendor = SKIP) @codes = codes unless codes == SKIP @mbps = mbps unless mbps == SKIP @part_no = part_no unless part_no == SKIP @serial_no = serial_no unless serial_no == SKIP @type = type unless type == SKIP @vendor = vendor unless vendor == SKIP end |
Instance Attribute Details
#codes ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 14 def codes @codes end |
#mbps ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 18 def mbps @mbps end |
#part_no ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 22 def part_no @part_no end |
#serial_no ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 26 def serial_no @serial_no end |
#type ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 30 def type @type end |
#vendor ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 34 def vendor @vendor end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 76 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. codes = hash.key?('codes') ? hash['codes'] : SKIP mbps = hash.key?('mbps') ? hash['mbps'] : SKIP part_no = hash.key?('part_no') ? hash['part_no'] : SKIP serial_no = hash.key?('serial_no') ? hash['serial_no'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP vendor = hash.key?('vendor') ? hash['vendor'] : SKIP # Create object from extracted values. StatsMxedgePortStatSfp.new(codes, mbps, part_no, serial_no, type, vendor) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['codes'] = 'codes' @_hash['mbps'] = 'mbps' @_hash['part_no'] = 'part_no' @_hash['serial_no'] = 'serial_no' @_hash['type'] = 'type' @_hash['vendor'] = 'vendor' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 49 def self.optionals %w[ codes mbps part_no serial_no type vendor ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
104 105 106 107 108 109 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} codes: #{@codes.inspect}, mbps: #{@mbps.inspect}, part_no:"\ " #{@part_no.inspect}, serial_no: #{@serial_no.inspect}, type: #{@type.inspect}, vendor:"\ " #{@vendor.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
97 98 99 100 101 |
# File 'lib/mist_api/models/stats_mxedge_port_stat_sfp.rb', line 97 def to_s class_name = self.class.name.split('::').last "<#{class_name} codes: #{@codes}, mbps: #{@mbps}, part_no: #{@part_no}, serial_no:"\ " #{@serial_no}, type: #{@type}, vendor: #{@vendor}>" end |