Class: MistApi::NacPortal
- Defined in:
- lib/mist_api/models/nac_portal.rb
Overview
NacPortal Model.
Instance Attribute Summary collapse
-
#access_type ⇒ NacPortalAccessTypeEnum
if ‘type`==`marvis_client`.
-
#additional_cacerts ⇒ Array[String]
Optional list of additional CA certificates to be used.
-
#additional_nac_server_name ⇒ Array[String]
Optional list of additional NAC server names.
-
#bg_image_url ⇒ String
Background image.
-
#cert_expire_time ⇒ Integer
In days.
-
#eap_type ⇒ NacPortalEapTypeEnum
enum: ‘wpa2`, `wpa3`.
-
#enable_telemetry ⇒ TrueClass | FalseClass
Model, version, fingering, events (connecting, disconnect, roaming), which ap.
-
#expiry_notification_time ⇒ Integer
In days.
-
#name ⇒ String
In days.
-
#notify_expiry ⇒ TrueClass | FalseClass
phase 2.
-
#portal ⇒ NacPortalGuestPortal
Guest portal configuration when ‘type`==`guest_portal`.
-
#portal_authorize_jwt_secret ⇒ String
If ‘type`==`guest_portal` and `auth`==`external`, the `portal_authorize_jwt_secret` will be generated.
-
#portal_authorize_url ⇒ String
If ‘type`==`guest_portal` and `auth`==`external`, the `portal_authorize_url` will be generated.
-
#portal_sso_url ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP.
-
#ssid ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP.
-
#sso ⇒ NacPortalSso
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP.
-
#template_url ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP.
-
#thumbnail_url ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP.
-
#tos ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP.
-
#type ⇒ NacPortalTypeEnum
enum: * ‘guest_admin`: NAC-Based Portal Admin for Pre Created Guest Authentication * `guest_portal`: NAC-Based Guest Portal * `marvis_client`.
-
#ui_url ⇒ String
If ‘auth`==`guest_admin`, the URL to the guest admin portal.
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(access_type = NacPortalAccessTypeEnum::WIRELESS, additional_cacerts = SKIP, additional_nac_server_name = SKIP, bg_image_url = SKIP, cert_expire_time = SKIP, eap_type = NacPortalEapTypeEnum::WPA2, enable_telemetry = SKIP, expiry_notification_time = SKIP, name = SKIP, notify_expiry = SKIP, portal = SKIP, portal_authorize_jwt_secret = SKIP, portal_authorize_url = SKIP, portal_sso_url = SKIP, ssid = SKIP, sso = SKIP, template_url = SKIP, thumbnail_url = SKIP, tos = SKIP, type = SKIP, ui_url = SKIP, additional_properties = nil) ⇒ NacPortal
constructor
A new instance of NacPortal.
-
#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(access_type = NacPortalAccessTypeEnum::WIRELESS, additional_cacerts = SKIP, additional_nac_server_name = SKIP, bg_image_url = SKIP, cert_expire_time = SKIP, eap_type = NacPortalEapTypeEnum::WPA2, enable_telemetry = SKIP, expiry_notification_time = SKIP, name = SKIP, notify_expiry = SKIP, portal = SKIP, portal_authorize_jwt_secret = SKIP, portal_authorize_url = SKIP, portal_sso_url = SKIP, ssid = SKIP, sso = SKIP, template_url = SKIP, thumbnail_url = SKIP, tos = SKIP, type = SKIP, ui_url = SKIP, additional_properties = nil) ⇒ NacPortal
Returns a new instance of NacPortal.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/mist_api/models/nac_portal.rb', line 186 def initialize(access_type = NacPortalAccessTypeEnum::WIRELESS, additional_cacerts = SKIP, additional_nac_server_name = SKIP, bg_image_url = SKIP, cert_expire_time = SKIP, eap_type = NacPortalEapTypeEnum::WPA2, enable_telemetry = SKIP, expiry_notification_time = SKIP, name = SKIP, notify_expiry = SKIP, portal = SKIP, = SKIP, = SKIP, portal_sso_url = SKIP, ssid = SKIP, sso = SKIP, template_url = SKIP, thumbnail_url = SKIP, tos = SKIP, type = SKIP, ui_url = SKIP, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @access_type = access_type unless access_type == SKIP @additional_cacerts = additional_cacerts unless additional_cacerts == SKIP unless additional_nac_server_name == SKIP @additional_nac_server_name = additional_nac_server_name end @bg_image_url = bg_image_url unless bg_image_url == SKIP @cert_expire_time = cert_expire_time unless cert_expire_time == SKIP @eap_type = eap_type unless eap_type == SKIP @enable_telemetry = enable_telemetry unless enable_telemetry == SKIP @expiry_notification_time = expiry_notification_time unless expiry_notification_time == SKIP @name = name unless name == SKIP @notify_expiry = notify_expiry unless notify_expiry == SKIP @portal = portal unless portal == SKIP unless == SKIP @portal_authorize_jwt_secret = end @portal_authorize_url = unless == SKIP @portal_sso_url = portal_sso_url unless portal_sso_url == SKIP @ssid = ssid unless ssid == SKIP @sso = sso unless sso == SKIP @template_url = template_url unless template_url == SKIP @thumbnail_url = thumbnail_url unless thumbnail_url == SKIP @tos = tos unless tos == SKIP @type = type unless type == SKIP @ui_url = ui_url unless ui_url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#access_type ⇒ NacPortalAccessTypeEnum
if ‘type`==`marvis_client`. enum: `wireless`, `wireless+wired`
14 15 16 |
# File 'lib/mist_api/models/nac_portal.rb', line 14 def access_type @access_type end |
#additional_cacerts ⇒ Array[String]
Optional list of additional CA certificates to be used
18 19 20 |
# File 'lib/mist_api/models/nac_portal.rb', line 18 def additional_cacerts @additional_cacerts end |
#additional_nac_server_name ⇒ Array[String]
Optional list of additional NAC server names
22 23 24 |
# File 'lib/mist_api/models/nac_portal.rb', line 22 def additional_nac_server_name @additional_nac_server_name end |
#bg_image_url ⇒ String
Background image
26 27 28 |
# File 'lib/mist_api/models/nac_portal.rb', line 26 def bg_image_url @bg_image_url end |
#cert_expire_time ⇒ Integer
In days
30 31 32 |
# File 'lib/mist_api/models/nac_portal.rb', line 30 def cert_expire_time @cert_expire_time end |
#eap_type ⇒ NacPortalEapTypeEnum
enum: ‘wpa2`, `wpa3`
34 35 36 |
# File 'lib/mist_api/models/nac_portal.rb', line 34 def eap_type @eap_type end |
#enable_telemetry ⇒ TrueClass | FalseClass
Model, version, fingering, events (connecting, disconnect, roaming), which ap
39 40 41 |
# File 'lib/mist_api/models/nac_portal.rb', line 39 def enable_telemetry @enable_telemetry end |
#expiry_notification_time ⇒ Integer
In days
43 44 45 |
# File 'lib/mist_api/models/nac_portal.rb', line 43 def expiry_notification_time @expiry_notification_time end |
#name ⇒ String
In days
47 48 49 |
# File 'lib/mist_api/models/nac_portal.rb', line 47 def name @name end |
#notify_expiry ⇒ TrueClass | FalseClass
phase 2
51 52 53 |
# File 'lib/mist_api/models/nac_portal.rb', line 51 def notify_expiry @notify_expiry end |
#portal ⇒ NacPortalGuestPortal
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
67 68 69 |
# File 'lib/mist_api/models/nac_portal.rb', line 67 def portal @portal end |
#portal_authorize_jwt_secret ⇒ String
If ‘type`==`guest_portal` and `auth`==`external`, the `portal_authorize_jwt_secret` will be generated
72 73 74 |
# File 'lib/mist_api/models/nac_portal.rb', line 72 def @portal_authorize_jwt_secret end |
#portal_authorize_url ⇒ String
If ‘type`==`guest_portal` and `auth`==`external`, the `portal_authorize_url` will be generated
77 78 79 |
# File 'lib/mist_api/models/nac_portal.rb', line 77 def @portal_authorize_url end |
#portal_sso_url ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP
83 84 85 |
# File 'lib/mist_api/models/nac_portal.rb', line 83 def portal_sso_url @portal_sso_url end |
#ssid ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP
89 90 91 |
# File 'lib/mist_api/models/nac_portal.rb', line 89 def ssid @ssid end |
#sso ⇒ NacPortalSso
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP
95 96 97 |
# File 'lib/mist_api/models/nac_portal.rb', line 95 def sso @sso end |
#template_url ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP
101 102 103 |
# File 'lib/mist_api/models/nac_portal.rb', line 101 def template_url @template_url end |
#thumbnail_url ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP
107 108 109 |
# File 'lib/mist_api/models/nac_portal.rb', line 107 def thumbnail_url @thumbnail_url end |
#tos ⇒ String
If ‘type`==`guest_portal` or `type`==`guest_admin` and ans SSO is enabled, the `portal_sso_url` will be generated (which needs to be configured in your IDP
113 114 115 |
# File 'lib/mist_api/models/nac_portal.rb', line 113 def tos @tos end |
#type ⇒ NacPortalTypeEnum
enum:
* `guest_admin`: NAC-Based Portal Admin for Pre Created Guest
Authentication
* `guest_portal`: NAC-Based Guest Portal
* `marvis_client`
121 122 123 |
# File 'lib/mist_api/models/nac_portal.rb', line 121 def type @type end |
#ui_url ⇒ String
If ‘auth`==`guest_admin`, the URL to the guest admin portal
125 126 127 |
# File 'lib/mist_api/models/nac_portal.rb', line 125 def ui_url @ui_url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/mist_api/models/nac_portal.rb', line 231 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. access_type = hash['access_type'] ||= NacPortalAccessTypeEnum::WIRELESS additional_cacerts = hash.key?('additional_cacerts') ? hash['additional_cacerts'] : SKIP additional_nac_server_name = hash.key?('additional_nac_server_name') ? hash['additional_nac_server_name'] : SKIP bg_image_url = hash.key?('bg_image_url') ? hash['bg_image_url'] : SKIP cert_expire_time = hash.key?('cert_expire_time') ? hash['cert_expire_time'] : SKIP eap_type = hash['eap_type'] ||= NacPortalEapTypeEnum::WPA2 enable_telemetry = hash.key?('enable_telemetry') ? hash['enable_telemetry'] : SKIP expiry_notification_time = hash.key?('expiry_notification_time') ? hash['expiry_notification_time'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP notify_expiry = hash.key?('notify_expiry') ? hash['notify_expiry'] : SKIP portal = NacPortalGuestPortal.from_hash(hash['portal']) if hash['portal'] = hash.key?('portal_authorize_jwt_secret') ? hash['portal_authorize_jwt_secret'] : SKIP = hash.key?('portal_authorize_url') ? hash['portal_authorize_url'] : SKIP portal_sso_url = hash.key?('portal_sso_url') ? hash['portal_sso_url'] : SKIP ssid = hash.key?('ssid') ? hash['ssid'] : SKIP sso = NacPortalSso.from_hash(hash['sso']) if hash['sso'] template_url = hash.key?('template_url') ? hash['template_url'] : SKIP thumbnail_url = hash.key?('thumbnail_url') ? hash['thumbnail_url'] : SKIP tos = hash.key?('tos') ? hash['tos'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP ui_url = hash.key?('ui_url') ? hash['ui_url'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. NacPortal.new(access_type, additional_cacerts, additional_nac_server_name, bg_image_url, cert_expire_time, eap_type, enable_telemetry, expiry_notification_time, name, notify_expiry, portal, , , portal_sso_url, ssid, sso, template_url, thumbnail_url, tos, type, ui_url, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 |
# File 'lib/mist_api/models/nac_portal.rb', line 128 def self.names @_hash = {} if @_hash.nil? @_hash['access_type'] = 'access_type' @_hash['additional_cacerts'] = 'additional_cacerts' @_hash['additional_nac_server_name'] = 'additional_nac_server_name' @_hash['bg_image_url'] = 'bg_image_url' @_hash['cert_expire_time'] = 'cert_expire_time' @_hash['eap_type'] = 'eap_type' @_hash['enable_telemetry'] = 'enable_telemetry' @_hash['expiry_notification_time'] = 'expiry_notification_time' @_hash['name'] = 'name' @_hash['notify_expiry'] = 'notify_expiry' @_hash['portal'] = 'portal' @_hash['portal_authorize_jwt_secret'] = 'portal_authorize_jwt_secret' @_hash['portal_authorize_url'] = 'portal_authorize_url' @_hash['portal_sso_url'] = 'portal_sso_url' @_hash['ssid'] = 'ssid' @_hash['sso'] = 'sso' @_hash['template_url'] = 'template_url' @_hash['thumbnail_url'] = 'thumbnail_url' @_hash['tos'] = 'tos' @_hash['type'] = 'type' @_hash['ui_url'] = 'ui_url' @_hash end |
.nullables ⇒ Object
An array for nullable fields
182 183 184 |
# File 'lib/mist_api/models/nac_portal.rb', line 182 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/mist_api/models/nac_portal.rb', line 155 def self.optionals %w[ access_type additional_cacerts additional_nac_server_name bg_image_url cert_expire_time eap_type enable_telemetry expiry_notification_time name notify_expiry portal portal_authorize_jwt_secret portal_authorize_url portal_sso_url ssid sso template_url thumbnail_url tos type ui_url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/mist_api/models/nac_portal.rb', line 313 def inspect class_name = self.class.name.split('::').last "<#{class_name} access_type: #{@access_type.inspect}, additional_cacerts:"\ " #{@additional_cacerts.inspect}, additional_nac_server_name:"\ " #{@additional_nac_server_name.inspect}, bg_image_url: #{@bg_image_url.inspect},"\ " cert_expire_time: #{@cert_expire_time.inspect}, eap_type: #{@eap_type.inspect},"\ " enable_telemetry: #{@enable_telemetry.inspect}, expiry_notification_time:"\ " #{@expiry_notification_time.inspect}, name: #{@name.inspect}, notify_expiry:"\ " #{@notify_expiry.inspect}, portal: #{@portal.inspect}, portal_authorize_jwt_secret:"\ " #{@portal_authorize_jwt_secret.inspect}, portal_authorize_url:"\ " #{@portal_authorize_url.inspect}, portal_sso_url: #{@portal_sso_url.inspect}, ssid:"\ " #{@ssid.inspect}, sso: #{@sso.inspect}, template_url: #{@template_url.inspect},"\ " thumbnail_url: #{@thumbnail_url.inspect}, tos: #{@tos.inspect}, type: #{@type.inspect},"\ " ui_url: #{@ui_url.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/mist_api/models/nac_portal.rb', line 298 def to_s class_name = self.class.name.split('::').last "<#{class_name} access_type: #{@access_type}, additional_cacerts: #{@additional_cacerts},"\ " additional_nac_server_name: #{@additional_nac_server_name}, bg_image_url:"\ " #{@bg_image_url}, cert_expire_time: #{@cert_expire_time}, eap_type: #{@eap_type},"\ " enable_telemetry: #{@enable_telemetry}, expiry_notification_time:"\ " #{@expiry_notification_time}, name: #{@name}, notify_expiry: #{@notify_expiry}, portal:"\ " #{@portal}, portal_authorize_jwt_secret: #{@portal_authorize_jwt_secret},"\ " portal_authorize_url: #{@portal_authorize_url}, portal_sso_url: #{@portal_sso_url}, ssid:"\ " #{@ssid}, sso: #{@sso}, template_url: #{@template_url}, thumbnail_url: #{@thumbnail_url},"\ " tos: #{@tos}, type: #{@type}, ui_url: #{@ui_url}, additional_properties:"\ " #{@additional_properties}>" end |