petstroepack 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +86 -0
- data/lib/ctd_documentation/api_helper.rb +10 -0
- data/lib/ctd_documentation/client.rb +140 -0
- data/lib/ctd_documentation/configuration.rb +103 -0
- data/lib/ctd_documentation/controllers/activities_controller.rb +69 -0
- data/lib/ctd_documentation/controllers/alerts_controller.rb +170 -0
- data/lib/ctd_documentation/controllers/assets_controller.rb +409 -0
- data/lib/ctd_documentation/controllers/base_controller.rb +65 -0
- data/lib/ctd_documentation/controllers/custom_attributes_categories_controller.rb +50 -0
- data/lib/ctd_documentation/controllers/events_controller.rb +67 -0
- data/lib/ctd_documentation/controllers/groups_controller.rb +28 -0
- data/lib/ctd_documentation/controllers/insights_controller.rb +111 -0
- data/lib/ctd_documentation/controllers/license_controller.rb +73 -0
- data/lib/ctd_documentation/controllers/login_controller.rb +31 -0
- data/lib/ctd_documentation/controllers/queries_controller.rb +128 -0
- data/lib/ctd_documentation/controllers/sensors_controller.rb +26 -0
- data/lib/ctd_documentation/controllers/sites_controller.rb +39 -0
- data/lib/ctd_documentation/controllers/tasks_controller.rb +148 -0
- data/lib/ctd_documentation/controllers/tasks_queries_controller.rb +29 -0
- data/lib/ctd_documentation/controllers/users_controller.rb +28 -0
- data/lib/ctd_documentation/exceptions/api_exception.rb +10 -0
- data/lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb +48 -0
- data/lib/ctd_documentation/http/auth/custom_header_auth.rb +25 -0
- data/lib/ctd_documentation/http/http_call_back.rb +10 -0
- data/lib/ctd_documentation/http/http_method_enum.rb +10 -0
- data/lib/ctd_documentation/http/http_request.rb +10 -0
- data/lib/ctd_documentation/http/http_response.rb +10 -0
- data/lib/ctd_documentation/models/actionable.rb +70 -0
- data/lib/ctd_documentation/models/actionable_asset.rb +80 -0
- data/lib/ctd_documentation/models/actionable_cap.rb +80 -0
- data/lib/ctd_documentation/models/actionable_information.rb +80 -0
- data/lib/ctd_documentation/models/actionable_policy.rb +361 -0
- data/lib/ctd_documentation/models/actionable_related_asset.rb +142 -0
- data/lib/ctd_documentation/models/active_history.rb +311 -0
- data/lib/ctd_documentation/models/activities_object.rb +150 -0
- data/lib/ctd_documentation/models/activities_response.rb +100 -0
- data/lib/ctd_documentation/models/activity.rb +150 -0
- data/lib/ctd_documentation/models/add_license_response.rb +79 -0
- data/lib/ctd_documentation/models/alert.rb +455 -0
- data/lib/ctd_documentation/models/alert_severity_enum.rb +23 -0
- data/lib/ctd_documentation/models/asset.rb +527 -0
- data/lib/ctd_documentation/models/assets_with_insights.rb +252 -0
- data/lib/ctd_documentation/models/assets_with_insights_response.rb +90 -0
- data/lib/ctd_documentation/models/authenticate.rb +57 -0
- data/lib/ctd_documentation/models/base_model.rb +58 -0
- data/lib/ctd_documentation/models/base_task.rb +198 -0
- data/lib/ctd_documentation/models/cap.rb +90 -0
- data/lib/ctd_documentation/models/code_sections.rb +70 -0
- data/lib/ctd_documentation/models/content_type_enum.rb +14 -0
- data/lib/ctd_documentation/models/create_a_new_query.rb +57 -0
- data/lib/ctd_documentation/models/create_a_new_query_response.rb +57 -0
- data/lib/ctd_documentation/models/create_group_response.rb +48 -0
- data/lib/ctd_documentation/models/create_user_response.rb +48 -0
- data/lib/ctd_documentation/models/createanewtask.rb +57 -0
- data/lib/ctd_documentation/models/createanewtask_response.rb +57 -0
- data/lib/ctd_documentation/models/ctd_login_exception.rb +81 -0
- data/lib/ctd_documentation/models/ctd_login_response.rb +101 -0
- data/lib/ctd_documentation/models/custom_attribute_category.rb +90 -0
- data/lib/ctd_documentation/models/db_statistics.rb +50 -0
- data/lib/ctd_documentation/models/delete_a_query_response.rb +48 -0
- data/lib/ctd_documentation/models/delete_a_task_response.rb +48 -0
- data/lib/ctd_documentation/models/destination_virtual_zone.rb +60 -0
- data/lib/ctd_documentation/models/detail.rb +60 -0
- data/lib/ctd_documentation/models/discovery_params.rb +82 -0
- data/lib/ctd_documentation/models/entity.rb +70 -0
- data/lib/ctd_documentation/models/event.rb +175 -0
- data/lib/ctd_documentation/models/find_asset_by_id_response.rb +547 -0
- data/lib/ctd_documentation/models/format1_enum.rb +22 -0
- data/lib/ctd_documentation/models/format_enum.rb +20 -0
- data/lib/ctd_documentation/models/get_active_detection_history_response.rb +90 -0
- data/lib/ctd_documentation/models/get_alerts_response.rb +90 -0
- data/lib/ctd_documentation/models/get_all_sites_response.rb +90 -0
- data/lib/ctd_documentation/models/get_assets_response.rb +90 -0
- data/lib/ctd_documentation/models/get_custom_attribute_categories_response.rb +90 -0
- data/lib/ctd_documentation/models/get_events_response.rb +90 -0
- data/lib/ctd_documentation/models/get_license_details_response.rb +81 -0
- data/lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb +70 -0
- data/lib/ctd_documentation/models/get_queries_response.rb +90 -0
- data/lib/ctd_documentation/models/get_tasks_response.rb +90 -0
- data/lib/ctd_documentation/models/get_types_response.rb +57 -0
- data/lib/ctd_documentation/models/group.rb +73 -0
- data/lib/ctd_documentation/models/identifiable.rb +70 -0
- data/lib/ctd_documentation/models/indicator_info.rb +90 -0
- data/lib/ctd_documentation/models/indicators.rb +122 -0
- data/lib/ctd_documentation/models/information.rb +183 -0
- data/lib/ctd_documentation/models/insight_status_enum.rb +20 -0
- data/lib/ctd_documentation/models/insight_status_exact1_enum.rb +21 -0
- data/lib/ctd_documentation/models/insight_status_exact_enum.rb +20 -0
- data/lib/ctd_documentation/models/license_request.rb +48 -0
- data/lib/ctd_documentation/models/network.rb +80 -0
- data/lib/ctd_documentation/models/new_queryobject.rb +199 -0
- data/lib/ctd_documentation/models/new_taskobject.rb +199 -0
- data/lib/ctd_documentation/models/object.rb +70 -0
- data/lib/ctd_documentation/models/paginated_response.rb +71 -0
- data/lib/ctd_documentation/models/policy.rb +331 -0
- data/lib/ctd_documentation/models/queryextraparams.rb +60 -0
- data/lib/ctd_documentation/models/ranger_system_check_response.rb +57 -0
- data/lib/ctd_documentation/models/risk_vector.rb +89 -0
- data/lib/ctd_documentation/models/selection_params.rb +58 -0
- data/lib/ctd_documentation/models/selection_params1.rb +80 -0
- data/lib/ctd_documentation/models/site.rb +256 -0
- data/lib/ctd_documentation/models/site_list_slim_enum.rb +14 -0
- data/lib/ctd_documentation/models/slim_insight.rb +139 -0
- data/lib/ctd_documentation/models/sort1_enum.rb +65 -0
- data/lib/ctd_documentation/models/sort31_enum.rb +59 -0
- data/lib/ctd_documentation/models/sort3_enum.rb +59 -0
- data/lib/ctd_documentation/models/sort41_enum.rb +41 -0
- data/lib/ctd_documentation/models/sort4_enum.rb +41 -0
- data/lib/ctd_documentation/models/sort5_enum.rb +35 -0
- data/lib/ctd_documentation/models/sort6_enum.rb +41 -0
- data/lib/ctd_documentation/models/sort_enum.rb +125 -0
- data/lib/ctd_documentation/models/source_virtual_zone.rb +60 -0
- data/lib/ctd_documentation/models/special_hint_enum.rb +26 -0
- data/lib/ctd_documentation/models/special_hint_exact_enum.rb +26 -0
- data/lib/ctd_documentation/models/status_enum.rb +17 -0
- data/lib/ctd_documentation/models/status_exact_enum.rb +23 -0
- data/lib/ctd_documentation/models/subnet.rb +50 -0
- data/lib/ctd_documentation/models/task.rb +281 -0
- data/lib/ctd_documentation/models/taskextraparams.rb +71 -0
- data/lib/ctd_documentation/models/update_a_single_query_response.rb +57 -0
- data/lib/ctd_documentation/models/update_a_single_task_response.rb +57 -0
- data/lib/ctd_documentation/models/update_license_response.rb +79 -0
- data/lib/ctd_documentation/models/user.rb +88 -0
- data/lib/ctd_documentation/models/virtual_zones.rb +118 -0
- data/lib/ctd_documentation/utilities/date_time_helper.rb +11 -0
- data/lib/ctd_documentation/utilities/file_wrapper.rb +16 -0
- data/lib/ctd_documentation.rb +155 -0
- data/test/controllers/controller_test_base.rb +29 -0
- data/test/controllers/test_activities_controller.rb +64 -0
- data/test/controllers/test_alerts_controller.rb +16 -0
- data/test/controllers/test_assets_controller.rb +79 -0
- data/test/controllers/test_custom_attributes_categories_controller.rb +52 -0
- data/test/controllers/test_events_controller.rb +55 -0
- data/test/controllers/test_login_controller.rb +45 -0
- data/test/controllers/test_queries_controller.rb +292 -0
- data/test/controllers/test_sites_controller.rb +53 -0
- data/test/controllers/test_tasks_controller.rb +250 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +259 -0
@@ -0,0 +1,361 @@
|
|
1
|
+
# ctd_documentation
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module CtdDocumentation
|
7
|
+
# ActionablePolicy Model.
|
8
|
+
class ActionablePolicy < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Integer]
|
14
|
+
attr_accessor :actionable_id
|
15
|
+
|
16
|
+
# TODO: Write general description for this method
|
17
|
+
# @return [Integer]
|
18
|
+
attr_accessor :role_number
|
19
|
+
|
20
|
+
# TODO: Write general description for this method
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :role_name
|
23
|
+
|
24
|
+
# TODO: Write general description for this method
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :resource_id
|
27
|
+
|
28
|
+
# TODO: Write general description for this method
|
29
|
+
# @return [Integer]
|
30
|
+
attr_accessor :id
|
31
|
+
|
32
|
+
# TODO: Write general description for this method
|
33
|
+
# @return [Integer]
|
34
|
+
attr_accessor :site_id
|
35
|
+
|
36
|
+
# TODO: Write general description for this method
|
37
|
+
# @return [Integer]
|
38
|
+
attr_accessor :action
|
39
|
+
|
40
|
+
# TODO: Write general description for this method
|
41
|
+
# @return [TrueClass|FalseClass]
|
42
|
+
attr_accessor :active
|
43
|
+
|
44
|
+
# TODO: Write general description for this method
|
45
|
+
# @return [Integer]
|
46
|
+
attr_accessor :approved_user_id
|
47
|
+
|
48
|
+
# TODO: Write general description for this method
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :approved_username
|
51
|
+
|
52
|
+
# TODO: Write general description for this method
|
53
|
+
# @return [List of Integer]
|
54
|
+
attr_accessor :categories
|
55
|
+
|
56
|
+
# TODO: Write general description for this method
|
57
|
+
# @return [List of Integer]
|
58
|
+
attr_accessor :categories_access
|
59
|
+
|
60
|
+
# TODO: Write general description for this method
|
61
|
+
# @return [Integer]
|
62
|
+
attr_accessor :cloud_reputation
|
63
|
+
|
64
|
+
# TODO: Write general description for this method
|
65
|
+
# @return [Integer]
|
66
|
+
attr_accessor :created_user_id
|
67
|
+
|
68
|
+
# TODO: Write general description for this method
|
69
|
+
# @return [String]
|
70
|
+
attr_accessor :created_username
|
71
|
+
|
72
|
+
# TODO: Write general description for this method
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :description
|
75
|
+
|
76
|
+
# TODO: Write general description for this method
|
77
|
+
# @return [TrueClass|FalseClass]
|
78
|
+
attr_accessor :full_match
|
79
|
+
|
80
|
+
# TODO: Write general description for this method
|
81
|
+
# @return [Integer]
|
82
|
+
attr_accessor :hit_count
|
83
|
+
|
84
|
+
# TODO: Write general description for this method
|
85
|
+
# @return [List of String]
|
86
|
+
attr_accessor :port_ranges
|
87
|
+
|
88
|
+
# TODO: Write general description for this method
|
89
|
+
# @return [List of String]
|
90
|
+
attr_accessor :ports
|
91
|
+
|
92
|
+
# TODO: Write general description for this method
|
93
|
+
# @return [List of String]
|
94
|
+
attr_accessor :protocols
|
95
|
+
|
96
|
+
# TODO: Write general description for this method
|
97
|
+
# @return [TrueClass|FalseClass]
|
98
|
+
attr_accessor :valid
|
99
|
+
|
100
|
+
# TODO: Write general description for this method
|
101
|
+
# @return [Integer]
|
102
|
+
attr_accessor :state
|
103
|
+
|
104
|
+
# TODO: Write general description for this method
|
105
|
+
# @return [Integer]
|
106
|
+
attr_accessor :usage_percentage
|
107
|
+
|
108
|
+
# TODO: Write general description for this method
|
109
|
+
# @return [Integer]
|
110
|
+
attr_accessor :modified_user_id
|
111
|
+
|
112
|
+
# TODO: Write general description for this method
|
113
|
+
# @return [String]
|
114
|
+
attr_accessor :modified_username
|
115
|
+
|
116
|
+
# TODO: Write general description for this method
|
117
|
+
# @return [String]
|
118
|
+
attr_accessor :last_modified
|
119
|
+
|
120
|
+
# TODO: Write general description for this method
|
121
|
+
# @return [String]
|
122
|
+
attr_accessor :timestamp
|
123
|
+
|
124
|
+
# TODO: Write general description for this method
|
125
|
+
# @return [String]
|
126
|
+
attr_accessor :last_user_modified
|
127
|
+
|
128
|
+
# TODO: Write general description for this method
|
129
|
+
# @return [String]
|
130
|
+
attr_accessor :state_modified
|
131
|
+
|
132
|
+
# TODO: Write general description for this method
|
133
|
+
# @return [VirtualZones]
|
134
|
+
attr_accessor :virtual_zones
|
135
|
+
|
136
|
+
# A mapping from model property names to API property names.
|
137
|
+
def self.names
|
138
|
+
@_hash = {} if @_hash.nil?
|
139
|
+
@_hash['actionable_id'] = 'actionable_id'
|
140
|
+
@_hash['role_number'] = 'role_number'
|
141
|
+
@_hash['role_name'] = 'role_name'
|
142
|
+
@_hash['resource_id'] = 'resource_id'
|
143
|
+
@_hash['id'] = 'id'
|
144
|
+
@_hash['site_id'] = 'site_id'
|
145
|
+
@_hash['action'] = 'action'
|
146
|
+
@_hash['active'] = 'active'
|
147
|
+
@_hash['approved_user_id'] = 'approved_user_id'
|
148
|
+
@_hash['approved_username'] = 'approved_username'
|
149
|
+
@_hash['categories'] = 'categories'
|
150
|
+
@_hash['categories_access'] = 'categories_access'
|
151
|
+
@_hash['cloud_reputation'] = 'cloud_reputation'
|
152
|
+
@_hash['created_user_id'] = 'created_user_id'
|
153
|
+
@_hash['created_username'] = 'created_username'
|
154
|
+
@_hash['description'] = 'description'
|
155
|
+
@_hash['full_match'] = 'full_match'
|
156
|
+
@_hash['hit_count'] = 'hit_count'
|
157
|
+
@_hash['port_ranges'] = 'port_ranges'
|
158
|
+
@_hash['ports'] = 'ports'
|
159
|
+
@_hash['protocols'] = 'protocols'
|
160
|
+
@_hash['valid'] = 'valid'
|
161
|
+
@_hash['state'] = 'state'
|
162
|
+
@_hash['usage_percentage'] = 'usage_percentage'
|
163
|
+
@_hash['modified_user_id'] = 'modified_user_id'
|
164
|
+
@_hash['modified_username'] = 'modified_username'
|
165
|
+
@_hash['last_modified'] = 'last_modified'
|
166
|
+
@_hash['timestamp'] = 'timestamp'
|
167
|
+
@_hash['last_user_modified'] = 'last_user_modified'
|
168
|
+
@_hash['state_modified'] = 'state_modified'
|
169
|
+
@_hash['virtual_zones'] = 'virtual_zones'
|
170
|
+
@_hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# An array for optional fields
|
174
|
+
def self.optionals
|
175
|
+
%w[
|
176
|
+
actionable_id
|
177
|
+
role_number
|
178
|
+
role_name
|
179
|
+
resource_id
|
180
|
+
id
|
181
|
+
site_id
|
182
|
+
action
|
183
|
+
active
|
184
|
+
approved_user_id
|
185
|
+
approved_username
|
186
|
+
categories
|
187
|
+
categories_access
|
188
|
+
cloud_reputation
|
189
|
+
created_user_id
|
190
|
+
created_username
|
191
|
+
description
|
192
|
+
full_match
|
193
|
+
hit_count
|
194
|
+
port_ranges
|
195
|
+
ports
|
196
|
+
protocols
|
197
|
+
valid
|
198
|
+
state
|
199
|
+
usage_percentage
|
200
|
+
modified_user_id
|
201
|
+
modified_username
|
202
|
+
last_modified
|
203
|
+
timestamp
|
204
|
+
last_user_modified
|
205
|
+
state_modified
|
206
|
+
virtual_zones
|
207
|
+
]
|
208
|
+
end
|
209
|
+
|
210
|
+
# An array for nullable fields
|
211
|
+
def self.nullables
|
212
|
+
[]
|
213
|
+
end
|
214
|
+
|
215
|
+
def initialize(actionable_id = SKIP,
|
216
|
+
role_number = SKIP,
|
217
|
+
role_name = SKIP,
|
218
|
+
resource_id = SKIP,
|
219
|
+
id = SKIP,
|
220
|
+
site_id = SKIP,
|
221
|
+
action = SKIP,
|
222
|
+
active = SKIP,
|
223
|
+
approved_user_id = SKIP,
|
224
|
+
approved_username = SKIP,
|
225
|
+
categories = SKIP,
|
226
|
+
categories_access = SKIP,
|
227
|
+
cloud_reputation = SKIP,
|
228
|
+
created_user_id = SKIP,
|
229
|
+
created_username = SKIP,
|
230
|
+
description = SKIP,
|
231
|
+
full_match = SKIP,
|
232
|
+
hit_count = SKIP,
|
233
|
+
port_ranges = SKIP,
|
234
|
+
ports = SKIP,
|
235
|
+
protocols = SKIP,
|
236
|
+
valid = SKIP,
|
237
|
+
state = SKIP,
|
238
|
+
usage_percentage = SKIP,
|
239
|
+
modified_user_id = SKIP,
|
240
|
+
modified_username = SKIP,
|
241
|
+
last_modified = SKIP,
|
242
|
+
timestamp = SKIP,
|
243
|
+
last_user_modified = SKIP,
|
244
|
+
state_modified = SKIP,
|
245
|
+
virtual_zones = SKIP)
|
246
|
+
@actionable_id = actionable_id unless actionable_id == SKIP
|
247
|
+
@role_number = role_number unless role_number == SKIP
|
248
|
+
@role_name = role_name unless role_name == SKIP
|
249
|
+
@resource_id = resource_id unless resource_id == SKIP
|
250
|
+
@id = id unless id == SKIP
|
251
|
+
@site_id = site_id unless site_id == SKIP
|
252
|
+
@action = action unless action == SKIP
|
253
|
+
@active = active unless active == SKIP
|
254
|
+
@approved_user_id = approved_user_id unless approved_user_id == SKIP
|
255
|
+
@approved_username = approved_username unless approved_username == SKIP
|
256
|
+
@categories = categories unless categories == SKIP
|
257
|
+
@categories_access = categories_access unless categories_access == SKIP
|
258
|
+
@cloud_reputation = cloud_reputation unless cloud_reputation == SKIP
|
259
|
+
@created_user_id = created_user_id unless created_user_id == SKIP
|
260
|
+
@created_username = created_username unless created_username == SKIP
|
261
|
+
@description = description unless description == SKIP
|
262
|
+
@full_match = full_match unless full_match == SKIP
|
263
|
+
@hit_count = hit_count unless hit_count == SKIP
|
264
|
+
@port_ranges = port_ranges unless port_ranges == SKIP
|
265
|
+
@ports = ports unless ports == SKIP
|
266
|
+
@protocols = protocols unless protocols == SKIP
|
267
|
+
@valid = valid unless valid == SKIP
|
268
|
+
@state = state unless state == SKIP
|
269
|
+
@usage_percentage = usage_percentage unless usage_percentage == SKIP
|
270
|
+
@modified_user_id = modified_user_id unless modified_user_id == SKIP
|
271
|
+
@modified_username = modified_username unless modified_username == SKIP
|
272
|
+
@last_modified = last_modified unless last_modified == SKIP
|
273
|
+
@timestamp = timestamp unless timestamp == SKIP
|
274
|
+
@last_user_modified = last_user_modified unless last_user_modified == SKIP
|
275
|
+
@state_modified = state_modified unless state_modified == SKIP
|
276
|
+
@virtual_zones = virtual_zones unless virtual_zones == SKIP
|
277
|
+
end
|
278
|
+
|
279
|
+
# Creates an instance of the object from a hash.
|
280
|
+
def self.from_hash(hash)
|
281
|
+
return nil unless hash
|
282
|
+
|
283
|
+
# Extract variables from the hash.
|
284
|
+
actionable_id = hash.key?('actionable_id') ? hash['actionable_id'] : SKIP
|
285
|
+
role_number = hash.key?('role_number') ? hash['role_number'] : SKIP
|
286
|
+
role_name = hash.key?('role_name') ? hash['role_name'] : SKIP
|
287
|
+
resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
|
288
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
289
|
+
site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
|
290
|
+
action = hash.key?('action') ? hash['action'] : SKIP
|
291
|
+
active = hash.key?('active') ? hash['active'] : SKIP
|
292
|
+
approved_user_id =
|
293
|
+
hash.key?('approved_user_id') ? hash['approved_user_id'] : SKIP
|
294
|
+
approved_username =
|
295
|
+
hash.key?('approved_username') ? hash['approved_username'] : SKIP
|
296
|
+
categories = hash.key?('categories') ? hash['categories'] : SKIP
|
297
|
+
categories_access =
|
298
|
+
hash.key?('categories_access') ? hash['categories_access'] : SKIP
|
299
|
+
cloud_reputation =
|
300
|
+
hash.key?('cloud_reputation') ? hash['cloud_reputation'] : SKIP
|
301
|
+
created_user_id =
|
302
|
+
hash.key?('created_user_id') ? hash['created_user_id'] : SKIP
|
303
|
+
created_username =
|
304
|
+
hash.key?('created_username') ? hash['created_username'] : SKIP
|
305
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
306
|
+
full_match = hash.key?('full_match') ? hash['full_match'] : SKIP
|
307
|
+
hit_count = hash.key?('hit_count') ? hash['hit_count'] : SKIP
|
308
|
+
port_ranges = hash.key?('port_ranges') ? hash['port_ranges'] : SKIP
|
309
|
+
ports = hash.key?('ports') ? hash['ports'] : SKIP
|
310
|
+
protocols = hash.key?('protocols') ? hash['protocols'] : SKIP
|
311
|
+
valid = hash.key?('valid') ? hash['valid'] : SKIP
|
312
|
+
state = hash.key?('state') ? hash['state'] : SKIP
|
313
|
+
usage_percentage =
|
314
|
+
hash.key?('usage_percentage') ? hash['usage_percentage'] : SKIP
|
315
|
+
modified_user_id =
|
316
|
+
hash.key?('modified_user_id') ? hash['modified_user_id'] : SKIP
|
317
|
+
modified_username =
|
318
|
+
hash.key?('modified_username') ? hash['modified_username'] : SKIP
|
319
|
+
last_modified = hash.key?('last_modified') ? hash['last_modified'] : SKIP
|
320
|
+
timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
|
321
|
+
last_user_modified =
|
322
|
+
hash.key?('last_user_modified') ? hash['last_user_modified'] : SKIP
|
323
|
+
state_modified =
|
324
|
+
hash.key?('state_modified') ? hash['state_modified'] : SKIP
|
325
|
+
virtual_zones = VirtualZones.from_hash(hash['virtual_zones']) if hash['virtual_zones']
|
326
|
+
|
327
|
+
# Create object from extracted values.
|
328
|
+
ActionablePolicy.new(actionable_id,
|
329
|
+
role_number,
|
330
|
+
role_name,
|
331
|
+
resource_id,
|
332
|
+
id,
|
333
|
+
site_id,
|
334
|
+
action,
|
335
|
+
active,
|
336
|
+
approved_user_id,
|
337
|
+
approved_username,
|
338
|
+
categories,
|
339
|
+
categories_access,
|
340
|
+
cloud_reputation,
|
341
|
+
created_user_id,
|
342
|
+
created_username,
|
343
|
+
description,
|
344
|
+
full_match,
|
345
|
+
hit_count,
|
346
|
+
port_ranges,
|
347
|
+
ports,
|
348
|
+
protocols,
|
349
|
+
valid,
|
350
|
+
state,
|
351
|
+
usage_percentage,
|
352
|
+
modified_user_id,
|
353
|
+
modified_username,
|
354
|
+
last_modified,
|
355
|
+
timestamp,
|
356
|
+
last_user_modified,
|
357
|
+
state_modified,
|
358
|
+
virtual_zones)
|
359
|
+
end
|
360
|
+
end
|
361
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# ctd_documentation
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module CtdDocumentation
|
7
|
+
# ActionableRelatedAsset Model.
|
8
|
+
class ActionableRelatedAsset < 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 [String]
|
18
|
+
attr_accessor :resource_id
|
19
|
+
|
20
|
+
# TODO: Write general description for this method
|
21
|
+
# @return [Integer]
|
22
|
+
attr_accessor :id
|
23
|
+
|
24
|
+
# TODO: Write general description for this method
|
25
|
+
# @return [List of String]
|
26
|
+
attr_accessor :ip
|
27
|
+
|
28
|
+
# TODO: Write general description for this method
|
29
|
+
# @return [List of String]
|
30
|
+
attr_accessor :mac
|
31
|
+
|
32
|
+
# TODO: Write general description for this method
|
33
|
+
# @return [Integer]
|
34
|
+
attr_accessor :asset_type_number
|
35
|
+
|
36
|
+
# TODO: Write general description for this method
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :asset_type_name
|
39
|
+
|
40
|
+
# TODO: Write general description for this method
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :name
|
43
|
+
|
44
|
+
# TODO: Write general description for this method
|
45
|
+
# @return [Integer]
|
46
|
+
attr_accessor :network_id
|
47
|
+
|
48
|
+
# TODO: Write general description for this method
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :vendor
|
51
|
+
|
52
|
+
# A mapping from model property names to API property names.
|
53
|
+
def self.names
|
54
|
+
@_hash = {} if @_hash.nil?
|
55
|
+
@_hash['site_id'] = 'site_id'
|
56
|
+
@_hash['resource_id'] = 'resource_id'
|
57
|
+
@_hash['id'] = 'id'
|
58
|
+
@_hash['ip'] = 'ip'
|
59
|
+
@_hash['mac'] = 'mac'
|
60
|
+
@_hash['asset_type_number'] = 'asset_type_number'
|
61
|
+
@_hash['asset_type_name'] = 'asset_type_name'
|
62
|
+
@_hash['name'] = 'name'
|
63
|
+
@_hash['network_id'] = 'network_id'
|
64
|
+
@_hash['vendor'] = 'vendor'
|
65
|
+
@_hash
|
66
|
+
end
|
67
|
+
|
68
|
+
# An array for optional fields
|
69
|
+
def self.optionals
|
70
|
+
%w[
|
71
|
+
site_id
|
72
|
+
resource_id
|
73
|
+
id
|
74
|
+
ip
|
75
|
+
mac
|
76
|
+
asset_type_number
|
77
|
+
asset_type_name
|
78
|
+
name
|
79
|
+
network_id
|
80
|
+
vendor
|
81
|
+
]
|
82
|
+
end
|
83
|
+
|
84
|
+
# An array for nullable fields
|
85
|
+
def self.nullables
|
86
|
+
[]
|
87
|
+
end
|
88
|
+
|
89
|
+
def initialize(site_id = SKIP,
|
90
|
+
resource_id = SKIP,
|
91
|
+
id = SKIP,
|
92
|
+
ip = SKIP,
|
93
|
+
mac = SKIP,
|
94
|
+
asset_type_number = SKIP,
|
95
|
+
asset_type_name = SKIP,
|
96
|
+
name = SKIP,
|
97
|
+
network_id = SKIP,
|
98
|
+
vendor = SKIP)
|
99
|
+
@site_id = site_id unless site_id == SKIP
|
100
|
+
@resource_id = resource_id unless resource_id == SKIP
|
101
|
+
@id = id unless id == SKIP
|
102
|
+
@ip = ip unless ip == SKIP
|
103
|
+
@mac = mac unless mac == SKIP
|
104
|
+
@asset_type_number = asset_type_number unless asset_type_number == SKIP
|
105
|
+
@asset_type_name = asset_type_name unless asset_type_name == SKIP
|
106
|
+
@name = name unless name == SKIP
|
107
|
+
@network_id = network_id unless network_id == SKIP
|
108
|
+
@vendor = vendor unless vendor == SKIP
|
109
|
+
end
|
110
|
+
|
111
|
+
# Creates an instance of the object from a hash.
|
112
|
+
def self.from_hash(hash)
|
113
|
+
return nil unless hash
|
114
|
+
|
115
|
+
# Extract variables from the hash.
|
116
|
+
site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
|
117
|
+
resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
|
118
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
119
|
+
ip = hash.key?('ip') ? hash['ip'] : SKIP
|
120
|
+
mac = hash.key?('mac') ? hash['mac'] : SKIP
|
121
|
+
asset_type_number =
|
122
|
+
hash.key?('asset_type_number') ? hash['asset_type_number'] : SKIP
|
123
|
+
asset_type_name =
|
124
|
+
hash.key?('asset_type_name') ? hash['asset_type_name'] : SKIP
|
125
|
+
name = hash.key?('name') ? hash['name'] : SKIP
|
126
|
+
network_id = hash.key?('network_id') ? hash['network_id'] : SKIP
|
127
|
+
vendor = hash.key?('vendor') ? hash['vendor'] : SKIP
|
128
|
+
|
129
|
+
# Create object from extracted values.
|
130
|
+
ActionableRelatedAsset.new(site_id,
|
131
|
+
resource_id,
|
132
|
+
id,
|
133
|
+
ip,
|
134
|
+
mac,
|
135
|
+
asset_type_number,
|
136
|
+
asset_type_name,
|
137
|
+
name,
|
138
|
+
network_id,
|
139
|
+
vendor)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|