datadog_api_client 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +715 -44
  4. data/.generator/schemas/v2/openapi.yaml +458 -44
  5. data/.generator/src/generator/formatter.py +14 -0
  6. data/.github/workflows/test_integration.yml +0 -7
  7. data/CHANGELOG.md +34 -0
  8. data/examples/v1/dashboards/CreateDashboard_1442588603.rb +61 -0
  9. data/examples/v1/dashboards/CreateDashboard_252716965.rb +52 -0
  10. data/examples/v1/dashboards/CreateDashboard_3882428227.rb +60 -0
  11. data/examples/v1/metrics/SubmitDistributionPoints.rb +22 -0
  12. data/examples/v1/metrics/SubmitDistributionPoints_3109558960.rb +25 -0
  13. data/examples/v1/organizations/DowngradeOrg.rb +5 -0
  14. data/examples/v1/organizations/UpdateOrg.rb +1 -0
  15. data/examples/v1/service-level-objectives/SearchSLO.rb +16 -0
  16. data/examples/v1/snapshots/GetGraphSnapshot.rb +2 -0
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +3 -0
  18. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +3 -0
  19. data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -0
  20. data/examples/v2/metrics/CreateTagConfiguration.rb +0 -3
  21. data/examples/v2/metrics/DeleteTagConfiguration.rb +0 -3
  22. data/examples/v2/metrics/ListTagConfigurationByName.rb +0 -3
  23. data/examples/v2/metrics/ListTagConfigurations.rb +0 -3
  24. data/examples/v2/metrics/ListTagConfigurations_103226315.rb +0 -3
  25. data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -3
  26. data/examples/v2/metrics/UpdateTagConfiguration.rb +0 -3
  27. data/examples/v2/opsgenie-integration/CreateOpsgenieService.rb +16 -0
  28. data/examples/v2/opsgenie-integration/DeleteOpsgenieService.rb +8 -0
  29. data/examples/v2/opsgenie-integration/GetOpsgenieService.rb +8 -0
  30. data/examples/v2/opsgenie-integration/ListOpsgenieServices.rb +5 -0
  31. data/examples/v2/opsgenie-integration/UpdateOpsgenieService.rb +21 -0
  32. data/examples/v2/security-monitoring/ListSecurityMonitoringSignals.rb +0 -3
  33. data/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.rb +0 -3
  34. data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +3 -0
  35. data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +5 -0
  36. data/examples/v2/usage-metering/GetEstimatedCostByOrg_1171921972.rb +9 -0
  37. data/examples/v2/usage-metering/GetEstimatedCostByOrg_627383212.rb +9 -0
  38. data/lib/datadog_api_client/v1/api/metrics_api.rb +81 -0
  39. data/lib/datadog_api_client/v1/api/organizations_api.rb +74 -1
  40. data/lib/datadog_api_client/v1/api/security_monitoring_api.rb +2 -2
  41. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +78 -4
  42. data/lib/datadog_api_client/v1/api/snapshots_api.rb +4 -0
  43. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +9 -5
  44. data/lib/datadog_api_client/v1/configuration.rb +51 -0
  45. data/lib/datadog_api_client/v1/models/distribution_point_item.rb +63 -0
  46. data/lib/datadog_api_client/v1/models/distribution_points_content_encoding.rb +26 -0
  47. data/lib/datadog_api_client/v1/models/distribution_points_payload.rb +124 -0
  48. data/lib/datadog_api_client/v1/models/distribution_points_series.rb +179 -0
  49. data/lib/datadog_api_client/v1/models/distribution_points_type.rb +26 -0
  50. data/lib/datadog_api_client/v1/models/distribution_widget_histogram_request_query.rb +64 -0
  51. data/lib/datadog_api_client/v1/models/distribution_widget_histogram_request_type.rb +26 -0
  52. data/lib/datadog_api_client/v1/models/distribution_widget_request.rb +21 -1
  53. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stat_name.rb +1 -0
  54. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
  55. data/lib/datadog_api_client/v1/models/ip_prefixes_synthetics_private_locations.rb +125 -0
  56. data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
  57. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
  58. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
  59. data/lib/datadog_api_client/v1/models/org_downgraded_response.rb +111 -0
  60. data/lib/datadog_api_client/v1/models/organization.rb +14 -4
  61. data/lib/datadog_api_client/v1/models/search_slo_response.rb +131 -0
  62. data/lib/datadog_api_client/v1/models/search_slo_response_data.rb +121 -0
  63. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +123 -0
  64. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets.rb +197 -0
  65. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_int.rb +121 -0
  66. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_string.rb +121 -0
  67. data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +151 -0
  68. data/lib/datadog_api_client/v1/models/search_slo_response_meta.rb +111 -0
  69. data/lib/datadog_api_client/v1/models/search_slo_response_meta_page.rb +181 -0
  70. data/lib/datadog_api_client/v1/models/service_level_objective.rb +3 -3
  71. data/lib/datadog_api_client/v1/models/service_level_objective_query.rb +1 -1
  72. data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +3 -3
  73. data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +1 -1
  74. data/lib/datadog_api_client/v1/models/slo_response_data.rb +1 -1
  75. data/lib/datadog_api_client/v1/models/synthetics_api_test.rb +11 -0
  76. data/lib/datadog_api_client/v1/models/synthetics_browser_test.rb +11 -0
  77. data/lib/datadog_api_client/v1/models/synthetics_core_web_vitals.rb +2 -2
  78. data/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb +111 -0
  79. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +11 -1
  80. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +4 -0
  81. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +4 -0
  82. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
  83. data/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb +474 -4
  84. data/lib/datadog_api_client/v1.rb +19 -0
  85. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +1 -1
  86. data/lib/datadog_api_client/v2/api/metrics_api.rb +0 -2
  87. data/lib/datadog_api_client/v2/api/opsgenie_integration_api.rb +395 -0
  88. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +76 -0
  89. data/lib/datadog_api_client/v2/configuration.rb +0 -7
  90. data/lib/datadog_api_client/v2/models/intake_payload_accepted.rb +10 -8
  91. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +0 -2
  92. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +0 -2
  93. data/lib/datadog_api_client/v2/models/opsgenie_service_create_attributes.rb +174 -0
  94. data/lib/datadog_api_client/v2/models/opsgenie_service_create_data.rb +145 -0
  95. data/lib/datadog_api_client/v2/models/opsgenie_service_create_request.rb +122 -0
  96. data/lib/datadog_api_client/v2/models/opsgenie_service_region_type.rb +28 -0
  97. data/lib/datadog_api_client/v2/models/opsgenie_service_response.rb +122 -0
  98. data/lib/datadog_api_client/v2/models/opsgenie_service_response_attributes.rb +132 -0
  99. data/lib/datadog_api_client/v2/models/opsgenie_service_response_data.rb +166 -0
  100. data/lib/datadog_api_client/v2/models/opsgenie_service_type.rb +26 -0
  101. data/lib/datadog_api_client/v2/models/opsgenie_service_update_attributes.rb +142 -0
  102. data/lib/datadog_api_client/v2/models/opsgenie_service_update_data.rb +166 -0
  103. data/lib/datadog_api_client/v2/models/opsgenie_service_update_request.rb +122 -0
  104. data/lib/datadog_api_client/v2/models/opsgenie_services_response.rb +124 -0
  105. data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +30 -4
  106. data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_method.rb +27 -0
  107. data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_threshold.rb +27 -0
  108. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +13 -1
  109. data/lib/datadog_api_client/v2.rb +15 -0
  110. data/lib/datadog_api_client/version.rb +1 -1
  111. metadata +51 -2
@@ -37,6 +37,12 @@ module DatadogAPIClient::V1
37
37
  # The APM host usage by tag(s).
38
38
  attr_accessor :apm_host_usage
39
39
 
40
+ # The percentage of Application Security Monitoring host usage by tag(s).
41
+ attr_accessor :appsec_percentage
42
+
43
+ # The Application Security Monitoring host usage by tag(s).
44
+ attr_accessor :appsec_usage
45
+
40
46
  # The percentage of synthetic browser test usage by tag(s).
41
47
  attr_accessor :browser_percentage
42
48
 
@@ -61,6 +67,12 @@ module DatadogAPIClient::V1
61
67
  # The estimated live indexed logs usage by tag(s). This field is in private beta.
62
68
  attr_accessor :estimated_indexed_logs_usage
63
69
 
70
+ # The percentage of estimated indexed spans usage by tag(s). This field is in private beta.
71
+ attr_accessor :estimated_indexed_spans_percentage
72
+
73
+ # The estimated indexed spans usage by tag(s). This field is in private beta.
74
+ attr_accessor :estimated_indexed_spans_usage
75
+
64
76
  # The percentage of Fargate usage by tags.
65
77
  attr_accessor :fargate_percentage
66
78
 
@@ -123,6 +135,8 @@ module DatadogAPIClient::V1
123
135
  :'api_usage' => :'api_usage',
124
136
  :'apm_host_percentage' => :'apm_host_percentage',
125
137
  :'apm_host_usage' => :'apm_host_usage',
138
+ :'appsec_percentage' => :'appsec_percentage',
139
+ :'appsec_usage' => :'appsec_usage',
126
140
  :'browser_percentage' => :'browser_percentage',
127
141
  :'browser_usage' => :'browser_usage',
128
142
  :'container_percentage' => :'container_percentage',
@@ -131,6 +145,8 @@ module DatadogAPIClient::V1
131
145
  :'custom_timeseries_usage' => :'custom_timeseries_usage',
132
146
  :'estimated_indexed_logs_percentage' => :'estimated_indexed_logs_percentage',
133
147
  :'estimated_indexed_logs_usage' => :'estimated_indexed_logs_usage',
148
+ :'estimated_indexed_spans_percentage' => :'estimated_indexed_spans_percentage',
149
+ :'estimated_indexed_spans_usage' => :'estimated_indexed_spans_usage',
134
150
  :'fargate_percentage' => :'fargate_percentage',
135
151
  :'fargate_usage' => :'fargate_usage',
136
152
  :'functions_percentage' => :'functions_percentage',
@@ -166,6 +182,8 @@ module DatadogAPIClient::V1
166
182
  :'api_usage' => :'Float',
167
183
  :'apm_host_percentage' => :'Float',
168
184
  :'apm_host_usage' => :'Float',
185
+ :'appsec_percentage' => :'Float',
186
+ :'appsec_usage' => :'Float',
169
187
  :'browser_percentage' => :'Float',
170
188
  :'browser_usage' => :'Float',
171
189
  :'container_percentage' => :'Float',
@@ -174,6 +192,8 @@ module DatadogAPIClient::V1
174
192
  :'custom_timeseries_usage' => :'Float',
175
193
  :'estimated_indexed_logs_percentage' => :'Float',
176
194
  :'estimated_indexed_logs_usage' => :'Float',
195
+ :'estimated_indexed_spans_percentage' => :'Float',
196
+ :'estimated_indexed_spans_usage' => :'Float',
177
197
  :'fargate_percentage' => :'Float',
178
198
  :'fargate_usage' => :'Float',
179
199
  :'functions_percentage' => :'Float',
@@ -234,6 +254,14 @@ module DatadogAPIClient::V1
234
254
  self.apm_host_usage = attributes[:'apm_host_usage']
235
255
  end
236
256
 
257
+ if attributes.key?(:'appsec_percentage')
258
+ self.appsec_percentage = attributes[:'appsec_percentage']
259
+ end
260
+
261
+ if attributes.key?(:'appsec_usage')
262
+ self.appsec_usage = attributes[:'appsec_usage']
263
+ end
264
+
237
265
  if attributes.key?(:'browser_percentage')
238
266
  self.browser_percentage = attributes[:'browser_percentage']
239
267
  end
@@ -266,6 +294,14 @@ module DatadogAPIClient::V1
266
294
  self.estimated_indexed_logs_usage = attributes[:'estimated_indexed_logs_usage']
267
295
  end
268
296
 
297
+ if attributes.key?(:'estimated_indexed_spans_percentage')
298
+ self.estimated_indexed_spans_percentage = attributes[:'estimated_indexed_spans_percentage']
299
+ end
300
+
301
+ if attributes.key?(:'estimated_indexed_spans_usage')
302
+ self.estimated_indexed_spans_usage = attributes[:'estimated_indexed_spans_usage']
303
+ end
304
+
269
305
  if attributes.key?(:'fargate_percentage')
270
306
  self.fargate_percentage = attributes[:'fargate_percentage']
271
307
  end
@@ -356,6 +392,8 @@ module DatadogAPIClient::V1
356
392
  api_usage == o.api_usage &&
357
393
  apm_host_percentage == o.apm_host_percentage &&
358
394
  apm_host_usage == o.apm_host_usage &&
395
+ appsec_percentage == o.appsec_percentage &&
396
+ appsec_usage == o.appsec_usage &&
359
397
  browser_percentage == o.browser_percentage &&
360
398
  browser_usage == o.browser_usage &&
361
399
  container_percentage == o.container_percentage &&
@@ -364,6 +402,8 @@ module DatadogAPIClient::V1
364
402
  custom_timeseries_usage == o.custom_timeseries_usage &&
365
403
  estimated_indexed_logs_percentage == o.estimated_indexed_logs_percentage &&
366
404
  estimated_indexed_logs_usage == o.estimated_indexed_logs_usage &&
405
+ estimated_indexed_spans_percentage == o.estimated_indexed_spans_percentage &&
406
+ estimated_indexed_spans_usage == o.estimated_indexed_spans_usage &&
367
407
  fargate_percentage == o.fargate_percentage &&
368
408
  fargate_usage == o.fargate_usage &&
369
409
  functions_percentage == o.functions_percentage &&
@@ -395,7 +435,7 @@ module DatadogAPIClient::V1
395
435
  # @return [Integer] Hash code
396
436
  # @!visibility private
397
437
  def hash
398
- [api_percentage, api_usage, apm_host_percentage, apm_host_usage, browser_percentage, browser_usage, container_percentage, container_usage, custom_timeseries_percentage, custom_timeseries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, fargate_percentage, fargate_usage, functions_percentage, functions_usage, indexed_logs_percentage, indexed_logs_usage, infra_host_percentage, infra_host_usage, invocations_percentage, invocations_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_host_percentage, profiled_host_usage, snmp_percentage, snmp_usage].hash
438
+ [api_percentage, api_usage, apm_host_percentage, apm_host_usage, appsec_percentage, appsec_usage, browser_percentage, browser_usage, container_percentage, container_usage, custom_timeseries_percentage, custom_timeseries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, fargate_percentage, fargate_usage, functions_percentage, functions_usage, indexed_logs_percentage, indexed_logs_usage, infra_host_percentage, infra_host_usage, invocations_percentage, invocations_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_host_percentage, profiled_host_usage, snmp_percentage, snmp_usage].hash
399
439
  end
400
440
  end
401
441
  end
@@ -0,0 +1,111 @@
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
+ # Status of downgrade
21
+ class OrgDowngradedResponse
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Information pertaining to the downgraded child organization.
29
+ attr_accessor :message
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ # @!visibility private
33
+ def self.attribute_map
34
+ {
35
+ :'message' => :'message'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ # @!visibility private
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'message' => :'String'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ # @!visibility private
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param attributes [Hash] Model attributes in the form of hash
62
+ # @!visibility private
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::OrgDowngradedResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::OrgDowngradedResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'message')
77
+ self.message = attributes[:'message']
78
+ end
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ # @!visibility private
84
+ def valid?
85
+ true
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
+ message == o.message
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param o [Object] Object to be compared
99
+ # @!visibility private
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ # @!visibility private
107
+ def hash
108
+ [message].hash
109
+ end
110
+ end
111
+ end
@@ -46,6 +46,9 @@ module DatadogAPIClient::V1
46
46
  # Subscription definition.
47
47
  attr_accessor :subscription
48
48
 
49
+ # Only available for MSP customers. Allows child organizations to be created on a trial plan.
50
+ attr_accessor :trial
51
+
49
52
  # Attribute mapping from ruby-style variable name to JSON key.
50
53
  # @!visibility private
51
54
  def self.attribute_map
@@ -56,7 +59,8 @@ module DatadogAPIClient::V1
56
59
  :'name' => :'name',
57
60
  :'public_id' => :'public_id',
58
61
  :'settings' => :'settings',
59
- :'subscription' => :'subscription'
62
+ :'subscription' => :'subscription',
63
+ :'trial' => :'trial'
60
64
  }
61
65
  end
62
66
 
@@ -76,7 +80,8 @@ module DatadogAPIClient::V1
76
80
  :'name' => :'String',
77
81
  :'public_id' => :'String',
78
82
  :'settings' => :'OrganizationSettings',
79
- :'subscription' => :'OrganizationSubscription'
83
+ :'subscription' => :'OrganizationSubscription',
84
+ :'trial' => :'Boolean'
80
85
  }
81
86
  end
82
87
 
@@ -130,6 +135,10 @@ module DatadogAPIClient::V1
130
135
  if attributes.key?(:'subscription')
131
136
  self.subscription = attributes[:'subscription']
132
137
  end
138
+
139
+ if attributes.key?(:'trial')
140
+ self.trial = attributes[:'trial']
141
+ end
133
142
  end
134
143
 
135
144
  # Check to see if the all the properties in the model are valid
@@ -162,7 +171,8 @@ module DatadogAPIClient::V1
162
171
  name == o.name &&
163
172
  public_id == o.public_id &&
164
173
  settings == o.settings &&
165
- subscription == o.subscription
174
+ subscription == o.subscription &&
175
+ trial == o.trial
166
176
  end
167
177
 
168
178
  # @see the `==` method
@@ -176,7 +186,7 @@ module DatadogAPIClient::V1
176
186
  # @return [Integer] Hash code
177
187
  # @!visibility private
178
188
  def hash
179
- [billing, created, description, name, public_id, settings, subscription].hash
189
+ [billing, created, description, name, public_id, settings, subscription, trial].hash
180
190
  end
181
191
  end
182
192
  end
@@ -0,0 +1,131 @@
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 search SLO response containing results from the search query.
21
+ class SearchSLOResponse
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Data from search SLO response.
29
+ attr_accessor :data
30
+
31
+ # Pagination links.
32
+ attr_accessor :links
33
+
34
+ # Searches metadata returned by the API.
35
+ attr_accessor :meta
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'data' => :'data',
42
+ :'links' => :'links',
43
+ :'meta' => :'meta'
44
+ }
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ # @!visibility private
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ # @!visibility private
55
+ def self.openapi_types
56
+ {
57
+ :'data' => :'SearchSLOResponseData',
58
+ :'links' => :'SearchSLOResponseLinks',
59
+ :'meta' => :'SearchSLOResponseMeta'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ # @!visibility private
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param attributes [Hash] Model attributes in the form of hash
72
+ # @!visibility private
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponse` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'data')
87
+ self.data = attributes[:'data']
88
+ end
89
+
90
+ if attributes.key?(:'links')
91
+ self.links = attributes[:'links']
92
+ end
93
+
94
+ if attributes.key?(:'meta')
95
+ self.meta = attributes[:'meta']
96
+ end
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ # @!visibility private
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param o [Object] Object to be compared
108
+ # @!visibility private
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ data == o.data &&
113
+ links == o.links &&
114
+ meta == o.meta
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param o [Object] Object to be compared
119
+ # @!visibility private
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ # @!visibility private
127
+ def hash
128
+ [data, links, meta].hash
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,121 @@
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
+ # Data from search SLO response.
21
+ class SearchSLOResponseData
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Attributes
29
+ attr_accessor :attributes
30
+
31
+ # Type of service level objective result.
32
+ attr_accessor :type
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'attributes' => :'attributes',
39
+ :'type' => :'type'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ # @!visibility private
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'attributes' => :'SearchSLOResponseDataAttributes',
54
+ :'type' => :'String'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ # @!visibility private
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param attributes [Hash] Model attributes in the form of hash
67
+ # @!visibility private
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseData` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'attributes')
82
+ self.attributes = attributes[:'attributes']
83
+ end
84
+
85
+ if attributes.key?(:'type')
86
+ self.type = attributes[:'type']
87
+ end
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ # @!visibility private
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param o [Object] Object to be compared
99
+ # @!visibility private
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ attributes == o.attributes &&
104
+ type == o.type
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param o [Object] Object to be compared
109
+ # @!visibility private
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ # @!visibility private
117
+ def hash
118
+ [attributes, type].hash
119
+ end
120
+ end
121
+ end
@@ -0,0 +1,123 @@
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
+ # Attributes
21
+ class SearchSLOResponseDataAttributes
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Facets
29
+ attr_accessor :facets
30
+
31
+ # SLOs
32
+ attr_accessor :slo
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'facets' => :'facets',
39
+ :'slo' => :'slo'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ # @!visibility private
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'facets' => :'SearchSLOResponseDataAttributesFacets',
54
+ :'slo' => :'Array<ServiceLevelObjective>'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ # @!visibility private
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param attributes [Hash] Model attributes in the form of hash
67
+ # @!visibility private
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOResponseDataAttributes` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'facets')
82
+ self.facets = attributes[:'facets']
83
+ end
84
+
85
+ if attributes.key?(:'slo')
86
+ if (value = attributes[:'slo']).is_a?(Array)
87
+ self.slo = value
88
+ end
89
+ end
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ # @!visibility private
95
+ def valid?
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param o [Object] Object to be compared
101
+ # @!visibility private
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ facets == o.facets &&
106
+ slo == o.slo
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param o [Object] Object to be compared
111
+ # @!visibility private
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [facets, slo].hash
121
+ end
122
+ end
123
+ end