Class: MistApi::PskPortalPassphraseRules
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::PskPortalPassphraseRules
- Defined in:
- lib/mist_api/models/psk_portal_passphrase_rules.rb
Overview
PskPortalPassphraseRules Model.
Instance Attribute Summary collapse
-
#alphabets_enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#length ⇒ Integer
TODO: Write general description for this method.
-
#max_length ⇒ Integer
For valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
-
#min_length ⇒ Integer
Ror valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
-
#numerics_enabled ⇒ TrueClass | FalseClass
Ror valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
-
#symbols ⇒ String
Ror valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
-
#symbols_enabled ⇒ TrueClass | FalseClass
Ror valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(alphabets_enabled = true, length = SKIP, max_length = SKIP, min_length = SKIP, numerics_enabled = true, symbols = SKIP, symbols_enabled = true) ⇒ PskPortalPassphraseRules
constructor
A new instance of PskPortalPassphraseRules.
-
#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(alphabets_enabled = true, length = SKIP, max_length = SKIP, min_length = SKIP, numerics_enabled = true, symbols = SKIP, symbols_enabled = true) ⇒ PskPortalPassphraseRules
Returns a new instance of PskPortalPassphraseRules.
101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 101 def initialize(alphabets_enabled = true, length = SKIP, max_length = SKIP, min_length = SKIP, numerics_enabled = true, symbols = SKIP, symbols_enabled = true) @alphabets_enabled = alphabets_enabled unless alphabets_enabled == SKIP @length = length unless length == SKIP @max_length = max_length unless max_length == SKIP @min_length = min_length unless min_length == SKIP @numerics_enabled = numerics_enabled unless numerics_enabled == SKIP @symbols = symbols unless symbols == SKIP @symbols_enabled = symbols_enabled unless symbols_enabled == SKIP end |
Instance Attribute Details
#alphabets_enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 14 def alphabets_enabled @alphabets_enabled end |
#length ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 18 def length @length end |
#max_length ⇒ Integer
For valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
- if `max_length` and/or `min_length` are invalid, passphrase size is
equal to ‘length` parameter
- if `length` is not set or is invalid, default passphrase size is 8.
- valid `max_length`, `min_length`, `length` should be an integer
between 8 to 63. Also, ‘max_length` > `min_length`
28 29 30 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 28 def max_length @max_length end |
#min_length ⇒ Integer
Ror valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
- if `max_length` and/or `min_length` are invalid, passphrase size is
equal to ‘length` parameter
- if `length` is not set or is invalid, default passphrase size is 8.
- valid `max_length`, `min_length`, `length` should be an integer
between 8 to 63. Also, ‘max_length` > `min_length`
38 39 40 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 38 def min_length @min_length end |
#numerics_enabled ⇒ TrueClass | FalseClass
Ror valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
- if `max_length` and/or `min_length` are invalid, passphrase size is
equal to ‘length` parameter
- if `length` is not set or is invalid, default passphrase size is 8.
- valid `max_length`, `min_length`, `length` should be an integer
between 8 to 63. Also, ‘max_length` > `min_length`
48 49 50 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 48 def numerics_enabled @numerics_enabled end |
#symbols ⇒ String
Ror valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
- if `max_length` and/or `min_length` are invalid, passphrase size is
equal to ‘length` parameter
- if `length` is not set or is invalid, default passphrase size is 8.
- valid `max_length`, `min_length`, `length` should be an integer
between 8 to 63. Also, ‘max_length` > `min_length`
58 59 60 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 58 def symbols @symbols end |
#symbols_enabled ⇒ TrueClass | FalseClass
Ror valid ‘max_length` and `min_length`, passphrase size is set randomly from that range.
- if `max_length` and/or `min_length` are invalid, passphrase size is
equal to ‘length` parameter
- if `length` is not set or is invalid, default passphrase size is 8.
- valid `max_length`, `min_length`, `length` should be an integer
between 8 to 63. Also, ‘max_length` > `min_length`
68 69 70 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 68 def symbols_enabled @symbols_enabled end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 114 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. alphabets_enabled = hash['alphabets_enabled'] ||= true length = hash.key?('length') ? hash['length'] : SKIP max_length = hash.key?('max_length') ? hash['max_length'] : SKIP min_length = hash.key?('min_length') ? hash['min_length'] : SKIP numerics_enabled = hash['numerics_enabled'] ||= true symbols = hash.key?('symbols') ? hash['symbols'] : SKIP symbols_enabled = hash['symbols_enabled'] ||= true # Create object from extracted values. PskPortalPassphraseRules.new(alphabets_enabled, length, max_length, min_length, numerics_enabled, symbols, symbols_enabled) end |
.names ⇒ Object
A mapping from model property names to API property names.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 71 def self.names @_hash = {} if @_hash.nil? @_hash['alphabets_enabled'] = 'alphabets_enabled' @_hash['length'] = 'length' @_hash['max_length'] = 'max_length' @_hash['min_length'] = 'min_length' @_hash['numerics_enabled'] = 'numerics_enabled' @_hash['symbols'] = 'symbols' @_hash['symbols_enabled'] = 'symbols_enabled' @_hash end |
.nullables ⇒ Object
An array for nullable fields
97 98 99 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 97 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 84 def self.optionals %w[ alphabets_enabled length max_length min_length numerics_enabled symbols symbols_enabled ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
138 139 140 141 142 143 144 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 138 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
155 156 157 158 159 160 161 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 155 def inspect class_name = self.class.name.split('::').last "<#{class_name} alphabets_enabled: #{@alphabets_enabled.inspect}, length:"\ " #{@length.inspect}, max_length: #{@max_length.inspect}, min_length:"\ " #{@min_length.inspect}, numerics_enabled: #{@numerics_enabled.inspect}, symbols:"\ " #{@symbols.inspect}, symbols_enabled: #{@symbols_enabled.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
147 148 149 150 151 152 |
# File 'lib/mist_api/models/psk_portal_passphrase_rules.rb', line 147 def to_s class_name = self.class.name.split('::').last "<#{class_name} alphabets_enabled: #{@alphabets_enabled}, length: #{@length}, max_length:"\ " #{@max_length}, min_length: #{@min_length}, numerics_enabled: #{@numerics_enabled},"\ " symbols: #{@symbols}, symbols_enabled: #{@symbols_enabled}>" end |