Class: MistApi::WlanHotspot20

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

Overview

Hostspot 2.0 wlan settings

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(domain_name = SKIP, enabled = SKIP, nai_realms = SKIP, operators = SKIP, rcoi = SKIP, venue_name = SKIP) ⇒ WlanHotspot20

Returns a new instance of WlanHotspot20.



65
66
67
68
69
70
71
72
73
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 65

def initialize(domain_name = SKIP, enabled = SKIP, nai_realms = SKIP,
               operators = SKIP, rcoi = SKIP, venue_name = SKIP)
  @domain_name = domain_name unless domain_name == SKIP
  @enabled = enabled unless enabled == SKIP
  @nai_realms = nai_realms unless nai_realms == SKIP
  @operators = operators unless operators == SKIP
  @rcoi = rcoi unless rcoi == SKIP
  @venue_name = venue_name unless venue_name == SKIP
end

Instance Attribute Details

#domain_nameArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


14
15
16
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 14

def domain_name
  @domain_name
end

#enabledTrueClass | FalseClass

Whether to enable hotspot 2.0 config

Returns:

  • (TrueClass | FalseClass)


18
19
20
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 18

def enabled
  @enabled
end

#nai_realmsArray[String]

Whether to enable hotspot 2.0 config

Returns:

  • (Array[String])


22
23
24
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 22

def nai_realms
  @nai_realms
end

#operatorsArray[WlanHotspot20OperatorsItemEnum]

List of operators to support

Returns:



26
27
28
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 26

def operators
  @operators
end

#rcoiArray[String]

List of operators to support

Returns:

  • (Array[String])


30
31
32
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 30

def rcoi
  @rcoi
end

#venue_nameString

Venue name, default is site name

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 34

def venue_name
  @venue_name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 76

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  domain_name = hash.key?('domain_name') ? hash['domain_name'] : SKIP
  enabled = hash.key?('enabled') ? hash['enabled'] : SKIP
  nai_realms = hash.key?('nai_realms') ? hash['nai_realms'] : SKIP
  operators = hash.key?('operators') ? hash['operators'] : SKIP
  rcoi = hash.key?('rcoi') ? hash['rcoi'] : SKIP
  venue_name = hash.key?('venue_name') ? hash['venue_name'] : SKIP

  # Create object from extracted values.
  WlanHotspot20.new(domain_name,
                    enabled,
                    nai_realms,
                    operators,
                    rcoi,
                    venue_name)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['domain_name'] = 'domain_name'
  @_hash['enabled'] = 'enabled'
  @_hash['nai_realms'] = 'nai_realms'
  @_hash['operators'] = 'operators'
  @_hash['rcoi'] = 'rcoi'
  @_hash['venue_name'] = 'venue_name'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    domain_name
    enabled
    nai_realms
    operators
    rcoi
    venue_name
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:

  • The (WlanHotspot20 | Hash)

    value against the validation is performed.



98
99
100
101
102
103
104
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 98

def self.validate(value)
  return true if value.instance_of? self

  return false unless value.instance_of? Hash

  true
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



114
115
116
117
118
119
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 114

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} domain_name: #{@domain_name.inspect}, enabled: #{@enabled.inspect},"\
  " nai_realms: #{@nai_realms.inspect}, operators: #{@operators.inspect}, rcoi:"\
  " #{@rcoi.inspect}, venue_name: #{@venue_name.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



107
108
109
110
111
# File 'lib/mist_api/models/wlan_hotspot20.rb', line 107

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} domain_name: #{@domain_name}, enabled: #{@enabled}, nai_realms:"\
  " #{@nai_realms}, operators: #{@operators}, rcoi: #{@rcoi}, venue_name: #{@venue_name}>"
end