Class: MistApi::StatsApL2tpStatSession
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::StatsApL2tpStatSession
- Defined in:
- lib/mist_api/models/stats_ap_l2tp_stat_session.rb
Overview
StatsApL2tpStatSession Model.
Instance Attribute Summary collapse
-
#local_sid ⇒ Integer
Remote sessions id (dynamically unless Tunnel is said to be static).
-
#remote_id ⇒ String
WxlanTunnel Remote ID (user-configured).
-
#remote_sid ⇒ Integer
Remote sessions id (dynamically unless Tunnel is said to be static).
-
#state ⇒ L2tpStateEnum
enum: ‘established`, `established_with_session`, `idle`, `wait-ctrl-conn`, `wait-ctrl-reply`.
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(local_sid = SKIP, remote_id = SKIP, remote_sid = SKIP, state = SKIP) ⇒ StatsApL2tpStatSession
constructor
A new instance of StatsApL2tpStatSession.
-
#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(local_sid = SKIP, remote_id = SKIP, remote_sid = SKIP, state = SKIP) ⇒ StatsApL2tpStatSession
Returns a new instance of StatsApL2tpStatSession.
58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 58 def initialize(local_sid = SKIP, remote_id = SKIP, remote_sid = SKIP, state = SKIP) @local_sid = local_sid unless local_sid == SKIP @remote_id = remote_id unless remote_id == SKIP @remote_sid = remote_sid unless remote_sid == SKIP @state = state unless state == SKIP end |
Instance Attribute Details
#local_sid ⇒ Integer
Remote sessions id (dynamically unless Tunnel is said to be static)
14 15 16 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 14 def local_sid @local_sid end |
#remote_id ⇒ String
WxlanTunnel Remote ID (user-configured)
18 19 20 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 18 def remote_id @remote_id end |
#remote_sid ⇒ Integer
Remote sessions id (dynamically unless Tunnel is said to be static)
22 23 24 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 22 def remote_sid @remote_sid end |
#state ⇒ L2tpStateEnum
enum: ‘established`, `established_with_session`, `idle`, `wait-ctrl-conn`, `wait-ctrl-reply`
27 28 29 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 27 def state @state end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 67 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. local_sid = hash.key?('local_sid') ? hash['local_sid'] : SKIP remote_id = hash.key?('remote_id') ? hash['remote_id'] : SKIP remote_sid = hash.key?('remote_sid') ? hash['remote_sid'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP # Create object from extracted values. StatsApL2tpStatSession.new(local_sid, remote_id, remote_sid, state) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['local_sid'] = 'local_sid' @_hash['remote_id'] = 'remote_id' @_hash['remote_sid'] = 'remote_sid' @_hash['state'] = 'state' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 53 54 55 56 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 50 def self.nullables %w[ local_sid remote_id remote_sid ] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 40 def self.optionals %w[ local_sid remote_id remote_sid state ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} local_sid: #{@local_sid.inspect}, remote_id: #{@remote_id.inspect},"\ " remote_sid: #{@remote_sid.inspect}, state: #{@state.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 |
# File 'lib/mist_api/models/stats_ap_l2tp_stat_session.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} local_sid: #{@local_sid}, remote_id: #{@remote_id}, remote_sid:"\ " #{@remote_sid}, state: #{@state}>" end |