Class: UntitledApi::ApiV1SitesPcapsCaptureResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb

Overview

Response data

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(timestamp = SKIP, id = SKIP, org_id = SKIP, site_id = SKIP, aps = SKIP, ssid = SKIP, client_mac = SKIP, type = SKIP, max_num_packets = SKIP, max_pkt_len = SKIP, include_mcast = SKIP, duration = SKIP, enabled = SKIP, expiry = SKIP, ap_count = SKIP, invalid_aps = SKIP, format = SKIP, raw = SKIP, tcpdump_parser_expression = SKIP, custom_lib = SKIP) ⇒ ApiV1SitesPcapsCaptureResponse

Returns a new instance of ApiV1SitesPcapsCaptureResponse.



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 149

def initialize(timestamp = SKIP,
               id = SKIP,
               org_id = SKIP,
               site_id = SKIP,
               aps = SKIP,
               ssid = SKIP,
               client_mac = SKIP,
               type = SKIP,
               max_num_packets = SKIP,
               max_pkt_len = SKIP,
               include_mcast = SKIP,
               duration = SKIP,
               enabled = SKIP,
               expiry = SKIP,
               ap_count = SKIP,
               invalid_aps = SKIP,
               format = SKIP,
               raw = SKIP,
               tcpdump_parser_expression = SKIP,
               custom_lib = SKIP)
  @timestamp = timestamp unless timestamp == SKIP
  @id = id unless id == SKIP
  @org_id = org_id unless org_id == SKIP
  @site_id = site_id unless site_id == SKIP
  @aps = aps unless aps == SKIP
  @ssid = ssid unless ssid == SKIP
  @client_mac = client_mac unless client_mac == SKIP
  @type = type unless type == SKIP
  @max_num_packets = max_num_packets unless max_num_packets == SKIP
  @max_pkt_len = max_pkt_len unless max_pkt_len == SKIP
  @include_mcast = include_mcast unless include_mcast == SKIP
  @duration = duration unless duration == SKIP
  @enabled = enabled unless enabled == SKIP
  @expiry = expiry unless expiry == SKIP
  @ap_count = ap_count unless ap_count == SKIP
  @invalid_aps = invalid_aps unless invalid_aps == SKIP
  @format = format unless format == SKIP
  @raw = raw unless raw == SKIP
  unless tcpdump_parser_expression == SKIP
    @tcpdump_parser_expression =
      tcpdump_parser_expression
  end
  @custom_lib = custom_lib unless custom_lib == SKIP
end

Instance Attribute Details

#ap_countFloat

TODO: Write general description for this method

Returns:

  • (Float)


70
71
72
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 70

def ap_count
  @ap_count
end

#apsObject

TODO: Write general description for this method

Returns:

  • (Object)


30
31
32
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 30

def aps
  @aps
end

#client_macObject

TODO: Write general description for this method

Returns:

  • (Object)


38
39
40
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 38

def client_mac
  @client_mac
end

#custom_libObject

TODO: Write general description for this method

Returns:

  • (Object)


90
91
92
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 90

def custom_lib
  @custom_lib
end

#durationFloat

TODO: Write general description for this method

Returns:

  • (Float)


58
59
60
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 58

def duration
  @duration
end

#enabledObject

TODO: Write general description for this method

Returns:

  • (Object)


62
63
64
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 62

def enabled
  @enabled
end

#expiryFloat

TODO: Write general description for this method

Returns:

  • (Float)


66
67
68
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 66

def expiry
  @expiry
end

#formatString

TODO: Write general description for this method

Returns:

  • (String)


78
79
80
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 78

def format
  @format
end

#idString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 18

def id
  @id
end

#include_mcastObject

TODO: Write general description for this method

Returns:

  • (Object)


54
55
56
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 54

def include_mcast
  @include_mcast
end

#invalid_apsObject

TODO: Write general description for this method

Returns:

  • (Object)


74
75
76
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 74

def invalid_aps
  @invalid_aps
end

#max_num_packetsFloat

TODO: Write general description for this method

Returns:

  • (Float)


46
47
48
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 46

def max_num_packets
  @max_num_packets
end

#max_pkt_lenFloat

TODO: Write general description for this method

Returns:

  • (Float)


50
51
52
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 50

def max_pkt_len
  @max_pkt_len
end

#org_idString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 22

def org_id
  @org_id
end

#rawObject

TODO: Write general description for this method

Returns:

  • (Object)


82
83
84
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 82

def raw
  @raw
end

#site_idString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 26

def site_id
  @site_id
end

#ssidString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 34

def ssid
  @ssid
end

#tcpdump_parser_expressionObject

TODO: Write general description for this method

Returns:

  • (Object)


86
87
88
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 86

def tcpdump_parser_expression
  @tcpdump_parser_expression
end

#timestampFloat

TODO: Write general description for this method

Returns:

  • (Float)


14
15
16
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 14

def timestamp
  @timestamp
end

#typeString

TODO: Write general description for this method

Returns:

  • (String)


42
43
44
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 42

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 195

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  aps = hash.key?('aps') ? hash['aps'] : SKIP
  ssid = hash.key?('ssid') ? hash['ssid'] : SKIP
  client_mac = hash.key?('client_mac') ? hash['client_mac'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  max_num_packets =
    hash.key?('max_num_packets') ? hash['max_num_packets'] : SKIP
  max_pkt_len = hash.key?('max_pkt_len') ? hash['max_pkt_len'] : SKIP
  include_mcast = hash.key?('include_mcast') ? hash['include_mcast'] : SKIP
  duration = hash.key?('duration') ? hash['duration'] : SKIP
  enabled = hash.key?('enabled') ? hash['enabled'] : SKIP
  expiry = hash.key?('expiry') ? hash['expiry'] : SKIP
  ap_count = hash.key?('ap_count') ? hash['ap_count'] : SKIP
  invalid_aps = hash.key?('invalid_aps') ? hash['invalid_aps'] : SKIP
  format = hash.key?('format') ? hash['format'] : SKIP
  raw = hash.key?('raw') ? hash['raw'] : SKIP
  tcpdump_parser_expression =
    hash.key?('tcpdump_parser_expression') ? hash['tcpdump_parser_expression'] : SKIP
  custom_lib = hash.key?('custom_lib') ? hash['custom_lib'] : SKIP

  # Create object from extracted values.
  ApiV1SitesPcapsCaptureResponse.new(timestamp,
                                     id,
                                     org_id,
                                     site_id,
                                     aps,
                                     ssid,
                                     client_mac,
                                     type,
                                     max_num_packets,
                                     max_pkt_len,
                                     include_mcast,
                                     duration,
                                     enabled,
                                     expiry,
                                     ap_count,
                                     invalid_aps,
                                     format,
                                     raw,
                                     tcpdump_parser_expression,
                                     custom_lib)
end

.namesObject

A mapping from model property names to API property names.



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 93

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['timestamp'] = 'timestamp'
  @_hash['id'] = 'id'
  @_hash['org_id'] = 'org_id'
  @_hash['site_id'] = 'site_id'
  @_hash['aps'] = 'aps'
  @_hash['ssid'] = 'ssid'
  @_hash['client_mac'] = 'client_mac'
  @_hash['type'] = 'type'
  @_hash['max_num_packets'] = 'max_num_packets'
  @_hash['max_pkt_len'] = 'max_pkt_len'
  @_hash['include_mcast'] = 'include_mcast'
  @_hash['duration'] = 'duration'
  @_hash['enabled'] = 'enabled'
  @_hash['expiry'] = 'expiry'
  @_hash['ap_count'] = 'ap_count'
  @_hash['invalid_aps'] = 'invalid_aps'
  @_hash['format'] = 'format'
  @_hash['raw'] = 'raw'
  @_hash['tcpdump_parser_expression'] = 'tcpdump_parser_expression'
  @_hash['custom_lib'] = 'custom_lib'
  @_hash
end

.nullablesObject

An array for nullable fields



145
146
147
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 145

def self.nullables
  []
end

.optionalsObject

An array for optional fields



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/untitled_api/models/api_v1_sites_pcaps_capture_response.rb', line 119

def self.optionals
  %w[
    timestamp
    id
    org_id
    site_id
    aps
    ssid
    client_mac
    type
    max_num_packets
    max_pkt_len
    include_mcast
    duration
    enabled
    expiry
    ap_count
    invalid_aps
    format
    raw
    tcpdump_parser_expression
    custom_lib
  ]
end