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,90 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # CustomAttributeCategory Model.
8
+ class CustomAttributeCategory < 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 [String]
26
+ attr_accessor :description
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :name
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['resource_id'] = 'resource_id'
36
+ @_hash['id'] = 'id'
37
+ @_hash['site_id'] = 'site_id'
38
+ @_hash['description'] = 'description'
39
+ @_hash['name'] = 'name'
40
+ @_hash
41
+ end
42
+
43
+ # An array for optional fields
44
+ def self.optionals
45
+ %w[
46
+ resource_id
47
+ id
48
+ site_id
49
+ description
50
+ name
51
+ ]
52
+ end
53
+
54
+ # An array for nullable fields
55
+ def self.nullables
56
+ []
57
+ end
58
+
59
+ def initialize(resource_id = SKIP,
60
+ id = SKIP,
61
+ site_id = SKIP,
62
+ description = SKIP,
63
+ name = SKIP)
64
+ @resource_id = resource_id unless resource_id == SKIP
65
+ @id = id unless id == SKIP
66
+ @site_id = site_id unless site_id == SKIP
67
+ @description = description unless description == SKIP
68
+ @name = name unless name == 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
+ resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
77
+ id = hash.key?('id') ? hash['id'] : SKIP
78
+ site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
79
+ description = hash.key?('description') ? hash['description'] : SKIP
80
+ name = hash.key?('name') ? hash['name'] : SKIP
81
+
82
+ # Create object from extracted values.
83
+ CustomAttributeCategory.new(resource_id,
84
+ id,
85
+ site_id,
86
+ description,
87
+ name)
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,50 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # DbStatistics Model.
8
+ class DbStatistics < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :query_count
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['query_count'] = 'query_count'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ query_count
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(query_count = SKIP)
36
+ @query_count = query_count unless query_count == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ query_count = hash.key?('query_count') ? hash['query_count'] : SKIP
45
+
46
+ # Create object from extracted values.
47
+ DbStatistics.new(query_count)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,48 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # DeleteAQueryResponse Model.
8
+ class DeleteAQueryResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [TrueClass|FalseClass]
14
+ attr_accessor :success
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['success'] = 'success'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(success = nil)
34
+ @success = success
35
+ end
36
+
37
+ # Creates an instance of the object from a hash.
38
+ def self.from_hash(hash)
39
+ return nil unless hash
40
+
41
+ # Extract variables from the hash.
42
+ success = hash.key?('success') ? hash['success'] : nil
43
+
44
+ # Create object from extracted values.
45
+ DeleteAQueryResponse.new(success)
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,48 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # DeleteATaskResponse Model.
8
+ class DeleteATaskResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [TrueClass|FalseClass]
14
+ attr_accessor :success
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['success'] = 'success'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(success = nil)
34
+ @success = success
35
+ end
36
+
37
+ # Creates an instance of the object from a hash.
38
+ def self.from_hash(hash)
39
+ return nil unless hash
40
+
41
+ # Extract variables from the hash.
42
+ success = hash.key?('success') ? hash['success'] : nil
43
+
44
+ # Create object from extracted values.
45
+ DeleteATaskResponse.new(success)
46
+ end
47
+ end
48
+ 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
+ # DestinationVirtualZone Model.
8
+ class DestinationVirtualZone < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :num_assets
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['name'] = 'name'
24
+ @_hash['num_assets'] = 'num_assets'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ name
32
+ num_assets
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(name = SKIP,
42
+ num_assets = SKIP)
43
+ @name = name unless name == SKIP
44
+ @num_assets = num_assets unless num_assets == 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
+ name = hash.key?('name') ? hash['name'] : SKIP
53
+ num_assets = hash.key?('num_assets') ? hash['num_assets'] : SKIP
54
+
55
+ # Create object from extracted values.
56
+ DestinationVirtualZone.new(name,
57
+ num_assets)
58
+ end
59
+ end
60
+ 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
+ # Detail Model.
8
+ class Detail < 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 :title
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['description'] = 'description'
24
+ @_hash['title'] = 'title'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ description
32
+ title
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(description = SKIP,
42
+ title = SKIP)
43
+ @description = description unless description == SKIP
44
+ @title = title unless title == 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
+ description = hash.key?('description') ? hash['description'] : SKIP
53
+ title = hash.key?('title') ? hash['title'] : SKIP
54
+
55
+ # Create object from extracted values.
56
+ Detail.new(description,
57
+ title)
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,82 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # DiscoveryParams Model.
8
+ class DiscoveryParams < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :ip_range
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :sub_query
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Integer]
22
+ attr_accessor :concurrent_scans
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Integer]
26
+ attr_accessor :retranmissions
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['ip_range'] = 'ip_range'
32
+ @_hash['sub_query'] = 'sub_query'
33
+ @_hash['concurrent_scans'] = 'concurrent_scans'
34
+ @_hash['retranmissions'] = 'retranmissions'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ ip_range
42
+ sub_query
43
+ concurrent_scans
44
+ retranmissions
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(ip_range = SKIP,
54
+ sub_query = SKIP,
55
+ concurrent_scans = SKIP,
56
+ retranmissions = SKIP)
57
+ @ip_range = ip_range unless ip_range == SKIP
58
+ @sub_query = sub_query unless sub_query == SKIP
59
+ @concurrent_scans = concurrent_scans unless concurrent_scans == SKIP
60
+ @retranmissions = retranmissions unless retranmissions == 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
+ ip_range = hash.key?('ip_range') ? hash['ip_range'] : SKIP
69
+ sub_query = hash.key?('sub_query') ? hash['sub_query'] : SKIP
70
+ concurrent_scans =
71
+ hash.key?('concurrent_scans') ? hash['concurrent_scans'] : SKIP
72
+ retranmissions =
73
+ hash.key?('retranmissions') ? hash['retranmissions'] : SKIP
74
+
75
+ # Create object from extracted values.
76
+ DiscoveryParams.new(ip_range,
77
+ sub_query,
78
+ concurrent_scans,
79
+ retranmissions)
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,70 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # Entity Model.
8
+ class Entity < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :user_id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :type
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Object]
22
+ attr_accessor :object
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['user_id'] = 'user_id'
28
+ @_hash['type'] = 'type'
29
+ @_hash['object'] = 'object'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ user_id
37
+ type
38
+ object
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(user_id = SKIP,
48
+ type = SKIP,
49
+ object = SKIP)
50
+ @user_id = user_id unless user_id == SKIP
51
+ @type = type unless type == SKIP
52
+ @object = object unless object == 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
+ user_id = hash.key?('user_id') ? hash['user_id'] : SKIP
61
+ type = hash.key?('type') ? hash['type'] : SKIP
62
+ object = Object.from_hash(hash['object']) if hash['object']
63
+
64
+ # Create object from extracted values.
65
+ Entity.new(user_id,
66
+ type,
67
+ object)
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,175 @@
1
+ # ctd_documentation
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CtdDocumentation
7
+ # Event Model.
8
+ class Event < 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 [String]
26
+ attr_accessor :timestamp
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :last_updated
31
+
32
+ # 0: eNewAsset | 1: eAssetConflict | 2: eBaselineDeviation | 3: eThreat | 4:
33
+ # eAssetInformationChange | 5: eProtocolSpecific
34
+ # 6: eBaselineDown | 8: eBaselineVolumeDeviationHigh | 9:
35
+ # eBaselineVolumeDeviationLow | 10: eFTPData
36
+ # 11: eBaselineRule | 12: eHighArpActivity | 13: eKnownThreatEvent | 14:
37
+ # eFalseMac | 15: eSuspiciousFileTransfer
38
+ # 16: ePolicyViolation | 17: ePolicyRuleMatch | 18: eHostScan | 19:
39
+ # ePortScan | 20: eDenialOfService
40
+ # @return [Integer]
41
+ attr_accessor :type_number
42
+
43
+ # 0: eNewAsset | 1: eAssetConflict | 2: eBaselineDeviation | 3: eThreat | 4:
44
+ # eAssetInformationChange | 5: eProtocolSpecific
45
+ # 6: eBaselineDown | 8: eBaselineVolumeDeviationHigh | 9:
46
+ # eBaselineVolumeDeviationLow | 10: eFTPData
47
+ # 11: eBaselineRule | 12: eHighArpActivity | 13: eKnownThreatEvent | 14:
48
+ # eFalseMac | 15: eSuspiciousFileTransfer
49
+ # 16: ePolicyViolation | 17: ePolicyRuleMatch | 18: eHostScan | 19:
50
+ # ePortScan | 20: eDenialOfService
51
+ # @return [String]
52
+ attr_accessor :description
53
+
54
+ # 0: eNewAsset | 1: eAssetConflict | 2: eBaselineDeviation | 3: eThreat | 4:
55
+ # eAssetInformationChange | 5: eProtocolSpecific
56
+ # 6: eBaselineDown | 8: eBaselineVolumeDeviationHigh | 9:
57
+ # eBaselineVolumeDeviationLow | 10: eFTPData
58
+ # 11: eBaselineRule | 12: eHighArpActivity | 13: eKnownThreatEvent | 14:
59
+ # eFalseMac | 15: eSuspiciousFileTransfer
60
+ # 16: ePolicyViolation | 17: ePolicyRuleMatch | 18: eHostScan | 19:
61
+ # ePortScan | 20: eDenialOfService
62
+ # @return [Integer]
63
+ attr_accessor :alert_id
64
+
65
+ # 0: eNewAsset | 1: eAssetConflict | 2: eBaselineDeviation | 3: eThreat | 4:
66
+ # eAssetInformationChange | 5: eProtocolSpecific
67
+ # 6: eBaselineDown | 8: eBaselineVolumeDeviationHigh | 9:
68
+ # eBaselineVolumeDeviationLow | 10: eFTPData
69
+ # 11: eBaselineRule | 12: eHighArpActivity | 13: eKnownThreatEvent | 14:
70
+ # eFalseMac | 15: eSuspiciousFileTransfer
71
+ # 16: ePolicyViolation | 17: ePolicyRuleMatch | 18: eHostScan | 19:
72
+ # ePortScan | 20: eDenialOfService
73
+ # @return [String]
74
+ attr_accessor :status
75
+
76
+ # 0: eNewAsset | 1: eAssetConflict | 2: eBaselineDeviation | 3: eThreat | 4:
77
+ # eAssetInformationChange | 5: eProtocolSpecific
78
+ # 6: eBaselineDown | 8: eBaselineVolumeDeviationHigh | 9:
79
+ # eBaselineVolumeDeviationLow | 10: eFTPData
80
+ # 11: eBaselineRule | 12: eHighArpActivity | 13: eKnownThreatEvent | 14:
81
+ # eFalseMac | 15: eSuspiciousFileTransfer
82
+ # 16: ePolicyViolation | 17: ePolicyRuleMatch | 18: eHostScan | 19:
83
+ # ePortScan | 20: eDenialOfService
84
+ # @return [String]
85
+ attr_accessor :type_name
86
+
87
+ # A mapping from model property names to API property names.
88
+ def self.names
89
+ @_hash = {} if @_hash.nil?
90
+ @_hash['resource_id'] = 'resource_id'
91
+ @_hash['id'] = 'id'
92
+ @_hash['site_id'] = 'site_id'
93
+ @_hash['timestamp'] = 'timestamp'
94
+ @_hash['last_updated'] = 'last_updated'
95
+ @_hash['type_number'] = 'type_number'
96
+ @_hash['description'] = 'description'
97
+ @_hash['alert_id'] = 'alert_id'
98
+ @_hash['status'] = 'status'
99
+ @_hash['type_name'] = 'type_name'
100
+ @_hash
101
+ end
102
+
103
+ # An array for optional fields
104
+ def self.optionals
105
+ %w[
106
+ resource_id
107
+ id
108
+ site_id
109
+ timestamp
110
+ last_updated
111
+ type_number
112
+ description
113
+ alert_id
114
+ status
115
+ type_name
116
+ ]
117
+ end
118
+
119
+ # An array for nullable fields
120
+ def self.nullables
121
+ []
122
+ end
123
+
124
+ def initialize(resource_id = SKIP,
125
+ id = SKIP,
126
+ site_id = SKIP,
127
+ timestamp = SKIP,
128
+ last_updated = SKIP,
129
+ type_number = SKIP,
130
+ description = SKIP,
131
+ alert_id = SKIP,
132
+ status = SKIP,
133
+ type_name = SKIP)
134
+ @resource_id = resource_id unless resource_id == SKIP
135
+ @id = id unless id == SKIP
136
+ @site_id = site_id unless site_id == SKIP
137
+ @timestamp = timestamp unless timestamp == SKIP
138
+ @last_updated = last_updated unless last_updated == SKIP
139
+ @type_number = type_number unless type_number == SKIP
140
+ @description = description unless description == SKIP
141
+ @alert_id = alert_id unless alert_id == SKIP
142
+ @status = status unless status == SKIP
143
+ @type_name = type_name unless type_name == SKIP
144
+ end
145
+
146
+ # Creates an instance of the object from a hash.
147
+ def self.from_hash(hash)
148
+ return nil unless hash
149
+
150
+ # Extract variables from the hash.
151
+ resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
152
+ id = hash.key?('id') ? hash['id'] : SKIP
153
+ site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
154
+ timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
155
+ last_updated = hash.key?('last_updated') ? hash['last_updated'] : SKIP
156
+ type_number = hash.key?('type_number') ? hash['type_number'] : SKIP
157
+ description = hash.key?('description') ? hash['description'] : SKIP
158
+ alert_id = hash.key?('alert_id') ? hash['alert_id'] : SKIP
159
+ status = hash.key?('status') ? hash['status'] : SKIP
160
+ type_name = hash.key?('type_name') ? hash['type_name'] : SKIP
161
+
162
+ # Create object from extracted values.
163
+ Event.new(resource_id,
164
+ id,
165
+ site_id,
166
+ timestamp,
167
+ last_updated,
168
+ type_number,
169
+ description,
170
+ alert_id,
171
+ status,
172
+ type_name)
173
+ end
174
+ end
175
+ end