petstroepack 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,71 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # PaginatedResponse Model.
8
+ class PaginatedResponse < 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
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['count_filtered'] = 'count_filtered'
28
+ @_hash['count_total'] = 'count_total'
29
+ @_hash['count_in_page'] = 'count_in_page'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ count_filtered
37
+ count_total
38
+ count_in_page
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(count_filtered = SKIP,
48
+ count_total = SKIP,
49
+ count_in_page = SKIP)
50
+ @count_filtered = count_filtered unless count_filtered == SKIP
51
+ @count_total = count_total unless count_total == SKIP
52
+ @count_in_page = count_in_page unless count_in_page == SKIP
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ count_filtered =
61
+ hash.key?('count_filtered') ? hash['count_filtered'] : SKIP
62
+ count_total = hash.key?('count_total') ? hash['count_total'] : SKIP
63
+ count_in_page = hash.key?('count_in_page') ? hash['count_in_page'] : SKIP
64
+
65
+ # Create object from extracted values.
66
+ PaginatedResponse.new(count_filtered,
67
+ count_total,
68
+ count_in_page)
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,331 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # Policy Model.
8
+ class Policy < 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 [Integer]
26
+ attr_accessor :action
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [TrueClass|FalseClass]
30
+ attr_accessor :active
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [Integer]
34
+ attr_accessor :approved_user_id
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [String]
38
+ attr_accessor :approved_username
39
+
40
+ # TODO: Write general description for this method
41
+ # @return [List of Integer]
42
+ attr_accessor :categories
43
+
44
+ # TODO: Write general description for this method
45
+ # @return [List of Integer]
46
+ attr_accessor :categories_access
47
+
48
+ # TODO: Write general description for this method
49
+ # @return [Integer]
50
+ attr_accessor :cloud_reputation
51
+
52
+ # TODO: Write general description for this method
53
+ # @return [Integer]
54
+ attr_accessor :created_user_id
55
+
56
+ # TODO: Write general description for this method
57
+ # @return [String]
58
+ attr_accessor :created_username
59
+
60
+ # TODO: Write general description for this method
61
+ # @return [String]
62
+ attr_accessor :description
63
+
64
+ # TODO: Write general description for this method
65
+ # @return [TrueClass|FalseClass]
66
+ attr_accessor :full_match
67
+
68
+ # TODO: Write general description for this method
69
+ # @return [Integer]
70
+ attr_accessor :hit_count
71
+
72
+ # TODO: Write general description for this method
73
+ # @return [List of String]
74
+ attr_accessor :port_ranges
75
+
76
+ # TODO: Write general description for this method
77
+ # @return [List of String]
78
+ attr_accessor :ports
79
+
80
+ # TODO: Write general description for this method
81
+ # @return [List of String]
82
+ attr_accessor :protocols
83
+
84
+ # TODO: Write general description for this method
85
+ # @return [TrueClass|FalseClass]
86
+ attr_accessor :valid
87
+
88
+ # TODO: Write general description for this method
89
+ # @return [Integer]
90
+ attr_accessor :state
91
+
92
+ # TODO: Write general description for this method
93
+ # @return [Integer]
94
+ attr_accessor :usage_percentage
95
+
96
+ # TODO: Write general description for this method
97
+ # @return [Integer]
98
+ attr_accessor :modified_user_id
99
+
100
+ # TODO: Write general description for this method
101
+ # @return [String]
102
+ attr_accessor :modified_username
103
+
104
+ # TODO: Write general description for this method
105
+ # @return [String]
106
+ attr_accessor :last_modified
107
+
108
+ # TODO: Write general description for this method
109
+ # @return [String]
110
+ attr_accessor :timestamp
111
+
112
+ # TODO: Write general description for this method
113
+ # @return [String]
114
+ attr_accessor :last_user_modified
115
+
116
+ # TODO: Write general description for this method
117
+ # @return [String]
118
+ attr_accessor :state_modified
119
+
120
+ # TODO: Write general description for this method
121
+ # @return [VirtualZones]
122
+ attr_accessor :virtual_zones
123
+
124
+ # A mapping from model property names to API property names.
125
+ def self.names
126
+ @_hash = {} if @_hash.nil?
127
+ @_hash['resource_id'] = 'resource_id'
128
+ @_hash['id'] = 'id'
129
+ @_hash['site_id'] = 'site_id'
130
+ @_hash['action'] = 'action'
131
+ @_hash['active'] = 'active'
132
+ @_hash['approved_user_id'] = 'approved_user_id'
133
+ @_hash['approved_username'] = 'approved_username'
134
+ @_hash['categories'] = 'categories'
135
+ @_hash['categories_access'] = 'categories_access'
136
+ @_hash['cloud_reputation'] = 'cloud_reputation'
137
+ @_hash['created_user_id'] = 'created_user_id'
138
+ @_hash['created_username'] = 'created_username'
139
+ @_hash['description'] = 'description'
140
+ @_hash['full_match'] = 'full_match'
141
+ @_hash['hit_count'] = 'hit_count'
142
+ @_hash['port_ranges'] = 'port_ranges'
143
+ @_hash['ports'] = 'ports'
144
+ @_hash['protocols'] = 'protocols'
145
+ @_hash['valid'] = 'valid'
146
+ @_hash['state'] = 'state'
147
+ @_hash['usage_percentage'] = 'usage_percentage'
148
+ @_hash['modified_user_id'] = 'modified_user_id'
149
+ @_hash['modified_username'] = 'modified_username'
150
+ @_hash['last_modified'] = 'last_modified'
151
+ @_hash['timestamp'] = 'timestamp'
152
+ @_hash['last_user_modified'] = 'last_user_modified'
153
+ @_hash['state_modified'] = 'state_modified'
154
+ @_hash['virtual_zones'] = 'virtual_zones'
155
+ @_hash
156
+ end
157
+
158
+ # An array for optional fields
159
+ def self.optionals
160
+ %w[
161
+ resource_id
162
+ id
163
+ site_id
164
+ action
165
+ active
166
+ approved_user_id
167
+ approved_username
168
+ categories
169
+ categories_access
170
+ cloud_reputation
171
+ created_user_id
172
+ created_username
173
+ description
174
+ full_match
175
+ hit_count
176
+ port_ranges
177
+ ports
178
+ protocols
179
+ valid
180
+ state
181
+ usage_percentage
182
+ modified_user_id
183
+ modified_username
184
+ last_modified
185
+ timestamp
186
+ last_user_modified
187
+ state_modified
188
+ virtual_zones
189
+ ]
190
+ end
191
+
192
+ # An array for nullable fields
193
+ def self.nullables
194
+ []
195
+ end
196
+
197
+ def initialize(resource_id = SKIP,
198
+ id = SKIP,
199
+ site_id = SKIP,
200
+ action = SKIP,
201
+ active = SKIP,
202
+ approved_user_id = SKIP,
203
+ approved_username = SKIP,
204
+ categories = SKIP,
205
+ categories_access = SKIP,
206
+ cloud_reputation = SKIP,
207
+ created_user_id = SKIP,
208
+ created_username = SKIP,
209
+ description = SKIP,
210
+ full_match = SKIP,
211
+ hit_count = SKIP,
212
+ port_ranges = SKIP,
213
+ ports = SKIP,
214
+ protocols = SKIP,
215
+ valid = SKIP,
216
+ state = SKIP,
217
+ usage_percentage = SKIP,
218
+ modified_user_id = SKIP,
219
+ modified_username = SKIP,
220
+ last_modified = SKIP,
221
+ timestamp = SKIP,
222
+ last_user_modified = SKIP,
223
+ state_modified = SKIP,
224
+ virtual_zones = SKIP)
225
+ @resource_id = resource_id unless resource_id == SKIP
226
+ @id = id unless id == SKIP
227
+ @site_id = site_id unless site_id == SKIP
228
+ @action = action unless action == SKIP
229
+ @active = active unless active == SKIP
230
+ @approved_user_id = approved_user_id unless approved_user_id == SKIP
231
+ @approved_username = approved_username unless approved_username == SKIP
232
+ @categories = categories unless categories == SKIP
233
+ @categories_access = categories_access unless categories_access == SKIP
234
+ @cloud_reputation = cloud_reputation unless cloud_reputation == SKIP
235
+ @created_user_id = created_user_id unless created_user_id == SKIP
236
+ @created_username = created_username unless created_username == SKIP
237
+ @description = description unless description == SKIP
238
+ @full_match = full_match unless full_match == SKIP
239
+ @hit_count = hit_count unless hit_count == SKIP
240
+ @port_ranges = port_ranges unless port_ranges == SKIP
241
+ @ports = ports unless ports == SKIP
242
+ @protocols = protocols unless protocols == SKIP
243
+ @valid = valid unless valid == SKIP
244
+ @state = state unless state == SKIP
245
+ @usage_percentage = usage_percentage unless usage_percentage == SKIP
246
+ @modified_user_id = modified_user_id unless modified_user_id == SKIP
247
+ @modified_username = modified_username unless modified_username == SKIP
248
+ @last_modified = last_modified unless last_modified == SKIP
249
+ @timestamp = timestamp unless timestamp == SKIP
250
+ @last_user_modified = last_user_modified unless last_user_modified == SKIP
251
+ @state_modified = state_modified unless state_modified == SKIP
252
+ @virtual_zones = virtual_zones unless virtual_zones == SKIP
253
+ end
254
+
255
+ # Creates an instance of the object from a hash.
256
+ def self.from_hash(hash)
257
+ return nil unless hash
258
+
259
+ # Extract variables from the hash.
260
+ resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
261
+ id = hash.key?('id') ? hash['id'] : SKIP
262
+ site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
263
+ action = hash.key?('action') ? hash['action'] : SKIP
264
+ active = hash.key?('active') ? hash['active'] : SKIP
265
+ approved_user_id =
266
+ hash.key?('approved_user_id') ? hash['approved_user_id'] : SKIP
267
+ approved_username =
268
+ hash.key?('approved_username') ? hash['approved_username'] : SKIP
269
+ categories = hash.key?('categories') ? hash['categories'] : SKIP
270
+ categories_access =
271
+ hash.key?('categories_access') ? hash['categories_access'] : SKIP
272
+ cloud_reputation =
273
+ hash.key?('cloud_reputation') ? hash['cloud_reputation'] : SKIP
274
+ created_user_id =
275
+ hash.key?('created_user_id') ? hash['created_user_id'] : SKIP
276
+ created_username =
277
+ hash.key?('created_username') ? hash['created_username'] : SKIP
278
+ description = hash.key?('description') ? hash['description'] : SKIP
279
+ full_match = hash.key?('full_match') ? hash['full_match'] : SKIP
280
+ hit_count = hash.key?('hit_count') ? hash['hit_count'] : SKIP
281
+ port_ranges = hash.key?('port_ranges') ? hash['port_ranges'] : SKIP
282
+ ports = hash.key?('ports') ? hash['ports'] : SKIP
283
+ protocols = hash.key?('protocols') ? hash['protocols'] : SKIP
284
+ valid = hash.key?('valid') ? hash['valid'] : SKIP
285
+ state = hash.key?('state') ? hash['state'] : SKIP
286
+ usage_percentage =
287
+ hash.key?('usage_percentage') ? hash['usage_percentage'] : SKIP
288
+ modified_user_id =
289
+ hash.key?('modified_user_id') ? hash['modified_user_id'] : SKIP
290
+ modified_username =
291
+ hash.key?('modified_username') ? hash['modified_username'] : SKIP
292
+ last_modified = hash.key?('last_modified') ? hash['last_modified'] : SKIP
293
+ timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
294
+ last_user_modified =
295
+ hash.key?('last_user_modified') ? hash['last_user_modified'] : SKIP
296
+ state_modified =
297
+ hash.key?('state_modified') ? hash['state_modified'] : SKIP
298
+ virtual_zones = VirtualZones.from_hash(hash['virtual_zones']) if hash['virtual_zones']
299
+
300
+ # Create object from extracted values.
301
+ Policy.new(resource_id,
302
+ id,
303
+ site_id,
304
+ action,
305
+ active,
306
+ approved_user_id,
307
+ approved_username,
308
+ categories,
309
+ categories_access,
310
+ cloud_reputation,
311
+ created_user_id,
312
+ created_username,
313
+ description,
314
+ full_match,
315
+ hit_count,
316
+ port_ranges,
317
+ ports,
318
+ protocols,
319
+ valid,
320
+ state,
321
+ usage_percentage,
322
+ modified_user_id,
323
+ modified_username,
324
+ last_modified,
325
+ timestamp,
326
+ last_user_modified,
327
+ state_modified,
328
+ virtual_zones)
329
+ end
330
+ end
331
+ end
@@ -0,0 +1,60 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # Queryextraparams Model.
8
+ class Queryextraparams < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :sub_query
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :b_r_snmp_port
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['sub_query'] = 'sub_query'
24
+ @_hash['b_r_snmp_port'] = 'B&R-SNMP_port'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ sub_query
32
+ b_r_snmp_port
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(sub_query = SKIP,
42
+ b_r_snmp_port = SKIP)
43
+ @sub_query = sub_query unless sub_query == SKIP
44
+ @b_r_snmp_port = b_r_snmp_port unless b_r_snmp_port == SKIP
45
+ end
46
+
47
+ # Creates an instance of the object from a hash.
48
+ def self.from_hash(hash)
49
+ return nil unless hash
50
+
51
+ # Extract variables from the hash.
52
+ sub_query = hash.key?('sub_query') ? hash['sub_query'] : SKIP
53
+ b_r_snmp_port = hash.key?('B&R-SNMP_port') ? hash['B&R-SNMP_port'] : SKIP
54
+
55
+ # Create object from extracted values.
56
+ Queryextraparams.new(sub_query,
57
+ b_r_snmp_port)
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,57 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # RangerSystemCheckResponse Model.
8
+ class RangerSystemCheckResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Object]
14
+ attr_accessor :data
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [TrueClass|FalseClass]
18
+ attr_accessor :success
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['data'] = 'data'
24
+ @_hash['success'] = 'success'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(data = nil,
39
+ success = nil)
40
+ @data = data
41
+ @success = success
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+ data = Object.from_hash(hash['data']) if hash['data']
50
+ success = hash.key?('success') ? hash['success'] : nil
51
+
52
+ # Create object from extracted values.
53
+ RangerSystemCheckResponse.new(data,
54
+ success)
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,89 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # RiskVector Model.
8
+ class RiskVector < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [List of Detail]
14
+ attr_accessor :details
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :name
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Float]
22
+ attr_accessor :scale
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Float]
26
+ attr_accessor :score
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['details'] = 'details'
32
+ @_hash['name'] = 'name'
33
+ @_hash['scale'] = 'scale'
34
+ @_hash['score'] = 'score'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ details
42
+ name
43
+ scale
44
+ score
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(details = SKIP,
54
+ name = SKIP,
55
+ scale = SKIP,
56
+ score = SKIP)
57
+ @details = details unless details == SKIP
58
+ @name = name unless name == SKIP
59
+ @scale = scale unless scale == SKIP
60
+ @score = score unless score == 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
+ # Parameter is an array, so we need to iterate through it
69
+ details = nil
70
+ unless hash['details'].nil?
71
+ details = []
72
+ hash['details'].each do |structure|
73
+ details << (Detail.from_hash(structure) if structure)
74
+ end
75
+ end
76
+
77
+ details = SKIP unless hash.key?('details')
78
+ name = hash.key?('name') ? hash['name'] : SKIP
79
+ scale = hash.key?('scale') ? hash['scale'] : SKIP
80
+ score = hash.key?('score') ? hash['score'] : SKIP
81
+
82
+ # Create object from extracted values.
83
+ RiskVector.new(details,
84
+ name,
85
+ scale,
86
+ score)
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,58 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # SelectionParams Model.
8
+ class SelectionParams < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :site_id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [SelectionParams1]
18
+ attr_accessor :selection_params
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['site_id'] = 'site_id'
24
+ @_hash['selection_params'] = 'selection_params'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(site_id = nil,
39
+ selection_params = nil)
40
+ @site_id = site_id
41
+ @selection_params = selection_params
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+ site_id = hash.key?('site_id') ? hash['site_id'] : nil
50
+ selection_params = SelectionParams1.from_hash(hash['selection_params']) if
51
+ hash['selection_params']
52
+
53
+ # Create object from extracted values.
54
+ SelectionParams.new(site_id,
55
+ selection_params)
56
+ end
57
+ end
58
+ end