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
@@ -0,0 +1,119 @@
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 new suppression properties; partial updates are supported.
21
+ class SecurityMonitoringSuppressionUpdateData
22
+ include BaseGenericModel
23
+
24
+ # The suppression rule properties to be updated.
25
+ attr_reader :attributes
26
+
27
+ # The type of the resource. The value should always be `suppressions`.
28
+ attr_reader :type
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'attributes' => :'attributes',
35
+ :'type' => :'type'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'attributes' => :'SecurityMonitoringSuppressionUpdateAttributes',
44
+ :'type' => :'SecurityMonitoringSuppressionType'
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::SecurityMonitoringSuppressionUpdateData` 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::SecurityMonitoringSuppressionUpdateData`. 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?(:'attributes')
65
+ self.attributes = attributes[:'attributes']
66
+ end
67
+
68
+ if attributes.key?(:'type')
69
+ self.type = attributes[:'type']
70
+ end
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ # @!visibility private
76
+ def valid?
77
+ return false if @attributes.nil?
78
+ return false if @type.nil?
79
+ true
80
+ end
81
+
82
+ # Custom attribute writer method with validation
83
+ # @param attributes [Object] Object to be assigned
84
+ # @!visibility private
85
+ def attributes=(attributes)
86
+ if attributes.nil?
87
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
88
+ end
89
+ @attributes = attributes
90
+ end
91
+
92
+ # Custom attribute writer method with validation
93
+ # @param type [Object] Object to be assigned
94
+ # @!visibility private
95
+ def type=(type)
96
+ if type.nil?
97
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
98
+ end
99
+ @type = type
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param o [Object] Object to be compared
104
+ # @!visibility private
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ attributes == o.attributes &&
109
+ type == o.type
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ # @!visibility private
115
+ def hash
116
+ [attributes, type].hash
117
+ end
118
+ end
119
+ 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
+ # Request object containing the fields to update on the suppression rule.
21
+ class SecurityMonitoringSuppressionUpdateRequest
22
+ include BaseGenericModel
23
+
24
+ # The new suppression properties; partial updates are supported.
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' => :'SecurityMonitoringSuppressionUpdateData'
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::SecurityMonitoringSuppressionUpdateRequest` 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::SecurityMonitoringSuppressionUpdateRequest`. 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,82 @@
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 object containing the available suppression rules.
21
+ class SecurityMonitoringSuppressionsResponse
22
+ include BaseGenericModel
23
+
24
+ # A list of suppressions objects.
25
+ attr_accessor :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' => :'Array<SecurityMonitoringSuppression>'
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::SecurityMonitoringSuppressionsResponse` 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::SecurityMonitoringSuppressionsResponse`. 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
+ if (value = attributes[:'data']).is_a?(Array)
61
+ self.data = value
62
+ end
63
+ end
64
+ end
65
+
66
+ # Checks equality by comparing each attribute.
67
+ # @param o [Object] Object to be compared
68
+ # @!visibility private
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ data == o.data
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Integer] Hash code
77
+ # @!visibility private
78
+ def hash
79
+ [data].hash
80
+ end
81
+ end
82
+ 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
+ # A query to be combined with the third party case query.
21
+ class SecurityMonitoringThirdPartyRootQuery
22
+ include BaseGenericModel
23
+
24
+ # Fields to group by.
25
+ attr_accessor :group_by_fields
26
+
27
+ # Query to run on logs.
28
+ attr_accessor :query
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'group_by_fields' => :'groupByFields',
35
+ :'query' => :'query'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'group_by_fields' => :'Array<String>',
44
+ :'query' => :'String'
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::SecurityMonitoringThirdPartyRootQuery` 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::SecurityMonitoringThirdPartyRootQuery`. 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?(:'group_by_fields')
65
+ if (value = attributes[:'group_by_fields']).is_a?(Array)
66
+ self.group_by_fields = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'query')
71
+ self.query = attributes[:'query']
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
+ group_by_fields == o.group_by_fields &&
82
+ query == o.query
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ # @!visibility private
88
+ def hash
89
+ [group_by_fields, query].hash
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,112 @@
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 when signal is generated by a third party rule.
21
+ class SecurityMonitoringThirdPartyRuleCase
22
+ include BaseGenericModel
23
+
24
+ # Name of the case.
25
+ attr_accessor :name
26
+
27
+ # Notification targets for each rule case.
28
+ attr_accessor :notifications
29
+
30
+ # A query to map a third party event to this case.
31
+ attr_accessor :query
32
+
33
+ # Severity of the Security Signal.
34
+ attr_accessor :status
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ # @!visibility private
38
+ def self.attribute_map
39
+ {
40
+ :'name' => :'name',
41
+ :'notifications' => :'notifications',
42
+ :'query' => :'query',
43
+ :'status' => :'status'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'name' => :'String',
52
+ :'notifications' => :'Array<String>',
53
+ :'query' => :'String',
54
+ :'status' => :'SecurityMonitoringRuleSeverity'
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::SecurityMonitoringThirdPartyRuleCase` 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::SecurityMonitoringThirdPartyRuleCase`. 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?(:'name')
75
+ self.name = attributes[:'name']
76
+ end
77
+
78
+ if attributes.key?(:'notifications')
79
+ if (value = attributes[:'notifications']).is_a?(Array)
80
+ self.notifications = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'query')
85
+ self.query = attributes[:'query']
86
+ end
87
+
88
+ if attributes.key?(:'status')
89
+ self.status = attributes[:'status']
90
+ end
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param o [Object] Object to be compared
95
+ # @!visibility private
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ name == o.name &&
100
+ notifications == o.notifications &&
101
+ query == o.query &&
102
+ status == o.status
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Integer] Hash code
107
+ # @!visibility private
108
+ def hash
109
+ [name, notifications, query, status].hash
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,130 @@
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 when a signal is generated by a third party rule.
21
+ class SecurityMonitoringThirdPartyRuleCaseCreate
22
+ include BaseGenericModel
23
+
24
+ # Name of the case.
25
+ attr_accessor :name
26
+
27
+ # Notification targets for each rule case.
28
+ attr_accessor :notifications
29
+
30
+ # A query to map a third party event to this case.
31
+ attr_accessor :query
32
+
33
+ # Severity of the Security Signal.
34
+ attr_reader :status
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ # @!visibility private
38
+ def self.attribute_map
39
+ {
40
+ :'name' => :'name',
41
+ :'notifications' => :'notifications',
42
+ :'query' => :'query',
43
+ :'status' => :'status'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'name' => :'String',
52
+ :'notifications' => :'Array<String>',
53
+ :'query' => :'String',
54
+ :'status' => :'SecurityMonitoringRuleSeverity'
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::SecurityMonitoringThirdPartyRuleCaseCreate` 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::SecurityMonitoringThirdPartyRuleCaseCreate`. 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?(:'name')
75
+ self.name = attributes[:'name']
76
+ end
77
+
78
+ if attributes.key?(:'notifications')
79
+ if (value = attributes[:'notifications']).is_a?(Array)
80
+ self.notifications = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'query')
85
+ self.query = attributes[:'query']
86
+ end
87
+
88
+ if attributes.key?(:'status')
89
+ self.status = attributes[:'status']
90
+ end
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ # @!visibility private
96
+ def valid?
97
+ return false if @status.nil?
98
+ true
99
+ end
100
+
101
+ # Custom attribute writer method with validation
102
+ # @param status [Object] Object to be assigned
103
+ # @!visibility private
104
+ def status=(status)
105
+ if status.nil?
106
+ fail ArgumentError, 'invalid value for "status", status cannot be nil.'
107
+ end
108
+ @status = status
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param o [Object] Object to be compared
113
+ # @!visibility private
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ name == o.name &&
118
+ notifications == o.notifications &&
119
+ query == o.query &&
120
+ status == o.status
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ # @!visibility private
126
+ def hash
127
+ [name, notifications, query, status].hash
128
+ end
129
+ end
130
+ end