Class: MistApi::WxlanTunnelSession
- Defined in:
- lib/mist_api/models/wxlan_tunnel_session.rb
Overview
WxlanTunnelSession Model.
Instance Attribute Summary collapse
-
#ap_as_session_id ⇒ String
If ‘use_ap_as_session_ids`==`true`, only apmac is supported right now.
-
#comment ⇒ String
Optional, user-specified string for display purpose.
-
#enable_cookie ⇒ TrueClass | FalseClass
Optional, user-specified string for display purpose.
-
#ethertype ⇒ WxlanTunnelSessionEthertypeEnum
enum: ‘ethernet`, `vlan`.
-
#local_session_id ⇒ Integer
1-2147483647.
-
#pseudo_802_1ad_enabled ⇒ TrueClass | FalseClass
Optional.
-
#remote_id ⇒ String
Remote-id of the session, has to be unique in the same tunnel.
-
#remote_session_id ⇒ Integer
1-2147483647.
-
#use_ap_as_session_ids ⇒ TrueClass | FalseClass
Whether to use AP (last 4 bytes of MAC currently) as session ids.
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(ap_as_session_id = SKIP, comment = SKIP, enable_cookie = SKIP, ethertype = SKIP, local_session_id = SKIP, pseudo_802_1ad_enabled = false, remote_id = SKIP, remote_session_id = SKIP, use_ap_as_session_ids = false) ⇒ WxlanTunnelSession
constructor
A new instance of WxlanTunnelSession.
-
#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(ap_as_session_id = SKIP, comment = SKIP, enable_cookie = SKIP, ethertype = SKIP, local_session_id = SKIP, pseudo_802_1ad_enabled = false, remote_id = SKIP, remote_session_id = SKIP, use_ap_as_session_ids = false) ⇒ WxlanTunnelSession
Returns a new instance of WxlanTunnelSession.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 86 def initialize(ap_as_session_id = SKIP, comment = SKIP, = SKIP, ethertype = SKIP, local_session_id = SKIP, pseudo_802_1ad_enabled = false, remote_id = SKIP, remote_session_id = SKIP, use_ap_as_session_ids = false) @ap_as_session_id = ap_as_session_id unless ap_as_session_id == SKIP @comment = comment unless comment == SKIP @enable_cookie = unless == SKIP @ethertype = ethertype unless ethertype == SKIP @local_session_id = local_session_id unless local_session_id == SKIP @pseudo_802_1ad_enabled = pseudo_802_1ad_enabled unless pseudo_802_1ad_enabled == SKIP @remote_id = remote_id unless remote_id == SKIP @remote_session_id = remote_session_id unless remote_session_id == SKIP @use_ap_as_session_ids = use_ap_as_session_ids unless use_ap_as_session_ids == SKIP end |
Instance Attribute Details
#ap_as_session_id ⇒ String
If ‘use_ap_as_session_ids`==`true`, only apmac is supported right now. This is the name WLAN should use for wxtunnel_remote_id
15 16 17 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 15 def ap_as_session_id @ap_as_session_id end |
#comment ⇒ String
Optional, user-specified string for display purpose
19 20 21 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 19 def comment @comment end |
#enable_cookie ⇒ TrueClass | FalseClass
Optional, user-specified string for display purpose
23 24 25 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 23 def @enable_cookie end |
#ethertype ⇒ WxlanTunnelSessionEthertypeEnum
enum: ‘ethernet`, `vlan`
27 28 29 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 27 def ethertype @ethertype end |
#local_session_id ⇒ Integer
1-2147483647
31 32 33 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 31 def local_session_id @local_session_id end |
#pseudo_802_1ad_enabled ⇒ TrueClass | FalseClass
Optional. Enables the pseudo 802.1ad QinQ mode where the AP device drops the outer vlan tag (QinQ). This mode is useful when tunneling Mist AP’s to some aggregation routers.
37 38 39 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 37 def pseudo_802_1ad_enabled @pseudo_802_1ad_enabled end |
#remote_id ⇒ String
Remote-id of the session, has to be unique in the same tunnel
41 42 43 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 41 def remote_id @remote_id end |
#remote_session_id ⇒ Integer
1-2147483647
45 46 47 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 45 def remote_session_id @remote_session_id end |
#use_ap_as_session_ids ⇒ TrueClass | FalseClass
Whether to use AP (last 4 bytes of MAC currently) as session ids
49 50 51 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 49 def use_ap_as_session_ids @use_ap_as_session_ids end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 103 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap_as_session_id = hash.key?('ap_as_session_id') ? hash['ap_as_session_id'] : SKIP comment = hash.key?('comment') ? hash['comment'] : SKIP = hash.key?('enable_cookie') ? hash['enable_cookie'] : SKIP ethertype = hash.key?('ethertype') ? hash['ethertype'] : SKIP local_session_id = hash.key?('local_session_id') ? hash['local_session_id'] : SKIP pseudo_802_1ad_enabled = hash['pseudo_802.1ad_enabled'] ||= false remote_id = hash.key?('remote_id') ? hash['remote_id'] : SKIP remote_session_id = hash.key?('remote_session_id') ? hash['remote_session_id'] : SKIP use_ap_as_session_ids = hash['use_ap_as_session_ids'] ||= false # Create object from extracted values. WxlanTunnelSession.new(ap_as_session_id, comment, , ethertype, local_session_id, pseudo_802_1ad_enabled, remote_id, remote_session_id, use_ap_as_session_ids) end |
.names ⇒ Object
A mapping from model property names to API property names.
52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 52 def self.names @_hash = {} if @_hash.nil? @_hash['ap_as_session_id'] = 'ap_as_session_id' @_hash['comment'] = 'comment' @_hash['enable_cookie'] = 'enable_cookie' @_hash['ethertype'] = 'ethertype' @_hash['local_session_id'] = 'local_session_id' @_hash['pseudo_802_1ad_enabled'] = 'pseudo_802.1ad_enabled' @_hash['remote_id'] = 'remote_id' @_hash['remote_session_id'] = 'remote_session_id' @_hash['use_ap_as_session_ids'] = 'use_ap_as_session_ids' @_hash end |
.nullables ⇒ Object
An array for nullable fields
82 83 84 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 82 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 67 def self.optionals %w[ ap_as_session_id comment enable_cookie ethertype local_session_id pseudo_802_1ad_enabled remote_id remote_session_id use_ap_as_session_ids ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
143 144 145 146 147 148 149 150 151 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 143 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap_as_session_id: #{@ap_as_session_id.inspect}, comment:"\ " #{@comment.inspect}, enable_cookie: #{@enable_cookie.inspect}, ethertype:"\ " #{@ethertype.inspect}, local_session_id: #{@local_session_id.inspect},"\ " pseudo_802_1ad_enabled: #{@pseudo_802_1ad_enabled.inspect}, remote_id:"\ " #{@remote_id.inspect}, remote_session_id: #{@remote_session_id.inspect},"\ " use_ap_as_session_ids: #{@use_ap_as_session_ids.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
133 134 135 136 137 138 139 140 |
# File 'lib/mist_api/models/wxlan_tunnel_session.rb', line 133 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap_as_session_id: #{@ap_as_session_id}, comment: #{@comment},"\ " enable_cookie: #{@enable_cookie}, ethertype: #{@ethertype}, local_session_id:"\ " #{@local_session_id}, pseudo_802_1ad_enabled: #{@pseudo_802_1ad_enabled}, remote_id:"\ " #{@remote_id}, remote_session_id: #{@remote_session_id}, use_ap_as_session_ids:"\ " #{@use_ap_as_session_ids}>" end |