Class: MistApi::NacPortalGuestPortal
- Defined in:
- lib/mist_api/models/nac_portal_guest_portal.rb
Overview
Guest portal configuration when ‘type`==`guest_portal`. If * `auth`==`none`, the user is presented with a terms of service and can click and continue. * `auth`==`external`, the user is redirected to an external URL for authentication. * `auth`==`multi`, the user is presented with a choice of authentication methods: - social logins: facebook / google / amazon / microsoft / azure - sponsor - sms: supported provider: twillio - email - sso - userpass: pre created guest list
Instance Attribute Summary collapse
-
#auth ⇒ NacPortalGuestPortalAuthEnum
Guest portal authentication type.
-
#expire ⇒ Integer
If ‘auth`==`none` or `auth`==`multi`, whether to expire the guest after a certain time.
-
#external_portal_url ⇒ String
If ‘auth`==`external`, the URL to redirect the user to for authentication.
-
#force_reconnect ⇒ TrueClass | FalseClass
Disconnect client (workaround for reauth issues).
-
#forward ⇒ TrueClass | FalseClass
If ‘auth`==`none` or `auth`==`multi`, whether to forward the user to the guest portal after authentication.
-
#forward_url ⇒ String
If ‘auth`==`none` or `auth`==`multi`, URL to forward the user to after authentication.
-
#max_num_devices ⇒ Integer
Maximum number of clients allowed per guest.
-
#privacy ⇒ TrueClass | FalseClass
If ‘auth`==`none` or `auth`==`multi`, whether to show the privacy policy.
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.
Instance Method Summary collapse
-
#initialize(auth = SKIP, expire = SKIP, external_portal_url = SKIP, force_reconnect = SKIP, forward = SKIP, forward_url = SKIP, max_num_devices = 0, privacy = SKIP) ⇒ NacPortalGuestPortal
constructor
A new instance of NacPortalGuestPortal.
-
#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(auth = SKIP, expire = SKIP, external_portal_url = SKIP, force_reconnect = SKIP, forward = SKIP, forward_url = SKIP, max_num_devices = 0, privacy = SKIP) ⇒ NacPortalGuestPortal
Returns a new instance of NacPortalGuestPortal.
87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 87 def initialize(auth = SKIP, expire = SKIP, external_portal_url = SKIP, force_reconnect = SKIP, forward = SKIP, forward_url = SKIP, max_num_devices = 0, privacy = SKIP) @auth = auth unless auth == SKIP @expire = expire unless expire == SKIP @external_portal_url = external_portal_url unless external_portal_url == SKIP @force_reconnect = force_reconnect unless force_reconnect == SKIP @forward = forward unless forward == SKIP @forward_url = forward_url unless forward_url == SKIP @max_num_devices = max_num_devices unless max_num_devices == SKIP @privacy = privacy unless privacy == SKIP end |
Instance Attribute Details
#auth ⇒ NacPortalGuestPortalAuthEnum
Guest portal authentication type. enum: ‘external`, `multi`, `none`
20 21 22 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 20 def auth @auth end |
#expire ⇒ Integer
If ‘auth`==`none` or `auth`==`multi`, whether to expire the guest after a certain time
25 26 27 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 25 def expire @expire end |
#external_portal_url ⇒ String
If ‘auth`==`external`, the URL to redirect the user to for authentication
29 30 31 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 29 def external_portal_url @external_portal_url end |
#force_reconnect ⇒ TrueClass | FalseClass
Disconnect client (workaround for reauth issues)
33 34 35 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 33 def force_reconnect @force_reconnect end |
#forward ⇒ TrueClass | FalseClass
If ‘auth`==`none` or `auth`==`multi`, whether to forward the user to the guest portal after authentication
38 39 40 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 38 def forward @forward end |
#forward_url ⇒ String
If ‘auth`==`none` or `auth`==`multi`, URL to forward the user to after authentication
43 44 45 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 43 def forward_url @forward_url end |
#max_num_devices ⇒ Integer
Maximum number of clients allowed per guest. 0 (default, unlimited), 1-100 range
48 49 50 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 48 def max_num_devices @max_num_devices end |
#privacy ⇒ TrueClass | FalseClass
If ‘auth`==`none` or `auth`==`multi`, whether to show the privacy policy
52 53 54 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 52 def privacy @privacy end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 101 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auth = hash.key?('auth') ? hash['auth'] : SKIP expire = hash.key?('expire') ? hash['expire'] : SKIP external_portal_url = hash.key?('external_portal_url') ? hash['external_portal_url'] : SKIP force_reconnect = hash.key?('force_reconnect') ? hash['force_reconnect'] : SKIP forward = hash.key?('forward') ? hash['forward'] : SKIP forward_url = hash.key?('forward_url') ? hash['forward_url'] : SKIP max_num_devices = hash['max_num_devices'] ||= 0 privacy = hash.key?('privacy') ? hash['privacy'] : SKIP # Create object from extracted values. NacPortalGuestPortal.new(auth, expire, external_portal_url, force_reconnect, forward, forward_url, max_num_devices, privacy) end |
.names ⇒ Object
A mapping from model property names to API property names.
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 55 def self.names @_hash = {} if @_hash.nil? @_hash['auth'] = 'auth' @_hash['expire'] = 'expire' @_hash['external_portal_url'] = 'external_portal_url' @_hash['force_reconnect'] = 'force_reconnect' @_hash['forward'] = 'forward' @_hash['forward_url'] = 'forward_url' @_hash['max_num_devices'] = 'max_num_devices' @_hash['privacy'] = 'privacy' @_hash end |
.nullables ⇒ Object
An array for nullable fields
83 84 85 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 83 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 69 def self.optionals %w[ auth expire external_portal_url force_reconnect forward forward_url max_num_devices privacy ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
136 137 138 139 140 141 142 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 136 def inspect class_name = self.class.name.split('::').last "<#{class_name} auth: #{@auth.inspect}, expire: #{@expire.inspect}, external_portal_url:"\ " #{@external_portal_url.inspect}, force_reconnect: #{@force_reconnect.inspect}, forward:"\ " #{@forward.inspect}, forward_url: #{@forward_url.inspect}, max_num_devices:"\ " #{@max_num_devices.inspect}, privacy: #{@privacy.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
128 129 130 131 132 133 |
# File 'lib/mist_api/models/nac_portal_guest_portal.rb', line 128 def to_s class_name = self.class.name.split('::').last "<#{class_name} auth: #{@auth}, expire: #{@expire}, external_portal_url:"\ " #{@external_portal_url}, force_reconnect: #{@force_reconnect}, forward: #{@forward},"\ " forward_url: #{@forward_url}, max_num_devices: #{@max_num_devices}, privacy: #{@privacy}>" end |