Class: MistApi::ResponseSwitchMetrics
- Defined in:
- lib/mist_api/models/response_switch_metrics.rb
Overview
ResponseSwitchMetrics Model.
Instance Attribute Summary collapse
-
#active_ports_summary ⇒ ResponseSwitchMetricsActivePortsSummary
TODO: Write general description for this method.
-
#config_success ⇒ ResponseSwitchMetricsConfigSuccess
TODO: Write general description for this method.
-
#version_compliance ⇒ ResponseSwitchMetricsVersionCompliance
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(active_ports_summary = SKIP, config_success = SKIP, version_compliance = SKIP) ⇒ ResponseSwitchMetrics
constructor
A new instance of ResponseSwitchMetrics.
-
#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(active_ports_summary = SKIP, config_success = SKIP, version_compliance = SKIP) ⇒ ResponseSwitchMetrics
Returns a new instance of ResponseSwitchMetrics.
47 48 49 50 51 52 |
# File 'lib/mist_api/models/response_switch_metrics.rb', line 47 def initialize(active_ports_summary = SKIP, config_success = SKIP, version_compliance = SKIP) @active_ports_summary = active_ports_summary unless active_ports_summary == SKIP @config_success = config_success unless config_success == SKIP @version_compliance = version_compliance unless version_compliance == SKIP end |
Instance Attribute Details
#active_ports_summary ⇒ ResponseSwitchMetricsActivePortsSummary
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_switch_metrics.rb', line 14 def active_ports_summary @active_ports_summary end |
#config_success ⇒ ResponseSwitchMetricsConfigSuccess
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/response_switch_metrics.rb', line 18 def config_success @config_success end |
#version_compliance ⇒ ResponseSwitchMetricsVersionCompliance
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/response_switch_metrics.rb', line 22 def version_compliance @version_compliance 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 70 71 72 |
# File 'lib/mist_api/models/response_switch_metrics.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. if hash['active_ports_summary'] active_ports_summary = ResponseSwitchMetricsActivePortsSummary.from_hash(hash['active_ports_summary']) end config_success = ResponseSwitchMetricsConfigSuccess.from_hash(hash['config_success']) if hash['config_success'] if hash['version_compliance'] version_compliance = ResponseSwitchMetricsVersionCompliance.from_hash(hash['version_compliance']) end # Create object from extracted values. ResponseSwitchMetrics.new(active_ports_summary, config_success, version_compliance) 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/response_switch_metrics.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['active_ports_summary'] = 'active_ports_summary' @_hash['config_success'] = 'config_success' @_hash['version_compliance'] = 'version_compliance' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/mist_api/models/response_switch_metrics.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/response_switch_metrics.rb', line 34 def self.optionals %w[ active_ports_summary config_success version_compliance ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
82 83 84 85 86 |
# File 'lib/mist_api/models/response_switch_metrics.rb', line 82 def inspect class_name = self.class.name.split('::').last "<#{class_name} active_ports_summary: #{@active_ports_summary.inspect}, config_success:"\ " #{@config_success.inspect}, version_compliance: #{@version_compliance.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
75 76 77 78 79 |
# File 'lib/mist_api/models/response_switch_metrics.rb', line 75 def to_s class_name = self.class.name.split('::').last "<#{class_name} active_ports_summary: #{@active_ports_summary}, config_success:"\ " #{@config_success}, version_compliance: #{@version_compliance}>" end |