Class: MistApi::GuestOrg
- Defined in:
- lib/mist_api/models/guest_org.rb
Overview
Guest
Instance Attribute Summary collapse
-
#access_code_email ⇒ String
If ‘auth_method`==`email`, the email address where the authorization code has been sent to.
-
#allow_wlan_id_roam ⇒ TrueClass | FalseClass
Based on the WLAN portal configuration (field ‘allow_wlan_id_roam`), if the user is also authorized on other Guest WLANs of the same Org without reauthentication.
-
#ap_mac ⇒ String
MAC Address of the AP the guest was connected to during the registration process.
-
#auth_method ⇒ String
Type of guest authorization.
-
#authorized ⇒ TrueClass | FalseClass
Whether the guest is current authorized.
-
#authorized_expiring_time ⇒ Float
When the authorization would expire.
-
#authorized_time ⇒ Float
When the guest was authorized.
-
#company ⇒ String
Optional, the info provided by user.
-
#cross_site ⇒ TrueClass | FalseClass
Based on the WLAN portal configuration (field ‘cross_site`), if the user is also authorized on other sites (same `wlan.ssid`) of the same Org without reauthentication.
-
#email ⇒ String
Optional, the info provided by user.
-
#field1 ⇒ String
Optional, the info provided by user.
-
#field2 ⇒ String
Optional, the info provided by user.
-
#field3 ⇒ String
Optional, the info provided by user.
-
#field4 ⇒ String
Optional, the info provided by user.
-
#mac ⇒ String
MAC.
-
#minutes ⇒ Integer
Authorization duration, in minutes.
-
#name ⇒ String
Optional, the info provided by user.
-
#random_mac ⇒ TrueClass | FalseClass
If the client is using a randomized MAC Address to connect the SSID.
-
#ssid ⇒ String
Name of the SSID.
-
#wlan_id ⇒ UUID | String
ID of the WLAN.
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(wlan_id = nil, access_code_email = SKIP, allow_wlan_id_roam = SKIP, ap_mac = SKIP, auth_method = SKIP, authorized = true, authorized_expiring_time = SKIP, authorized_time = SKIP, company = SKIP, cross_site = SKIP, email = SKIP, field1 = SKIP, field2 = SKIP, field3 = SKIP, field4 = SKIP, mac = SKIP, minutes = 1440, name = SKIP, random_mac = SKIP, ssid = SKIP, additional_properties = nil) ⇒ GuestOrg
constructor
A new instance of GuestOrg.
-
#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(wlan_id = nil, access_code_email = SKIP, allow_wlan_id_roam = SKIP, ap_mac = SKIP, auth_method = SKIP, authorized = true, authorized_expiring_time = SKIP, authorized_time = SKIP, company = SKIP, cross_site = SKIP, email = SKIP, field1 = SKIP, field2 = SKIP, field3 = SKIP, field4 = SKIP, mac = SKIP, minutes = 1440, name = SKIP, random_mac = SKIP, ssid = SKIP, additional_properties = nil) ⇒ GuestOrg
Returns a new instance of GuestOrg.
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 180 181 182 183 184 185 186 |
# File 'lib/mist_api/models/guest_org.rb', line 155 def initialize(wlan_id = nil, access_code_email = SKIP, allow_wlan_id_roam = SKIP, ap_mac = SKIP, auth_method = SKIP, = true, = SKIP, = SKIP, company = SKIP, cross_site = SKIP, email = SKIP, field1 = SKIP, field2 = SKIP, field3 = SKIP, field4 = SKIP, mac = SKIP, minutes = 1440, name = SKIP, random_mac = SKIP, ssid = SKIP, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @access_code_email = access_code_email unless access_code_email == SKIP @allow_wlan_id_roam = allow_wlan_id_roam unless allow_wlan_id_roam == SKIP @ap_mac = ap_mac unless ap_mac == SKIP @auth_method = auth_method unless auth_method == SKIP @authorized = unless == SKIP @authorized_expiring_time = unless == SKIP @authorized_time = unless == SKIP @company = company unless company == SKIP @cross_site = cross_site unless cross_site == SKIP @email = email unless email == SKIP @field1 = field1 unless field1 == SKIP @field2 = field2 unless field2 == SKIP @field3 = field3 unless field3 == SKIP @field4 = field4 unless field4 == SKIP @mac = mac unless mac == SKIP @minutes = minutes unless minutes == SKIP @name = name unless name == SKIP @random_mac = random_mac unless random_mac == SKIP @ssid = ssid unless ssid == SKIP @wlan_id = wlan_id @additional_properties = additional_properties end |
Instance Attribute Details
#access_code_email ⇒ String
If ‘auth_method`==`email`, the email address where the authorization code has been sent to
15 16 17 |
# File 'lib/mist_api/models/guest_org.rb', line 15 def access_code_email @access_code_email end |
#allow_wlan_id_roam ⇒ TrueClass | FalseClass
Based on the WLAN portal configuration (field ‘allow_wlan_id_roam`), if the user is also authorized on other Guest WLANs of the same Org without reauthentication
21 22 23 |
# File 'lib/mist_api/models/guest_org.rb', line 21 def allow_wlan_id_roam @allow_wlan_id_roam end |
#ap_mac ⇒ String
MAC Address of the AP the guest was connected to during the registration process
26 27 28 |
# File 'lib/mist_api/models/guest_org.rb', line 26 def ap_mac @ap_mac end |
#auth_method ⇒ String
Type of guest authorization
30 31 32 |
# File 'lib/mist_api/models/guest_org.rb', line 30 def auth_method @auth_method end |
#authorized ⇒ TrueClass | FalseClass
Whether the guest is current authorized
34 35 36 |
# File 'lib/mist_api/models/guest_org.rb', line 34 def @authorized end |
#authorized_expiring_time ⇒ Float
When the authorization would expire
38 39 40 |
# File 'lib/mist_api/models/guest_org.rb', line 38 def @authorized_expiring_time end |
#authorized_time ⇒ Float
When the guest was authorized
42 43 44 |
# File 'lib/mist_api/models/guest_org.rb', line 42 def @authorized_time end |
#company ⇒ String
Optional, the info provided by user
46 47 48 |
# File 'lib/mist_api/models/guest_org.rb', line 46 def company @company end |
#cross_site ⇒ TrueClass | FalseClass
Based on the WLAN portal configuration (field ‘cross_site`), if the user is also authorized on other sites (same `wlan.ssid`) of the same Org without reauthentication
52 53 54 |
# File 'lib/mist_api/models/guest_org.rb', line 52 def cross_site @cross_site end |
#email ⇒ String
Optional, the info provided by user
56 57 58 |
# File 'lib/mist_api/models/guest_org.rb', line 56 def email @email end |
#field1 ⇒ String
Optional, the info provided by user
60 61 62 |
# File 'lib/mist_api/models/guest_org.rb', line 60 def field1 @field1 end |
#field2 ⇒ String
Optional, the info provided by user
64 65 66 |
# File 'lib/mist_api/models/guest_org.rb', line 64 def field2 @field2 end |
#field3 ⇒ String
Optional, the info provided by user
68 69 70 |
# File 'lib/mist_api/models/guest_org.rb', line 68 def field3 @field3 end |
#field4 ⇒ String
Optional, the info provided by user
72 73 74 |
# File 'lib/mist_api/models/guest_org.rb', line 72 def field4 @field4 end |
#mac ⇒ String
MAC
76 77 78 |
# File 'lib/mist_api/models/guest_org.rb', line 76 def mac @mac end |
#minutes ⇒ Integer
Authorization duration, in minutes. Default is 1440 minutes (1 day), maximum is 259200 (180 days)
81 82 83 |
# File 'lib/mist_api/models/guest_org.rb', line 81 def minutes @minutes end |
#name ⇒ String
Optional, the info provided by user
85 86 87 |
# File 'lib/mist_api/models/guest_org.rb', line 85 def name @name end |
#random_mac ⇒ TrueClass | FalseClass
If the client is using a randomized MAC Address to connect the SSID
89 90 91 |
# File 'lib/mist_api/models/guest_org.rb', line 89 def random_mac @random_mac end |
#ssid ⇒ String
Name of the SSID
93 94 95 |
# File 'lib/mist_api/models/guest_org.rb', line 93 def ssid @ssid end |
#wlan_id ⇒ UUID | String
ID of the WLAN
97 98 99 |
# File 'lib/mist_api/models/guest_org.rb', line 97 def wlan_id @wlan_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/mist_api/models/guest_org.rb', line 189 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. wlan_id = hash.key?('wlan_id') ? hash['wlan_id'] : nil access_code_email = hash.key?('access_code_email') ? hash['access_code_email'] : SKIP allow_wlan_id_roam = hash.key?('allow_wlan_id_roam') ? hash['allow_wlan_id_roam'] : SKIP ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : SKIP auth_method = hash.key?('auth_method') ? hash['auth_method'] : SKIP = hash['authorized'] ||= true = hash.key?('authorized_expiring_time') ? hash['authorized_expiring_time'] : SKIP = hash.key?('authorized_time') ? hash['authorized_time'] : SKIP company = hash.key?('company') ? hash['company'] : SKIP cross_site = hash.key?('cross_site') ? hash['cross_site'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP field1 = hash.key?('field1') ? hash['field1'] : SKIP field2 = hash.key?('field2') ? hash['field2'] : SKIP field3 = hash.key?('field3') ? hash['field3'] : SKIP field4 = hash.key?('field4') ? hash['field4'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP minutes = hash['minutes'] ||= 1440 name = hash.key?('name') ? hash['name'] : SKIP random_mac = hash.key?('random_mac') ? hash['random_mac'] : SKIP ssid = hash.key?('ssid') ? hash['ssid'] : 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. GuestOrg.new(wlan_id, access_code_email, allow_wlan_id_roam, ap_mac, auth_method, , , , company, cross_site, email, field1, field2, field3, field4, mac, minutes, name, random_mac, ssid, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
100 101 102 103 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/guest_org.rb', line 100 def self.names @_hash = {} if @_hash.nil? @_hash['access_code_email'] = 'access_code_email' @_hash['allow_wlan_id_roam'] = 'allow_wlan_id_roam' @_hash['ap_mac'] = 'ap_mac' @_hash['auth_method'] = 'auth_method' @_hash['authorized'] = 'authorized' @_hash['authorized_expiring_time'] = 'authorized_expiring_time' @_hash['authorized_time'] = 'authorized_time' @_hash['company'] = 'company' @_hash['cross_site'] = 'cross_site' @_hash['email'] = 'email' @_hash['field1'] = 'field1' @_hash['field2'] = 'field2' @_hash['field3'] = 'field3' @_hash['field4'] = 'field4' @_hash['mac'] = 'mac' @_hash['minutes'] = 'minutes' @_hash['name'] = 'name' @_hash['random_mac'] = 'random_mac' @_hash['ssid'] = 'ssid' @_hash['wlan_id'] = 'wlan_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
151 152 153 |
# File 'lib/mist_api/models/guest_org.rb', line 151 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/mist_api/models/guest_org.rb', line 126 def self.optionals %w[ access_code_email allow_wlan_id_roam ap_mac auth_method authorized authorized_expiring_time authorized_time company cross_site email field1 field2 field3 field4 mac minutes name random_mac ssid ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/mist_api/models/guest_org.rb', line 262 def inspect class_name = self.class.name.split('::').last "<#{class_name} access_code_email: #{@access_code_email.inspect}, allow_wlan_id_roam:"\ " #{@allow_wlan_id_roam.inspect}, ap_mac: #{@ap_mac.inspect}, auth_method:"\ " #{@auth_method.inspect}, authorized: #{@authorized.inspect}, authorized_expiring_time:"\ " #{@authorized_expiring_time.inspect}, authorized_time: #{@authorized_time.inspect},"\ " company: #{@company.inspect}, cross_site: #{@cross_site.inspect}, email:"\ " #{@email.inspect}, field1: #{@field1.inspect}, field2: #{@field2.inspect}, field3:"\ " #{@field3.inspect}, field4: #{@field4.inspect}, mac: #{@mac.inspect}, minutes:"\ " #{@minutes.inspect}, name: #{@name.inspect}, random_mac: #{@random_mac.inspect}, ssid:"\ " #{@ssid.inspect}, wlan_id: #{@wlan_id.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
250 251 252 253 254 255 256 257 258 259 |
# File 'lib/mist_api/models/guest_org.rb', line 250 def to_s class_name = self.class.name.split('::').last "<#{class_name} access_code_email: #{@access_code_email}, allow_wlan_id_roam:"\ " #{@allow_wlan_id_roam}, ap_mac: #{@ap_mac}, auth_method: #{@auth_method}, authorized:"\ " #{@authorized}, authorized_expiring_time: #{@authorized_expiring_time}, authorized_time:"\ " #{@authorized_time}, company: #{@company}, cross_site: #{@cross_site}, email: #{@email},"\ " field1: #{@field1}, field2: #{@field2}, field3: #{@field3}, field4: #{@field4}, mac:"\ " #{@mac}, minutes: #{@minutes}, name: #{@name}, random_mac: #{@random_mac}, ssid: #{@ssid},"\ " wlan_id: #{@wlan_id}, additional_properties: #{@additional_properties}>" end |