Class: MistApi::MxclusterRadsecAcctServer

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

Overview

MxclusterRadsecAcctServer 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, port = 1813, secret = SKIP, ssids = SKIP) ⇒ MxclusterRadsecAcctServer

Returns a new instance of MxclusterRadsecAcctServer.



54
55
56
57
58
59
# File 'lib/mist_api/models/mxcluster_radsec_acct_server.rb', line 54

def initialize(host = SKIP, port = 1813, secret = SKIP, ssids = SKIP)
  @host = host unless host == SKIP
  @port = port unless port == SKIP
  @secret = secret unless secret == SKIP
  @ssids = ssids unless ssids == SKIP
end

Instance Attribute Details

#hostString

IP / hostname of RADIUS server

Returns:

  • (String)


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

def host
  @host
end

#portInteger

Acct port of RADIUS server

Returns:

  • (Integer)


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

def port
  @port
end

#secretString

Secret of RADIUS server

Returns:

  • (String)


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

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])


27
28
29
# File 'lib/mist_api/models/mxcluster_radsec_acct_server.rb', line 27

def ssids
  @ssids
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  host = hash.key?('host') ? hash['host'] : SKIP
  port = hash['port'] ||= 1813
  secret = hash.key?('secret') ? hash['secret'] : SKIP
  ssids = hash.key?('ssids') ? hash['ssids'] : SKIP

  # Create object from extracted values.
  MxclusterRadsecAcctServer.new(host,
                                port,
                                secret,
                                ssids)
end

.namesObject

A mapping from model property names to API property names.



30
31
32
33
34
35
36
37
# File 'lib/mist_api/models/mxcluster_radsec_acct_server.rb', line 30

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['host'] = 'host'
  @_hash['port'] = 'port'
  @_hash['secret'] = 'secret'
  @_hash['ssids'] = 'ssids'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



40
41
42
43
44
45
46
47
# File 'lib/mist_api/models/mxcluster_radsec_acct_server.rb', line 40

def self.optionals
  %w[
    host
    port
    secret
    ssids
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



85
86
87
88
89
# File 'lib/mist_api/models/mxcluster_radsec_acct_server.rb', line 85

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} host: #{@host.inspect}, port: #{@port.inspect}, secret: #{@secret.inspect},"\
  " ssids: #{@ssids.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



79
80
81
82
# File 'lib/mist_api/models/mxcluster_radsec_acct_server.rb', line 79

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} host: #{@host}, port: #{@port}, secret: #{@secret}, ssids: #{@ssids}>"
end