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,311 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # ActiveHistory Model.
8
+ class ActiveHistory < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # A string that represents specific days in a week, Sunday being 0 and
13
+ # Friday being 6. To select more than a specific day just concatenate the
14
+ # day number to the string
15
+ # @return [String]
16
+ attr_accessor :allowed_days
17
+
18
+ # A string that represents specific days in a week, Sunday being 0 and
19
+ # Friday being 6. To select more than a specific day just concatenate the
20
+ # day number to the string
21
+ # @return [String]
22
+ attr_accessor :allowed_run_time_end
23
+
24
+ # A string that represents specific days in a week, Sunday being 0 and
25
+ # Friday being 6. To select more than a specific day just concatenate the
26
+ # day number to the string
27
+ # @return [String]
28
+ attr_accessor :allowed_run_time_start
29
+
30
+ # A string that represents specific days in a week, Sunday being 0 and
31
+ # Friday being 6. To select more than a specific day just concatenate the
32
+ # day number to the string
33
+ # @return [Integer]
34
+ attr_accessor :type
35
+
36
+ # A string that represents specific days in a week, Sunday being 0 and
37
+ # Friday being 6. To select more than a specific day just concatenate the
38
+ # day number to the string
39
+ # @return [String]
40
+ attr_accessor :end_time
41
+
42
+ # A string that represents specific days in a week, Sunday being 0 and
43
+ # Friday being 6. To select more than a specific day just concatenate the
44
+ # day number to the string
45
+ # @return [String]
46
+ attr_accessor :interval
47
+
48
+ # A string that represents specific days in a week, Sunday being 0 and
49
+ # Friday being 6. To select more than a specific day just concatenate the
50
+ # day number to the string
51
+ # @return [TrueClass|FalseClass]
52
+ attr_accessor :is_recurring
53
+
54
+ # A string that represents specific days in a week, Sunday being 0 and
55
+ # Friday being 6. To select more than a specific day just concatenate the
56
+ # day number to the string
57
+ # @return [String]
58
+ attr_accessor :name
59
+
60
+ # A string that represents specific days in a week, Sunday being 0 and
61
+ # Friday being 6. To select more than a specific day just concatenate the
62
+ # day number to the string
63
+ # @return [String]
64
+ attr_accessor :resource_id
65
+
66
+ # A string that represents specific days in a week, Sunday being 0 and
67
+ # Friday being 6. To select more than a specific day just concatenate the
68
+ # day number to the string
69
+ # @return [Float]
70
+ attr_accessor :site_id
71
+
72
+ # A string that represents specific days in a week, Sunday being 0 and
73
+ # Friday being 6. To select more than a specific day just concatenate the
74
+ # day number to the string
75
+ # @return [String]
76
+ attr_accessor :status
77
+
78
+ # A string that represents specific days in a week, Sunday being 0 and
79
+ # Friday being 6. To select more than a specific day just concatenate the
80
+ # day number to the string
81
+ # @return [TrueClass|FalseClass]
82
+ attr_accessor :valid
83
+
84
+ # A string that represents specific days in a week, Sunday being 0 and
85
+ # Friday being 6. To select more than a specific day just concatenate the
86
+ # day number to the string
87
+ # @return [String]
88
+ attr_accessor :start_time
89
+
90
+ # A string that represents specific days in a week, Sunday being 0 and
91
+ # Friday being 6. To select more than a specific day just concatenate the
92
+ # day number to the string
93
+ # @return [DiscoveryParams]
94
+ attr_accessor :discovery_params
95
+
96
+ # A string that represents specific days in a week, Sunday being 0 and
97
+ # Friday being 6. To select more than a specific day just concatenate the
98
+ # day number to the string
99
+ # @return [Integer]
100
+ attr_accessor :attached_assets_count
101
+
102
+ # A string that represents specific days in a week, Sunday being 0 and
103
+ # Friday being 6. To select more than a specific day just concatenate the
104
+ # day number to the string
105
+ # @return [Integer]
106
+ attr_accessor :discovery_type
107
+
108
+ # A string that represents specific days in a week, Sunday being 0 and
109
+ # Friday being 6. To select more than a specific day just concatenate the
110
+ # day number to the string
111
+ # @return [String]
112
+ attr_accessor :display_type
113
+
114
+ # A string that represents specific days in a week, Sunday being 0 and
115
+ # Friday being 6. To select more than a specific day just concatenate the
116
+ # day number to the string
117
+ # @return [String]
118
+ attr_accessor :history_end_time
119
+
120
+ # A string that represents specific days in a week, Sunday being 0 and
121
+ # Friday being 6. To select more than a specific day just concatenate the
122
+ # day number to the string
123
+ # @return [String]
124
+ attr_accessor :history_start_time
125
+
126
+ # A string that represents specific days in a week, Sunday being 0 and
127
+ # Friday being 6. To select more than a specific day just concatenate the
128
+ # day number to the string
129
+ # @return [Integer]
130
+ attr_accessor :run_time
131
+
132
+ # A string that represents specific days in a week, Sunday being 0 and
133
+ # Friday being 6. To select more than a specific day just concatenate the
134
+ # day number to the string
135
+ # @return [Integer]
136
+ attr_accessor :task_id
137
+
138
+ # A string that represents specific days in a week, Sunday being 0 and
139
+ # Friday being 6. To select more than a specific day just concatenate the
140
+ # day number to the string
141
+ # @return [String]
142
+ attr_accessor :summary
143
+
144
+ # A mapping from model property names to API property names.
145
+ def self.names
146
+ @_hash = {} if @_hash.nil?
147
+ @_hash['allowed_days'] = 'allowed_days'
148
+ @_hash['allowed_run_time_end'] = 'allowed_run_time_end'
149
+ @_hash['allowed_run_time_start'] = 'allowed_run_time_start'
150
+ @_hash['type'] = 'type'
151
+ @_hash['end_time'] = 'end_time'
152
+ @_hash['interval'] = 'interval'
153
+ @_hash['is_recurring'] = 'is_recurring'
154
+ @_hash['name'] = 'name'
155
+ @_hash['resource_id'] = 'resource_id'
156
+ @_hash['site_id'] = 'site_id'
157
+ @_hash['status'] = 'status'
158
+ @_hash['valid'] = 'valid'
159
+ @_hash['start_time'] = 'start_time'
160
+ @_hash['discovery_params'] = 'discovery_params'
161
+ @_hash['attached_assets_count'] = 'attached_assets_count'
162
+ @_hash['discovery_type'] = 'discovery_type'
163
+ @_hash['display_type'] = 'display_type'
164
+ @_hash['history_end_time'] = 'history_end_time'
165
+ @_hash['history_start_time'] = 'history_start_time'
166
+ @_hash['run_time'] = 'run_time'
167
+ @_hash['task_id'] = 'task_id'
168
+ @_hash['summary'] = 'summary'
169
+ @_hash
170
+ end
171
+
172
+ # An array for optional fields
173
+ def self.optionals
174
+ %w[
175
+ allowed_days
176
+ allowed_run_time_end
177
+ allowed_run_time_start
178
+ type
179
+ end_time
180
+ interval
181
+ is_recurring
182
+ name
183
+ resource_id
184
+ site_id
185
+ status
186
+ valid
187
+ start_time
188
+ discovery_params
189
+ attached_assets_count
190
+ discovery_type
191
+ display_type
192
+ history_end_time
193
+ history_start_time
194
+ run_time
195
+ task_id
196
+ summary
197
+ ]
198
+ end
199
+
200
+ # An array for nullable fields
201
+ def self.nullables
202
+ []
203
+ end
204
+
205
+ def initialize(allowed_days = SKIP,
206
+ allowed_run_time_end = SKIP,
207
+ allowed_run_time_start = SKIP,
208
+ type = SKIP,
209
+ end_time = SKIP,
210
+ interval = SKIP,
211
+ is_recurring = SKIP,
212
+ name = SKIP,
213
+ resource_id = SKIP,
214
+ site_id = SKIP,
215
+ status = SKIP,
216
+ valid = SKIP,
217
+ start_time = SKIP,
218
+ discovery_params = SKIP,
219
+ attached_assets_count = SKIP,
220
+ discovery_type = SKIP,
221
+ display_type = SKIP,
222
+ history_end_time = SKIP,
223
+ history_start_time = SKIP,
224
+ run_time = SKIP,
225
+ task_id = SKIP,
226
+ summary = SKIP)
227
+ @allowed_days = allowed_days unless allowed_days == SKIP
228
+ @allowed_run_time_end = allowed_run_time_end unless allowed_run_time_end == SKIP
229
+ @allowed_run_time_start = allowed_run_time_start unless allowed_run_time_start == SKIP
230
+ @type = type unless type == SKIP
231
+ @end_time = end_time unless end_time == SKIP
232
+ @interval = interval unless interval == SKIP
233
+ @is_recurring = is_recurring unless is_recurring == SKIP
234
+ @name = name unless name == SKIP
235
+ @resource_id = resource_id unless resource_id == SKIP
236
+ @site_id = site_id unless site_id == SKIP
237
+ @status = status unless status == SKIP
238
+ @valid = valid unless valid == SKIP
239
+ @start_time = start_time unless start_time == SKIP
240
+ @discovery_params = discovery_params unless discovery_params == SKIP
241
+ @attached_assets_count = attached_assets_count unless attached_assets_count == SKIP
242
+ @discovery_type = discovery_type unless discovery_type == SKIP
243
+ @display_type = display_type unless display_type == SKIP
244
+ @history_end_time = history_end_time unless history_end_time == SKIP
245
+ @history_start_time = history_start_time unless history_start_time == SKIP
246
+ @run_time = run_time unless run_time == SKIP
247
+ @task_id = task_id unless task_id == SKIP
248
+ @summary = summary unless summary == SKIP
249
+ end
250
+
251
+ # Creates an instance of the object from a hash.
252
+ def self.from_hash(hash)
253
+ return nil unless hash
254
+
255
+ # Extract variables from the hash.
256
+ allowed_days = hash.key?('allowed_days') ? hash['allowed_days'] : SKIP
257
+ allowed_run_time_end =
258
+ hash.key?('allowed_run_time_end') ? hash['allowed_run_time_end'] : SKIP
259
+ allowed_run_time_start =
260
+ hash.key?('allowed_run_time_start') ? hash['allowed_run_time_start'] : SKIP
261
+ type = hash.key?('type') ? hash['type'] : SKIP
262
+ end_time = hash.key?('end_time') ? hash['end_time'] : SKIP
263
+ interval = hash.key?('interval') ? hash['interval'] : SKIP
264
+ is_recurring = hash.key?('is_recurring') ? hash['is_recurring'] : SKIP
265
+ name = hash.key?('name') ? hash['name'] : SKIP
266
+ resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
267
+ site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
268
+ status = hash.key?('status') ? hash['status'] : SKIP
269
+ valid = hash.key?('valid') ? hash['valid'] : SKIP
270
+ start_time = hash.key?('start_time') ? hash['start_time'] : SKIP
271
+ discovery_params = DiscoveryParams.from_hash(hash['discovery_params']) if
272
+ hash['discovery_params']
273
+ attached_assets_count =
274
+ hash.key?('attached_assets_count') ? hash['attached_assets_count'] : SKIP
275
+ discovery_type =
276
+ hash.key?('discovery_type') ? hash['discovery_type'] : SKIP
277
+ display_type = hash.key?('display_type') ? hash['display_type'] : SKIP
278
+ history_end_time =
279
+ hash.key?('history_end_time') ? hash['history_end_time'] : SKIP
280
+ history_start_time =
281
+ hash.key?('history_start_time') ? hash['history_start_time'] : SKIP
282
+ run_time = hash.key?('run_time') ? hash['run_time'] : SKIP
283
+ task_id = hash.key?('task_id') ? hash['task_id'] : SKIP
284
+ summary = hash.key?('summary') ? hash['summary'] : SKIP
285
+
286
+ # Create object from extracted values.
287
+ ActiveHistory.new(allowed_days,
288
+ allowed_run_time_end,
289
+ allowed_run_time_start,
290
+ type,
291
+ end_time,
292
+ interval,
293
+ is_recurring,
294
+ name,
295
+ resource_id,
296
+ site_id,
297
+ status,
298
+ valid,
299
+ start_time,
300
+ discovery_params,
301
+ attached_assets_count,
302
+ discovery_type,
303
+ display_type,
304
+ history_end_time,
305
+ history_start_time,
306
+ run_time,
307
+ task_id,
308
+ summary)
309
+ end
310
+ end
311
+ end
@@ -0,0 +1,150 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # ActivitiesObject Model.
8
+ class ActivitiesObject < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :description
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :display_type
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Entity]
22
+ attr_accessor :entity
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Integer]
26
+ attr_accessor :id
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :resource_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 [String]
38
+ attr_accessor :site_name
39
+
40
+ # TODO: Write general description for this method
41
+ # @return [String]
42
+ attr_accessor :timestamp
43
+
44
+ # TODO: Write general description for this method
45
+ # @return [Integer]
46
+ attr_accessor :type
47
+
48
+ # TODO: Write general description for this method
49
+ # @return [String]
50
+ attr_accessor :user_id
51
+
52
+ # TODO: Write general description for this method
53
+ # @return [String]
54
+ attr_accessor :user_name
55
+
56
+ # A mapping from model property names to API property names.
57
+ def self.names
58
+ @_hash = {} if @_hash.nil?
59
+ @_hash['description'] = 'description'
60
+ @_hash['display_type'] = 'display_type'
61
+ @_hash['entity'] = 'entity'
62
+ @_hash['id'] = 'id'
63
+ @_hash['resource_id'] = 'resource_id'
64
+ @_hash['site_id'] = 'site_id'
65
+ @_hash['site_name'] = 'site_name'
66
+ @_hash['timestamp'] = 'timestamp'
67
+ @_hash['type'] = 'type'
68
+ @_hash['user_id'] = 'user_id'
69
+ @_hash['user_name'] = 'user_name'
70
+ @_hash
71
+ end
72
+
73
+ # An array for optional fields
74
+ def self.optionals
75
+ %w[
76
+ description
77
+ display_type
78
+ entity
79
+ id
80
+ resource_id
81
+ site_id
82
+ site_name
83
+ timestamp
84
+ type
85
+ user_id
86
+ user_name
87
+ ]
88
+ end
89
+
90
+ # An array for nullable fields
91
+ def self.nullables
92
+ []
93
+ end
94
+
95
+ def initialize(description = SKIP,
96
+ display_type = SKIP,
97
+ entity = SKIP,
98
+ id = SKIP,
99
+ resource_id = SKIP,
100
+ site_id = SKIP,
101
+ site_name = SKIP,
102
+ timestamp = SKIP,
103
+ type = SKIP,
104
+ user_id = SKIP,
105
+ user_name = SKIP)
106
+ @description = description unless description == SKIP
107
+ @display_type = display_type unless display_type == SKIP
108
+ @entity = entity unless entity == SKIP
109
+ @id = id unless id == SKIP
110
+ @resource_id = resource_id unless resource_id == SKIP
111
+ @site_id = site_id unless site_id == SKIP
112
+ @site_name = site_name unless site_name == SKIP
113
+ @timestamp = timestamp unless timestamp == SKIP
114
+ @type = type unless type == SKIP
115
+ @user_id = user_id unless user_id == SKIP
116
+ @user_name = user_name unless user_name == SKIP
117
+ end
118
+
119
+ # Creates an instance of the object from a hash.
120
+ def self.from_hash(hash)
121
+ return nil unless hash
122
+
123
+ # Extract variables from the hash.
124
+ description = hash.key?('description') ? hash['description'] : SKIP
125
+ display_type = hash.key?('display_type') ? hash['display_type'] : SKIP
126
+ entity = Entity.from_hash(hash['entity']) if hash['entity']
127
+ id = hash.key?('id') ? hash['id'] : SKIP
128
+ resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
129
+ site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
130
+ site_name = hash.key?('site_name') ? hash['site_name'] : SKIP
131
+ timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
132
+ type = hash.key?('type') ? hash['type'] : SKIP
133
+ user_id = hash.key?('user_id') ? hash['user_id'] : SKIP
134
+ user_name = hash.key?('user_name') ? hash['user_name'] : SKIP
135
+
136
+ # Create object from extracted values.
137
+ ActivitiesObject.new(description,
138
+ display_type,
139
+ entity,
140
+ id,
141
+ resource_id,
142
+ site_id,
143
+ site_name,
144
+ timestamp,
145
+ type,
146
+ user_id,
147
+ user_name)
148
+ end
149
+ end
150
+ end
@@ -0,0 +1,100 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # ActivitiesResponse Model.
8
+ class ActivitiesResponse < 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_in_page
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Integer]
22
+ attr_accessor :count_total
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [DbStatistics]
26
+ attr_accessor :db_statistics
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [List of ActivitiesObject]
30
+ attr_accessor :objects
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['count_filtered'] = 'count_filtered'
36
+ @_hash['count_in_page'] = 'count_in_page'
37
+ @_hash['count_total'] = 'count_total'
38
+ @_hash['db_statistics'] = 'db_statistics'
39
+ @_hash['objects'] = 'objects'
40
+ @_hash
41
+ end
42
+
43
+ # An array for optional fields
44
+ def self.optionals
45
+ %w[
46
+ count_filtered
47
+ count_in_page
48
+ count_total
49
+ db_statistics
50
+ objects
51
+ ]
52
+ end
53
+
54
+ # An array for nullable fields
55
+ def self.nullables
56
+ []
57
+ end
58
+
59
+ def initialize(count_filtered = SKIP,
60
+ count_in_page = SKIP,
61
+ count_total = SKIP,
62
+ db_statistics = SKIP,
63
+ objects = SKIP)
64
+ @count_filtered = count_filtered unless count_filtered == SKIP
65
+ @count_in_page = count_in_page unless count_in_page == SKIP
66
+ @count_total = count_total unless count_total == SKIP
67
+ @db_statistics = db_statistics unless db_statistics == SKIP
68
+ @objects = objects unless objects == SKIP
69
+ end
70
+
71
+ # Creates an instance of the object from a hash.
72
+ def self.from_hash(hash)
73
+ return nil unless hash
74
+
75
+ # Extract variables from the hash.
76
+ count_filtered =
77
+ hash.key?('count_filtered') ? hash['count_filtered'] : SKIP
78
+ count_in_page = hash.key?('count_in_page') ? hash['count_in_page'] : SKIP
79
+ count_total = hash.key?('count_total') ? hash['count_total'] : SKIP
80
+ db_statistics = DbStatistics.from_hash(hash['db_statistics']) if hash['db_statistics']
81
+ # Parameter is an array, so we need to iterate through it
82
+ objects = nil
83
+ unless hash['objects'].nil?
84
+ objects = []
85
+ hash['objects'].each do |structure|
86
+ objects << (ActivitiesObject.from_hash(structure) if structure)
87
+ end
88
+ end
89
+
90
+ objects = SKIP unless hash.key?('objects')
91
+
92
+ # Create object from extracted values.
93
+ ActivitiesResponse.new(count_filtered,
94
+ count_in_page,
95
+ count_total,
96
+ db_statistics,
97
+ objects)
98
+ end
99
+ end
100
+ end