petstroepack 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +86 -0
  4. data/lib/ctd_documentation/api_helper.rb +10 -0
  5. data/lib/ctd_documentation/client.rb +140 -0
  6. data/lib/ctd_documentation/configuration.rb +103 -0
  7. data/lib/ctd_documentation/controllers/activities_controller.rb +69 -0
  8. data/lib/ctd_documentation/controllers/alerts_controller.rb +170 -0
  9. data/lib/ctd_documentation/controllers/assets_controller.rb +409 -0
  10. data/lib/ctd_documentation/controllers/base_controller.rb +65 -0
  11. data/lib/ctd_documentation/controllers/custom_attributes_categories_controller.rb +50 -0
  12. data/lib/ctd_documentation/controllers/events_controller.rb +67 -0
  13. data/lib/ctd_documentation/controllers/groups_controller.rb +28 -0
  14. data/lib/ctd_documentation/controllers/insights_controller.rb +111 -0
  15. data/lib/ctd_documentation/controllers/license_controller.rb +73 -0
  16. data/lib/ctd_documentation/controllers/login_controller.rb +31 -0
  17. data/lib/ctd_documentation/controllers/queries_controller.rb +128 -0
  18. data/lib/ctd_documentation/controllers/sensors_controller.rb +26 -0
  19. data/lib/ctd_documentation/controllers/sites_controller.rb +39 -0
  20. data/lib/ctd_documentation/controllers/tasks_controller.rb +148 -0
  21. data/lib/ctd_documentation/controllers/tasks_queries_controller.rb +29 -0
  22. data/lib/ctd_documentation/controllers/users_controller.rb +28 -0
  23. data/lib/ctd_documentation/exceptions/api_exception.rb +10 -0
  24. data/lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb +48 -0
  25. data/lib/ctd_documentation/http/auth/custom_header_auth.rb +25 -0
  26. data/lib/ctd_documentation/http/http_call_back.rb +10 -0
  27. data/lib/ctd_documentation/http/http_method_enum.rb +10 -0
  28. data/lib/ctd_documentation/http/http_request.rb +10 -0
  29. data/lib/ctd_documentation/http/http_response.rb +10 -0
  30. data/lib/ctd_documentation/models/actionable.rb +70 -0
  31. data/lib/ctd_documentation/models/actionable_asset.rb +80 -0
  32. data/lib/ctd_documentation/models/actionable_cap.rb +80 -0
  33. data/lib/ctd_documentation/models/actionable_information.rb +80 -0
  34. data/lib/ctd_documentation/models/actionable_policy.rb +361 -0
  35. data/lib/ctd_documentation/models/actionable_related_asset.rb +142 -0
  36. data/lib/ctd_documentation/models/active_history.rb +311 -0
  37. data/lib/ctd_documentation/models/activities_object.rb +150 -0
  38. data/lib/ctd_documentation/models/activities_response.rb +100 -0
  39. data/lib/ctd_documentation/models/activity.rb +150 -0
  40. data/lib/ctd_documentation/models/add_license_response.rb +79 -0
  41. data/lib/ctd_documentation/models/alert.rb +455 -0
  42. data/lib/ctd_documentation/models/alert_severity_enum.rb +23 -0
  43. data/lib/ctd_documentation/models/asset.rb +527 -0
  44. data/lib/ctd_documentation/models/assets_with_insights.rb +252 -0
  45. data/lib/ctd_documentation/models/assets_with_insights_response.rb +90 -0
  46. data/lib/ctd_documentation/models/authenticate.rb +57 -0
  47. data/lib/ctd_documentation/models/base_model.rb +58 -0
  48. data/lib/ctd_documentation/models/base_task.rb +198 -0
  49. data/lib/ctd_documentation/models/cap.rb +90 -0
  50. data/lib/ctd_documentation/models/code_sections.rb +70 -0
  51. data/lib/ctd_documentation/models/content_type_enum.rb +14 -0
  52. data/lib/ctd_documentation/models/create_a_new_query.rb +57 -0
  53. data/lib/ctd_documentation/models/create_a_new_query_response.rb +57 -0
  54. data/lib/ctd_documentation/models/create_group_response.rb +48 -0
  55. data/lib/ctd_documentation/models/create_user_response.rb +48 -0
  56. data/lib/ctd_documentation/models/createanewtask.rb +57 -0
  57. data/lib/ctd_documentation/models/createanewtask_response.rb +57 -0
  58. data/lib/ctd_documentation/models/ctd_login_exception.rb +81 -0
  59. data/lib/ctd_documentation/models/ctd_login_response.rb +101 -0
  60. data/lib/ctd_documentation/models/custom_attribute_category.rb +90 -0
  61. data/lib/ctd_documentation/models/db_statistics.rb +50 -0
  62. data/lib/ctd_documentation/models/delete_a_query_response.rb +48 -0
  63. data/lib/ctd_documentation/models/delete_a_task_response.rb +48 -0
  64. data/lib/ctd_documentation/models/destination_virtual_zone.rb +60 -0
  65. data/lib/ctd_documentation/models/detail.rb +60 -0
  66. data/lib/ctd_documentation/models/discovery_params.rb +82 -0
  67. data/lib/ctd_documentation/models/entity.rb +70 -0
  68. data/lib/ctd_documentation/models/event.rb +175 -0
  69. data/lib/ctd_documentation/models/find_asset_by_id_response.rb +547 -0
  70. data/lib/ctd_documentation/models/format1_enum.rb +22 -0
  71. data/lib/ctd_documentation/models/format_enum.rb +20 -0
  72. data/lib/ctd_documentation/models/get_active_detection_history_response.rb +90 -0
  73. data/lib/ctd_documentation/models/get_alerts_response.rb +90 -0
  74. data/lib/ctd_documentation/models/get_all_sites_response.rb +90 -0
  75. data/lib/ctd_documentation/models/get_assets_response.rb +90 -0
  76. data/lib/ctd_documentation/models/get_custom_attribute_categories_response.rb +90 -0
  77. data/lib/ctd_documentation/models/get_events_response.rb +90 -0
  78. data/lib/ctd_documentation/models/get_license_details_response.rb +81 -0
  79. data/lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb +70 -0
  80. data/lib/ctd_documentation/models/get_queries_response.rb +90 -0
  81. data/lib/ctd_documentation/models/get_tasks_response.rb +90 -0
  82. data/lib/ctd_documentation/models/get_types_response.rb +57 -0
  83. data/lib/ctd_documentation/models/group.rb +73 -0
  84. data/lib/ctd_documentation/models/identifiable.rb +70 -0
  85. data/lib/ctd_documentation/models/indicator_info.rb +90 -0
  86. data/lib/ctd_documentation/models/indicators.rb +122 -0
  87. data/lib/ctd_documentation/models/information.rb +183 -0
  88. data/lib/ctd_documentation/models/insight_status_enum.rb +20 -0
  89. data/lib/ctd_documentation/models/insight_status_exact1_enum.rb +21 -0
  90. data/lib/ctd_documentation/models/insight_status_exact_enum.rb +20 -0
  91. data/lib/ctd_documentation/models/license_request.rb +48 -0
  92. data/lib/ctd_documentation/models/network.rb +80 -0
  93. data/lib/ctd_documentation/models/new_queryobject.rb +199 -0
  94. data/lib/ctd_documentation/models/new_taskobject.rb +199 -0
  95. data/lib/ctd_documentation/models/object.rb +70 -0
  96. data/lib/ctd_documentation/models/paginated_response.rb +71 -0
  97. data/lib/ctd_documentation/models/policy.rb +331 -0
  98. data/lib/ctd_documentation/models/queryextraparams.rb +60 -0
  99. data/lib/ctd_documentation/models/ranger_system_check_response.rb +57 -0
  100. data/lib/ctd_documentation/models/risk_vector.rb +89 -0
  101. data/lib/ctd_documentation/models/selection_params.rb +58 -0
  102. data/lib/ctd_documentation/models/selection_params1.rb +80 -0
  103. data/lib/ctd_documentation/models/site.rb +256 -0
  104. data/lib/ctd_documentation/models/site_list_slim_enum.rb +14 -0
  105. data/lib/ctd_documentation/models/slim_insight.rb +139 -0
  106. data/lib/ctd_documentation/models/sort1_enum.rb +65 -0
  107. data/lib/ctd_documentation/models/sort31_enum.rb +59 -0
  108. data/lib/ctd_documentation/models/sort3_enum.rb +59 -0
  109. data/lib/ctd_documentation/models/sort41_enum.rb +41 -0
  110. data/lib/ctd_documentation/models/sort4_enum.rb +41 -0
  111. data/lib/ctd_documentation/models/sort5_enum.rb +35 -0
  112. data/lib/ctd_documentation/models/sort6_enum.rb +41 -0
  113. data/lib/ctd_documentation/models/sort_enum.rb +125 -0
  114. data/lib/ctd_documentation/models/source_virtual_zone.rb +60 -0
  115. data/lib/ctd_documentation/models/special_hint_enum.rb +26 -0
  116. data/lib/ctd_documentation/models/special_hint_exact_enum.rb +26 -0
  117. data/lib/ctd_documentation/models/status_enum.rb +17 -0
  118. data/lib/ctd_documentation/models/status_exact_enum.rb +23 -0
  119. data/lib/ctd_documentation/models/subnet.rb +50 -0
  120. data/lib/ctd_documentation/models/task.rb +281 -0
  121. data/lib/ctd_documentation/models/taskextraparams.rb +71 -0
  122. data/lib/ctd_documentation/models/update_a_single_query_response.rb +57 -0
  123. data/lib/ctd_documentation/models/update_a_single_task_response.rb +57 -0
  124. data/lib/ctd_documentation/models/update_license_response.rb +79 -0
  125. data/lib/ctd_documentation/models/user.rb +88 -0
  126. data/lib/ctd_documentation/models/virtual_zones.rb +118 -0
  127. data/lib/ctd_documentation/utilities/date_time_helper.rb +11 -0
  128. data/lib/ctd_documentation/utilities/file_wrapper.rb +16 -0
  129. data/lib/ctd_documentation.rb +155 -0
  130. data/test/controllers/controller_test_base.rb +29 -0
  131. data/test/controllers/test_activities_controller.rb +64 -0
  132. data/test/controllers/test_alerts_controller.rb +16 -0
  133. data/test/controllers/test_assets_controller.rb +79 -0
  134. data/test/controllers/test_custom_attributes_categories_controller.rb +52 -0
  135. data/test/controllers/test_events_controller.rb +55 -0
  136. data/test/controllers/test_login_controller.rb +45 -0
  137. data/test/controllers/test_queries_controller.rb +292 -0
  138. data/test/controllers/test_sites_controller.rb +53 -0
  139. data/test/controllers/test_tasks_controller.rb +250 -0
  140. data/test/http_response_catcher.rb +19 -0
  141. metadata +259 -0
@@ -0,0 +1,547 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # FindAssetByIDResponse Model.
8
+ class FindAssetByIDResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :resource_id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :id
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Integer]
22
+ attr_accessor :site_id
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [TrueClass|FalseClass]
26
+ attr_accessor :approved
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [Integer]
30
+ attr_accessor :asset_type_number
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [String]
34
+ attr_accessor :asset_type_name
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [String]
38
+ attr_accessor :class_type
39
+
40
+ # TODO: Write general description for this method
41
+ # @return [Integer]
42
+ attr_accessor :criticality_number
43
+
44
+ # TODO: Write general description for this method
45
+ # @return [String]
46
+ attr_accessor :criticality_name
47
+
48
+ # TODO: Write general description for this method
49
+ # @return [String]
50
+ attr_accessor :display_name
51
+
52
+ # TODO: Write general description for this method
53
+ # @return [String]
54
+ attr_accessor :first_seen
55
+
56
+ # TODO: Write general description for this method
57
+ # @return [String]
58
+ attr_accessor :last_seen
59
+
60
+ # TODO: Write general description for this method
61
+ # @return [TrueClass|FalseClass]
62
+ attr_accessor :ghost
63
+
64
+ # TODO: Write general description for this method
65
+ # @return [String]
66
+ attr_accessor :hostname
67
+
68
+ # TODO: Write general description for this method
69
+ # @return [Integer]
70
+ attr_accessor :installed_programs_count
71
+
72
+ # TODO: Write general description for this method
73
+ # @return [List of String]
74
+ attr_accessor :mac
75
+
76
+ # TODO: Write general description for this method
77
+ # @return [String]
78
+ attr_accessor :name
79
+
80
+ # TODO: Write general description for this method
81
+ # @return [Integer]
82
+ attr_accessor :network_id
83
+
84
+ # TODO: Write general description for this method
85
+ # @return [Integer]
86
+ attr_accessor :num_alerts
87
+
88
+ # TODO: Write general description for this method
89
+ # @return [Integer]
90
+ attr_accessor :patch_count
91
+
92
+ # TODO: Write general description for this method
93
+ # @return [TrueClass|FalseClass]
94
+ attr_accessor :parsed
95
+
96
+ # TODO: Write general description for this method
97
+ # @return [List of String]
98
+ attr_accessor :protocol
99
+
100
+ # TODO: Write general description for this method
101
+ # @return [Float]
102
+ attr_accessor :purdue_level
103
+
104
+ # TODO: Write general description for this method
105
+ # @return [Integer]
106
+ attr_accessor :risk_level
107
+
108
+ # TODO: Write general description for this method
109
+ # @return [String]
110
+ attr_accessor :site_name
111
+
112
+ # TODO: Write general description for this method
113
+ # @return [Integer]
114
+ attr_accessor :special_hint_number
115
+
116
+ # TODO: Write general description for this method
117
+ # @return [String]
118
+ attr_accessor :special_hint_name
119
+
120
+ # TODO: Write general description for this method
121
+ # @return [List of String]
122
+ attr_accessor :vlan
123
+
124
+ # TODO: Write general description for this method
125
+ # @return [Integer]
126
+ attr_accessor :virtual_zone_id
127
+
128
+ # TODO: Write general description for this method
129
+ # @return [String]
130
+ attr_accessor :virtual_zone_name
131
+
132
+ # TODO: Write general description for this method
133
+ # @return [String]
134
+ attr_accessor :vendor
135
+
136
+ # TODO: Write general description for this method
137
+ # @return [TrueClass|FalseClass]
138
+ attr_accessor :valid
139
+
140
+ # TODO: Write general description for this method
141
+ # @return [Integer]
142
+ attr_accessor :subnet_id
143
+
144
+ # TODO: Write general description for this method
145
+ # @return [Integer]
146
+ attr_accessor :usb_devices_count
147
+
148
+ # TODO: Write general description for this method
149
+ # @return [String]
150
+ attr_accessor :timestamp
151
+
152
+ # TODO: Write general description for this method
153
+ # @return [Network]
154
+ attr_accessor :network
155
+
156
+ # TODO: Write general description for this method
157
+ # @return [List of String]
158
+ attr_accessor :active_queries_names
159
+
160
+ # TODO: Write general description for this method
161
+ # @return [List of String]
162
+ attr_accessor :active_scans_names
163
+
164
+ # TODO: Write general description for this method
165
+ # @return [List of Object]
166
+ attr_accessor :children
167
+
168
+ # TODO: Write general description for this method
169
+ # @return [List of Object]
170
+ attr_accessor :custom_attributes
171
+
172
+ # TODO: Write general description for this method
173
+ # @return [List of Object]
174
+ attr_accessor :custom_informations
175
+
176
+ # TODO: Write general description for this method
177
+ # @return [List of String]
178
+ attr_accessor :insight_names
179
+
180
+ # TODO: Write general description for this method
181
+ # @return [List of CodeSections]
182
+ attr_accessor :code_sections
183
+
184
+ # TODO: Write general description for this method
185
+ # @return [Integer]
186
+ attr_accessor :risk_score
187
+
188
+ # TODO: Write general description for this method
189
+ # @return [List of RiskVector]
190
+ attr_accessor :risk_vectors
191
+
192
+ # A mapping from model property names to API property names.
193
+ def self.names
194
+ @_hash = {} if @_hash.nil?
195
+ @_hash['resource_id'] = 'resource_id'
196
+ @_hash['id'] = 'id'
197
+ @_hash['site_id'] = 'site_id'
198
+ @_hash['approved'] = 'approved'
199
+ @_hash['asset_type_number'] = 'asset_type_number'
200
+ @_hash['asset_type_name'] = 'asset_type_name'
201
+ @_hash['class_type'] = 'class_type'
202
+ @_hash['criticality_number'] = 'criticality_number'
203
+ @_hash['criticality_name'] = 'criticality_name'
204
+ @_hash['display_name'] = 'display_name'
205
+ @_hash['first_seen'] = 'first_seen'
206
+ @_hash['last_seen'] = 'last_seen'
207
+ @_hash['ghost'] = 'ghost'
208
+ @_hash['hostname'] = 'hostname'
209
+ @_hash['installed_programs_count'] = 'installed_programs_count'
210
+ @_hash['mac'] = 'mac'
211
+ @_hash['name'] = 'name'
212
+ @_hash['network_id'] = 'network_id'
213
+ @_hash['num_alerts'] = 'num_alerts'
214
+ @_hash['patch_count'] = 'patch_count'
215
+ @_hash['parsed'] = 'parsed'
216
+ @_hash['protocol'] = 'protocol'
217
+ @_hash['purdue_level'] = 'purdue_level'
218
+ @_hash['risk_level'] = 'risk_level'
219
+ @_hash['site_name'] = 'site_name'
220
+ @_hash['special_hint_number'] = 'special_hint_number'
221
+ @_hash['special_hint_name'] = 'special_hint_name'
222
+ @_hash['vlan'] = 'vlan'
223
+ @_hash['virtual_zone_id'] = 'virtual_zone_id'
224
+ @_hash['virtual_zone_name'] = 'virtual_zone_name'
225
+ @_hash['vendor'] = 'vendor'
226
+ @_hash['valid'] = 'valid'
227
+ @_hash['subnet_id'] = 'subnet_id'
228
+ @_hash['usb_devices_count'] = 'usb_devices_count'
229
+ @_hash['timestamp'] = 'timestamp'
230
+ @_hash['network'] = 'network'
231
+ @_hash['active_queries_names'] = 'active_queries_names'
232
+ @_hash['active_scans_names'] = 'active_scans_names'
233
+ @_hash['children'] = 'children'
234
+ @_hash['custom_attributes'] = 'custom_attributes'
235
+ @_hash['custom_informations'] = 'custom_informations'
236
+ @_hash['insight_names'] = 'insight_names'
237
+ @_hash['code_sections'] = 'code_sections'
238
+ @_hash['risk_score'] = 'risk_score'
239
+ @_hash['risk_vectors'] = 'risk_vectors'
240
+ @_hash
241
+ end
242
+
243
+ # An array for optional fields
244
+ def self.optionals
245
+ %w[
246
+ resource_id
247
+ id
248
+ site_id
249
+ approved
250
+ asset_type_number
251
+ asset_type_name
252
+ class_type
253
+ criticality_number
254
+ criticality_name
255
+ display_name
256
+ first_seen
257
+ last_seen
258
+ ghost
259
+ hostname
260
+ installed_programs_count
261
+ mac
262
+ name
263
+ network_id
264
+ num_alerts
265
+ patch_count
266
+ parsed
267
+ protocol
268
+ purdue_level
269
+ risk_level
270
+ site_name
271
+ special_hint_number
272
+ special_hint_name
273
+ vlan
274
+ virtual_zone_id
275
+ virtual_zone_name
276
+ vendor
277
+ valid
278
+ subnet_id
279
+ usb_devices_count
280
+ timestamp
281
+ network
282
+ active_queries_names
283
+ active_scans_names
284
+ children
285
+ custom_attributes
286
+ custom_informations
287
+ insight_names
288
+ code_sections
289
+ risk_score
290
+ risk_vectors
291
+ ]
292
+ end
293
+
294
+ # An array for nullable fields
295
+ def self.nullables
296
+ []
297
+ end
298
+
299
+ def initialize(resource_id = SKIP,
300
+ id = SKIP,
301
+ site_id = SKIP,
302
+ approved = SKIP,
303
+ asset_type_number = SKIP,
304
+ asset_type_name = SKIP,
305
+ class_type = SKIP,
306
+ criticality_number = SKIP,
307
+ criticality_name = SKIP,
308
+ display_name = SKIP,
309
+ first_seen = SKIP,
310
+ last_seen = SKIP,
311
+ ghost = SKIP,
312
+ hostname = SKIP,
313
+ installed_programs_count = SKIP,
314
+ mac = SKIP,
315
+ name = SKIP,
316
+ network_id = SKIP,
317
+ num_alerts = SKIP,
318
+ patch_count = SKIP,
319
+ parsed = SKIP,
320
+ protocol = SKIP,
321
+ purdue_level = 3,
322
+ risk_level = SKIP,
323
+ site_name = SKIP,
324
+ special_hint_number = SKIP,
325
+ special_hint_name = SKIP,
326
+ vlan = SKIP,
327
+ virtual_zone_id = SKIP,
328
+ virtual_zone_name = SKIP,
329
+ vendor = SKIP,
330
+ valid = SKIP,
331
+ subnet_id = SKIP,
332
+ usb_devices_count = SKIP,
333
+ timestamp = SKIP,
334
+ network = SKIP,
335
+ active_queries_names = SKIP,
336
+ active_scans_names = SKIP,
337
+ children = SKIP,
338
+ custom_attributes = SKIP,
339
+ custom_informations = SKIP,
340
+ insight_names = SKIP,
341
+ code_sections = SKIP,
342
+ risk_score = SKIP,
343
+ risk_vectors = SKIP)
344
+ @resource_id = resource_id unless resource_id == SKIP
345
+ @id = id unless id == SKIP
346
+ @site_id = site_id unless site_id == SKIP
347
+ @approved = approved unless approved == SKIP
348
+ @asset_type_number = asset_type_number unless asset_type_number == SKIP
349
+ @asset_type_name = asset_type_name unless asset_type_name == SKIP
350
+ @class_type = class_type unless class_type == SKIP
351
+ @criticality_number = criticality_number unless criticality_number == SKIP
352
+ @criticality_name = criticality_name unless criticality_name == SKIP
353
+ @display_name = display_name unless display_name == SKIP
354
+ @first_seen = first_seen unless first_seen == SKIP
355
+ @last_seen = last_seen unless last_seen == SKIP
356
+ @ghost = ghost unless ghost == SKIP
357
+ @hostname = hostname unless hostname == SKIP
358
+ @installed_programs_count = installed_programs_count unless installed_programs_count == SKIP
359
+ @mac = mac unless mac == SKIP
360
+ @name = name unless name == SKIP
361
+ @network_id = network_id unless network_id == SKIP
362
+ @num_alerts = num_alerts unless num_alerts == SKIP
363
+ @patch_count = patch_count unless patch_count == SKIP
364
+ @parsed = parsed unless parsed == SKIP
365
+ @protocol = protocol unless protocol == SKIP
366
+ @purdue_level = purdue_level unless purdue_level == SKIP
367
+ @risk_level = risk_level unless risk_level == SKIP
368
+ @site_name = site_name unless site_name == SKIP
369
+ @special_hint_number = special_hint_number unless special_hint_number == SKIP
370
+ @special_hint_name = special_hint_name unless special_hint_name == SKIP
371
+ @vlan = vlan unless vlan == SKIP
372
+ @virtual_zone_id = virtual_zone_id unless virtual_zone_id == SKIP
373
+ @virtual_zone_name = virtual_zone_name unless virtual_zone_name == SKIP
374
+ @vendor = vendor unless vendor == SKIP
375
+ @valid = valid unless valid == SKIP
376
+ @subnet_id = subnet_id unless subnet_id == SKIP
377
+ @usb_devices_count = usb_devices_count unless usb_devices_count == SKIP
378
+ @timestamp = timestamp unless timestamp == SKIP
379
+ @network = network unless network == SKIP
380
+ @active_queries_names = active_queries_names unless active_queries_names == SKIP
381
+ @active_scans_names = active_scans_names unless active_scans_names == SKIP
382
+ @children = children unless children == SKIP
383
+ @custom_attributes = custom_attributes unless custom_attributes == SKIP
384
+ @custom_informations = custom_informations unless custom_informations == SKIP
385
+ @insight_names = insight_names unless insight_names == SKIP
386
+ @code_sections = code_sections unless code_sections == SKIP
387
+ @risk_score = risk_score unless risk_score == SKIP
388
+ @risk_vectors = risk_vectors unless risk_vectors == SKIP
389
+ end
390
+
391
+ # Creates an instance of the object from a hash.
392
+ def self.from_hash(hash)
393
+ return nil unless hash
394
+
395
+ # Extract variables from the hash.
396
+ resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
397
+ id = hash.key?('id') ? hash['id'] : SKIP
398
+ site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
399
+ approved = hash.key?('approved') ? hash['approved'] : SKIP
400
+ asset_type_number =
401
+ hash.key?('asset_type_number') ? hash['asset_type_number'] : SKIP
402
+ asset_type_name =
403
+ hash.key?('asset_type_name') ? hash['asset_type_name'] : SKIP
404
+ class_type = hash.key?('class_type') ? hash['class_type'] : SKIP
405
+ criticality_number =
406
+ hash.key?('criticality_number') ? hash['criticality_number'] : SKIP
407
+ criticality_name =
408
+ hash.key?('criticality_name') ? hash['criticality_name'] : SKIP
409
+ display_name = hash.key?('display_name') ? hash['display_name'] : SKIP
410
+ first_seen = hash.key?('first_seen') ? hash['first_seen'] : SKIP
411
+ last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP
412
+ ghost = hash.key?('ghost') ? hash['ghost'] : SKIP
413
+ hostname = hash.key?('hostname') ? hash['hostname'] : SKIP
414
+ installed_programs_count =
415
+ hash.key?('installed_programs_count') ? hash['installed_programs_count'] : SKIP
416
+ mac = hash.key?('mac') ? hash['mac'] : SKIP
417
+ name = hash.key?('name') ? hash['name'] : SKIP
418
+ network_id = hash.key?('network_id') ? hash['network_id'] : SKIP
419
+ num_alerts = hash.key?('num_alerts') ? hash['num_alerts'] : SKIP
420
+ patch_count = hash.key?('patch_count') ? hash['patch_count'] : SKIP
421
+ parsed = hash.key?('parsed') ? hash['parsed'] : SKIP
422
+ protocol = hash.key?('protocol') ? hash['protocol'] : SKIP
423
+ purdue_level = hash['purdue_level'] ||= 3
424
+ risk_level = hash.key?('risk_level') ? hash['risk_level'] : SKIP
425
+ site_name = hash.key?('site_name') ? hash['site_name'] : SKIP
426
+ special_hint_number =
427
+ hash.key?('special_hint_number') ? hash['special_hint_number'] : SKIP
428
+ special_hint_name =
429
+ hash.key?('special_hint_name') ? hash['special_hint_name'] : SKIP
430
+ vlan = hash.key?('vlan') ? hash['vlan'] : SKIP
431
+ virtual_zone_id =
432
+ hash.key?('virtual_zone_id') ? hash['virtual_zone_id'] : SKIP
433
+ virtual_zone_name =
434
+ hash.key?('virtual_zone_name') ? hash['virtual_zone_name'] : SKIP
435
+ vendor = hash.key?('vendor') ? hash['vendor'] : SKIP
436
+ valid = hash.key?('valid') ? hash['valid'] : SKIP
437
+ subnet_id = hash.key?('subnet_id') ? hash['subnet_id'] : SKIP
438
+ usb_devices_count =
439
+ hash.key?('usb_devices_count') ? hash['usb_devices_count'] : SKIP
440
+ timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
441
+ network = Network.from_hash(hash['network']) if hash['network']
442
+ active_queries_names =
443
+ hash.key?('active_queries_names') ? hash['active_queries_names'] : SKIP
444
+ active_scans_names =
445
+ hash.key?('active_scans_names') ? hash['active_scans_names'] : SKIP
446
+ # Parameter is an array, so we need to iterate through it
447
+ children = nil
448
+ unless hash['children'].nil?
449
+ children = []
450
+ hash['children'].each do |structure|
451
+ children << (Object.from_hash(structure) if structure)
452
+ end
453
+ end
454
+
455
+ children = SKIP unless hash.key?('children')
456
+ # Parameter is an array, so we need to iterate through it
457
+ custom_attributes = nil
458
+ unless hash['custom_attributes'].nil?
459
+ custom_attributes = []
460
+ hash['custom_attributes'].each do |structure|
461
+ custom_attributes << (Object.from_hash(structure) if structure)
462
+ end
463
+ end
464
+
465
+ custom_attributes = SKIP unless hash.key?('custom_attributes')
466
+ # Parameter is an array, so we need to iterate through it
467
+ custom_informations = nil
468
+ unless hash['custom_informations'].nil?
469
+ custom_informations = []
470
+ hash['custom_informations'].each do |structure|
471
+ custom_informations << (Object.from_hash(structure) if structure)
472
+ end
473
+ end
474
+
475
+ custom_informations = SKIP unless hash.key?('custom_informations')
476
+ insight_names = hash.key?('insight_names') ? hash['insight_names'] : SKIP
477
+ # Parameter is an array, so we need to iterate through it
478
+ code_sections = nil
479
+ unless hash['code_sections'].nil?
480
+ code_sections = []
481
+ hash['code_sections'].each do |structure|
482
+ code_sections << (CodeSections.from_hash(structure) if structure)
483
+ end
484
+ end
485
+
486
+ code_sections = SKIP unless hash.key?('code_sections')
487
+ risk_score = hash.key?('risk_score') ? hash['risk_score'] : SKIP
488
+ # Parameter is an array, so we need to iterate through it
489
+ risk_vectors = nil
490
+ unless hash['risk_vectors'].nil?
491
+ risk_vectors = []
492
+ hash['risk_vectors'].each do |structure|
493
+ risk_vectors << (RiskVector.from_hash(structure) if structure)
494
+ end
495
+ end
496
+
497
+ risk_vectors = SKIP unless hash.key?('risk_vectors')
498
+
499
+ # Create object from extracted values.
500
+ FindAssetByIDResponse.new(resource_id,
501
+ id,
502
+ site_id,
503
+ approved,
504
+ asset_type_number,
505
+ asset_type_name,
506
+ class_type,
507
+ criticality_number,
508
+ criticality_name,
509
+ display_name,
510
+ first_seen,
511
+ last_seen,
512
+ ghost,
513
+ hostname,
514
+ installed_programs_count,
515
+ mac,
516
+ name,
517
+ network_id,
518
+ num_alerts,
519
+ patch_count,
520
+ parsed,
521
+ protocol,
522
+ purdue_level,
523
+ risk_level,
524
+ site_name,
525
+ special_hint_number,
526
+ special_hint_name,
527
+ vlan,
528
+ virtual_zone_id,
529
+ virtual_zone_name,
530
+ vendor,
531
+ valid,
532
+ subnet_id,
533
+ usb_devices_count,
534
+ timestamp,
535
+ network,
536
+ active_queries_names,
537
+ active_scans_names,
538
+ children,
539
+ custom_attributes,
540
+ custom_informations,
541
+ insight_names,
542
+ code_sections,
543
+ risk_score,
544
+ risk_vectors)
545
+ end
546
+ end
547
+ end
@@ -0,0 +1,22 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # Specifies the type of response (list of fields) returned by the query. If
8
+ # not provided, all asset's properties will return and could affect
9
+ # performance.
10
+ class Format1Enum
11
+ FORMAT1_ENUM = [
12
+ # TODO: Write general description for ASSET_LIST
13
+ ASSET_LIST = 'asset_list'.freeze,
14
+
15
+ # TODO: Write general description for INSIGHT_ASSETS
16
+ INSIGHT_ASSETS = 'insight_assets'.freeze,
17
+
18
+ # TODO: Write general description for RIDS
19
+ RIDS = 'rids'.freeze
20
+ ].freeze
21
+ end
22
+ end
@@ -0,0 +1,20 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # format.
8
+ class FormatEnum
9
+ FORMAT_ENUM = [
10
+ # TODO: Write general description for ASSET_LIST
11
+ ASSET_LIST = 'asset_list'.freeze,
12
+
13
+ # TODO: Write general description for INSIGHT_ASSETS
14
+ INSIGHT_ASSETS = 'insight_assets'.freeze,
15
+
16
+ # TODO: Write general description for RIDS
17
+ RIDS = 'rids'.freeze
18
+ ].freeze
19
+ end
20
+ end
@@ -0,0 +1,90 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # GetActiveDetectionHistoryResponse Model.
8
+ class GetActiveDetectionHistoryResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :count_filtered
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :count_total
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Integer]
22
+ attr_accessor :count_in_page
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [List of ActiveHistory]
26
+ attr_accessor :objects
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['count_filtered'] = 'count_filtered'
32
+ @_hash['count_total'] = 'count_total'
33
+ @_hash['count_in_page'] = 'count_in_page'
34
+ @_hash['objects'] = 'objects'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ count_filtered
42
+ count_total
43
+ count_in_page
44
+ objects
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(count_filtered = SKIP,
54
+ count_total = SKIP,
55
+ count_in_page = SKIP,
56
+ objects = SKIP)
57
+ @count_filtered = count_filtered unless count_filtered == SKIP
58
+ @count_total = count_total unless count_total == SKIP
59
+ @count_in_page = count_in_page unless count_in_page == SKIP
60
+ @objects = objects unless objects == SKIP
61
+ end
62
+
63
+ # Creates an instance of the object from a hash.
64
+ def self.from_hash(hash)
65
+ return nil unless hash
66
+
67
+ # Extract variables from the hash.
68
+ count_filtered =
69
+ hash.key?('count_filtered') ? hash['count_filtered'] : SKIP
70
+ count_total = hash.key?('count_total') ? hash['count_total'] : SKIP
71
+ count_in_page = hash.key?('count_in_page') ? hash['count_in_page'] : SKIP
72
+ # Parameter is an array, so we need to iterate through it
73
+ objects = nil
74
+ unless hash['objects'].nil?
75
+ objects = []
76
+ hash['objects'].each do |structure|
77
+ objects << (ActiveHistory.from_hash(structure) if structure)
78
+ end
79
+ end
80
+
81
+ objects = SKIP unless hash.key?('objects')
82
+
83
+ # Create object from extracted values.
84
+ GetActiveDetectionHistoryResponse.new(count_filtered,
85
+ count_total,
86
+ count_in_page,
87
+ objects)
88
+ end
89
+ end
90
+ end