Class: MistApi::MxclusterRadsecAuthServer

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/mxcluster_radsec_auth_server.rb

Overview

MxclusterRadsecAuthServer Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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 = SKIP, inband_status_check = false, inband_status_interval = 300, keywrap_enabled = SKIP, keywrap_format = MxclusterRadAuthServerKeywrapFormatEnum::ASCII, keywrap_kek = SKIP, keywrap_mack = SKIP, port = 1812, mretry = 2, secret = SKIP, ssids = SKIP, timeout = 5) ⇒ MxclusterRadsecAuthServer

Returns a new instance of MxclusterRadsecAuthServer.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 104

def initialize(
  host = SKIP, inband_status_check = false, inband_status_interval = 300,
  keywrap_enabled = SKIP,
  keywrap_format = MxclusterRadAuthServerKeywrapFormatEnum::ASCII,
  keywrap_kek = SKIP, keywrap_mack = SKIP, port = 1812, mretry = 2,
  secret = SKIP, ssids = SKIP, timeout = 5
)
  @host = host unless host == SKIP
  @inband_status_check = inband_status_check unless inband_status_check == SKIP
  @inband_status_interval = inband_status_interval unless inband_status_interval == SKIP
  @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
  @mretry = mretry unless mretry == SKIP
  @secret = secret unless secret == SKIP
  @ssids = ssids unless ssids == SKIP
  @timeout = timeout unless timeout == SKIP
end

Instance Attribute Details

#hostString

IP / hostname of RADIUS server

Returns:

  • (String)


14
15
16
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 14

def host
  @host
end

#inband_status_checkTrueClass | FalseClass

Whether to enable inband status check

Returns:

  • (TrueClass | FalseClass)


18
19
20
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 18

def inband_status_check
  @inband_status_check
end

#inband_status_intervalInteger

Inband status interval, in seconds

Returns:

  • (Integer)


22
23
24
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 22

def inband_status_interval
  @inband_status_interval
end

#keywrap_enabledTrueClass | FalseClass

If used for Mist APs, enable keywrap algorithm. Default is false

Returns:

  • (TrueClass | FalseClass)


26
27
28
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 26

def keywrap_enabled
  @keywrap_enabled
end

#keywrap_formatMxclusterRadAuthServerKeywrapFormatEnum

if used for Mist APs. enum: ‘ascii`, `hex`



30
31
32
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 30

def keywrap_format
  @keywrap_format
end

#keywrap_kekString

If used for Mist APs, encryption key

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 34

def keywrap_kek
  @keywrap_kek
end

#keywrap_mackString

If used for Mist APs, Message Authentication Code Key

Returns:

  • (String)


38
39
40
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 38

def keywrap_mack
  @keywrap_mack
end

#mretryInteger

Authentication request retry

Returns:

  • (Integer)


46
47
48
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 46

def mretry
  @mretry
end

#portInteger

Auth port of RADIUS server

Returns:

  • (Integer)


42
43
44
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 42

def port
  @port
end

#secretString

Secret of RADIUS server

Returns:

  • (String)


50
51
52
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 50

def secret
  @secret
end

#ssidsArray[String]

List of ssids that will use this server if match_ssid is true and match is found

Returns:

  • (Array[String])


55
56
57
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 55

def ssids
  @ssids
end

#timeoutInteger

Authentication request timeout, in seconds

Returns:

  • (Integer)


59
60
61
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 59

def timeout
  @timeout
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 126

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  host = hash.key?('host') ? hash['host'] : SKIP
  inband_status_check = hash['inband_status_check'] ||= false
  inband_status_interval = hash['inband_status_interval'] ||= 300
  keywrap_enabled =
    hash.key?('keywrap_enabled') ? hash['keywrap_enabled'] : SKIP
  keywrap_format =
    hash['keywrap_format'] ||= MxclusterRadAuthServerKeywrapFormatEnum::ASCII
  keywrap_kek = hash.key?('keywrap_kek') ? hash['keywrap_kek'] : SKIP
  keywrap_mack = hash.key?('keywrap_mack') ? hash['keywrap_mack'] : SKIP
  port = hash['port'] ||= 1812
  mretry = hash['retry'] ||= 2
  secret = hash.key?('secret') ? hash['secret'] : SKIP
  ssids = hash.key?('ssids') ? hash['ssids'] : SKIP
  timeout = hash['timeout'] ||= 5

  # Create object from extracted values.
  MxclusterRadsecAuthServer.new(host,
                                inband_status_check,
                                inband_status_interval,
                                keywrap_enabled,
                                keywrap_format,
                                keywrap_kek,
                                keywrap_mack,
                                port,
                                mretry,
                                secret,
                                ssids,
                                timeout)
end

.namesObject

A mapping from model property names to API property names.



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 62

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['host'] = 'host'
  @_hash['inband_status_check'] = 'inband_status_check'
  @_hash['inband_status_interval'] = 'inband_status_interval'
  @_hash['keywrap_enabled'] = 'keywrap_enabled'
  @_hash['keywrap_format'] = 'keywrap_format'
  @_hash['keywrap_kek'] = 'keywrap_kek'
  @_hash['keywrap_mack'] = 'keywrap_mack'
  @_hash['port'] = 'port'
  @_hash['mretry'] = 'retry'
  @_hash['secret'] = 'secret'
  @_hash['ssids'] = 'ssids'
  @_hash['timeout'] = 'timeout'
  @_hash
end

.nullablesObject

An array for nullable fields



98
99
100
101
102
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 98

def self.nullables
  %w[
    keywrap_format
  ]
end

.optionalsObject

An array for optional fields



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 80

def self.optionals
  %w[
    host
    inband_status_check
    inband_status_interval
    keywrap_enabled
    keywrap_format
    keywrap_kek
    keywrap_mack
    port
    mretry
    secret
    ssids
    timeout
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



171
172
173
174
175
176
177
178
179
180
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 171

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} host: #{@host.inspect}, inband_status_check:"\
  " #{@inband_status_check.inspect}, inband_status_interval:"\
  " #{@inband_status_interval.inspect}, keywrap_enabled: #{@keywrap_enabled.inspect},"\
  " keywrap_format: #{@keywrap_format.inspect}, keywrap_kek: #{@keywrap_kek.inspect},"\
  " keywrap_mack: #{@keywrap_mack.inspect}, port: #{@port.inspect}, mretry:"\
  " #{@mretry.inspect}, secret: #{@secret.inspect}, ssids: #{@ssids.inspect}, timeout:"\
  " #{@timeout.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



161
162
163
164
165
166
167
168
# File 'lib/mist_api/models/mxcluster_radsec_auth_server.rb', line 161

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} host: #{@host}, inband_status_check: #{@inband_status_check},"\
  " inband_status_interval: #{@inband_status_interval}, keywrap_enabled: #{@keywrap_enabled},"\
  " keywrap_format: #{@keywrap_format}, keywrap_kek: #{@keywrap_kek}, keywrap_mack:"\
  " #{@keywrap_mack}, port: #{@port}, mretry: #{@mretry}, secret: #{@secret}, ssids:"\
  " #{@ssids}, timeout: #{@timeout}>"
end