Class: MistApi::MxedgeUpgradeInfoItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::MxedgeUpgradeInfoItems
- Defined in:
- lib/mist_api/models/mxedge_upgrade_info_items.rb
Overview
MxedgeUpgradeInfoItems Model.
Instance Attribute Summary collapse
-
#default ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#distro ⇒ String
TODO: Write general description for this method.
-
#package ⇒ String
TODO: Write general description for this method.
-
#version ⇒ 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(package = nil, version = nil, default = SKIP, distro = SKIP) ⇒ MxedgeUpgradeInfoItems
constructor
A new instance of MxedgeUpgradeInfoItems.
-
#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(package = nil, version = nil, default = SKIP, distro = SKIP) ⇒ MxedgeUpgradeInfoItems
Returns a new instance of MxedgeUpgradeInfoItems.
51 52 53 54 55 56 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 51 def initialize(package = nil, version = nil, default = SKIP, distro = SKIP) @default = default unless default == SKIP @distro = distro unless distro == SKIP @package = package @version = version end |
Instance Attribute Details
#default ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 14 def default @default end |
#distro ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 18 def distro @distro end |
#package ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 22 def package @package end |
#version ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 26 def version @version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. package = hash.key?('package') ? hash['package'] : nil version = hash.key?('version') ? hash['version'] : nil default = hash.key?('default') ? hash['default'] : SKIP distro = hash.key?('distro') ? hash['distro'] : SKIP # Create object from extracted values. MxedgeUpgradeInfoItems.new(package, version, default, distro) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['default'] = 'default' @_hash['distro'] = 'distro' @_hash['package'] = 'package' @_hash['version'] = 'version' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 39 def self.optionals %w[ default distro ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
83 84 85 86 87 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 83 def inspect class_name = self.class.name.split('::').last "<#{class_name} default: #{@default.inspect}, distro: #{@distro.inspect}, package:"\ " #{@package.inspect}, version: #{@version.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
76 77 78 79 80 |
# File 'lib/mist_api/models/mxedge_upgrade_info_items.rb', line 76 def to_s class_name = self.class.name.split('::').last "<#{class_name} default: #{@default}, distro: #{@distro}, package: #{@package}, version:"\ " #{@version}>" end |