Class: MistApi::RadiusAuthServer
- Defined in:
- lib/mist_api/models/radius_auth_server.rb
Overview
Authentication Server
Instance Attribute Summary collapse
-
#host ⇒ String
IP/ hostname of RADIUS server.
-
#keywrap_enabled ⇒ TrueClass | FalseClass
IP/ hostname of RADIUS server.
-
#keywrap_format ⇒ RadiusKeywrapFormatEnum
enum: ‘ascii`, `hex`.
-
#keywrap_kek ⇒ String
enum: ‘ascii`, `hex`.
-
#keywrap_mack ⇒ String
enum: ‘ascii`, `hex`.
-
#port ⇒ Object
Radius Auth Port, value from 1 to 65535, default is 1812.
-
#require_message_authenticator ⇒ TrueClass | FalseClass
Whether to require Message-Authenticator in requests.
-
#secret ⇒ String
Secret of RADIUS server.
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(host = nil, secret = nil, keywrap_enabled = SKIP, keywrap_format = SKIP, keywrap_kek = SKIP, keywrap_mack = SKIP, port = SKIP, require_message_authenticator = false) ⇒ RadiusAuthServer
constructor
A new instance of RadiusAuthServer.
-
#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(host = nil, secret = nil, keywrap_enabled = SKIP, keywrap_format = SKIP, keywrap_kek = SKIP, keywrap_mack = SKIP, port = SKIP, require_message_authenticator = false) ⇒ RadiusAuthServer
Returns a new instance of RadiusAuthServer.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 76 def initialize(host = nil, secret = nil, keywrap_enabled = SKIP, keywrap_format = SKIP, keywrap_kek = SKIP, keywrap_mack = SKIP, port = SKIP, = false) @host = host @keywrap_enabled = keywrap_enabled unless keywrap_enabled == SKIP @keywrap_format = keywrap_format unless keywrap_format == SKIP @keywrap_kek = keywrap_kek unless keywrap_kek == SKIP @keywrap_mack = keywrap_mack unless keywrap_mack == SKIP @port = port unless port == SKIP unless == SKIP @require_message_authenticator = end @secret = secret end |
Instance Attribute Details
#host ⇒ String
IP/ hostname of RADIUS server
14 15 16 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 14 def host @host end |
#keywrap_enabled ⇒ TrueClass | FalseClass
IP/ hostname of RADIUS server
18 19 20 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 18 def keywrap_enabled @keywrap_enabled end |
#keywrap_format ⇒ RadiusKeywrapFormatEnum
enum: ‘ascii`, `hex`
22 23 24 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 22 def keywrap_format @keywrap_format end |
#keywrap_kek ⇒ String
enum: ‘ascii`, `hex`
26 27 28 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 26 def keywrap_kek @keywrap_kek end |
#keywrap_mack ⇒ String
enum: ‘ascii`, `hex`
30 31 32 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 30 def keywrap_mack @keywrap_mack end |
#port ⇒ Object
Radius Auth Port, value from 1 to 65535, default is 1812
34 35 36 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 34 def port @port end |
#require_message_authenticator ⇒ TrueClass | FalseClass
Whether to require Message-Authenticator in requests
38 39 40 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 38 def @require_message_authenticator end |
#secret ⇒ String
Secret of RADIUS server
42 43 44 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 42 def secret @secret end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 94 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. host = hash.key?('host') ? hash['host'] : nil secret = hash.key?('secret') ? hash['secret'] : nil keywrap_enabled = hash.key?('keywrap_enabled') ? hash['keywrap_enabled'] : SKIP keywrap_format = hash.key?('keywrap_format') ? hash['keywrap_format'] : SKIP keywrap_kek = hash.key?('keywrap_kek') ? hash['keywrap_kek'] : SKIP keywrap_mack = hash.key?('keywrap_mack') ? hash['keywrap_mack'] : SKIP port = hash.key?('port') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:RadiusAuthPort), hash['port'] ) : SKIP = hash['require_message_authenticator'] ||= false # Create object from extracted values. RadiusAuthServer.new(host, secret, keywrap_enabled, keywrap_format, keywrap_kek, keywrap_mack, port, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['host'] = 'host' @_hash['keywrap_enabled'] = 'keywrap_enabled' @_hash['keywrap_format'] = 'keywrap_format' @_hash['keywrap_kek'] = 'keywrap_kek' @_hash['keywrap_mack'] = 'keywrap_mack' @_hash['port'] = 'port' @_hash['require_message_authenticator'] = 'require_message_authenticator' @_hash['secret'] = 'secret' @_hash end |
.nullables ⇒ Object
An array for nullable fields
72 73 74 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 72 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 60 def self.optionals %w[ keywrap_enabled keywrap_format keywrap_kek keywrap_mack port require_message_authenticator ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 125 def self.validate(value) if value.instance_of? self return ( APIHelper.valid_type?(value.host, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.secret, ->(val) { val.instance_of? String }) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['host'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['secret'], ->(val) { val.instance_of? String }) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
155 156 157 158 159 160 161 162 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 155 def inspect class_name = self.class.name.split('::').last "<#{class_name} host: #{@host.inspect}, keywrap_enabled: #{@keywrap_enabled.inspect},"\ " keywrap_format: #{@keywrap_format.inspect}, keywrap_kek: #{@keywrap_kek.inspect},"\ " keywrap_mack: #{@keywrap_mack.inspect}, port: #{@port.inspect},"\ " require_message_authenticator: #{@require_message_authenticator.inspect}, secret:"\ " #{@secret.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
146 147 148 149 150 151 152 |
# File 'lib/mist_api/models/radius_auth_server.rb', line 146 def to_s class_name = self.class.name.split('::').last "<#{class_name} host: #{@host}, keywrap_enabled: #{@keywrap_enabled}, keywrap_format:"\ " #{@keywrap_format}, keywrap_kek: #{@keywrap_kek}, keywrap_mack: #{@keywrap_mack}, port:"\ " #{@port}, require_message_authenticator: #{@require_message_authenticator}, secret:"\ " #{@secret}>" end |