Class: MistApi::ApClientBridge

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

Overview

ApClientBridge Model.

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(auth = SKIP, enabled = false, ssid = SKIP) ⇒ ApClientBridge

Returns a new instance of ApClientBridge.



51
52
53
54
55
# File 'lib/mist_api/models/ap_client_bridge.rb', line 51

def initialize(auth = SKIP, enabled = false, ssid = SKIP)
  @auth = auth unless auth == SKIP
  @enabled = enabled unless enabled == SKIP
  @ssid = ssid unless ssid == SKIP
end

Instance Attribute Details

#authApClientBridgeAuth

TODO: Write general description for this method

Returns:



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

def auth
  @auth
end

#enabledTrueClass | FalseClass

When acted as client bridge:

* only 5G radio can be used
* will not serve as AP on any radios

Returns:

  • (TrueClass | FalseClass)


20
21
22
# File 'lib/mist_api/models/ap_client_bridge.rb', line 20

def enabled
  @enabled
end

#ssidString

When acted as client bridge:

* only 5G radio can be used
* will not serve as AP on any radios

Returns:

  • (String)


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

def ssid
  @ssid
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/mist_api/models/ap_client_bridge.rb', line 58

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  auth = ApClientBridgeAuth.from_hash(hash['auth']) if hash['auth']
  enabled = hash['enabled'] ||= false
  ssid = hash.key?('ssid') ? hash['ssid'] : SKIP

  # Create object from extracted values.
  ApClientBridge.new(auth,
                     enabled,
                     ssid)
end

.namesObject

A mapping from model property names to API property names.



29
30
31
32
33
34
35
# File 'lib/mist_api/models/ap_client_bridge.rb', line 29

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['auth'] = 'auth'
  @_hash['enabled'] = 'enabled'
  @_hash['ssid'] = 'ssid'
  @_hash
end

.nullablesObject

An array for nullable fields



47
48
49
# File 'lib/mist_api/models/ap_client_bridge.rb', line 47

def self.nullables
  []
end

.optionalsObject

An array for optional fields



38
39
40
41
42
43
44
# File 'lib/mist_api/models/ap_client_bridge.rb', line 38

def self.optionals
  %w[
    auth
    enabled
    ssid
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



79
80
81
82
83
# File 'lib/mist_api/models/ap_client_bridge.rb', line 79

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} auth: #{@auth.inspect}, enabled: #{@enabled.inspect}, ssid:"\
  " #{@ssid.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



73
74
75
76
# File 'lib/mist_api/models/ap_client_bridge.rb', line 73

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} auth: #{@auth}, enabled: #{@enabled}, ssid: #{@ssid}>"
end