Class: MistApi::ResponseClientSessionsSearchItem

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

Overview

ResponseClientSessionsSearchItem 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(ap = nil, band = nil, client_manufacture = nil, connect = nil, disconnect = nil, duration = nil, mac = nil, org_id = nil, site_id = nil, ssid = nil, timestamp = nil, wlan_id = nil, tags = SKIP) ⇒ ResponseClientSessionsSearchItem

Returns a new instance of ResponseClientSessionsSearchItem.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 95

def initialize(ap = nil, band = nil, client_manufacture = nil,
               connect = nil, disconnect = nil, duration = nil, mac = nil,
               org_id = nil, site_id = nil, ssid = nil, timestamp = nil,
               wlan_id = nil, tags = SKIP)
  @ap = ap
  @band = band
  @client_manufacture = client_manufacture
  @connect = connect
  @disconnect = disconnect
  @duration = duration
  @mac = mac
  @org_id = org_id
  @site_id = site_id
  @ssid = ssid
  @tags = tags unless tags == SKIP
  @timestamp = timestamp
  @wlan_id = wlan_id
end

Instance Attribute Details

#apString

TODO: Write general description for this method

Returns:

  • (String)


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

def ap
  @ap
end

#bandString

TODO: Write general description for this method

Returns:

  • (String)


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

def band
  @band
end

#client_manufactureString

TODO: Write general description for this method

Returns:

  • (String)


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

def client_manufacture
  @client_manufacture
end

#connectFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def connect
  @connect
end

#disconnectFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def disconnect
  @disconnect
end

#durationFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def duration
  @duration
end

#macString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 38

def mac
  @mac
end

#org_idUUID | String

TODO: Write general description for this method

Returns:

  • (UUID | String)


42
43
44
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 42

def org_id
  @org_id
end

#site_idUUID | String

TODO: Write general description for this method

Returns:

  • (UUID | String)


46
47
48
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 46

def site_id
  @site_id
end

#ssidString

TODO: Write general description for this method

Returns:

  • (String)


50
51
52
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 50

def ssid
  @ssid
end

#tagsArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


54
55
56
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 54

def tags
  @tags
end

#timestampFloat

Epoch (seconds)

Returns:

  • (Float)


58
59
60
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 58

def timestamp
  @timestamp
end

#wlan_idUUID | String

Epoch (seconds)

Returns:

  • (UUID | String)


62
63
64
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 62

def wlan_id
  @wlan_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 115

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
  client_manufacture =
    hash.key?('client_manufacture') ? hash['client_manufacture'] : 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
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : nil
  wlan_id = hash.key?('wlan_id') ? hash['wlan_id'] : nil
  tags = hash.key?('tags') ? hash['tags'] : SKIP

  # Create object from extracted values.
  ResponseClientSessionsSearchItem.new(ap,
                                       band,
                                       client_manufacture,
                                       connect,
                                       disconnect,
                                       duration,
                                       mac,
                                       org_id,
                                       site_id,
                                       ssid,
                                       timestamp,
                                       wlan_id,
                                       tags)
end

.namesObject

A mapping from model property names to API property names.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 65

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['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

.nullablesObject

An array for nullable fields



91
92
93
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 91

def self.nullables
  []
end

.optionalsObject

An array for optional fields



84
85
86
87
88
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 84

def self.optionals
  %w[
    tags
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



160
161
162
163
164
165
166
167
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 160

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}, 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_sObject

Provides a human-readable string representation of the object.



151
152
153
154
155
156
157
# File 'lib/mist_api/models/response_client_sessions_search_item.rb', line 151

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}, mac: #{@mac},"\
  " org_id: #{@org_id}, site_id: #{@site_id}, ssid: #{@ssid}, tags: #{@tags}, timestamp:"\
  " #{@timestamp}, wlan_id: #{@wlan_id}>"
end