datadog_api_client 2.0.2 → 2.2.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 (192) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +6 -6
  3. data/.generator/poetry.lock +21 -14
  4. data/.generator/pyproject.toml +1 -1
  5. data/.generator/schemas/v1/openapi.yaml +840 -908
  6. data/.generator/schemas/v2/openapi.yaml +1304 -913
  7. data/.generator/src/generator/formatter.py +1 -1
  8. data/.generator/src/generator/templates/api_client.j2 +5 -1
  9. data/.generator/src/generator/templates/configuration.j2 +17 -0
  10. data/.github/workflows/test.yml +4 -1
  11. data/.github/workflows/test_integration.yml +5 -0
  12. data/.pre-commit-config.yaml +1 -1
  13. data/CHANGELOG.md +49 -0
  14. data/README.md +11 -0
  15. data/examples/v1/dashboards/CreateDashboard_1094917386.rb +37 -0
  16. data/examples/v1/dashboards/CreateDashboard_1307120899.rb +61 -0
  17. data/examples/v1/dashboards/CreateDashboard_1423904722.rb +38 -0
  18. data/examples/v1/dashboards/CreateDashboard_2652180930.rb +43 -0
  19. data/examples/v1/dashboards/CreateDashboard_2850365602.rb +55 -0
  20. data/examples/v1/dashboards/CreateDashboard_3117424216.rb +33 -0
  21. data/examples/v1/dashboards/CreateDashboard_3669695268.rb +50 -0
  22. data/examples/v1/dashboards/CreateDashboard_858397694.rb +41 -0
  23. data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
  24. data/examples/v1/monitors/ValidateMonitor.rb +1 -0
  25. data/examples/v1/monitors/ValidateMonitor_4247196452.rb +38 -0
  26. data/examples/v1/synthetics/CreateGlobalVariable.rb +1 -0
  27. data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +23 -0
  28. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +10 -0
  29. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +6 -0
  30. data/examples/v1/synthetics/EditGlobalVariable.rb +1 -0
  31. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
  32. data/examples/v1/usage-metering/GetDailyCustomReports.rb +0 -3
  33. data/examples/v1/usage-metering/GetMonthlyCustomReports.rb +0 -3
  34. data/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb +0 -3
  35. data/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb +0 -3
  36. data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -3
  37. data/examples/v2/incidents/ListIncidentAttachments.rb +8 -0
  38. data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +11 -0
  39. data/examples/v2/incidents/UpdateIncidentAttachments.rb +38 -0
  40. data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +26 -0
  41. data/examples/v2/metrics/ListActiveMetricConfigurations.rb +5 -0
  42. data/examples/v2/metrics/ListTagConfigurations.rb +1 -1
  43. data/examples/v2/metrics/ListTagConfigurations_265033704.rb +8 -0
  44. data/examples/v2/metrics/{ListTagConfigurations_103226315.rb → ListTagConfigurations_2739018321.rb} +1 -1
  45. data/examples/v2/metrics/SubmitMetrics_1762007427.rb +23 -0
  46. data/examples/v2/roles/UpdateRole.rb +13 -0
  47. data/examples/v2/rum/CreateRUMApplication.rb +15 -0
  48. data/examples/v2/rum/DeleteRUMApplication.rb +8 -0
  49. data/examples/v2/rum/GetRUMApplication.rb +8 -0
  50. data/examples/v2/rum/GetRUMApplications.rb +5 -0
  51. data/examples/v2/rum/UpdateRUMApplication.rb +16 -0
  52. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +3 -2
  53. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +2 -2
  54. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +2 -2
  55. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +50 -0
  56. data/examples/v2/security-monitoring/GetSecurityMonitoringSignal.rb +5 -0
  57. data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +2 -1
  58. data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +1 -4
  59. data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +2 -4
  60. data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +2 -4
  61. data/examples/v2/usage-metering/GetHistoricalCostByOrg.rb +8 -0
  62. data/examples/v2/usage-metering/GetHourlyUsage.rb +5 -0
  63. data/generate.sh +30 -0
  64. data/lib/datadog_api_client/api_client.rb +5 -1
  65. data/lib/datadog_api_client/configuration.rb +20 -6
  66. data/lib/datadog_api_client/inflector.rb +67 -1
  67. data/lib/datadog_api_client/v1/api/metrics_api.rb +1 -1
  68. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -1
  69. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +42 -62
  70. data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -2
  71. data/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +28 -5
  72. data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +14 -4
  73. data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
  74. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
  75. data/lib/datadog_api_client/v1/models/list_stream_query.rb +14 -4
  76. data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
  77. data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +1 -0
  78. data/lib/datadog_api_client/v1/models/monitor_options.rb +28 -1
  79. data/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb +13 -1
  80. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
  81. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
  82. data/lib/datadog_api_client/v1/models/on_missing_data_option.rb +33 -0
  83. data/lib/datadog_api_client/v1/models/search_service_level_objective.rb +111 -0
  84. data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +286 -0
  85. data/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +134 -0
  86. data/lib/datadog_api_client/v1/models/search_slo_query.rb +137 -0
  87. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +8 -8
  88. data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +2 -0
  89. data/lib/datadog_api_client/v1/models/search_slo_threshold.rb +184 -0
  90. data/lib/datadog_api_client/v1/models/search_slo_timeframe.rb +28 -0
  91. data/lib/datadog_api_client/v1/models/slo_creator.rb +131 -0
  92. data/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +185 -0
  93. data/lib/datadog_api_client/v1/models/slo_list_widget_definition_type.rb +26 -0
  94. data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +149 -0
  95. data/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +143 -0
  96. data/lib/datadog_api_client/v1/models/slo_list_widget_request_type.rb +26 -0
  97. data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +174 -0
  98. data/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +121 -0
  99. data/lib/datadog_api_client/v1/models/synthetics_assertion_operator.rb +1 -0
  100. data/lib/datadog_api_client/v1/models/synthetics_basic_auth.rb +2 -1
  101. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +155 -0
  102. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest_type.rb +26 -0
  103. data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb +11 -12
  104. data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options_type.rb +1 -0
  105. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +31 -1
  106. data/lib/datadog_api_client/v1/models/synthetics_test_process_status.rb +0 -1
  107. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +15 -1
  108. data/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +193 -0
  109. data/lib/datadog_api_client/v1/models/topology_map_widget_definition_type.rb +26 -0
  110. data/lib/datadog_api_client/v1/models/topology_query.rb +144 -0
  111. data/lib/datadog_api_client/v1/models/topology_query_data_source.rb +27 -0
  112. data/lib/datadog_api_client/v1/models/topology_request.rb +121 -0
  113. data/lib/datadog_api_client/v1/models/topology_request_type.rb +26 -0
  114. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +4 -0
  115. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +4 -0
  116. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
  117. data/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +11 -1
  118. data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +12 -1
  119. data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
  120. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -1
  121. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
  122. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +21 -1
  123. data/lib/datadog_api_client/v1/models/widget_definition.rb +3 -1
  124. data/lib/datadog_api_client/v1/models/widget_monitor_summary_sort.rb +2 -0
  125. data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
  126. data/lib/datadog_api_client/v2/api/incident_services_api.rb +2 -2
  127. data/lib/datadog_api_client/v2/api/incident_teams_api.rb +2 -2
  128. data/lib/datadog_api_client/v2/api/incidents_api.rb +155 -0
  129. data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
  130. data/lib/datadog_api_client/v2/api/metrics_api.rb +77 -9
  131. data/lib/datadog_api_client/v2/api/rum_api.rb +329 -0
  132. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +68 -3
  133. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
  134. data/lib/datadog_api_client/v2/models/content_encoding.rb +1 -0
  135. data/lib/datadog_api_client/v2/models/incident_attachment_attachment_type.rb +27 -0
  136. data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +63 -0
  137. data/lib/datadog_api_client/v2/models/incident_attachment_data.rb +187 -0
  138. data/lib/datadog_api_client/v2/models/incident_attachment_link_attachment_type.rb +26 -0
  139. data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +145 -0
  140. data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +143 -0
  141. data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attachment_type.rb +26 -0
  142. data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +145 -0
  143. data/lib/datadog_api_client/v2/models/incident_attachment_related_object.rb +26 -0
  144. data/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +111 -0
  145. data/lib/datadog_api_client/v2/models/incident_attachment_type.rb +26 -0
  146. data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +63 -0
  147. data/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +144 -0
  148. data/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +127 -0
  149. data/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +137 -0
  150. data/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +143 -0
  151. data/lib/datadog_api_client/v2/models/incident_attachments_response.rb +136 -0
  152. data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +62 -0
  153. data/lib/datadog_api_client/v2/models/incident_related_object.rb +1 -0
  154. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -11
  155. data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +2 -1
  156. data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +14 -14
  157. data/lib/datadog_api_client/v2/models/metric_active_configuration_type.rb +26 -0
  158. data/lib/datadog_api_client/v2/models/metric_content_encoding.rb +2 -0
  159. data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +133 -0
  160. data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +111 -0
  161. data/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +125 -0
  162. data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +124 -0
  163. data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +145 -0
  164. data/lib/datadog_api_client/v2/models/role_update_data.rb +11 -1
  165. data/lib/datadog_api_client/v2/models/rum_application.rb +166 -0
  166. data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +279 -0
  167. data/lib/datadog_api_client/v2/models/rum_application_create.rb +145 -0
  168. data/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +132 -0
  169. data/lib/datadog_api_client/v2/models/rum_application_create_request.rb +122 -0
  170. data/lib/datadog_api_client/v2/models/rum_application_create_type.rb +26 -0
  171. data/lib/datadog_api_client/v2/models/rum_application_response.rb +111 -0
  172. data/lib/datadog_api_client/v2/models/rum_application_type.rb +26 -0
  173. data/lib/datadog_api_client/v2/models/rum_application_update.rb +155 -0
  174. data/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +121 -0
  175. data/lib/datadog_api_client/v2/models/rum_application_update_request.rb +122 -0
  176. data/lib/datadog_api_client/v2/models/rum_application_update_type.rb +26 -0
  177. data/lib/datadog_api_client/v2/models/rum_applications_response.rb +113 -0
  178. data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +36 -248
  179. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +36 -151
  180. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
  181. data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +37 -253
  182. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +275 -0
  183. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +187 -0
  184. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +279 -0
  185. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_type.rb +26 -0
  186. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +275 -0
  187. data/lib/datadog_api_client/v2/models/{security_monitoring_rule_query_create.rb → security_monitoring_standard_rule_query.rb} +3 -3
  188. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +279 -0
  189. data/lib/datadog_api_client/version.rb +1 -1
  190. metadata +97 -6
  191. data/Makefile +0 -7
  192. data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
@@ -0,0 +1,286 @@
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://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::V1
20
+ # A service level objective object includes a service level indicator, thresholds
21
+ # for one or more timeframes, and metadata (`name`, `description`, and `tags`).
22
+ class SearchServiceLevelObjectiveAttributes
23
+ include BaseGenericModel
24
+
25
+ # Whether the object has unparsed attributes
26
+ # @!visibility private
27
+ attr_accessor :_unparsed
28
+
29
+ # A list of tags associated with this service level objective.
30
+ # Always included in service level objective responses (but may be empty).
31
+ attr_accessor :all_tags
32
+
33
+ # Creation timestamp (UNIX time in seconds)
34
+ #
35
+ # Always included in service level objective responses.
36
+ attr_accessor :created_at
37
+
38
+ # The creator of the SLO
39
+ attr_accessor :creator
40
+
41
+ # A user-defined description of the service level objective.
42
+ #
43
+ # Always included in service level objective responses (but may be `null`).
44
+ # Optional in create/update requests.
45
+ attr_accessor :description
46
+
47
+ # Tags with the `env` tag key.
48
+ attr_accessor :env_tags
49
+
50
+ # A list of (up to 100) monitor groups that narrow the scope of a monitor service level objective.
51
+ # Included in service level objective responses if it is not empty.
52
+ attr_accessor :groups
53
+
54
+ # Modification timestamp (UNIX time in seconds)
55
+ #
56
+ # Always included in service level objective responses.
57
+ attr_accessor :modified_at
58
+
59
+ # A list of monitor ids that defines the scope of a monitor service level
60
+ # objective.
61
+ attr_accessor :monitor_ids
62
+
63
+ # The name of the service level objective object.
64
+ attr_accessor :name
65
+
66
+ # calculated status and error budget remaining.
67
+ attr_accessor :overall_status
68
+
69
+ # A metric-based SLO. **Required if type is `metric`**. Note that Datadog only allows the sum by aggregator
70
+ # to be used because this will sum up all request counts instead of averaging them, or taking the max or
71
+ # min of all of those requests.
72
+ attr_accessor :query
73
+
74
+ # Tags with the `service` tag key.
75
+ attr_accessor :service_tags
76
+
77
+ # The type of the service level objective.
78
+ attr_accessor :slo_type
79
+
80
+ # Tags with the `team` tag key.
81
+ attr_accessor :team_tags
82
+
83
+ # The thresholds (timeframes and associated targets) for this service level
84
+ # objective object.
85
+ attr_accessor :thresholds
86
+
87
+ # Attribute mapping from ruby-style variable name to JSON key.
88
+ # @!visibility private
89
+ def self.attribute_map
90
+ {
91
+ :'all_tags' => :'all_tags',
92
+ :'created_at' => :'created_at',
93
+ :'creator' => :'creator',
94
+ :'description' => :'description',
95
+ :'env_tags' => :'env_tags',
96
+ :'groups' => :'groups',
97
+ :'modified_at' => :'modified_at',
98
+ :'monitor_ids' => :'monitor_ids',
99
+ :'name' => :'name',
100
+ :'overall_status' => :'overall_status',
101
+ :'query' => :'query',
102
+ :'service_tags' => :'service_tags',
103
+ :'slo_type' => :'slo_type',
104
+ :'team_tags' => :'team_tags',
105
+ :'thresholds' => :'thresholds'
106
+ }
107
+ end
108
+
109
+ # Returns all the JSON keys this model knows about
110
+ # @!visibility private
111
+ def self.acceptable_attributes
112
+ attribute_map.values
113
+ end
114
+
115
+ # Attribute type mapping.
116
+ # @!visibility private
117
+ def self.openapi_types
118
+ {
119
+ :'all_tags' => :'Array<String>',
120
+ :'created_at' => :'Integer',
121
+ :'creator' => :'SLOCreator',
122
+ :'description' => :'String',
123
+ :'env_tags' => :'Array<String>',
124
+ :'groups' => :'Array<String>',
125
+ :'modified_at' => :'Integer',
126
+ :'monitor_ids' => :'Array<Integer>',
127
+ :'name' => :'String',
128
+ :'overall_status' => :'Array<SLOOverallStatuses>',
129
+ :'query' => :'SearchSLOQuery',
130
+ :'service_tags' => :'Array<String>',
131
+ :'slo_type' => :'SLOType',
132
+ :'team_tags' => :'Array<String>',
133
+ :'thresholds' => :'Array<SearchSLOThreshold>'
134
+ }
135
+ end
136
+
137
+ # List of attributes with nullable: true
138
+ # @!visibility private
139
+ def self.openapi_nullable
140
+ Set.new([
141
+ :'creator',
142
+ :'description',
143
+ :'groups',
144
+ :'monitor_ids',
145
+ :'query',
146
+ ])
147
+ end
148
+
149
+ # Initializes the object
150
+ # @param attributes [Hash] Model attributes in the form of hash
151
+ # @!visibility private
152
+ def initialize(attributes = {})
153
+ if (!attributes.is_a?(Hash))
154
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchServiceLevelObjectiveAttributes` initialize method"
155
+ end
156
+
157
+ # check to see if the attribute exists and convert string to symbol for hash key
158
+ attributes = attributes.each_with_object({}) { |(k, v), h|
159
+ if (!self.class.attribute_map.key?(k.to_sym))
160
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchServiceLevelObjectiveAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
161
+ end
162
+ h[k.to_sym] = v
163
+ }
164
+
165
+ if attributes.key?(:'all_tags')
166
+ if (value = attributes[:'all_tags']).is_a?(Array)
167
+ self.all_tags = value
168
+ end
169
+ end
170
+
171
+ if attributes.key?(:'created_at')
172
+ self.created_at = attributes[:'created_at']
173
+ end
174
+
175
+ if attributes.key?(:'creator')
176
+ self.creator = attributes[:'creator']
177
+ end
178
+
179
+ if attributes.key?(:'description')
180
+ self.description = attributes[:'description']
181
+ end
182
+
183
+ if attributes.key?(:'env_tags')
184
+ if (value = attributes[:'env_tags']).is_a?(Array)
185
+ self.env_tags = value
186
+ end
187
+ end
188
+
189
+ if attributes.key?(:'groups')
190
+ if (value = attributes[:'groups']).is_a?(Array)
191
+ self.groups = value
192
+ end
193
+ end
194
+
195
+ if attributes.key?(:'modified_at')
196
+ self.modified_at = attributes[:'modified_at']
197
+ end
198
+
199
+ if attributes.key?(:'monitor_ids')
200
+ if (value = attributes[:'monitor_ids']).is_a?(Array)
201
+ self.monitor_ids = value
202
+ end
203
+ end
204
+
205
+ if attributes.key?(:'name')
206
+ self.name = attributes[:'name']
207
+ end
208
+
209
+ if attributes.key?(:'overall_status')
210
+ if (value = attributes[:'overall_status']).is_a?(Array)
211
+ self.overall_status = value
212
+ end
213
+ end
214
+
215
+ if attributes.key?(:'query')
216
+ self.query = attributes[:'query']
217
+ end
218
+
219
+ if attributes.key?(:'service_tags')
220
+ if (value = attributes[:'service_tags']).is_a?(Array)
221
+ self.service_tags = value
222
+ end
223
+ end
224
+
225
+ if attributes.key?(:'slo_type')
226
+ self.slo_type = attributes[:'slo_type']
227
+ end
228
+
229
+ if attributes.key?(:'team_tags')
230
+ if (value = attributes[:'team_tags']).is_a?(Array)
231
+ self.team_tags = value
232
+ end
233
+ end
234
+
235
+ if attributes.key?(:'thresholds')
236
+ if (value = attributes[:'thresholds']).is_a?(Array)
237
+ self.thresholds = value
238
+ end
239
+ end
240
+ end
241
+
242
+ # Check to see if the all the properties in the model are valid
243
+ # @return true if the model is valid
244
+ # @!visibility private
245
+ def valid?
246
+ true
247
+ end
248
+
249
+ # Checks equality by comparing each attribute.
250
+ # @param o [Object] Object to be compared
251
+ # @!visibility private
252
+ def ==(o)
253
+ return true if self.equal?(o)
254
+ self.class == o.class &&
255
+ all_tags == o.all_tags &&
256
+ created_at == o.created_at &&
257
+ creator == o.creator &&
258
+ description == o.description &&
259
+ env_tags == o.env_tags &&
260
+ groups == o.groups &&
261
+ modified_at == o.modified_at &&
262
+ monitor_ids == o.monitor_ids &&
263
+ name == o.name &&
264
+ overall_status == o.overall_status &&
265
+ query == o.query &&
266
+ service_tags == o.service_tags &&
267
+ slo_type == o.slo_type &&
268
+ team_tags == o.team_tags &&
269
+ thresholds == o.thresholds
270
+ end
271
+
272
+ # @see the `==` method
273
+ # @param o [Object] Object to be compared
274
+ # @!visibility private
275
+ def eql?(o)
276
+ self == o
277
+ end
278
+
279
+ # Calculates hash code according to all attributes.
280
+ # @return [Integer] Hash code
281
+ # @!visibility private
282
+ def hash
283
+ [all_tags, created_at, creator, description, env_tags, groups, modified_at, monitor_ids, name, overall_status, query, service_tags, slo_type, team_tags, thresholds].hash
284
+ end
285
+ end
286
+ end
@@ -0,0 +1,134 @@
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://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::V1
20
+ # A service level objective ID and attributes.
21
+ class SearchServiceLevelObjectiveData
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # A service level objective object includes a service level indicator, thresholds
29
+ # for one or more timeframes, and metadata (`name`, `description`, and `tags`).
30
+ attr_accessor :attributes
31
+
32
+ # A unique identifier for the service level objective object.
33
+ #
34
+ # Always included in service level objective responses.
35
+ attr_accessor :id
36
+
37
+ # The type of the object, must be `slo`.
38
+ attr_accessor :type
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'attributes' => :'attributes',
45
+ :'id' => :'id',
46
+ :'type' => :'type'
47
+ }
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ # @!visibility private
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ # @!visibility private
58
+ def self.openapi_types
59
+ {
60
+ :'attributes' => :'SearchServiceLevelObjectiveAttributes',
61
+ :'id' => :'String',
62
+ :'type' => :'String'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ # @!visibility private
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param attributes [Hash] Model attributes in the form of hash
75
+ # @!visibility private
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchServiceLevelObjectiveData` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ attributes = attributes.each_with_object({}) { |(k, v), h|
83
+ if (!self.class.attribute_map.key?(k.to_sym))
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchServiceLevelObjectiveData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
85
+ end
86
+ h[k.to_sym] = v
87
+ }
88
+
89
+ if attributes.key?(:'attributes')
90
+ self.attributes = attributes[:'attributes']
91
+ end
92
+
93
+ if attributes.key?(:'id')
94
+ self.id = attributes[:'id']
95
+ end
96
+
97
+ if attributes.key?(:'type')
98
+ self.type = attributes[:'type']
99
+ end
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ # @!visibility private
105
+ def valid?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param o [Object] Object to be compared
111
+ # @!visibility private
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ attributes == o.attributes &&
116
+ id == o.id &&
117
+ type == o.type
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param o [Object] Object to be compared
122
+ # @!visibility private
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ # @!visibility private
130
+ def hash
131
+ [attributes, id, type].hash
132
+ end
133
+ end
134
+ end
@@ -0,0 +1,137 @@
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://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::V1
20
+ # A metric-based SLO. **Required if type is `metric`**. Note that Datadog only allows the sum by aggregator
21
+ # to be used because this will sum up all request counts instead of averaging them, or taking the max or
22
+ # min of all of those requests.
23
+ class SearchSLOQuery
24
+ include BaseGenericModel
25
+
26
+ # Whether the object has unparsed attributes
27
+ # @!visibility private
28
+ attr_accessor :_unparsed
29
+
30
+ # A Datadog metric query for total (valid) events.
31
+ attr_accessor :denominator
32
+
33
+ # Metric names used in the query's numerator and denominator.
34
+ # This field will return null and will be implemented in the next version of this endpoint.
35
+ attr_accessor :metrics
36
+
37
+ # A Datadog metric query for good events.
38
+ attr_accessor :numerator
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'denominator' => :'denominator',
45
+ :'metrics' => :'metrics',
46
+ :'numerator' => :'numerator'
47
+ }
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ # @!visibility private
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ # @!visibility private
58
+ def self.openapi_types
59
+ {
60
+ :'denominator' => :'String',
61
+ :'metrics' => :'Array<String>',
62
+ :'numerator' => :'String'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ # @!visibility private
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ :'metrics',
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param attributes [Hash] Model attributes in the form of hash
76
+ # @!visibility private
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOQuery` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!self.class.attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'denominator')
91
+ self.denominator = attributes[:'denominator']
92
+ end
93
+
94
+ if attributes.key?(:'metrics')
95
+ if (value = attributes[:'metrics']).is_a?(Array)
96
+ self.metrics = value
97
+ end
98
+ end
99
+
100
+ if attributes.key?(:'numerator')
101
+ self.numerator = attributes[:'numerator']
102
+ end
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ # @!visibility private
108
+ def valid?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param o [Object] Object to be compared
114
+ # @!visibility private
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ denominator == o.denominator &&
119
+ metrics == o.metrics &&
120
+ numerator == o.numerator
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param o [Object] Object to be compared
125
+ # @!visibility private
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ # @!visibility private
133
+ def hash
134
+ [denominator, metrics, numerator].hash
135
+ end
136
+ end
137
+ end
@@ -29,14 +29,14 @@ module DatadogAPIClient::V1
29
29
  attr_accessor :facets
30
30
 
31
31
  # SLOs
32
- attr_accessor :slo
32
+ attr_accessor :slos
33
33
 
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  # @!visibility private
36
36
  def self.attribute_map
37
37
  {
38
38
  :'facets' => :'facets',
39
- :'slo' => :'slo'
39
+ :'slos' => :'slos'
40
40
  }
41
41
  end
42
42
 
@@ -51,7 +51,7 @@ module DatadogAPIClient::V1
51
51
  def self.openapi_types
52
52
  {
53
53
  :'facets' => :'SearchSLOResponseDataAttributesFacets',
54
- :'slo' => :'Array<ServiceLevelObjective>'
54
+ :'slos' => :'Array<SearchServiceLevelObjective>'
55
55
  }
56
56
  end
57
57
 
@@ -82,9 +82,9 @@ module DatadogAPIClient::V1
82
82
  self.facets = attributes[:'facets']
83
83
  end
84
84
 
85
- if attributes.key?(:'slo')
86
- if (value = attributes[:'slo']).is_a?(Array)
87
- self.slo = value
85
+ if attributes.key?(:'slos')
86
+ if (value = attributes[:'slos']).is_a?(Array)
87
+ self.slos = value
88
88
  end
89
89
  end
90
90
  end
@@ -103,7 +103,7 @@ module DatadogAPIClient::V1
103
103
  return true if self.equal?(o)
104
104
  self.class == o.class &&
105
105
  facets == o.facets &&
106
- slo == o.slo
106
+ slos == o.slos
107
107
  end
108
108
 
109
109
  # @see the `==` method
@@ -117,7 +117,7 @@ module DatadogAPIClient::V1
117
117
  # @return [Integer] Hash code
118
118
  # @!visibility private
119
119
  def hash
120
- [facets, slo].hash
120
+ [facets, slos].hash
121
121
  end
122
122
  end
123
123
  end
@@ -74,6 +74,8 @@ module DatadogAPIClient::V1
74
74
  # @!visibility private
75
75
  def self.openapi_nullable
76
76
  Set.new([
77
+ :'last',
78
+ :'prev',
77
79
  ])
78
80
  end
79
81