Class: MistApi::MxedgeMgmt
- Defined in:
- lib/mist_api/models/mxedge_mgmt.rb
Overview
MxedgeMgmt Model.
Instance Attribute Summary collapse
-
#config_auto_revert ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#fips_enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#mist_password ⇒ String
TODO: Write general description for this method.
-
#oob_ip_type ⇒ MxedgeMgmtOobIpTypeEnum
enum: ‘dhcp`, `disabled`, `static`.
-
#oob_ip_type6 ⇒ MxedgeMgmtOobIpType6Enum
enum: ‘autoconf`, `dhcp`, `disabled`, `static`.
-
#root_password ⇒ String
enum: ‘autoconf`, `dhcp`, `disabled`, `static`.
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(config_auto_revert = false, fips_enabled = false, mist_password = SKIP, oob_ip_type = MxedgeMgmtOobIpTypeEnum::DHCP, oob_ip_type6 = MxedgeMgmtOobIpType6Enum::AUTOCONF, root_password = SKIP) ⇒ MxedgeMgmt
constructor
A new instance of MxedgeMgmt.
-
#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(config_auto_revert = false, fips_enabled = false, mist_password = SKIP, oob_ip_type = MxedgeMgmtOobIpTypeEnum::DHCP, oob_ip_type6 = MxedgeMgmtOobIpType6Enum::AUTOCONF, root_password = SKIP) ⇒ MxedgeMgmt
Returns a new instance of MxedgeMgmt.
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 65 def initialize(config_auto_revert = false, fips_enabled = false, mist_password = SKIP, oob_ip_type = MxedgeMgmtOobIpTypeEnum::DHCP, oob_ip_type6 = MxedgeMgmtOobIpType6Enum::AUTOCONF, root_password = SKIP) @config_auto_revert = config_auto_revert unless config_auto_revert == SKIP @fips_enabled = fips_enabled unless fips_enabled == SKIP @mist_password = mist_password unless mist_password == SKIP @oob_ip_type = oob_ip_type unless oob_ip_type == SKIP @oob_ip_type6 = oob_ip_type6 unless oob_ip_type6 == SKIP @root_password = root_password unless root_password == SKIP end |
Instance Attribute Details
#config_auto_revert ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 14 def config_auto_revert @config_auto_revert end |
#fips_enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 18 def fips_enabled @fips_enabled end |
#mist_password ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 22 def mist_password @mist_password end |
#oob_ip_type ⇒ MxedgeMgmtOobIpTypeEnum
enum: ‘dhcp`, `disabled`, `static`
26 27 28 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 26 def oob_ip_type @oob_ip_type end |
#oob_ip_type6 ⇒ MxedgeMgmtOobIpType6Enum
enum: ‘autoconf`, `dhcp`, `disabled`, `static`
30 31 32 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 30 def oob_ip_type6 @oob_ip_type6 end |
#root_password ⇒ String
enum: ‘autoconf`, `dhcp`, `disabled`, `static`
34 35 36 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 34 def root_password @root_password end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. config_auto_revert = hash['config_auto_revert'] ||= false fips_enabled = hash['fips_enabled'] ||= false mist_password = hash.key?('mist_password') ? hash['mist_password'] : SKIP oob_ip_type = hash['oob_ip_type'] ||= MxedgeMgmtOobIpTypeEnum::DHCP oob_ip_type6 = hash['oob_ip_type6'] ||= MxedgeMgmtOobIpType6Enum::AUTOCONF root_password = hash.key?('root_password') ? hash['root_password'] : SKIP # Create object from extracted values. MxedgeMgmt.new(config_auto_revert, fips_enabled, mist_password, oob_ip_type, oob_ip_type6, root_password) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['config_auto_revert'] = 'config_auto_revert' @_hash['fips_enabled'] = 'fips_enabled' @_hash['mist_password'] = 'mist_password' @_hash['oob_ip_type'] = 'oob_ip_type' @_hash['oob_ip_type6'] = 'oob_ip_type6' @_hash['root_password'] = 'root_password' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 49 def self.optionals %w[ config_auto_revert fips_enabled mist_password oob_ip_type oob_ip_type6 root_password ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
108 109 110 111 112 113 114 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 108 def inspect class_name = self.class.name.split('::').last "<#{class_name} config_auto_revert: #{@config_auto_revert.inspect}, fips_enabled:"\ " #{@fips_enabled.inspect}, mist_password: #{@mist_password.inspect}, oob_ip_type:"\ " #{@oob_ip_type.inspect}, oob_ip_type6: #{@oob_ip_type6.inspect}, root_password:"\ " #{@root_password.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
100 101 102 103 104 105 |
# File 'lib/mist_api/models/mxedge_mgmt.rb', line 100 def to_s class_name = self.class.name.split('::').last "<#{class_name} config_auto_revert: #{@config_auto_revert}, fips_enabled: #{@fips_enabled},"\ " mist_password: #{@mist_password}, oob_ip_type: #{@oob_ip_type}, oob_ip_type6:"\ " #{@oob_ip_type6}, root_password: #{@root_password}>" end |