datadog_api_client 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +5 -0
  4. data/.generator/schemas/v1/openapi.yaml +333 -128
  5. data/.generator/schemas/v2/openapi.yaml +2450 -131
  6. data/CHANGELOG.md +28 -0
  7. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
  8. data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
  9. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
  10. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
  11. data/examples/v2/case-management/ArchiveCase.rb +14 -0
  12. data/examples/v2/case-management/AssignCase.rb +20 -0
  13. data/examples/v2/case-management/CreateCase.rb +33 -0
  14. data/examples/v2/case-management/CreateProject.rb +15 -0
  15. data/examples/v2/case-management/DeleteProject.rb +5 -0
  16. data/examples/v2/case-management/GetCase.rb +8 -0
  17. data/examples/v2/case-management/GetProject.rb +5 -0
  18. data/examples/v2/case-management/GetProjects.rb +5 -0
  19. data/examples/v2/case-management/SearchCases.rb +5 -0
  20. data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
  21. data/examples/v2/case-management/UnarchiveCase.rb +14 -0
  22. data/examples/v2/case-management/UnassignCase.rb +14 -0
  23. data/examples/v2/case-management/UpdatePriority.rb +17 -0
  24. data/examples/v2/case-management/UpdateStatus.rb +17 -0
  25. data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
  26. data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
  27. data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
  28. data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
  29. data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
  30. data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
  31. data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
  32. data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
  33. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
  34. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
  35. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
  36. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
  37. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
  38. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
  39. data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
  40. data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
  41. data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
  42. data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +18 -0
  43. data/examples/v2/metrics/ListMetricAssets.rb +5 -0
  44. data/lib/datadog_api_client/inflector.rb +112 -0
  45. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
  46. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
  47. data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
  48. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +6 -0
  49. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
  50. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +8 -0
  51. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +84 -4
  52. data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
  53. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  54. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +1 -1
  55. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
  56. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
  57. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  58. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
  59. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
  60. data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
  61. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
  62. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
  63. data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
  64. data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
  65. data/lib/datadog_api_client/v2/api/metrics_api.rb +69 -1
  66. data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
  67. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
  68. data/lib/datadog_api_client/v2/models/case.rb +150 -0
  69. data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
  70. data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
  73. data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
  74. data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
  75. data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
  76. data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
  77. data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
  78. data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
  79. data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
  80. data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
  81. data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
  82. data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
  84. data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
  85. data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
  86. data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
  87. data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
  88. data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
  89. data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
  90. data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
  91. data/lib/datadog_api_client/v2/models/case_update_status_attributes.rb +98 -0
  92. data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
  93. data/lib/datadog_api_client/v2/models/cases_response.rb +92 -0
  94. data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
  95. data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
  96. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
  97. data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
  98. data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
  99. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
  100. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
  101. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
  102. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
  103. data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
  104. data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
  105. data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
  106. data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
  107. data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
  108. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
  109. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
  110. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
  111. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
  112. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
  113. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
  114. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
  115. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
  116. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
  117. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
  118. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
  119. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
  120. data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
  121. data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
  122. data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
  123. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
  124. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
  125. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
  126. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
  127. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
  128. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
  129. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
  130. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
  131. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
  132. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
  133. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
  134. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
  135. data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
  136. data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
  137. data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
  138. data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
  139. data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
  140. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +21 -20
  141. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
  142. data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
  143. data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
  144. data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
  145. data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
  146. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
  147. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
  148. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
  149. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
  150. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
  151. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
  152. data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
  153. data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
  154. data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
  155. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
  156. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
  157. data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
  158. data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
  159. data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
  160. data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
  161. data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
  162. data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
  163. data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
  164. data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
  165. data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
  166. data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
  167. data/lib/datadog_api_client/v2/models/nullable_user_relationship.rb +88 -0
  168. data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
  169. data/lib/datadog_api_client/v2/models/project.rb +150 -0
  170. data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
  171. data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
  172. data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
  173. data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
  174. data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
  175. data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
  176. data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
  177. data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
  178. data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
  179. data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
  180. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
  181. data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
  182. data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
  183. data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
  184. data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
  185. data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
  186. data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
  187. data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
  188. data/lib/datadog_api_client/version.rb +1 -1
  189. metadata +147 -2
@@ -0,0 +1,98 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Case update status attributes
21
+ class CaseUpdateStatusAttributes
22
+ include BaseGenericModel
23
+
24
+ # Case status
25
+ attr_reader :status
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'status' => :'status'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'status' => :'CaseStatus'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateStatusAttributes` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseUpdateStatusAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'status')
60
+ self.status = attributes[:'status']
61
+ end
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ # @!visibility private
67
+ def valid?
68
+ return false if @status.nil?
69
+ true
70
+ end
71
+
72
+ # Custom attribute writer method with validation
73
+ # @param status [Object] Object to be assigned
74
+ # @!visibility private
75
+ def status=(status)
76
+ if status.nil?
77
+ fail ArgumentError, 'invalid value for "status", status cannot be nil.'
78
+ end
79
+ @status = status
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ status == o.status
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ # @!visibility private
94
+ def hash
95
+ [status].hash
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,98 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Case update status request
21
+ class CaseUpdateStatusRequest
22
+ include BaseGenericModel
23
+
24
+ # Case update status
25
+ attr_reader :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'CaseUpdateStatus'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateStatusRequest` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CaseUpdateStatusRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ self.data = attributes[:'data']
61
+ end
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ # @!visibility private
67
+ def valid?
68
+ return false if @data.nil?
69
+ true
70
+ end
71
+
72
+ # Custom attribute writer method with validation
73
+ # @param data [Object] Object to be assigned
74
+ # @!visibility private
75
+ def data=(data)
76
+ if data.nil?
77
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
78
+ end
79
+ @data = data
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ data == o.data
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ # @!visibility private
94
+ def hash
95
+ [data].hash
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,92 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Response with cases
21
+ class CasesResponse
22
+ include BaseGenericModel
23
+
24
+ # Cases response data
25
+ attr_accessor :data
26
+
27
+ # Cases response metadata
28
+ attr_accessor :meta
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'data' => :'data',
35
+ :'meta' => :'meta'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'data' => :'Array<Case>',
44
+ :'meta' => :'CasesResponseMeta'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CasesResponse` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CasesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'data')
65
+ if (value = attributes[:'data']).is_a?(Array)
66
+ self.data = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'meta')
71
+ self.meta = attributes[:'meta']
72
+ end
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param o [Object] Object to be compared
77
+ # @!visibility private
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ data == o.data &&
82
+ meta == o.meta
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ # @!visibility private
88
+ def hash
89
+ [data, meta].hash
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,80 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Cases response metadata
21
+ class CasesResponseMeta
22
+ include BaseGenericModel
23
+
24
+ # Pagination metadata
25
+ attr_accessor :page
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'page' => :'page'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'page' => :'CasesResponseMetaPagination'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CasesResponseMeta` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CasesResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'page')
60
+ self.page = attributes[:'page']
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ page == o.page
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [page].hash
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,100 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Pagination metadata
21
+ class CasesResponseMetaPagination
22
+ include BaseGenericModel
23
+
24
+ # Current page number
25
+ attr_accessor :current
26
+
27
+ # Number of cases in current page
28
+ attr_accessor :size
29
+
30
+ # Total number of pages
31
+ attr_accessor :total
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'current' => :'current',
38
+ :'size' => :'size',
39
+ :'total' => :'total'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'current' => :'Integer',
48
+ :'size' => :'Integer',
49
+ :'total' => :'Integer'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param attributes [Hash] Model attributes in the form of hash
55
+ # @!visibility private
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CasesResponseMetaPagination` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CasesResponseMetaPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'current')
70
+ self.current = attributes[:'current']
71
+ end
72
+
73
+ if attributes.key?(:'size')
74
+ self.size = attributes[:'size']
75
+ end
76
+
77
+ if attributes.key?(:'total')
78
+ self.total = attributes[:'total']
79
+ end
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ current == o.current &&
89
+ size == o.size &&
90
+ total == o.total
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [current, size, total].hash
98
+ end
99
+ end
100
+ end
@@ -17,7 +17,7 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # A sort rule.
20
+ # A sort rule. The `aggregation` field is required when `type` is `measure`.
21
21
  class CIAppAggregateSort
22
22
  include BaseGenericModel
23
23
 
@@ -34,7 +34,7 @@ module DatadogAPIClient::V2
34
34
  # The value to use for logs that don't have the facet used to group-by.
35
35
  attr_accessor :missing
36
36
 
37
- # A sort rule.
37
+ # A sort rule. The `aggregation` field is required when `type` is `measure`.
38
38
  attr_accessor :sort
39
39
 
40
40
  # A resulting object to put the given computes in over all the matching records.
@@ -34,7 +34,7 @@ module DatadogAPIClient::V2
34
34
  # The value to use for logs that don't have the facet used to group-by.
35
35
  attr_accessor :missing
36
36
 
37
- # A sort rule.
37
+ # A sort rule. The `aggregation` field is required when `type` is `measure`.
38
38
  attr_accessor :sort
39
39
 
40
40
  # A resulting object to put the given computes in over all the matching records.
@@ -0,0 +1,90 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The action the rule can perform if triggered.
21
+ class CloudWorkloadSecurityAgentRuleAction
22
+ include BaseGenericModel
23
+
24
+ # SECL expression used to target the container to apply the action on
25
+ attr_accessor :filter
26
+
27
+ # Kill system call applied on the container matching the rule
28
+ attr_accessor :kill
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'filter' => :'filter',
35
+ :'kill' => :'kill'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'filter' => :'String',
44
+ :'kill' => :'CloudWorkloadSecurityAgentRuleKill'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleAction` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleAction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'filter')
65
+ self.filter = attributes[:'filter']
66
+ end
67
+
68
+ if attributes.key?(:'kill')
69
+ self.kill = attributes[:'kill']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ filter == o.filter &&
80
+ kill == o.kill
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [filter, kill].hash
88
+ end
89
+ end
90
+ end
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
21
21
  class CloudWorkloadSecurityAgentRuleAttributes
22
22
  include BaseGenericModel
23
23
 
24
+ # The array of actions the rule can perform if triggered.
25
+ attr_accessor :actions
26
+
24
27
  # The version of the agent.
25
28
  attr_accessor :agent_constraint
26
29
 
@@ -73,6 +76,7 @@ module DatadogAPIClient::V2
73
76
  # @!visibility private
74
77
  def self.attribute_map
75
78
  {
79
+ :'actions' => :'actions',
76
80
  :'agent_constraint' => :'agentConstraint',
77
81
  :'category' => :'category',
78
82
  :'creation_author_uu_id' => :'creationAuthorUuId',
@@ -96,6 +100,7 @@ module DatadogAPIClient::V2
96
100
  # @!visibility private
97
101
  def self.openapi_types
98
102
  {
103
+ :'actions' => :'Array<CloudWorkloadSecurityAgentRuleAction>',
99
104
  :'agent_constraint' => :'String',
100
105
  :'category' => :'String',
101
106
  :'creation_author_uu_id' => :'String',
@@ -115,6 +120,14 @@ module DatadogAPIClient::V2
115
120
  }
116
121
  end
117
122
 
123
+ # List of attributes with nullable: true
124
+ # @!visibility private
125
+ def self.openapi_nullable
126
+ Set.new([
127
+ :'actions',
128
+ ])
129
+ end
130
+
118
131
  # Initializes the object
119
132
  # @param attributes [Hash] Model attributes in the form of hash
120
133
  # @!visibility private
@@ -131,6 +144,12 @@ module DatadogAPIClient::V2
131
144
  h[k.to_sym] = v
132
145
  }
133
146
 
147
+ if attributes.key?(:'actions')
148
+ if (value = attributes[:'actions']).is_a?(Array)
149
+ self.actions = value
150
+ end
151
+ end
152
+
134
153
  if attributes.key?(:'agent_constraint')
135
154
  self.agent_constraint = attributes[:'agent_constraint']
136
155
  end
@@ -204,6 +223,7 @@ module DatadogAPIClient::V2
204
223
  def ==(o)
205
224
  return true if self.equal?(o)
206
225
  self.class == o.class &&
226
+ actions == o.actions &&
207
227
  agent_constraint == o.agent_constraint &&
208
228
  category == o.category &&
209
229
  creation_author_uu_id == o.creation_author_uu_id &&
@@ -226,7 +246,7 @@ module DatadogAPIClient::V2
226
246
  # @return [Integer] Hash code
227
247
  # @!visibility private
228
248
  def hash
229
- [agent_constraint, category, creation_author_uu_id, creation_date, creator, default_rule, description, enabled, expression, filters, name, update_author_uu_id, update_date, updated_at, updater, version].hash
249
+ [actions, agent_constraint, category, creation_author_uu_id, creation_date, creator, default_rule, description, enabled, expression, filters, name, update_author_uu_id, update_date, updated_at, updater, version].hash
230
250
  end
231
251
  end
232
252
  end