Class: MistApi::SleImpactedAps
- Defined in:
- lib/mist_api/models/sle_impacted_aps.rb
Overview
SleImpactedAps Model.
Instance Attribute Summary collapse
-
#aps ⇒ Array[SleImpactedApsAp]
TODO: Write general description for this method.
-
#classifier ⇒ String
TODO: Write general description for this method.
-
#failure ⇒ String
TODO: Write general description for this method.
-
#limit ⇒ Float
TODO: Write general description for this method.
-
#mend ⇒ Float
TODO: Write general description for this method.
-
#metric ⇒ String
TODO: Write general description for this method.
-
#page ⇒ Float
TODO: Write general description for this method.
-
#start ⇒ Float
TODO: Write general description for this method.
-
#total_count ⇒ Float
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(aps = nil, classifier = nil, mend = nil, failure = nil, limit = nil, metric = nil, page = nil, start = nil, total_count = nil) ⇒ SleImpactedAps
constructor
A new instance of SleImpactedAps.
-
#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(aps = nil, classifier = nil, mend = nil, failure = nil, limit = nil, metric = nil, page = nil, start = nil, total_count = nil) ⇒ SleImpactedAps
Returns a new instance of SleImpactedAps.
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 73 def initialize(aps = nil, classifier = nil, mend = nil, failure = nil, limit = nil, metric = nil, page = nil, start = nil, total_count = nil) @aps = aps @classifier = classifier @mend = mend @failure = failure @limit = limit @metric = metric @page = page @start = start @total_count = total_count end |
Instance Attribute Details
#aps ⇒ Array[SleImpactedApsAp]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 14 def aps @aps end |
#classifier ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 18 def classifier @classifier end |
#failure ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 26 def failure @failure end |
#limit ⇒ Float
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 30 def limit @limit end |
#mend ⇒ Float
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 22 def mend @mend end |
#metric ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 34 def metric @metric end |
#page ⇒ Float
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 38 def page @page end |
#start ⇒ Float
TODO: Write general description for this method
42 43 44 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 42 def start @start end |
#total_count ⇒ Float
TODO: Write general description for this method
46 47 48 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 46 def total_count @total_count end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it aps = nil unless hash['aps'].nil? aps = [] hash['aps'].each do |structure| aps << (SleImpactedApsAp.from_hash(structure) if structure) end end aps = nil unless hash.key?('aps') classifier = hash.key?('classifier') ? hash['classifier'] : nil mend = hash.key?('end') ? hash['end'] : nil failure = hash.key?('failure') ? hash['failure'] : nil limit = hash.key?('limit') ? hash['limit'] : nil metric = hash.key?('metric') ? hash['metric'] : nil page = hash.key?('page') ? hash['page'] : nil start = hash.key?('start') ? hash['start'] : nil total_count = hash.key?('total_count') ? hash['total_count'] : nil # Create object from extracted values. SleImpactedAps.new(aps, classifier, mend, failure, limit, metric, page, start, total_count) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['aps'] = 'aps' @_hash['classifier'] = 'classifier' @_hash['mend'] = 'end' @_hash['failure'] = 'failure' @_hash['limit'] = 'limit' @_hash['metric'] = 'metric' @_hash['page'] = 'page' @_hash['start'] = 'start' @_hash['total_count'] = 'total_count' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 64 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
132 133 134 135 136 137 138 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 132 def inspect class_name = self.class.name.split('::').last "<#{class_name} aps: #{@aps.inspect}, classifier: #{@classifier.inspect}, mend:"\ " #{@mend.inspect}, failure: #{@failure.inspect}, limit: #{@limit.inspect}, metric:"\ " #{@metric.inspect}, page: #{@page.inspect}, start: #{@start.inspect}, total_count:"\ " #{@total_count.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
124 125 126 127 128 129 |
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 124 def to_s class_name = self.class.name.split('::').last "<#{class_name} aps: #{@aps}, classifier: #{@classifier}, mend: #{@mend}, failure:"\ " #{@failure}, limit: #{@limit}, metric: #{@metric}, page: #{@page}, start: #{@start},"\ " total_count: #{@total_count}>" end |