datadog_api_client 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +6 -6
  3. data/.generator/templates/api.mustache +2 -2
  4. data/.generator/templates/api_client.mustache +7 -0
  5. data/.generator/templates/api_client_typhoeus_partial.mustache +7 -0
  6. data/.generator/templates/configuration.mustache +4 -0
  7. data/.openapi-generator/VERSION +1 -1
  8. data/CHANGELOG.md +27 -0
  9. data/README.md +12 -1
  10. data/data/v1/openapi.yaml +866 -119
  11. data/data/v2/openapi.yaml +113 -0
  12. data/docs/v1/AWSAccount.md +6 -0
  13. data/docs/v1/DowntimeRecurrence.md +1 -1
  14. data/docs/v1/Event.md +1 -1
  15. data/docs/v1/FormulaAndFunctionApmDependencyStatName.md +15 -0
  16. data/docs/v1/FormulaAndFunctionApmDependencyStatsDataSource.md +15 -0
  17. data/docs/v1/FormulaAndFunctionApmDependencyStatsQueryDefinition.md +36 -0
  18. data/docs/v1/FormulaAndFunctionApmResourceStatName.md +15 -0
  19. data/docs/v1/FormulaAndFunctionApmResourceStatsDataSource.md +15 -0
  20. data/docs/v1/FormulaAndFunctionApmResourceStatsQueryDefinition.md +36 -0
  21. data/docs/v1/FormulaAndFunctionQueryDefinition.md +5 -1
  22. data/docs/v1/FunnelQuery.md +22 -0
  23. data/docs/v1/FunnelRequestType.md +15 -0
  24. data/docs/v1/FunnelSource.md +15 -0
  25. data/docs/v1/FunnelWidgetDefinition.md +28 -0
  26. data/docs/v1/FunnelWidgetDefinitionType.md +15 -0
  27. data/docs/v1/FunnelWidgetRequest.md +20 -0
  28. data/docs/v1/LogsAPI.md +1 -1
  29. data/docs/v1/MetricContentEncoding.md +15 -0
  30. data/docs/v1/MetricsAPI.md +10 -6
  31. data/docs/v1/MetricsPayload.md +1 -1
  32. data/docs/v1/MonitorOptions.md +5 -1
  33. data/docs/v1/MonitorRenotifyStatusType.md +15 -0
  34. data/docs/v1/MonitorsAPI.md +9 -9
  35. data/docs/v1/NotebookCreateDataAttributes.md +2 -0
  36. data/docs/v1/NotebookMetadata.md +22 -0
  37. data/docs/v1/NotebookMetadataType.md +15 -0
  38. data/docs/v1/NotebookResponseDataAttributes.md +2 -0
  39. data/docs/v1/NotebookUpdateDataAttributes.md +2 -0
  40. data/docs/v1/NotebooksAPI.md +7 -3
  41. data/docs/v1/NotebooksResponseDataAttributes.md +2 -0
  42. data/docs/v1/ProcessQueryDefinition.md +1 -1
  43. data/docs/v1/README.md +31 -3
  44. data/docs/v1/SLOCorrection.md +1 -1
  45. data/docs/v1/SLOCorrectionCreateData.md +1 -1
  46. data/docs/v1/SLOCorrectionCreateRequestAttributes.md +4 -4
  47. data/docs/v1/SLOCorrectionListResponse.md +1 -1
  48. data/docs/v1/SLOCorrectionResponseAttributes.md +4 -4
  49. data/docs/v1/SLOCorrectionUpdateRequestAttributes.md +3 -3
  50. data/docs/v1/ScatterPlotWidgetDefinitionRequests.md +4 -2
  51. data/docs/v1/ScatterplotDimension.md +15 -0
  52. data/docs/v1/ScatterplotTableRequest.md +22 -0
  53. data/docs/v1/ScatterplotWidgetFormula.md +22 -0
  54. data/docs/v1/Series.md +1 -1
  55. data/docs/v1/ServiceChecksAPI.md +1 -1
  56. data/docs/v1/ServiceLevelObjectiveCorrectionsAPI.md +11 -11
  57. data/docs/v1/SyntheticsAPI.md +61 -0
  58. data/docs/v1/SyntheticsAPIStep.md +1 -1
  59. data/docs/v1/SyntheticsBatchDetails.md +18 -0
  60. data/docs/v1/SyntheticsBatchDetailsData.md +22 -0
  61. data/docs/v1/SyntheticsBatchResult.md +36 -0
  62. data/docs/v1/SyntheticsBrowserError.md +3 -3
  63. data/docs/v1/SyntheticsCIBatchMetadata.md +20 -0
  64. data/docs/v1/{SyntheticsCITestMetadataCi.md → SyntheticsCIBatchMetadataCI.md} +2 -2
  65. data/docs/v1/SyntheticsCIBatchMetadataGit.md +20 -0
  66. data/docs/v1/SyntheticsCITest.md +1 -1
  67. data/docs/v1/SyntheticsStatus.md +15 -0
  68. data/docs/v1/SyntheticsTestDetails.md +2 -0
  69. data/docs/v1/SyntheticsTestExecutionRule.md +15 -0
  70. data/docs/v1/SyntheticsTestRequest.md +2 -0
  71. data/docs/v1/UsageAttributionValues.md +4 -4
  72. data/docs/v1/UsageMeteringAPI.md +65 -0
  73. data/docs/v1/UsageSDSHour.md +22 -0
  74. data/docs/v1/UsageSDSResponse.md +18 -0
  75. data/docs/v1/UsageSummaryDate.md +4 -0
  76. data/docs/v1/UsageSummaryDateOrg.md +6 -2
  77. data/docs/v1/UsageSummaryResponse.md +6 -2
  78. data/docs/v1/UsageTimeseriesHour.md +1 -1
  79. data/docs/v1/WebhooksIntegration.md +1 -1
  80. data/docs/v1/WebhooksIntegrationUpdateRequest.md +1 -1
  81. data/docs/v1/WidgetDefinition.md +2 -0
  82. data/docs/v2/IncidentServicesAPI.md +5 -5
  83. data/docs/v2/IncidentTeamsAPI.md +5 -5
  84. data/docs/v2/IncidentsAPI.md +5 -5
  85. data/docs/v2/README.md +5 -0
  86. data/docs/v2/SecurityMonitoringAPI.md +5 -5
  87. data/examples/v1/metrics/SubmitMetrics.rbbeta +14 -0
  88. data/extract-code-blocks.awk +4 -0
  89. data/lib/datadog_api_client/v1/api/logs_api.rb +1 -1
  90. data/lib/datadog_api_client/v1/api/metrics_api.rb +5 -2
  91. data/lib/datadog_api_client/v1/api/monitors_api.rb +9 -9
  92. data/lib/datadog_api_client/v1/api/notebooks_api.rb +8 -2
  93. data/lib/datadog_api_client/v1/api/service_checks_api.rb +1 -1
  94. data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +16 -16
  95. data/lib/datadog_api_client/v1/api/synthetics_api.rb +73 -0
  96. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +77 -0
  97. data/lib/datadog_api_client/v1/api_client.rb +14 -0
  98. data/lib/datadog_api_client/v1/configuration.rb +7 -0
  99. data/lib/datadog_api_client/v1/models/aws_account.rb +37 -1
  100. data/lib/datadog_api_client/v1/models/content_encoding.rb +2 -2
  101. data/lib/datadog_api_client/v1/models/creator.rb +1 -0
  102. data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +1 -0
  103. data/lib/datadog_api_client/v1/models/downtime_recurrence.rb +1 -1
  104. data/lib/datadog_api_client/v1/models/event.rb +1 -16
  105. data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stat_name.rb +44 -0
  106. data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_data_source.rb +38 -0
  107. data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb +356 -0
  108. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stat_name.rb +47 -0
  109. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_data_source.rb +38 -0
  110. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb +348 -0
  111. data/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +2 -0
  112. data/lib/datadog_api_client/v1/models/funnel_query.rb +271 -0
  113. data/lib/datadog_api_client/v1/models/funnel_request_type.rb +38 -0
  114. data/lib/datadog_api_client/v1/models/funnel_source.rb +38 -0
  115. data/lib/datadog_api_client/v1/models/funnel_widget_definition.rb +322 -0
  116. data/lib/datadog_api_client/v1/models/funnel_widget_definition_type.rb +38 -0
  117. data/lib/datadog_api_client/v1/models/funnel_widget_request.rb +251 -0
  118. data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +38 -0
  119. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -0
  120. data/lib/datadog_api_client/v1/models/monitor.rb +2 -0
  121. data/lib/datadog_api_client/v1/models/monitor_options.rb +26 -2
  122. data/lib/datadog_api_client/v1/models/monitor_renotify_status_type.rb +40 -0
  123. data/lib/datadog_api_client/v1/models/notebook_author.rb +2 -0
  124. data/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb +10 -1
  125. data/lib/datadog_api_client/v1/models/notebook_metadata.rb +259 -0
  126. data/lib/datadog_api_client/v1/models/notebook_metadata_type.rb +42 -0
  127. data/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb +10 -1
  128. data/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb +10 -1
  129. data/lib/datadog_api_client/v1/models/notebooks_response_data_attributes.rb +10 -1
  130. data/lib/datadog_api_client/v1/models/notebooks_response_meta.rb +1 -1
  131. data/lib/datadog_api_client/v1/models/scatter_plot_widget_definition_requests.rb +10 -11
  132. data/lib/datadog_api_client/v1/models/scatterplot_dimension.rb +41 -0
  133. data/lib/datadog_api_client/v1/models/scatterplot_table_request.rb +256 -0
  134. data/lib/datadog_api_client/v1/models/scatterplot_widget_formula.rb +262 -0
  135. data/lib/datadog_api_client/v1/models/slo_correction.rb +2 -2
  136. data/lib/datadog_api_client/v1/models/slo_correction_create_data.rb +6 -1
  137. data/lib/datadog_api_client/v1/models/slo_correction_create_request.rb +1 -1
  138. data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +5 -5
  139. data/lib/datadog_api_client/v1/models/slo_correction_list_response.rb +2 -2
  140. data/lib/datadog_api_client/v1/models/slo_correction_response.rb +1 -1
  141. data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +5 -5
  142. data/lib/datadog_api_client/v1/models/slo_correction_update_data.rb +1 -1
  143. data/lib/datadog_api_client/v1/models/slo_correction_update_request.rb +1 -1
  144. data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +4 -4
  145. data/lib/datadog_api_client/v1/models/synthetics_batch_details.rb +232 -0
  146. data/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb +253 -0
  147. data/lib/datadog_api_client/v1/models/synthetics_batch_result.rb +319 -0
  148. data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata.rb → synthetics_ci_batch_metadata.rb} +6 -6
  149. data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata_ci.rb → synthetics_ci_batch_metadata_ci.rb} +4 -4
  150. data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata_git.rb → synthetics_ci_batch_metadata_git.rb} +5 -5
  151. data/lib/datadog_api_client/v1/models/synthetics_ci_test.rb +1 -1
  152. data/lib/datadog_api_client/v1/models/synthetics_status.rb +40 -0
  153. data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +10 -1
  154. data/lib/datadog_api_client/v1/models/synthetics_test_execution_rule.rb +40 -0
  155. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  156. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +13 -13
  157. data/lib/datadog_api_client/v1/models/usage_sds_hour.rb +253 -0
  158. data/lib/datadog_api_client/v1/models/usage_sds_response.rb +235 -0
  159. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -1
  160. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +28 -8
  161. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +29 -9
  162. data/lib/datadog_api_client/v1/models/usage_timeseries_hour.rb +1 -1
  163. data/lib/datadog_api_client/v1/models/webhooks_integration.rb +1 -1
  164. data/lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb +1 -1
  165. data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
  166. data/lib/datadog_api_client/v1.rb +29 -3
  167. data/lib/datadog_api_client/v2/api/incident_services_api.rb +5 -5
  168. data/lib/datadog_api_client/v2/api/incident_teams_api.rb +5 -5
  169. data/lib/datadog_api_client/v2/api/incidents_api.rb +5 -5
  170. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +5 -5
  171. data/lib/datadog_api_client/v2/api_client.rb +14 -0
  172. data/lib/datadog_api_client/v2/configuration.rb +5 -0
  173. data/lib/datadog_api_client/v2/models/incident_field_attributes_multiple_value.rb +1 -0
  174. data/lib/datadog_api_client/v2/models/incident_field_attributes_single_value.rb +1 -0
  175. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -0
  176. data/lib/datadog_api_client/v2/models/user_attributes.rb +2 -0
  177. data/lib/datadog_api_client/version.rb +1 -1
  178. data/spec/v1/models/formula_and_function_apm_dependency_stat_name_spec.rb +31 -0
  179. data/spec/v1/models/formula_and_function_apm_dependency_stats_data_source_spec.rb +31 -0
  180. data/spec/v1/models/formula_and_function_apm_dependency_stats_query_definition_spec.rb +91 -0
  181. data/spec/v1/models/formula_and_function_apm_resource_stat_name_spec.rb +31 -0
  182. data/spec/v1/models/formula_and_function_apm_resource_stats_data_source_spec.rb +31 -0
  183. data/spec/v1/models/formula_and_function_apm_resource_stats_query_definition_spec.rb +91 -0
  184. data/spec/v1/models/funnel_query_spec.rb +49 -0
  185. data/spec/v1/models/funnel_request_type_spec.rb +31 -0
  186. data/spec/v1/models/funnel_source_spec.rb +31 -0
  187. data/spec/v1/models/funnel_widget_definition_spec.rb +67 -0
  188. data/spec/v1/models/funnel_widget_definition_type_spec.rb +31 -0
  189. data/spec/v1/models/funnel_widget_request_spec.rb +43 -0
  190. data/spec/v1/models/metric_content_encoding_spec.rb +31 -0
  191. data/spec/v1/models/monitor_renotify_status_type_spec.rb +31 -0
  192. data/spec/v1/models/notebook_metadata_spec.rb +49 -0
  193. data/spec/v1/models/notebook_metadata_type_spec.rb +31 -0
  194. data/spec/v1/models/scatterplot_dimension_spec.rb +31 -0
  195. data/spec/v1/models/scatterplot_table_request_spec.rb +49 -0
  196. data/spec/v1/models/scatterplot_widget_formula_spec.rb +49 -0
  197. data/spec/v1/models/synthetics_batch_details_data_spec.rb +49 -0
  198. data/spec/v1/models/synthetics_batch_details_spec.rb +37 -0
  199. data/spec/v1/models/synthetics_batch_result_spec.rb +91 -0
  200. data/spec/v1/models/{synthetics_ci_test_metadata_ci_spec.rb → synthetics_ci_batch_metadata_ci_spec.rb} +6 -6
  201. data/spec/v1/models/{synthetics_ci_test_metadata_git_spec.rb → synthetics_ci_batch_metadata_git_spec.rb} +6 -6
  202. data/spec/v1/models/{synthetics_ci_test_metadata_spec.rb → synthetics_ci_batch_metadata_spec.rb} +6 -6
  203. data/spec/v1/models/synthetics_status_spec.rb +31 -0
  204. data/spec/v1/models/synthetics_test_execution_rule_spec.rb +31 -0
  205. data/spec/v1/models/usage_sds_hour_spec.rb +49 -0
  206. data/spec/v1/models/usage_sds_response_spec.rb +37 -0
  207. metadata +119 -14
  208. data/docs/v1/SyntheticsCITestMetadata.md +0 -20
  209. data/docs/v1/SyntheticsCITestMetadataGit.md +0 -20
@@ -119,10 +119,10 @@ module DatadogAPIClient::V1
119
119
  attr_accessor :npm_host_usage
120
120
 
121
121
  # The percentage of profiled containers usage by tag(s).
122
- attr_accessor :profiled_containers_percentage
122
+ attr_accessor :profiled_container_percentage
123
123
 
124
124
  # The profiled container usage by tag(s).
125
- attr_accessor :profiled_containers_usage
125
+ attr_accessor :profiled_container_usage
126
126
 
127
127
  # The percentage of profiled hosts usage by tag(s).
128
128
  attr_accessor :profiled_hosts_percentage
@@ -171,8 +171,8 @@ module DatadogAPIClient::V1
171
171
  :'lambda_usage' => :'lambda_usage',
172
172
  :'npm_host_percentage' => :'npm_host_percentage',
173
173
  :'npm_host_usage' => :'npm_host_usage',
174
- :'profiled_containers_percentage' => :'profiled_containers_percentage',
175
- :'profiled_containers_usage' => :'profiled_containers_usage',
174
+ :'profiled_container_percentage' => :'profiled_container_percentage',
175
+ :'profiled_container_usage' => :'profiled_container_usage',
176
176
  :'profiled_hosts_percentage' => :'profiled_hosts_percentage',
177
177
  :'profiled_hosts_usage' => :'profiled_hosts_usage',
178
178
  :'snmp_percentage' => :'snmp_percentage',
@@ -220,8 +220,8 @@ module DatadogAPIClient::V1
220
220
  :'lambda_usage' => :'Float',
221
221
  :'npm_host_percentage' => :'Float',
222
222
  :'npm_host_usage' => :'Float',
223
- :'profiled_containers_percentage' => :'Float',
224
- :'profiled_containers_usage' => :'Float',
223
+ :'profiled_container_percentage' => :'Float',
224
+ :'profiled_container_usage' => :'Float',
225
225
  :'profiled_hosts_percentage' => :'Float',
226
226
  :'profiled_hosts_usage' => :'Float',
227
227
  :'snmp_percentage' => :'Float',
@@ -378,12 +378,12 @@ module DatadogAPIClient::V1
378
378
  self.npm_host_usage = attributes[:'npm_host_usage']
379
379
  end
380
380
 
381
- if attributes.key?(:'profiled_containers_percentage')
382
- self.profiled_containers_percentage = attributes[:'profiled_containers_percentage']
381
+ if attributes.key?(:'profiled_container_percentage')
382
+ self.profiled_container_percentage = attributes[:'profiled_container_percentage']
383
383
  end
384
384
 
385
- if attributes.key?(:'profiled_containers_usage')
386
- self.profiled_containers_usage = attributes[:'profiled_containers_usage']
385
+ if attributes.key?(:'profiled_container_usage')
386
+ self.profiled_container_usage = attributes[:'profiled_container_usage']
387
387
  end
388
388
 
389
389
  if attributes.key?(:'profiled_hosts_percentage')
@@ -453,8 +453,8 @@ module DatadogAPIClient::V1
453
453
  lambda_usage == o.lambda_usage &&
454
454
  npm_host_percentage == o.npm_host_percentage &&
455
455
  npm_host_usage == o.npm_host_usage &&
456
- profiled_containers_percentage == o.profiled_containers_percentage &&
457
- profiled_containers_usage == o.profiled_containers_usage &&
456
+ profiled_container_percentage == o.profiled_container_percentage &&
457
+ profiled_container_usage == o.profiled_container_usage &&
458
458
  profiled_hosts_percentage == o.profiled_hosts_percentage &&
459
459
  profiled_hosts_usage == o.profiled_hosts_usage &&
460
460
  snmp_percentage == o.snmp_percentage &&
@@ -470,7 +470,7 @@ module DatadogAPIClient::V1
470
470
  # Calculates hash code according to all attributes.
471
471
  # @return [Integer] Hash code
472
472
  def hash
473
- [api_percentage, api_usage, apm_host_percentage, apm_host_usage, browser_percentage, browser_usage, container_percentage, container_usage, cspm_container_percentage, cspm_container_usage, cspm_host_percentage, cspm_host_usage, custom_timeseries_percentage, custom_timeseries_usage, cws_container_percentage, cws_container_usage, cws_host_percentage, cws_host_usage, dbm_host_percentage, dbm_host_usage, dbm_queries_percentage, dbm_queries_usage, infra_host_percentage, infra_host_usage, lambda_functions_percentage, lambda_functions_usage, lambda_invocations_percentage, lambda_invocations_usage, lambda_percentage, lambda_usage, npm_host_percentage, npm_host_usage, profiled_containers_percentage, profiled_containers_usage, profiled_hosts_percentage, profiled_hosts_usage, snmp_percentage, snmp_usage].hash
473
+ [api_percentage, api_usage, apm_host_percentage, apm_host_usage, browser_percentage, browser_usage, container_percentage, container_usage, cspm_container_percentage, cspm_container_usage, cspm_host_percentage, cspm_host_usage, custom_timeseries_percentage, custom_timeseries_usage, cws_container_percentage, cws_container_usage, cws_host_percentage, cws_host_usage, dbm_host_percentage, dbm_host_usage, dbm_queries_percentage, dbm_queries_usage, infra_host_percentage, infra_host_usage, lambda_functions_percentage, lambda_functions_usage, lambda_invocations_percentage, lambda_invocations_usage, lambda_percentage, lambda_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_hosts_percentage, profiled_hosts_usage, snmp_percentage, snmp_usage].hash
474
474
  end
475
475
 
476
476
  # Builds the object from hash
@@ -0,0 +1,253 @@
1
+ =begin
2
+ #Datadog API V1 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://openapi-generator.tech
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::V1
20
+ # Sensitive Data Scanner usage for a given organization for a given hour.
21
+ class UsageSDSHour
22
+ # whether the object has unparsed attributes
23
+ attr_accessor :_unparsed
24
+
25
+ # The hour for the usage.
26
+ attr_accessor :hour
27
+
28
+ # The total number of bytes scanned of logs usage by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
29
+ attr_accessor :logs_scanned_bytes
30
+
31
+ # The total number of bytes scanned across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
32
+ attr_accessor :total_scanned_bytes
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'hour' => :'hour',
38
+ :'logs_scanned_bytes' => :'logs_scanned_bytes',
39
+ :'total_scanned_bytes' => :'total_scanned_bytes'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'hour' => :'Time',
52
+ :'logs_scanned_bytes' => :'Integer',
53
+ :'total_scanned_bytes' => :'Integer'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSDSHour` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSDSHour`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'hour')
79
+ self.hour = attributes[:'hour']
80
+ end
81
+
82
+ if attributes.key?(:'logs_scanned_bytes')
83
+ self.logs_scanned_bytes = attributes[:'logs_scanned_bytes']
84
+ end
85
+
86
+ if attributes.key?(:'total_scanned_bytes')
87
+ self.total_scanned_bytes = attributes[:'total_scanned_bytes']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ invalid_properties = Array.new
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ hour == o.hour &&
110
+ logs_scanned_bytes == o.logs_scanned_bytes &&
111
+ total_scanned_bytes == o.total_scanned_bytes
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [hour, logs_scanned_bytes, total_scanned_bytes].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ new.build_from_hash(attributes)
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ self.class.openapi_types.each_pair do |key, type|
139
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
140
+ self.send("#{key}=", nil)
141
+ elsif type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
145
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ end
147
+ elsif !attributes[self.class.attribute_map[key]].nil?
148
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ end
150
+ end
151
+
152
+ self
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def _deserialize(type, value)
160
+ case type.to_sym
161
+ when :Time
162
+ Time.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :Boolean
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when :Array
181
+ # generic array, return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ # models (e.g. Pet) or oneOf
196
+ klass = DatadogAPIClient::V1.const_get(type)
197
+ res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
+ if res.instance_of? DatadogAPIClient::V1::UnparsedObject
199
+ self._unparsed = true
200
+ end
201
+ res
202
+ end
203
+ end
204
+
205
+ # Returns the string representation of the object
206
+ # @return [String] String presentation of the object
207
+ def to_s
208
+ to_hash.to_s
209
+ end
210
+
211
+ # to_body is an alias to to_hash (backward compatibility)
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_body
214
+ to_hash
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ if value.nil?
224
+ is_nullable = self.class.openapi_nullable.include?(attr)
225
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
+ end
227
+
228
+ hash[param] = _to_hash(value)
229
+ end
230
+ hash
231
+ end
232
+
233
+ # Outputs non-array value in the form of hash
234
+ # For object, use to_hash. Otherwise, just return the value
235
+ # @param [Object] value Any valid value
236
+ # @return [Hash] Returns the value in the form of hash
237
+ def _to_hash(value)
238
+ if value.is_a?(Array)
239
+ value.compact.map { |v| _to_hash(v) }
240
+ elsif value.is_a?(Hash)
241
+ {}.tap do |hash|
242
+ value.each { |k, v| hash[k] = _to_hash(v) }
243
+ end
244
+ elsif value.respond_to? :to_hash
245
+ value.to_hash
246
+ else
247
+ value
248
+ end
249
+ end
250
+
251
+ end
252
+
253
+ end
@@ -0,0 +1,235 @@
1
+ =begin
2
+ #Datadog API V1 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://openapi-generator.tech
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::V1
20
+ # Response containing the Sensitive Data Scanner usage for each hour for a given organization.
21
+ class UsageSDSResponse
22
+ # whether the object has unparsed attributes
23
+ attr_accessor :_unparsed
24
+
25
+ # Get hourly usage for Sensitive Data Scanner.
26
+ attr_accessor :usage
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'usage' => :'usage'
32
+ }
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'usage' => :'Array<UsageSDSHour>'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageSDSResponse` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UsageSDSResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'usage')
69
+ if (value = attributes[:'usage']).is_a?(Array)
70
+ self.usage = value
71
+ end
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ usage == o.usage
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [usage].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ new.build_from_hash(attributes)
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :Time
144
+ Time.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when :Array
163
+ # generic array, return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ # models (e.g. Pet) or oneOf
178
+ klass = DatadogAPIClient::V1.const_get(type)
179
+ res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
180
+ if res.instance_of? DatadogAPIClient::V1::UnparsedObject
181
+ self._unparsed = true
182
+ end
183
+ res
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+
235
+ end
@@ -142,6 +142,12 @@ module DatadogAPIClient::V1
142
142
  # Shows the sum of RUM Sessions (browser and mobile) over all hours in the current date for all organizations.
143
143
  attr_accessor :rum_total_session_count_sum
144
144
 
145
+ # Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations.
146
+ attr_accessor :sds_logs_scanned_bytes_sum
147
+
148
+ # Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over all hours in the current month for all organizations.
149
+ attr_accessor :sds_total_scanned_bytes_sum
150
+
145
151
  # Shows the sum of all Synthetic browser tests over all hours in the current date for all organizations.
146
152
  attr_accessor :synthetics_browser_check_calls_count_sum
147
153
 
@@ -200,6 +206,8 @@ module DatadogAPIClient::V1
200
206
  :'profiling_host_top99p' => :'profiling_host_top99p',
201
207
  :'rum_session_count_sum' => :'rum_session_count_sum',
202
208
  :'rum_total_session_count_sum' => :'rum_total_session_count_sum',
209
+ :'sds_logs_scanned_bytes_sum' => :'sds_logs_scanned_bytes_sum',
210
+ :'sds_total_scanned_bytes_sum' => :'sds_total_scanned_bytes_sum',
203
211
  :'synthetics_browser_check_calls_count_sum' => :'synthetics_browser_check_calls_count_sum',
204
212
  :'synthetics_check_calls_count_sum' => :'synthetics_check_calls_count_sum',
205
213
  :'trace_search_indexed_events_count_sum' => :'trace_search_indexed_events_count_sum',
@@ -256,6 +264,8 @@ module DatadogAPIClient::V1
256
264
  :'profiling_host_top99p' => :'Integer',
257
265
  :'rum_session_count_sum' => :'Integer',
258
266
  :'rum_total_session_count_sum' => :'Integer',
267
+ :'sds_logs_scanned_bytes_sum' => :'Integer',
268
+ :'sds_total_scanned_bytes_sum' => :'Integer',
259
269
  :'synthetics_browser_check_calls_count_sum' => :'Integer',
260
270
  :'synthetics_check_calls_count_sum' => :'Integer',
261
271
  :'trace_search_indexed_events_count_sum' => :'Integer',
@@ -447,6 +457,14 @@ module DatadogAPIClient::V1
447
457
  self.rum_total_session_count_sum = attributes[:'rum_total_session_count_sum']
448
458
  end
449
459
 
460
+ if attributes.key?(:'sds_logs_scanned_bytes_sum')
461
+ self.sds_logs_scanned_bytes_sum = attributes[:'sds_logs_scanned_bytes_sum']
462
+ end
463
+
464
+ if attributes.key?(:'sds_total_scanned_bytes_sum')
465
+ self.sds_total_scanned_bytes_sum = attributes[:'sds_total_scanned_bytes_sum']
466
+ end
467
+
450
468
  if attributes.key?(:'synthetics_browser_check_calls_count_sum')
451
469
  self.synthetics_browser_check_calls_count_sum = attributes[:'synthetics_browser_check_calls_count_sum']
452
470
  end
@@ -526,6 +544,8 @@ module DatadogAPIClient::V1
526
544
  profiling_host_top99p == o.profiling_host_top99p &&
527
545
  rum_session_count_sum == o.rum_session_count_sum &&
528
546
  rum_total_session_count_sum == o.rum_total_session_count_sum &&
547
+ sds_logs_scanned_bytes_sum == o.sds_logs_scanned_bytes_sum &&
548
+ sds_total_scanned_bytes_sum == o.sds_total_scanned_bytes_sum &&
529
549
  synthetics_browser_check_calls_count_sum == o.synthetics_browser_check_calls_count_sum &&
530
550
  synthetics_check_calls_count_sum == o.synthetics_check_calls_count_sum &&
531
551
  trace_search_indexed_events_count_sum == o.trace_search_indexed_events_count_sum &&
@@ -542,7 +562,7 @@ module DatadogAPIClient::V1
542
562
  # Calculates hash code according to all attributes.
543
563
  # @return [Integer] Hash code
544
564
  def hash
545
- [agent_host_top99p, apm_azure_app_service_host_top99p, apm_host_top99p, audit_logs_lines_indexed_sum, aws_host_top99p, aws_lambda_func_count, aws_lambda_invocations_sum, azure_app_service_top99p, billable_ingested_bytes_sum, container_avg, container_hwm, cspm_container_avg, cspm_container_hwm, cspm_host_top99p, custom_ts_avg, cws_container_count_avg, cws_host_top99p, date, dbm_host_top99p, dbm_queries_count_avg, fargate_tasks_count_avg, fargate_tasks_count_hwm, gcp_host_top99p, heroku_host_top99p, incident_management_monthly_active_users_hwm, indexed_events_count_sum, infra_host_top99p, ingested_events_bytes_sum, iot_device_sum, iot_device_top99p, mobile_rum_session_count_android_sum, mobile_rum_session_count_ios_sum, mobile_rum_session_count_sum, netflow_indexed_events_count_sum, npm_host_top99p, opentelemetry_host_top99p, orgs, profiling_host_top99p, rum_session_count_sum, rum_total_session_count_sum, synthetics_browser_check_calls_count_sum, synthetics_check_calls_count_sum, trace_search_indexed_events_count_sum, twol_ingested_events_bytes_sum, vsphere_host_top99p].hash
565
+ [agent_host_top99p, apm_azure_app_service_host_top99p, apm_host_top99p, audit_logs_lines_indexed_sum, aws_host_top99p, aws_lambda_func_count, aws_lambda_invocations_sum, azure_app_service_top99p, billable_ingested_bytes_sum, container_avg, container_hwm, cspm_container_avg, cspm_container_hwm, cspm_host_top99p, custom_ts_avg, cws_container_count_avg, cws_host_top99p, date, dbm_host_top99p, dbm_queries_count_avg, fargate_tasks_count_avg, fargate_tasks_count_hwm, gcp_host_top99p, heroku_host_top99p, incident_management_monthly_active_users_hwm, indexed_events_count_sum, infra_host_top99p, ingested_events_bytes_sum, iot_device_sum, iot_device_top99p, mobile_rum_session_count_android_sum, mobile_rum_session_count_ios_sum, mobile_rum_session_count_sum, netflow_indexed_events_count_sum, npm_host_top99p, opentelemetry_host_top99p, orgs, profiling_host_top99p, rum_session_count_sum, rum_total_session_count_sum, sds_logs_scanned_bytes_sum, sds_total_scanned_bytes_sum, synthetics_browser_check_calls_count_sum, synthetics_check_calls_count_sum, trace_search_indexed_events_count_sum, twol_ingested_events_bytes_sum, vsphere_host_top99p].hash
546
566
  end
547
567
 
548
568
  # Builds the object from hash