Class: MistApi::ResponseTroubleshoot
- Defined in:
- lib/mist_api/models/response_troubleshoot.rb
Overview
ResponseTroubleshoot Model.
Instance Attribute Summary collapse
-
#mend ⇒ Integer
TODO: Write general description for this method.
-
#results ⇒ Array[ResponseTroubleshootItem]
TODO: Write general description for this method.
-
#start ⇒ Integer
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(mend = SKIP, results = SKIP, start = SKIP) ⇒ ResponseTroubleshoot
constructor
A new instance of ResponseTroubleshoot.
-
#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(mend = SKIP, results = SKIP, start = SKIP) ⇒ ResponseTroubleshoot
Returns a new instance of ResponseTroubleshoot.
47 48 49 50 51 |
# File 'lib/mist_api/models/response_troubleshoot.rb', line 47 def initialize(mend = SKIP, results = SKIP, start = SKIP) @mend = mend unless mend == SKIP @results = results unless results == SKIP @start = start unless start == SKIP end |
Instance Attribute Details
#mend ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_troubleshoot.rb', line 14 def mend @mend end |
#results ⇒ Array[ResponseTroubleshootItem]
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/response_troubleshoot.rb', line 18 def results @results end |
#start ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/response_troubleshoot.rb', line 22 def start @start end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/mist_api/models/response_troubleshoot.rb', line 54 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mend = hash.key?('end') ? hash['end'] : SKIP # Parameter is an array, so we need to iterate through it results = nil unless hash['results'].nil? results = [] hash['results'].each do |structure| results << (ResponseTroubleshootItem.from_hash(structure) if structure) end end results = SKIP unless hash.key?('results') start = hash.key?('start') ? hash['start'] : SKIP # Create object from extracted values. ResponseTroubleshoot.new(mend, results, start) 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_troubleshoot.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['mend'] = 'end' @_hash['results'] = 'results' @_hash['start'] = 'start' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/mist_api/models/response_troubleshoot.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_troubleshoot.rb', line 34 def self.optionals %w[ mend results start ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
84 85 86 87 88 |
# File 'lib/mist_api/models/response_troubleshoot.rb', line 84 def inspect class_name = self.class.name.split('::').last "<#{class_name} mend: #{@mend.inspect}, results: #{@results.inspect}, start:"\ " #{@start.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
78 79 80 81 |
# File 'lib/mist_api/models/response_troubleshoot.rb', line 78 def to_s class_name = self.class.name.split('::').last "<#{class_name} mend: #{@mend}, results: #{@results}, start: #{@start}>" end |