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