datadog_api_client 2.18.0 → 2.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +1 -1
  4. data/.generator/poetry.lock +69 -69
  5. data/.generator/schemas/v1/openapi.yaml +286 -55
  6. data/.generator/schemas/v2/openapi.yaml +2021 -226
  7. data/.generator/src/generator/templates/api.j2 +5 -5
  8. data/.generator/src/generator/templates/model_generic.j2 +2 -2
  9. data/CHANGELOG.md +38 -0
  10. data/examples/v1/azure-integration/CreateAzureIntegration.rb +4 -4
  11. data/examples/v1/azure-integration/DeleteAzureIntegration.rb +2 -15
  12. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +4 -4
  13. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +4 -5
  14. data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +2 -14
  15. data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +4 -5
  16. data/examples/v1/logs-indexes/CreateLogsIndex.rb +5 -0
  17. data/examples/v1/logs-indexes/UpdateLogsIndex.rb +5 -0
  18. data/examples/v1/service-level-objectives/CreateSLO_3765703239.rb +46 -0
  19. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +1 -1
  20. data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
  21. data/examples/v1/synthetics/TriggerCITests.rb +1 -1
  22. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -1
  23. data/examples/v1/usage-metering/GetUsageLambda.rb +5 -2
  24. data/examples/v2/api-management/CreateOpenAPI.rb +11 -0
  25. data/examples/v2/api-management/DeleteOpenAPI.rb +11 -0
  26. data/examples/v2/api-management/GetOpenAPI.rb +11 -0
  27. data/examples/v2/api-management/UpdateOpenAPI.rb +14 -0
  28. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
  29. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -3
  30. data/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.rb +18 -0
  31. data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +29 -0
  32. data/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.rb +5 -0
  33. data/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.rb +5 -0
  34. data/examples/v2/cloud-cost-management/GetCloudCostActivity.rb +5 -0
  35. data/examples/v2/cloud-cost-management/ListAWSRelatedAccounts.rb +5 -0
  36. data/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.rb +5 -0
  37. data/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.rb +5 -0
  38. data/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.rb +14 -0
  39. data/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.rb +14 -0
  40. data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +1 -1
  41. data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +4 -1
  42. data/examples/v2/downtimes/ListMonitorDowntimes_3316718253.rb +5 -0
  43. data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +16 -0
  44. data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +16 -0
  45. data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +17 -0
  46. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +19 -0
  47. data/examples/v2/okta-integration/CreateOktaAccount.rb +1 -1
  48. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.rb +46 -0
  49. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +19 -0
  50. data/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.rb +8 -0
  51. data/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.rb +8 -0
  52. data/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.rb +5 -0
  53. data/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.rb +17 -0
  54. data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +7 -0
  55. data/examples/v2/sensitive-data-scanner/UpdateScanningRule.rb +7 -10
  56. data/examples/v2/teams/CreateTeamMembership.rb +6 -0
  57. data/examples/v2/teams/GetTeamMemberships_3799131168.rb +8 -0
  58. data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +1 -1
  59. data/lib/datadog_api_client/configuration.rb +4 -1
  60. data/lib/datadog_api_client/inflector.rb +74 -0
  61. data/lib/datadog_api_client/v1/api/downtimes_api.rb +28 -7
  62. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
  63. data/lib/datadog_api_client/v1/api/organizations_api.rb +1 -1
  64. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  65. data/lib/datadog_api_client/v1/models/dashboard.rb +5 -1
  66. data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +2 -0
  67. data/lib/datadog_api_client/v1/models/gcp_account.rb +22 -2
  68. data/lib/datadog_api_client/v1/models/log.rb +1 -1
  69. data/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb +90 -0
  70. data/lib/datadog_api_client/v1/models/logs_index.rb +36 -1
  71. data/lib/datadog_api_client/v1/models/logs_index_update_request.rb +36 -1
  72. data/lib/datadog_api_client/v1/models/metrics_payload.rb +1 -1
  73. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -1
  74. data/lib/datadog_api_client/v1/models/organization.rb +1 -1
  75. data/lib/datadog_api_client/v1/models/service_level_objective.rb +11 -1
  76. data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +11 -1
  77. data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +1 -1
  78. data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +1 -1
  79. data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +1 -1
  80. data/lib/datadog_api_client/v1/models/slo_data_source_query_definition.rb +62 -0
  81. data/lib/datadog_api_client/v1/models/slo_formula.rb +98 -0
  82. data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +2 -2
  83. data/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb +1 -1
  84. data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +1 -1
  85. data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +1 -1
  86. data/lib/datadog_api_client/v1/models/slo_response_data.rb +11 -1
  87. data/lib/datadog_api_client/v1/models/slo_sli_spec.rb +62 -0
  88. data/lib/datadog_api_client/v1/models/slo_time_slice_comparator.rb +29 -0
  89. data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +141 -0
  90. data/lib/datadog_api_client/v1/models/slo_time_slice_query.rb +131 -0
  91. data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +99 -0
  92. data/lib/datadog_api_client/v1/models/slo_type.rb +1 -0
  93. data/lib/datadog_api_client/v1/models/slo_type_numeric.rb +1 -0
  94. data/lib/datadog_api_client/v1/models/split_config.rb +6 -6
  95. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  96. data/lib/datadog_api_client/v1/models/usage_lambda_hour.rb +1 -1
  97. data/lib/datadog_api_client/v1/models/usage_lambda_response.rb +1 -1
  98. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
  99. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
  100. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
  101. data/lib/datadog_api_client/v2/api/api_management_api.rb +319 -0
  102. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +0 -6
  103. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +680 -0
  104. data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -0
  105. data/lib/datadog_api_client/v2/api/metrics_api.rb +3 -2
  106. data/lib/datadog_api_client/v2/api/organizations_api.rb +1 -1
  107. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +329 -0
  108. data/lib/datadog_api_client/v2/api/teams_api.rb +22 -0
  109. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
  110. data/lib/datadog_api_client/v2/models/aws_cur_config.rb +129 -0
  111. data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +305 -0
  112. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb +119 -0
  113. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb +98 -0
  114. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb +98 -0
  115. data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_type.rb +26 -0
  116. data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +119 -0
  117. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb +98 -0
  118. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb +202 -0
  119. data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_type.rb +26 -0
  120. data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +80 -0
  121. data/lib/datadog_api_client/v2/models/aws_cur_config_type.rb +26 -0
  122. data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +82 -0
  123. data/lib/datadog_api_client/v2/models/aws_related_account.rb +129 -0
  124. data/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb +90 -0
  125. data/lib/datadog_api_client/v2/models/aws_related_account_type.rb +26 -0
  126. data/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb +82 -0
  127. data/lib/datadog_api_client/v2/models/azure_uc_config.rb +378 -0
  128. data/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb +129 -0
  129. data/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb +110 -0
  130. data/lib/datadog_api_client/v2/models/azure_uc_config_pair_type.rb +26 -0
  131. data/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb +80 -0
  132. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +119 -0
  133. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb +98 -0
  134. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb +98 -0
  135. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_type.rb +26 -0
  136. data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +119 -0
  137. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb +98 -0
  138. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +192 -0
  139. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_type.rb +26 -0
  140. data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +82 -0
  141. data/lib/datadog_api_client/v2/models/bill_config.rb +161 -0
  142. data/lib/datadog_api_client/v2/models/ci_app_git_info.rb +2 -2
  143. data/lib/datadog_api_client/v2/models/cloud_cost_activity.rb +119 -0
  144. data/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb +98 -0
  145. data/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb +80 -0
  146. data/lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb +26 -0
  147. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +28 -4
  148. data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +28 -4
  149. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +28 -4
  150. data/lib/datadog_api_client/v2/models/create_open_api_response.rb +80 -0
  151. data/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb +82 -0
  152. data/lib/datadog_api_client/v2/models/create_open_api_response_data.rb +90 -0
  153. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
  154. data/lib/datadog_api_client/v2/models/dora_git_info.rb +2 -2
  155. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +11 -1
  156. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +25 -5
  157. data/lib/datadog_api_client/v2/models/metric_payload.rb +1 -1
  158. data/lib/datadog_api_client/v2/models/open_api_endpoint.rb +90 -0
  159. data/lib/datadog_api_client/v2/models/open_api_file.rb +80 -0
  160. data/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb +98 -0
  161. data/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb +119 -0
  162. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +14 -4
  163. data/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb +114 -0
  164. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
  165. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
  166. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
  167. data/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb +100 -0
  168. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +198 -0
  169. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +181 -0
  170. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb +119 -0
  171. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb +98 -0
  172. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb +80 -0
  173. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_type.rb +26 -0
  174. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +166 -0
  175. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb +119 -0
  176. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb +98 -0
  177. data/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb +82 -0
  178. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb +92 -0
  179. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +112 -0
  180. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb +130 -0
  181. data/lib/datadog_api_client/v2/models/security_monitoring_user.rb +98 -0
  182. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +134 -0
  183. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +46 -1
  184. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +33 -1
  185. data/lib/datadog_api_client/v2/models/update_open_api_response.rb +80 -0
  186. data/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb +82 -0
  187. data/lib/datadog_api_client/v2/models/update_open_api_response_data.rb +90 -0
  188. data/lib/datadog_api_client/v2/models/user_team_attributes.rb +24 -1
  189. data/lib/datadog_api_client/v2/models/user_team_relationships.rb +11 -1
  190. data/lib/datadog_api_client/v2/models/user_team_team_type.rb +26 -0
  191. data/lib/datadog_api_client/version.rb +1 -1
  192. metadata +103 -3
  193. data/examples/v1/usage-metering/GetUsageLambda_3132428705.rb +0 -8
@@ -55,6 +55,9 @@ module DatadogAPIClient::V2
55
55
  # Options on new value rules.
56
56
  attr_accessor :new_value_options
57
57
 
58
+ # Options on third party rules.
59
+ attr_accessor :third_party_rule_options
60
+
58
61
  # Attribute mapping from ruby-style variable name to JSON key.
59
62
  # @!visibility private
60
63
  def self.attribute_map
@@ -67,7 +70,8 @@ module DatadogAPIClient::V2
67
70
  :'impossible_travel_options' => :'impossibleTravelOptions',
68
71
  :'keep_alive' => :'keepAlive',
69
72
  :'max_signal_duration' => :'maxSignalDuration',
70
- :'new_value_options' => :'newValueOptions'
73
+ :'new_value_options' => :'newValueOptions',
74
+ :'third_party_rule_options' => :'thirdPartyRuleOptions'
71
75
  }
72
76
  end
73
77
 
@@ -83,7 +87,8 @@ module DatadogAPIClient::V2
83
87
  :'impossible_travel_options' => :'SecurityMonitoringRuleImpossibleTravelOptions',
84
88
  :'keep_alive' => :'SecurityMonitoringRuleKeepAlive',
85
89
  :'max_signal_duration' => :'SecurityMonitoringRuleMaxSignalDuration',
86
- :'new_value_options' => :'SecurityMonitoringRuleNewValueOptions'
90
+ :'new_value_options' => :'SecurityMonitoringRuleNewValueOptions',
91
+ :'third_party_rule_options' => :'SecurityMonitoringRuleThirdPartyOptions'
87
92
  }
88
93
  end
89
94
 
@@ -138,6 +143,10 @@ module DatadogAPIClient::V2
138
143
  if attributes.key?(:'new_value_options')
139
144
  self.new_value_options = attributes[:'new_value_options']
140
145
  end
146
+
147
+ if attributes.key?(:'third_party_rule_options')
148
+ self.third_party_rule_options = attributes[:'third_party_rule_options']
149
+ end
141
150
  end
142
151
 
143
152
  # Checks equality by comparing each attribute.
@@ -154,14 +163,15 @@ module DatadogAPIClient::V2
154
163
  impossible_travel_options == o.impossible_travel_options &&
155
164
  keep_alive == o.keep_alive &&
156
165
  max_signal_duration == o.max_signal_duration &&
157
- new_value_options == o.new_value_options
166
+ new_value_options == o.new_value_options &&
167
+ third_party_rule_options == o.third_party_rule_options
158
168
  end
159
169
 
160
170
  # Calculates hash code according to all attributes.
161
171
  # @return [Integer] Hash code
162
172
  # @!visibility private
163
173
  def hash
164
- [compliance_rule_options, decrease_criticality_based_on_env, detection_method, evaluation_window, hardcoded_evaluator_type, impossible_travel_options, keep_alive, max_signal_duration, new_value_options].hash
174
+ [compliance_rule_options, decrease_criticality_based_on_env, detection_method, evaluation_window, hardcoded_evaluator_type, impossible_travel_options, keep_alive, max_signal_duration, new_value_options, third_party_rule_options].hash
165
175
  end
166
176
  end
167
177
  end
@@ -0,0 +1,114 @@
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
+ # Options on third party rules.
21
+ class SecurityMonitoringRuleThirdPartyOptions
22
+ include BaseGenericModel
23
+
24
+ # Notification targets for the logs that do not correspond to any of the cases.
25
+ attr_accessor :default_notifications
26
+
27
+ # Severity of the Security Signal.
28
+ attr_accessor :default_status
29
+
30
+ # Queries to be combined with third party case queries. Each of them can have different group by fields, to aggregate differently based on the type of alert.
31
+ attr_accessor :root_queries
32
+
33
+ # A template for the signal title; if omitted, the title is generated based on the case name.
34
+ attr_accessor :signal_title_template
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ # @!visibility private
38
+ def self.attribute_map
39
+ {
40
+ :'default_notifications' => :'defaultNotifications',
41
+ :'default_status' => :'defaultStatus',
42
+ :'root_queries' => :'rootQueries',
43
+ :'signal_title_template' => :'signalTitleTemplate'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'default_notifications' => :'Array<String>',
52
+ :'default_status' => :'SecurityMonitoringRuleSeverity',
53
+ :'root_queries' => :'Array<SecurityMonitoringThirdPartyRootQuery>',
54
+ :'signal_title_template' => :'String'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param attributes [Hash] Model attributes in the form of hash
60
+ # @!visibility private
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleThirdPartyOptions` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleThirdPartyOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'default_notifications')
75
+ if (value = attributes[:'default_notifications']).is_a?(Array)
76
+ self.default_notifications = value
77
+ end
78
+ end
79
+
80
+ if attributes.key?(:'default_status')
81
+ self.default_status = attributes[:'default_status']
82
+ end
83
+
84
+ if attributes.key?(:'root_queries')
85
+ if (value = attributes[:'root_queries']).is_a?(Array)
86
+ self.root_queries = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'signal_title_template')
91
+ self.signal_title_template = attributes[:'signal_title_template']
92
+ end
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param o [Object] Object to be compared
97
+ # @!visibility private
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ default_notifications == o.default_notifications &&
102
+ default_status == o.default_status &&
103
+ root_queries == o.root_queries &&
104
+ signal_title_template == o.signal_title_template
105
+ end
106
+
107
+ # Calculates hash code according to all attributes.
108
+ # @return [Integer] Hash code
109
+ # @!visibility private
110
+ def hash
111
+ [default_notifications, default_status, root_queries, signal_title_template].hash
112
+ end
113
+ end
114
+ end
@@ -51,6 +51,9 @@ module DatadogAPIClient::V2
51
51
  # Tags for generated signals.
52
52
  attr_accessor :tags
53
53
 
54
+ # Cases for generating signals from third party rules. Only available for third party rules.
55
+ attr_accessor :third_party_cases
56
+
54
57
  # The version of the rule being updated.
55
58
  attr_reader :version
56
59
 
@@ -68,6 +71,7 @@ module DatadogAPIClient::V2
68
71
  :'options' => :'options',
69
72
  :'queries' => :'queries',
70
73
  :'tags' => :'tags',
74
+ :'third_party_cases' => :'thirdPartyCases',
71
75
  :'version' => :'version'
72
76
  }
73
77
  end
@@ -86,6 +90,7 @@ module DatadogAPIClient::V2
86
90
  :'options' => :'SecurityMonitoringRuleOptions',
87
91
  :'queries' => :'Array<SecurityMonitoringRuleQuery>',
88
92
  :'tags' => :'Array<String>',
93
+ :'third_party_cases' => :'Array<SecurityMonitoringThirdPartyRuleCase>',
89
94
  :'version' => :'Integer'
90
95
  }
91
96
  end
@@ -154,6 +159,12 @@ module DatadogAPIClient::V2
154
159
  end
155
160
  end
156
161
 
162
+ if attributes.key?(:'third_party_cases')
163
+ if (value = attributes[:'third_party_cases']).is_a?(Array)
164
+ self.third_party_cases = value
165
+ end
166
+ end
167
+
157
168
  if attributes.key?(:'version')
158
169
  self.version = attributes[:'version']
159
170
  end
@@ -193,6 +204,7 @@ module DatadogAPIClient::V2
193
204
  options == o.options &&
194
205
  queries == o.queries &&
195
206
  tags == o.tags &&
207
+ third_party_cases == o.third_party_cases &&
196
208
  version == o.version
197
209
  end
198
210
 
@@ -200,7 +212,7 @@ module DatadogAPIClient::V2
200
212
  # @return [Integer] Hash code
201
213
  # @!visibility private
202
214
  def hash
203
- [cases, compliance_signal_options, filters, has_extended_title, is_enabled, message, name, options, queries, tags, version].hash
215
+ [cases, compliance_signal_options, filters, has_extended_title, is_enabled, message, name, options, queries, tags, third_party_cases, version].hash
204
216
  end
205
217
  end
206
218
  end
@@ -48,6 +48,9 @@ module DatadogAPIClient::V2
48
48
  # Tags for generated signals.
49
49
  attr_accessor :tags
50
50
 
51
+ # Cases for generating signals from third party rules. Only available for third party rules.
52
+ attr_accessor :third_party_cases
53
+
51
54
  # The rule type.
52
55
  attr_accessor :type
53
56
 
@@ -64,6 +67,7 @@ module DatadogAPIClient::V2
64
67
  :'options' => :'options',
65
68
  :'queries' => :'queries',
66
69
  :'tags' => :'tags',
70
+ :'third_party_cases' => :'thirdPartyCases',
67
71
  :'type' => :'type'
68
72
  }
69
73
  end
@@ -81,6 +85,7 @@ module DatadogAPIClient::V2
81
85
  :'options' => :'SecurityMonitoringRuleOptions',
82
86
  :'queries' => :'Array<SecurityMonitoringStandardRuleQuery>',
83
87
  :'tags' => :'Array<String>',
88
+ :'third_party_cases' => :'Array<SecurityMonitoringThirdPartyRuleCaseCreate>',
84
89
  :'type' => :'SecurityMonitoringRuleTypeCreate'
85
90
  }
86
91
  end
@@ -145,6 +150,12 @@ module DatadogAPIClient::V2
145
150
  end
146
151
  end
147
152
 
153
+ if attributes.key?(:'third_party_cases')
154
+ if (value = attributes[:'third_party_cases']).is_a?(Array)
155
+ self.third_party_cases = value
156
+ end
157
+ end
158
+
148
159
  if attributes.key?(:'type')
149
160
  self.type = attributes[:'type']
150
161
  end
@@ -238,6 +249,7 @@ module DatadogAPIClient::V2
238
249
  options == o.options &&
239
250
  queries == o.queries &&
240
251
  tags == o.tags &&
252
+ third_party_cases == o.third_party_cases &&
241
253
  type == o.type
242
254
  end
243
255
 
@@ -245,7 +257,7 @@ module DatadogAPIClient::V2
245
257
  # @return [Integer] Hash code
246
258
  # @!visibility private
247
259
  def hash
248
- [cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, type].hash
260
+ [cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, third_party_cases, type].hash
249
261
  end
250
262
  end
251
263
  end
@@ -69,6 +69,9 @@ module DatadogAPIClient::V2
69
69
  # Tags for generated signals.
70
70
  attr_accessor :tags
71
71
 
72
+ # Cases for generating signals from third party rules. Only available for third party rules.
73
+ attr_accessor :third_party_cases
74
+
72
75
  # The rule type.
73
76
  attr_accessor :type
74
77
 
@@ -98,6 +101,7 @@ module DatadogAPIClient::V2
98
101
  :'options' => :'options',
99
102
  :'queries' => :'queries',
100
103
  :'tags' => :'tags',
104
+ :'third_party_cases' => :'thirdPartyCases',
101
105
  :'type' => :'type',
102
106
  :'update_author_id' => :'updateAuthorId',
103
107
  :'version' => :'version'
@@ -124,6 +128,7 @@ module DatadogAPIClient::V2
124
128
  :'options' => :'SecurityMonitoringRuleOptions',
125
129
  :'queries' => :'Array<SecurityMonitoringStandardRuleQuery>',
126
130
  :'tags' => :'Array<String>',
131
+ :'third_party_cases' => :'Array<SecurityMonitoringThirdPartyRuleCase>',
127
132
  :'type' => :'SecurityMonitoringRuleTypeRead',
128
133
  :'update_author_id' => :'Integer',
129
134
  :'version' => :'Integer'
@@ -218,6 +223,12 @@ module DatadogAPIClient::V2
218
223
  end
219
224
  end
220
225
 
226
+ if attributes.key?(:'third_party_cases')
227
+ if (value = attributes[:'third_party_cases']).is_a?(Array)
228
+ self.third_party_cases = value
229
+ end
230
+ end
231
+
221
232
  if attributes.key?(:'type')
222
233
  self.type = attributes[:'type']
223
234
  end
@@ -253,6 +264,7 @@ module DatadogAPIClient::V2
253
264
  options == o.options &&
254
265
  queries == o.queries &&
255
266
  tags == o.tags &&
267
+ third_party_cases == o.third_party_cases &&
256
268
  type == o.type &&
257
269
  update_author_id == o.update_author_id &&
258
270
  version == o.version
@@ -262,7 +274,7 @@ module DatadogAPIClient::V2
262
274
  # @return [Integer] Hash code
263
275
  # @!visibility private
264
276
  def hash
265
- [cases, compliance_signal_options, created_at, creation_author_id, deprecation_date, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, type, update_author_id, version].hash
277
+ [cases, compliance_signal_options, created_at, creation_author_id, deprecation_date, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, third_party_cases, type, update_author_id, version].hash
266
278
  end
267
279
  end
268
280
  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
+ # The suppression rule's properties.
21
+ class SecurityMonitoringSuppression
22
+ include BaseGenericModel
23
+
24
+ # The attributes of the suppression rule.
25
+ attr_accessor :attributes
26
+
27
+ # The ID of the suppression rule.
28
+ attr_accessor :id
29
+
30
+ # The type of the resource. The value should always be `suppressions`.
31
+ attr_accessor :type
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'attributes' => :'attributes',
38
+ :'id' => :'id',
39
+ :'type' => :'type'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'attributes' => :'SecurityMonitoringSuppressionAttributes',
48
+ :'id' => :'String',
49
+ :'type' => :'SecurityMonitoringSuppressionType'
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::SecurityMonitoringSuppression` 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::SecurityMonitoringSuppression`. 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?(:'attributes')
70
+ self.attributes = attributes[:'attributes']
71
+ end
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'type')
78
+ self.type = attributes[:'type']
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
+ attributes == o.attributes &&
89
+ id == o.id &&
90
+ type == o.type
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [attributes, id, type].hash
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,198 @@
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 attributes of the suppression rule.
21
+ class SecurityMonitoringSuppressionAttributes
22
+ include BaseGenericModel
23
+
24
+ # A Unix millisecond timestamp given the creation date of the suppression rule.
25
+ attr_accessor :creation_date
26
+
27
+ # A user.
28
+ attr_accessor :creator
29
+
30
+ # A description for the suppression rule.
31
+ attr_accessor :description
32
+
33
+ # Whether the suppression rule is enabled.
34
+ attr_accessor :enabled
35
+
36
+ # A Unix millisecond timestamp giving an expiration date for the suppression rule. After this date, it won't suppress signals anymore.
37
+ attr_accessor :expiration_date
38
+
39
+ # The name of the suppression rule.
40
+ attr_accessor :name
41
+
42
+ # The rule query of the suppression rule, with the same syntax as the search bar for detection rules.
43
+ attr_accessor :rule_query
44
+
45
+ # The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer.
46
+ attr_accessor :suppression_query
47
+
48
+ # A Unix millisecond timestamp given the update date of the suppression rule.
49
+ attr_accessor :update_date
50
+
51
+ # A user.
52
+ attr_accessor :updater
53
+
54
+ # The version of the suppression rule; it starts at 1, and is incremented at each update.
55
+ attr_reader :version
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ # @!visibility private
59
+ def self.attribute_map
60
+ {
61
+ :'creation_date' => :'creation_date',
62
+ :'creator' => :'creator',
63
+ :'description' => :'description',
64
+ :'enabled' => :'enabled',
65
+ :'expiration_date' => :'expiration_date',
66
+ :'name' => :'name',
67
+ :'rule_query' => :'rule_query',
68
+ :'suppression_query' => :'suppression_query',
69
+ :'update_date' => :'update_date',
70
+ :'updater' => :'updater',
71
+ :'version' => :'version'
72
+ }
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ # @!visibility private
77
+ def self.openapi_types
78
+ {
79
+ :'creation_date' => :'Integer',
80
+ :'creator' => :'SecurityMonitoringUser',
81
+ :'description' => :'String',
82
+ :'enabled' => :'Boolean',
83
+ :'expiration_date' => :'Integer',
84
+ :'name' => :'String',
85
+ :'rule_query' => :'String',
86
+ :'suppression_query' => :'String',
87
+ :'update_date' => :'Integer',
88
+ :'updater' => :'SecurityMonitoringUser',
89
+ :'version' => :'Integer'
90
+ }
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param attributes [Hash] Model attributes in the form of hash
95
+ # @!visibility private
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionAttributes` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!self.class.attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'creation_date')
110
+ self.creation_date = attributes[:'creation_date']
111
+ end
112
+
113
+ if attributes.key?(:'creator')
114
+ self.creator = attributes[:'creator']
115
+ end
116
+
117
+ if attributes.key?(:'description')
118
+ self.description = attributes[:'description']
119
+ end
120
+
121
+ if attributes.key?(:'enabled')
122
+ self.enabled = attributes[:'enabled']
123
+ end
124
+
125
+ if attributes.key?(:'expiration_date')
126
+ self.expiration_date = attributes[:'expiration_date']
127
+ end
128
+
129
+ if attributes.key?(:'name')
130
+ self.name = attributes[:'name']
131
+ end
132
+
133
+ if attributes.key?(:'rule_query')
134
+ self.rule_query = attributes[:'rule_query']
135
+ end
136
+
137
+ if attributes.key?(:'suppression_query')
138
+ self.suppression_query = attributes[:'suppression_query']
139
+ end
140
+
141
+ if attributes.key?(:'update_date')
142
+ self.update_date = attributes[:'update_date']
143
+ end
144
+
145
+ if attributes.key?(:'updater')
146
+ self.updater = attributes[:'updater']
147
+ end
148
+
149
+ if attributes.key?(:'version')
150
+ self.version = attributes[:'version']
151
+ end
152
+ end
153
+
154
+ # Check to see if the all the properties in the model are valid
155
+ # @return true if the model is valid
156
+ # @!visibility private
157
+ def valid?
158
+ return false if !@version.nil? && @version > 2147483647
159
+ true
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param version [Object] Object to be assigned
164
+ # @!visibility private
165
+ def version=(version)
166
+ if !version.nil? && version > 2147483647
167
+ fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 2147483647.'
168
+ end
169
+ @version = version
170
+ end
171
+
172
+ # Checks equality by comparing each attribute.
173
+ # @param o [Object] Object to be compared
174
+ # @!visibility private
175
+ def ==(o)
176
+ return true if self.equal?(o)
177
+ self.class == o.class &&
178
+ creation_date == o.creation_date &&
179
+ creator == o.creator &&
180
+ description == o.description &&
181
+ enabled == o.enabled &&
182
+ expiration_date == o.expiration_date &&
183
+ name == o.name &&
184
+ rule_query == o.rule_query &&
185
+ suppression_query == o.suppression_query &&
186
+ update_date == o.update_date &&
187
+ updater == o.updater &&
188
+ version == o.version
189
+ end
190
+
191
+ # Calculates hash code according to all attributes.
192
+ # @return [Integer] Hash code
193
+ # @!visibility private
194
+ def hash
195
+ [creation_date, creator, description, enabled, expiration_date, name, rule_query, suppression_query, update_date, updater, version].hash
196
+ end
197
+ end
198
+ end