Class: MistApi::WirelessClientSession
- Defined in:
- lib/mist_api/models/wireless_client_session.rb
Overview
WirelessClientSession Model.
Instance Attribute Summary collapse
-
#ap ⇒ String
TODO: Write general description for this method.
-
#band ⇒ String
TODO: Write general description for this method.
-
#client_manufacture ⇒ String
TODO: Write general description for this method.
-
#connect ⇒ Integer
TODO: Write general description for this method.
-
#disconnect ⇒ Integer
TODO: Write general description for this method.
-
#duration ⇒ Float
TODO: Write general description for this method.
-
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#mac ⇒ String
TODO: Write general description for this method.
-
#org_id ⇒ UUID | String
TODO: Write general description for this method.
-
#site_id ⇒ UUID | String
TODO: Write general description for this method.
-
#ssid ⇒ String
TODO: Write general description for this method.
-
#tags ⇒ Array[String]
TODO: Write general description for this method.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#wlan_id ⇒ UUID | String
Epoch (seconds).
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 = nil, band = nil, connect = nil, disconnect = nil, duration = nil, mac = nil, org_id = nil, site_id = nil, ssid = nil, timestamp = nil, wlan_id = nil, client_manufacture = SKIP, for_site = SKIP, tags = SKIP) ⇒ WirelessClientSession
constructor
A new instance of WirelessClientSession.
-
#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 = nil, band = nil, connect = nil, disconnect = nil, duration = nil, mac = nil, org_id = nil, site_id = nil, ssid = nil, timestamp = nil, wlan_id = nil, client_manufacture = SKIP, for_site = SKIP, tags = SKIP) ⇒ WirelessClientSession
Returns a new instance of WirelessClientSession.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 104 def initialize(ap = nil, band = nil, connect = nil, disconnect = nil, duration = nil, mac = nil, org_id = nil, site_id = nil, ssid = nil, = nil, wlan_id = nil, client_manufacture = SKIP, for_site = SKIP, = SKIP) @ap = ap @band = band @client_manufacture = client_manufacture unless client_manufacture == SKIP @connect = connect @disconnect = disconnect @duration = duration @for_site = for_site unless for_site == SKIP @mac = mac @org_id = org_id @site_id = site_id @ssid = ssid @tags = unless == SKIP @timestamp = @wlan_id = wlan_id end |
Instance Attribute Details
#ap ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 14 def ap @ap end |
#band ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 18 def band @band end |
#client_manufacture ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 22 def client_manufacture @client_manufacture end |
#connect ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 26 def connect @connect end |
#disconnect ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 30 def disconnect @disconnect end |
#duration ⇒ Float
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 34 def duration @duration end |
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 38 def for_site @for_site end |
#mac ⇒ String
TODO: Write general description for this method
42 43 44 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 42 def mac @mac end |
#org_id ⇒ UUID | String
TODO: Write general description for this method
46 47 48 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 46 def org_id @org_id end |
#site_id ⇒ UUID | String
TODO: Write general description for this method
50 51 52 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 50 def site_id @site_id end |
#ssid ⇒ String
TODO: Write general description for this method
54 55 56 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 54 def ssid @ssid end |
#tags ⇒ Array[String]
TODO: Write general description for this method
58 59 60 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 58 def @tags end |
#timestamp ⇒ Float
Epoch (seconds)
62 63 64 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 62 def @timestamp end |
#wlan_id ⇒ UUID | String
Epoch (seconds)
66 67 68 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 66 def wlan_id @wlan_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 125 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap = hash.key?('ap') ? hash['ap'] : nil band = hash.key?('band') ? hash['band'] : nil connect = hash.key?('connect') ? hash['connect'] : nil disconnect = hash.key?('disconnect') ? hash['disconnect'] : nil duration = hash.key?('duration') ? hash['duration'] : nil mac = hash.key?('mac') ? hash['mac'] : nil org_id = hash.key?('org_id') ? hash['org_id'] : nil site_id = hash.key?('site_id') ? hash['site_id'] : nil ssid = hash.key?('ssid') ? hash['ssid'] : nil = hash.key?('timestamp') ? hash['timestamp'] : nil wlan_id = hash.key?('wlan_id') ? hash['wlan_id'] : nil client_manufacture = hash.key?('client_manufacture') ? hash['client_manufacture'] : SKIP for_site = hash.key?('for_site') ? hash['for_site'] : SKIP = hash.key?('tags') ? hash['tags'] : SKIP # Create object from extracted values. WirelessClientSession.new(ap, band, connect, disconnect, duration, mac, org_id, site_id, ssid, , wlan_id, client_manufacture, for_site, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 69 def self.names @_hash = {} if @_hash.nil? @_hash['ap'] = 'ap' @_hash['band'] = 'band' @_hash['client_manufacture'] = 'client_manufacture' @_hash['connect'] = 'connect' @_hash['disconnect'] = 'disconnect' @_hash['duration'] = 'duration' @_hash['for_site'] = 'for_site' @_hash['mac'] = 'mac' @_hash['org_id'] = 'org_id' @_hash['site_id'] = 'site_id' @_hash['ssid'] = 'ssid' @_hash['tags'] = 'tags' @_hash['timestamp'] = 'timestamp' @_hash['wlan_id'] = 'wlan_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
98 99 100 101 102 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 98 def self.nullables %w[ client_manufacture ] end |
.optionals ⇒ Object
An array for optional fields
89 90 91 92 93 94 95 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 89 def self.optionals %w[ client_manufacture for_site tags ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
172 173 174 175 176 177 178 179 180 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 172 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap.inspect}, band: #{@band.inspect}, client_manufacture:"\ " #{@client_manufacture.inspect}, connect: #{@connect.inspect}, disconnect:"\ " #{@disconnect.inspect}, duration: #{@duration.inspect}, for_site: #{@for_site.inspect},"\ " mac: #{@mac.inspect}, org_id: #{@org_id.inspect}, site_id: #{@site_id.inspect}, ssid:"\ " #{@ssid.inspect}, tags: #{@tags.inspect}, timestamp: #{@timestamp.inspect}, wlan_id:"\ " #{@wlan_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
163 164 165 166 167 168 169 |
# File 'lib/mist_api/models/wireless_client_session.rb', line 163 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap}, band: #{@band}, client_manufacture: #{@client_manufacture},"\ " connect: #{@connect}, disconnect: #{@disconnect}, duration: #{@duration}, for_site:"\ " #{@for_site}, mac: #{@mac}, org_id: #{@org_id}, site_id: #{@site_id}, ssid: #{@ssid},"\ " tags: #{@tags}, timestamp: #{@timestamp}, wlan_id: #{@wlan_id}>" end |