Class: MistApi::SsoMxedgeProxy

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

Overview

If ‘idp_type`==`mxedge_proxy`, this requires `mist_nac` to be enabled on the mxcluster

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(acct_servers = SKIP, auth_servers = SKIP, mxcluster_id = SKIP, operator_name = SKIP, proxy_hosts = SKIP, ssids = SKIP) ⇒ SsoMxedgeProxy

Returns a new instance of SsoMxedgeProxy.



66
67
68
69
70
71
72
73
74
75
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 66

def initialize(acct_servers = SKIP, auth_servers = SKIP,
               mxcluster_id = SKIP, operator_name = SKIP,
               proxy_hosts = SKIP, ssids = SKIP)
  @acct_servers = acct_servers unless acct_servers == SKIP
  @auth_servers = auth_servers unless auth_servers == SKIP
  @mxcluster_id = mxcluster_id unless mxcluster_id == SKIP
  @operator_name = operator_name unless operator_name == SKIP
  @proxy_hosts = proxy_hosts unless proxy_hosts == SKIP
  @ssids = ssids unless ssids == SKIP
end

Instance Attribute Details

#acct_serversArray[SsoMxedgeProxyAcctServer]

TODO: Write general description for this method

Returns:



15
16
17
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 15

def acct_servers
  @acct_servers
end

#auth_serversArray[SsoMxedgeProxyAuthServer]

TODO: Write general description for this method

Returns:



19
20
21
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 19

def auth_servers
  @auth_servers
end

#mxcluster_idUUID | String

TODO: Write general description for this method

Returns:

  • (UUID | String)


23
24
25
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 23

def mxcluster_id
  @mxcluster_id
end

#operator_nameString

Operator name as Radius attribute while proxying

Returns:

  • (String)


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

def operator_name
  @operator_name
end

#proxy_hostsArray[String]

Public hostname/IPs

Returns:

  • (Array[String])


31
32
33
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 31

def proxy_hosts
  @proxy_hosts
end

#ssidsArray[String]

SSIDs that support eduroam

Returns:

  • (Array[String])


35
36
37
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 35

def ssids
  @ssids
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 78

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  # Parameter is an array, so we need to iterate through it
  acct_servers = nil
  unless hash['acct_servers'].nil?
    acct_servers = []
    hash['acct_servers'].each do |structure|
      acct_servers << (SsoMxedgeProxyAcctServer.from_hash(structure) if structure)
    end
  end

  acct_servers = SKIP unless hash.key?('acct_servers')
  # Parameter is an array, so we need to iterate through it
  auth_servers = nil
  unless hash['auth_servers'].nil?
    auth_servers = []
    hash['auth_servers'].each do |structure|
      auth_servers << (SsoMxedgeProxyAuthServer.from_hash(structure) if structure)
    end
  end

  auth_servers = SKIP unless hash.key?('auth_servers')
  mxcluster_id = hash.key?('mxcluster_id') ? hash['mxcluster_id'] : SKIP
  operator_name = hash.key?('operator_name') ? hash['operator_name'] : SKIP
  proxy_hosts = hash.key?('proxy_hosts') ? hash['proxy_hosts'] : SKIP
  ssids = hash.key?('ssids') ? hash['ssids'] : SKIP

  # Create object from extracted values.
  SsoMxedgeProxy.new(acct_servers,
                     auth_servers,
                     mxcluster_id,
                     operator_name,
                     proxy_hosts,
                     ssids)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['acct_servers'] = 'acct_servers'
  @_hash['auth_servers'] = 'auth_servers'
  @_hash['mxcluster_id'] = 'mxcluster_id'
  @_hash['operator_name'] = 'operator_name'
  @_hash['proxy_hosts'] = 'proxy_hosts'
  @_hash['ssids'] = 'ssids'
  @_hash
end

.nullablesObject

An array for nullable fields



62
63
64
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 62

def self.nullables
  []
end

.optionalsObject

An array for optional fields



50
51
52
53
54
55
56
57
58
59
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 50

def self.optionals
  %w[
    acct_servers
    auth_servers
    mxcluster_id
    operator_name
    proxy_hosts
    ssids
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



125
126
127
128
129
130
131
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 125

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} acct_servers: #{@acct_servers.inspect}, auth_servers:"\
  " #{@auth_servers.inspect}, mxcluster_id: #{@mxcluster_id.inspect}, operator_name:"\
  " #{@operator_name.inspect}, proxy_hosts: #{@proxy_hosts.inspect}, ssids:"\
  " #{@ssids.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



117
118
119
120
121
122
# File 'lib/mist_api/models/sso_mxedge_proxy.rb', line 117

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} acct_servers: #{@acct_servers}, auth_servers: #{@auth_servers},"\
  " mxcluster_id: #{@mxcluster_id}, operator_name: #{@operator_name}, proxy_hosts:"\
  " #{@proxy_hosts}, ssids: #{@ssids}>"
end