datadog_api_client 2.12.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +6 -6
  3. data/.generator/conftest.py +7 -0
  4. data/.generator/poetry.lock +45 -75
  5. data/.generator/pyproject.toml +7 -7
  6. data/.generator/schemas/v1/openapi.yaml +257 -19
  7. data/.generator/schemas/v2/openapi.yaml +3020 -911
  8. data/.generator/src/generator/formatter.py +43 -32
  9. data/.generator/src/generator/openapi.py +4 -2
  10. data/.generator/src/generator/templates/api_client.j2 +81 -53
  11. data/.generator/src/generator/templates/configuration.j2 +21 -0
  12. data/.github/workflows/test_integration.yml +7 -1
  13. data/.pre-commit-config.yaml +4 -4
  14. data/CHANGELOG.md +62 -0
  15. data/README.md +23 -0
  16. data/examples/v1/azure-integration/CreateAzureIntegration.rb +3 -0
  17. data/examples/v1/azure-integration/DeleteAzureIntegration.rb +3 -0
  18. data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +3 -0
  19. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +3 -0
  20. data/examples/v1/dashboards/CreateDashboard_1284514532.rb +43 -0
  21. data/examples/v1/dashboards/CreateDashboard_2261785072.rb +47 -0
  22. data/examples/v1/dashboards/CreateDashboard_252716965.rb +6 -0
  23. data/examples/v1/dashboards/CreateDashboard_3513586382.rb +74 -0
  24. data/examples/v1/dashboards/CreateDashboard_3562282606.rb +1 -0
  25. data/examples/v1/dashboards/DeletePublicDashboardInvitation.rb +3 -3
  26. data/examples/v1/organizations/UpdateOrg.rb +1 -1
  27. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
  28. data/examples/v1/users/CreateUser.rb +1 -1
  29. data/examples/v1/users/CreateUser_266604071.rb +13 -0
  30. data/examples/v1/users/UpdateUser.rb +1 -1
  31. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +3 -0
  32. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +3 -0
  33. data/examples/v2/confluent-cloud/CreateConfluentAccount.rb +1 -0
  34. data/examples/v2/confluent-cloud/CreateConfluentResource.rb +1 -0
  35. data/examples/v2/confluent-cloud/UpdateConfluentResource.rb +1 -0
  36. data/examples/v2/downtimes/CancelDowntime.rb +11 -0
  37. data/examples/v2/downtimes/CreateDowntime.rb +26 -0
  38. data/examples/v2/downtimes/GetDowntime.rb +11 -0
  39. data/examples/v2/downtimes/ListDowntimes.rb +8 -0
  40. data/examples/v2/downtimes/ListMonitorDowntimes.rb +8 -0
  41. data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +8 -0
  42. data/examples/v2/downtimes/UpdateDowntime.rb +21 -0
  43. data/examples/v2/logs/AggregateLogs_2955613758.rb +1 -1
  44. data/examples/v2/logs/ListLogsGet_2034110533.rb +3 -1
  45. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.rb +10 -0
  46. data/examples/v2/spans/AggregateSpans.rb +25 -0
  47. data/examples/v2/spans/ListSpans.rb +25 -0
  48. data/examples/v2/spans/ListSpansGet.rb +5 -0
  49. data/examples/v2/spans/ListSpansGet_1130763422.rb +8 -0
  50. data/examples/v2/spans/ListSpans_3495563906.rb +25 -0
  51. data/examples/v2/teams/CreateTeam.rb +2 -2
  52. data/examples/v2/teams/CreateTeam_252121814.rb +24 -0
  53. data/examples/v2/teams/GetUserMemberships.rb +8 -0
  54. data/examples/v2/teams/UpdateTeam.rb +9 -0
  55. data/lib/datadog_api_client/api_client.rb +81 -53
  56. data/lib/datadog_api_client/configuration.rb +28 -0
  57. data/lib/datadog_api_client/inflector.rb +97 -1
  58. data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +2 -2
  59. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +10 -10
  60. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  61. data/lib/datadog_api_client/v1/models/azure_account.rb +32 -1
  62. data/lib/datadog_api_client/v1/models/change_widget_request.rb +1 -1
  63. data/lib/datadog_api_client/v1/models/distribution_widget_definition.rb +13 -1
  64. data/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_data_source.rb +26 -0
  65. data/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb +150 -0
  66. data/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +2 -1
  67. data/lib/datadog_api_client/v1/models/formula_and_function_response_format.rb +2 -1
  68. data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb +11 -1
  69. data/lib/datadog_api_client/v1/models/geomap_widget_request.rb +24 -2
  70. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +3 -0
  71. data/lib/datadog_api_client/v1/models/ip_prefixes_remote_configuration.rb +94 -0
  72. data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
  73. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
  74. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +61 -1
  75. data/lib/datadog_api_client/v1/models/organization_settings.rb +8 -0
  76. data/lib/datadog_api_client/v1/models/query_value_widget_request.rb +1 -1
  77. data/lib/datadog_api_client/v1/models/scatterplot_table_request.rb +1 -1
  78. data/lib/datadog_api_client/v1/models/sunburst_widget_request.rb +1 -1
  79. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  80. data/lib/datadog_api_client/v1/models/table_widget_request.rb +1 -1
  81. data/lib/datadog_api_client/v1/models/timeseries_widget_request.rb +1 -1
  82. data/lib/datadog_api_client/v1/models/toplist_widget_request.rb +1 -1
  83. data/lib/datadog_api_client/v1/models/tree_map_widget_request.rb +1 -1
  84. data/lib/datadog_api_client/v1/models/usage_ci_visibility_hour.rb +12 -1
  85. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +24 -4
  86. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +24 -4
  87. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +24 -4
  88. data/lib/datadog_api_client/v1/models/user.rb +8 -0
  89. data/lib/datadog_api_client/v1/models/widget_comparator.rb +1 -0
  90. data/lib/datadog_api_client/v1/models/widget_display_type.rb +1 -0
  91. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +11 -5
  92. data/lib/datadog_api_client/v2/api/downtimes_api.rb +462 -0
  93. data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +2 -2
  94. data/lib/datadog_api_client/v2/api/logs_api.rb +2 -2
  95. data/lib/datadog_api_client/v2/api/metrics_api.rb +2 -2
  96. data/lib/datadog_api_client/v2/api/rum_api.rb +2 -2
  97. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +3 -3
  98. data/lib/datadog_api_client/v2/api/spans_api.rb +294 -0
  99. data/lib/datadog_api_client/v2/api/spans_metrics_api.rb +2 -2
  100. data/lib/datadog_api_client/v2/api/teams_api.rb +65 -0
  101. data/lib/datadog_api_client/v2/models/application_key_create_attributes.rb +1 -1
  102. data/lib/datadog_api_client/v2/models/application_key_update_attributes.rb +1 -1
  103. data/lib/datadog_api_client/v2/models/audit_logs_event_attributes.rb +11 -1
  104. data/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb +9 -21
  105. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb +1 -1
  106. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event_attributes.rb +102 -0
  107. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event_pipeline.rb +1 -1
  108. data/lib/datadog_api_client/v2/models/ci_app_pipeline_level.rb +30 -0
  109. data/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb +1 -1
  110. data/lib/datadog_api_client/v2/models/ci_app_test_level.rb +29 -0
  111. data/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb +1 -1
  112. data/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb +1 -1
  113. data/lib/datadog_api_client/v2/models/cloud_configuration_rule_compliance_signal_options.rb +25 -1
  114. data/lib/datadog_api_client/v2/models/cloud_configuration_rule_create_payload.rb +13 -1
  115. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +41 -1
  116. data/lib/datadog_api_client/v2/models/confluent_account_resource_attributes.rb +11 -1
  117. data/lib/datadog_api_client/v2/models/confluent_resource_request_attributes.rb +11 -1
  118. data/lib/datadog_api_client/v2/models/confluent_resource_response_attributes.rb +21 -1
  119. data/lib/datadog_api_client/v2/models/dashboard_list_item.rb +36 -1
  120. data/lib/datadog_api_client/v2/models/downtime_create_request.rb +98 -0
  121. data/lib/datadog_api_client/v2/models/downtime_create_request_attributes.rb +194 -0
  122. data/lib/datadog_api_client/v2/models/downtime_create_request_data.rb +119 -0
  123. data/lib/datadog_api_client/v2/models/downtime_included_monitor_type.rb +26 -0
  124. data/lib/datadog_api_client/v2/models/downtime_meta.rb +80 -0
  125. data/lib/datadog_api_client/v2/models/downtime_meta_page.rb +80 -0
  126. data/lib/datadog_api_client/v2/models/downtime_monitor_identifier.rb +63 -0
  127. data/lib/datadog_api_client/v2/models/downtime_monitor_identifier_id.rb +98 -0
  128. data/lib/datadog_api_client/v2/models/downtime_monitor_identifier_tags.rb +107 -0
  129. data/lib/datadog_api_client/v2/models/downtime_monitor_included_attributes.rb +80 -0
  130. data/lib/datadog_api_client/v2/models/downtime_monitor_included_item.rb +100 -0
  131. data/lib/datadog_api_client/v2/models/downtime_notify_end_state_actions.rb +27 -0
  132. data/lib/datadog_api_client/v2/models/downtime_notify_end_state_types.rb +28 -0
  133. data/lib/datadog_api_client/v2/models/downtime_relationships.rb +90 -0
  134. data/lib/datadog_api_client/v2/models/downtime_relationships_created_by.rb +88 -0
  135. data/lib/datadog_api_client/v2/models/downtime_relationships_created_by_data.rb +90 -0
  136. data/lib/datadog_api_client/v2/models/downtime_relationships_monitor.rb +88 -0
  137. data/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb +90 -0
  138. data/lib/datadog_api_client/v2/models/downtime_resource_type.rb +26 -0
  139. data/lib/datadog_api_client/v2/models/downtime_response.rb +95 -0
  140. data/lib/datadog_api_client/v2/models/downtime_response_attributes.rb +208 -0
  141. data/lib/datadog_api_client/v2/models/downtime_response_data.rb +110 -0
  142. data/lib/datadog_api_client/v2/models/downtime_response_included_item.rb +63 -0
  143. data/lib/datadog_api_client/v2/models/downtime_schedule_create_request.rb +63 -0
  144. data/lib/datadog_api_client/v2/models/downtime_schedule_current_downtime_response.rb +100 -0
  145. data/lib/datadog_api_client/v2/models/downtime_schedule_one_time_create_update_request.rb +101 -0
  146. data/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb +116 -0
  147. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_create_update_request.rb +143 -0
  148. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_response.rb +106 -0
  149. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_create_request.rb +110 -0
  150. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_response.rb +131 -0
  151. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_update_request.rb +92 -0
  152. data/lib/datadog_api_client/v2/models/downtime_schedule_response.rb +65 -0
  153. data/lib/datadog_api_client/v2/models/downtime_schedule_update_request.rb +63 -0
  154. data/lib/datadog_api_client/v2/models/downtime_status.rb +29 -0
  155. data/lib/datadog_api_client/v2/models/downtime_update_request.rb +98 -0
  156. data/lib/datadog_api_client/v2/models/downtime_update_request_attributes.rb +165 -0
  157. data/lib/datadog_api_client/v2/models/{team_data.rb → downtime_update_request_data.rb} +9 -9
  158. data/lib/datadog_api_client/v2/models/event_response_attributes.rb +11 -1
  159. data/lib/datadog_api_client/v2/models/events_group_by_sort.rb +1 -1
  160. data/lib/datadog_api_client/v2/models/events_response_metadata.rb +11 -1
  161. data/lib/datadog_api_client/v2/models/formula_limit.rb +1 -0
  162. data/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +1 -1
  163. data/lib/datadog_api_client/v2/models/list_downtimes_response.rb +104 -0
  164. data/lib/datadog_api_client/v2/models/logs_aggregate_request.rb +1 -1
  165. data/lib/datadog_api_client/v2/models/logs_aggregate_request_page.rb +1 -1
  166. data/lib/datadog_api_client/v2/models/logs_group_by.rb +3 -2
  167. data/lib/datadog_api_client/v2/models/logs_group_by_histogram.rb +1 -1
  168. data/lib/datadog_api_client/v2/models/logs_list_request.rb +1 -1
  169. data/lib/datadog_api_client/v2/models/logs_query_options.rb +1 -1
  170. data/lib/datadog_api_client/v2/models/logs_response_metadata_page.rb +1 -1
  171. data/lib/datadog_api_client/v2/models/metrics_aggregator.rb +1 -1
  172. data/lib/datadog_api_client/v2/models/metrics_scalar_query.rb +1 -1
  173. data/lib/datadog_api_client/v2/models/monitor_downtime_match_resource_type.rb +26 -0
  174. data/lib/datadog_api_client/v2/models/monitor_downtime_match_response.rb +92 -0
  175. data/lib/datadog_api_client/v2/models/monitor_downtime_match_response_attributes.rb +120 -0
  176. data/lib/datadog_api_client/v2/models/monitor_downtime_match_response_data.rb +108 -0
  177. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb +14 -4
  178. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_type.rb +26 -0
  179. data/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb +1 -1
  180. data/lib/datadog_api_client/v2/models/query_formula.rb +1 -0
  181. data/lib/datadog_api_client/v2/models/relationship_to_team_links.rb +14 -4
  182. data/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb +14 -4
  183. data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +2 -1
  184. data/lib/datadog_api_client/v2/models/rum_application_list.rb +11 -1
  185. data/lib/datadog_api_client/v2/models/security_monitoring_signal_metadata_type.rb +26 -0
  186. data/lib/datadog_api_client/v2/models/security_monitoring_signal_response.rb +80 -0
  187. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response_query.rb +26 -2
  188. data/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_data.rb +24 -4
  189. data/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_data.rb +24 -4
  190. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +1 -19
  191. data/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb +11 -1
  192. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response_data.rb +11 -1
  193. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb +11 -1
  194. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +11 -1
  195. data/lib/datadog_api_client/v2/models/service_definition_data.rb +11 -1
  196. data/lib/datadog_api_client/v2/models/service_definition_meta.rb +36 -4
  197. data/lib/datadog_api_client/v2/models/service_definition_meta_warnings.rb +100 -0
  198. data/lib/datadog_api_client/v2/models/span.rb +100 -0
  199. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket.rb +100 -0
  200. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_attributes.rb +100 -0
  201. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_type.rb +26 -0
  202. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value.rb +64 -0
  203. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value_timeseries_point.rb +90 -0
  204. data/lib/datadog_api_client/v2/models/spans_aggregate_data.rb +90 -0
  205. data/lib/datadog_api_client/v2/models/spans_aggregate_request.rb +80 -0
  206. data/lib/datadog_api_client/v2/models/spans_aggregate_request_attributes.rb +115 -0
  207. data/lib/datadog_api_client/v2/models/spans_aggregate_request_type.rb +26 -0
  208. data/lib/datadog_api_client/v2/models/spans_aggregate_response.rb +92 -0
  209. data/lib/datadog_api_client/v2/models/spans_aggregate_response_metadata.rb +113 -0
  210. data/lib/datadog_api_client/v2/models/spans_aggregate_response_status.rb +27 -0
  211. data/lib/datadog_api_client/v2/models/spans_aggregate_sort.rb +110 -0
  212. data/lib/datadog_api_client/v2/models/spans_aggregate_sort_type.rb +27 -0
  213. data/lib/datadog_api_client/v2/models/spans_aggregation_function.rb +37 -0
  214. data/lib/datadog_api_client/v2/models/spans_attributes.rb +244 -0
  215. data/lib/datadog_api_client/v2/models/spans_compute.rb +129 -0
  216. data/lib/datadog_api_client/v2/models/spans_compute_type.rb +27 -0
  217. data/lib/datadog_api_client/v2/models/spans_group_by.rb +149 -0
  218. data/lib/datadog_api_client/v2/models/spans_group_by_histogram.rb +143 -0
  219. data/lib/datadog_api_client/v2/models/spans_group_by_missing.rb +63 -0
  220. data/lib/datadog_api_client/v2/models/spans_group_by_total.rb +64 -0
  221. data/lib/datadog_api_client/v2/models/spans_list_request.rb +80 -0
  222. data/lib/datadog_api_client/v2/models/spans_list_request_attributes.rb +111 -0
  223. data/lib/datadog_api_client/v2/models/spans_list_request_data.rb +90 -0
  224. data/lib/datadog_api_client/v2/models/spans_list_request_page.rb +108 -0
  225. data/lib/datadog_api_client/v2/models/spans_list_request_type.rb +26 -0
  226. data/lib/datadog_api_client/v2/models/spans_list_response.rb +102 -0
  227. data/lib/datadog_api_client/v2/models/spans_list_response_links.rb +81 -0
  228. data/lib/datadog_api_client/v2/models/spans_list_response_metadata.rb +123 -0
  229. data/lib/datadog_api_client/v2/models/spans_query_filter.rb +100 -0
  230. data/lib/datadog_api_client/v2/models/spans_query_options.rb +91 -0
  231. data/lib/datadog_api_client/v2/models/spans_response_metadata_page.rb +81 -0
  232. data/lib/datadog_api_client/v2/models/spans_sort.rb +27 -0
  233. data/lib/datadog_api_client/v2/models/spans_sort_order.rb +27 -0
  234. data/lib/datadog_api_client/v2/models/spans_type.rb +26 -0
  235. data/lib/datadog_api_client/v2/models/spans_warning.rb +100 -0
  236. data/lib/datadog_api_client/v2/models/team_attributes.rb +50 -4
  237. data/lib/datadog_api_client/v2/models/team_create_attributes.rb +57 -4
  238. data/lib/datadog_api_client/v2/models/team_relationships_links.rb +80 -0
  239. data/lib/datadog_api_client/v2/models/team_response.rb +1 -1
  240. data/lib/datadog_api_client/v2/models/team_update_attributes.rb +57 -4
  241. data/lib/datadog_api_client/v2/models/teams_response.rb +24 -4
  242. data/lib/datadog_api_client/v2/models/teams_response_links.rb +129 -0
  243. data/lib/datadog_api_client/v2/models/teams_response_meta.rb +80 -0
  244. data/lib/datadog_api_client/v2/models/teams_response_meta_pagination.rb +150 -0
  245. data/lib/datadog_api_client/v2/models/usage_attributes_object.rb +11 -1
  246. data/lib/datadog_api_client/v2/models/user_invitation_response_data.rb +11 -1
  247. data/lib/datadog_api_client/v2/models/user_teams_response.rb +24 -4
  248. data/lib/datadog_api_client/version.rb +1 -1
  249. data/spec/configuration_spec.rb +17 -0
  250. data/spec/retry_spec.rb +44 -0
  251. metadata +119 -3
@@ -0,0 +1,106 @@
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
+ # An RRULE-based recurring downtime.
21
+ class DowntimeScheduleRecurrenceResponse
22
+ include BaseGenericModel
23
+
24
+ # The length of the downtime. Must begin with an integer and end with one of 'm', 'h', d', or 'w'.
25
+ attr_accessor :duration
26
+
27
+ # The `RRULE` standard for defining recurring events.
28
+ # For example, to have a recurring event on the first day of each month, set the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`.
29
+ # Most common `rrule` options from the [iCalendar Spec](https://tools.ietf.org/html/rfc5545) are supported.
30
+ #
31
+ # **Note**: Attributes specifying the duration in `RRULE` are not supported (for example, `DTSTART`, `DTEND`, `DURATION`).
32
+ # More examples available in this [downtime guide](https://docs.datadoghq.com/monitors/guide/suppress-alert-with-downtimes/?tab=api).
33
+ attr_accessor :rrule
34
+
35
+ # ISO-8601 Datetime to start the downtime. Must not include a UTC offset. If not provided, the
36
+ # downtime starts the moment it is created.
37
+ attr_accessor :start
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ # @!visibility private
41
+ def self.attribute_map
42
+ {
43
+ :'duration' => :'duration',
44
+ :'rrule' => :'rrule',
45
+ :'start' => :'start'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'duration' => :'String',
54
+ :'rrule' => :'String',
55
+ :'start' => :'String'
56
+ }
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param attributes [Hash] Model attributes in the form of hash
61
+ # @!visibility private
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleRecurrenceResponse` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleRecurrenceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'duration')
76
+ self.duration = attributes[:'duration']
77
+ end
78
+
79
+ if attributes.key?(:'rrule')
80
+ self.rrule = attributes[:'rrule']
81
+ end
82
+
83
+ if attributes.key?(:'start')
84
+ self.start = attributes[:'start']
85
+ end
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ duration == o.duration &&
95
+ rrule == o.rrule &&
96
+ start == o.start
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Integer] Hash code
101
+ # @!visibility private
102
+ def hash
103
+ [duration, rrule, start].hash
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,110 @@
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 recurring downtime schedule definition.
21
+ class DowntimeScheduleRecurrencesCreateRequest
22
+ include BaseGenericModel
23
+
24
+ # A list of downtime recurrences.
25
+ attr_reader :recurrences
26
+
27
+ # The timezone in which to schedule the downtime.
28
+ attr_accessor :timezone
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'recurrences' => :'recurrences',
35
+ :'timezone' => :'timezone'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'recurrences' => :'Array<DowntimeScheduleRecurrenceCreateUpdateRequest>',
44
+ :'timezone' => :'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::DowntimeScheduleRecurrencesCreateRequest` 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::DowntimeScheduleRecurrencesCreateRequest`. 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?(:'recurrences')
65
+ if (value = attributes[:'recurrences']).is_a?(Array)
66
+ self.recurrences = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'timezone')
71
+ self.timezone = attributes[:'timezone']
72
+ end
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ # @!visibility private
78
+ def valid?
79
+ return false if @recurrences.nil?
80
+ true
81
+ end
82
+
83
+ # Custom attribute writer method with validation
84
+ # @param recurrences [Object] Object to be assigned
85
+ # @!visibility private
86
+ def recurrences=(recurrences)
87
+ if recurrences.nil?
88
+ fail ArgumentError, 'invalid value for "recurrences", recurrences cannot be nil.'
89
+ end
90
+ @recurrences = recurrences
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
+ recurrences == o.recurrences &&
100
+ timezone == o.timezone
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ # @!visibility private
106
+ def hash
107
+ [recurrences, timezone].hash
108
+ end
109
+ end
110
+ end
@@ -0,0 +1,131 @@
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 recurring downtime schedule definition.
21
+ class DowntimeScheduleRecurrencesResponse
22
+ include BaseGenericModel
23
+
24
+ # The most recent actual start and end dates for a recurring downtime. For a canceled downtime,
25
+ # this is the previously occurring downtime. For active downtimes, this is the ongoing downtime, and for scheduled
26
+ # downtimes it is the upcoming downtime.
27
+ attr_accessor :current_downtime
28
+
29
+ # A list of downtime recurrences.
30
+ attr_reader :recurrences
31
+
32
+ # The timezone in which to schedule the downtime. This affects recurring start and end dates.
33
+ # Must match `display_timezone`.
34
+ attr_accessor :timezone
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ # @!visibility private
38
+ def self.attribute_map
39
+ {
40
+ :'current_downtime' => :'current_downtime',
41
+ :'recurrences' => :'recurrences',
42
+ :'timezone' => :'timezone'
43
+ }
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ # @!visibility private
48
+ def self.openapi_types
49
+ {
50
+ :'current_downtime' => :'DowntimeScheduleCurrentDowntimeResponse',
51
+ :'recurrences' => :'Array<DowntimeScheduleRecurrenceResponse>',
52
+ :'timezone' => :'String'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param attributes [Hash] Model attributes in the form of hash
58
+ # @!visibility private
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleRecurrencesResponse` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleRecurrencesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'current_downtime')
73
+ self.current_downtime = attributes[:'current_downtime']
74
+ end
75
+
76
+ if attributes.key?(:'recurrences')
77
+ if (value = attributes[:'recurrences']).is_a?(Array)
78
+ self.recurrences = value
79
+ end
80
+ end
81
+
82
+ if attributes.key?(:'timezone')
83
+ self.timezone = attributes[:'timezone']
84
+ end
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ # @!visibility private
90
+ def valid?
91
+ return false if @recurrences.nil?
92
+ return false if @recurrences.length > 5
93
+ return false if @recurrences.length < 1
94
+ true
95
+ end
96
+
97
+ # Custom attribute writer method with validation
98
+ # @param recurrences [Object] Object to be assigned
99
+ # @!visibility private
100
+ def recurrences=(recurrences)
101
+ if recurrences.nil?
102
+ fail ArgumentError, 'invalid value for "recurrences", recurrences cannot be nil.'
103
+ end
104
+ if recurrences.length > 5
105
+ fail ArgumentError, 'invalid value for "recurrences", number of items must be less than or equal to 5.'
106
+ end
107
+ if recurrences.length < 1
108
+ fail ArgumentError, 'invalid value for "recurrences", number of items must be greater than or equal to 1.'
109
+ end
110
+ @recurrences = recurrences
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param o [Object] Object to be compared
115
+ # @!visibility private
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ current_downtime == o.current_downtime &&
120
+ recurrences == o.recurrences &&
121
+ timezone == o.timezone
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ # @!visibility private
127
+ def hash
128
+ [current_downtime, recurrences, timezone].hash
129
+ end
130
+ end
131
+ 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 recurring downtime schedule definition.
21
+ class DowntimeScheduleRecurrencesUpdateRequest
22
+ include BaseGenericModel
23
+
24
+ # A list of downtime recurrences.
25
+ attr_accessor :recurrences
26
+
27
+ # The timezone in which to schedule the downtime.
28
+ attr_accessor :timezone
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'recurrences' => :'recurrences',
35
+ :'timezone' => :'timezone'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'recurrences' => :'Array<DowntimeScheduleRecurrenceCreateUpdateRequest>',
44
+ :'timezone' => :'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::DowntimeScheduleRecurrencesUpdateRequest` 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::DowntimeScheduleRecurrencesUpdateRequest`. 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?(:'recurrences')
65
+ if (value = attributes[:'recurrences']).is_a?(Array)
66
+ self.recurrences = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'timezone')
71
+ self.timezone = attributes[:'timezone']
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
+ recurrences == o.recurrences &&
82
+ timezone == o.timezone
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ # @!visibility private
88
+ def hash
89
+ [recurrences, timezone].hash
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,65 @@
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 schedule that defines when the monitor starts, stops, and recurs. There are two types of schedules:
21
+ # one-time and recurring. Recurring schedules may have up to five RRULE-based recurrences. If no schedules are
22
+ # provided, the downtime will begin immediately and never end.
23
+ module DowntimeScheduleResponse
24
+ class << self
25
+ include BaseOneOfModel
26
+ include BaseOneOfModelNoDiscriminator
27
+
28
+ # List of class defined in oneOf (OpenAPI v3)
29
+ def openapi_one_of
30
+ [
31
+ :'DowntimeScheduleRecurrencesResponse',
32
+ :'DowntimeScheduleOneTimeResponse'
33
+ ]
34
+ end
35
+ # Builds the object
36
+ # @param data [Mixed] Data to be matched against the list of oneOf items
37
+ # @return [Object] Returns the model or the data itself
38
+ def build(data)
39
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
40
+ # Note:
41
+ # - We do not attempt to check whether exactly one item matches.
42
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
43
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
44
+ # - TODO: scalar values are de facto behaving as if they were nullable.
45
+ # - TODO: logging when debugging is set.
46
+ openapi_one_of.each do |klass|
47
+ begin
48
+ next if klass == :AnyType # "nullable: true"
49
+ typed_data = find_and_cast_into_type(klass, data)
50
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
51
+ return typed_data if typed_data
52
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
53
+ end
54
+ end
55
+
56
+ if openapi_one_of.include?(:AnyType)
57
+ data
58
+ else
59
+ self._unparsed = true
60
+ DatadogAPIClient::UnparsedObject.new(data)
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,63 @@
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
+ # Schedule for the downtime.
21
+ module DowntimeScheduleUpdateRequest
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'DowntimeScheduleRecurrencesUpdateRequest',
30
+ :'DowntimeScheduleOneTimeCreateUpdateRequest'
31
+ ]
32
+ end
33
+ # Builds the object
34
+ # @param data [Mixed] Data to be matched against the list of oneOf items
35
+ # @return [Object] Returns the model or the data itself
36
+ def build(data)
37
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
38
+ # Note:
39
+ # - We do not attempt to check whether exactly one item matches.
40
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
42
+ # - TODO: scalar values are de facto behaving as if they were nullable.
43
+ # - TODO: logging when debugging is set.
44
+ openapi_one_of.each do |klass|
45
+ begin
46
+ next if klass == :AnyType # "nullable: true"
47
+ typed_data = find_and_cast_into_type(klass, data)
48
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
49
+ return typed_data if typed_data
50
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
51
+ end
52
+ end
53
+
54
+ if openapi_one_of.include?(:AnyType)
55
+ data
56
+ else
57
+ self._unparsed = true
58
+ DatadogAPIClient::UnparsedObject.new(data)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,29 @@
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 current status of the downtime.
21
+ class DowntimeStatus
22
+ include BaseEnumModel
23
+
24
+ ACTIVE = "active".freeze
25
+ CANCELED = "canceled".freeze
26
+ ENDED = "ended".freeze
27
+ SCHEDULED = "scheduled".freeze
28
+ end
29
+ 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 for editing a downtime.
21
+ class DowntimeUpdateRequest
22
+ include BaseGenericModel
23
+
24
+ # Object to update a downtime.
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' => :'DowntimeUpdateRequestData'
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::DowntimeUpdateRequest` 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::DowntimeUpdateRequest`. 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