Class: MistApi::WlanAirwatch
- Defined in:
- lib/mist_api/models/wlan_airwatch.rb
Overview
Airwatch wlan settings
Instance Attribute Summary collapse
-
#api_key ⇒ String
API Key.
-
#console_url ⇒ String
Console URL.
-
#enabled ⇒ TrueClass | FalseClass
Console URL.
-
#password ⇒ String
Password.
-
#username ⇒ String
Username.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(api_key = SKIP, console_url = SKIP, enabled = false, password = SKIP, username = SKIP) ⇒ WlanAirwatch
constructor
A new instance of WlanAirwatch.
-
#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(api_key = SKIP, console_url = SKIP, enabled = false, password = SKIP, username = SKIP) ⇒ WlanAirwatch
Returns a new instance of WlanAirwatch.
59 60 61 62 63 64 65 66 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 59 def initialize(api_key = SKIP, console_url = SKIP, enabled = false, password = SKIP, username = SKIP) @api_key = api_key unless api_key == SKIP @console_url = console_url unless console_url == SKIP @enabled = enabled unless enabled == SKIP @password = password unless password == SKIP @username = username unless username == SKIP end |
Instance Attribute Details
#api_key ⇒ String
API Key
14 15 16 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 14 def api_key @api_key end |
#console_url ⇒ String
Console URL
18 19 20 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 18 def console_url @console_url end |
#enabled ⇒ TrueClass | FalseClass
Console URL
22 23 24 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 22 def enabled @enabled end |
#password ⇒ String
Password
26 27 28 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 26 def password @password end |
#username ⇒ String
Username
30 31 32 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 30 def username @username end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. api_key = hash.key?('api_key') ? hash['api_key'] : SKIP console_url = hash.key?('console_url') ? hash['console_url'] : SKIP enabled = hash['enabled'] ||= false password = hash.key?('password') ? hash['password'] : SKIP username = hash.key?('username') ? hash['username'] : SKIP # Create object from extracted values. WlanAirwatch.new(api_key, console_url, enabled, password, username) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['api_key'] = 'api_key' @_hash['console_url'] = 'console_url' @_hash['enabled'] = 'enabled' @_hash['password'] = 'password' @_hash['username'] = 'username' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 44 def self.optionals %w[ api_key console_url enabled password username ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
89 90 91 92 93 94 95 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 89 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
105 106 107 108 109 110 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 105 def inspect class_name = self.class.name.split('::').last "<#{class_name} api_key: #{@api_key.inspect}, console_url: #{@console_url.inspect},"\ " enabled: #{@enabled.inspect}, password: #{@password.inspect}, username:"\ " #{@username.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
98 99 100 101 102 |
# File 'lib/mist_api/models/wlan_airwatch.rb', line 98 def to_s class_name = self.class.name.split('::').last "<#{class_name} api_key: #{@api_key}, console_url: #{@console_url}, enabled: #{@enabled},"\ " password: #{@password}, username: #{@username}>" end |