datadog_api_client 2.12.0 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) 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 +76 -3
  7. data/.generator/schemas/v2/openapi.yaml +2328 -459
  8. data/.generator/src/generator/formatter.py +9 -3
  9. data/.generator/src/generator/openapi.py +4 -2
  10. data/.github/workflows/test_integration.yml +7 -1
  11. data/.pre-commit-config.yaml +2 -2
  12. data/CHANGELOG.md +31 -0
  13. data/examples/v1/dashboards/CreateDashboard_1284514532.rb +43 -0
  14. data/examples/v1/dashboards/CreateDashboard_2261785072.rb +47 -0
  15. data/examples/v1/dashboards/CreateDashboard_3513586382.rb +74 -0
  16. data/examples/v1/dashboards/CreateDashboard_3562282606.rb +1 -0
  17. data/examples/v1/organizations/UpdateOrg.rb +1 -1
  18. data/examples/v1/users/CreateUser.rb +1 -1
  19. data/examples/v1/users/CreateUser_266604071.rb +13 -0
  20. data/examples/v1/users/UpdateUser.rb +1 -1
  21. data/examples/v2/confluent-cloud/CreateConfluentAccount.rb +1 -0
  22. data/examples/v2/confluent-cloud/CreateConfluentResource.rb +1 -0
  23. data/examples/v2/confluent-cloud/UpdateConfluentResource.rb +1 -0
  24. data/examples/v2/downtimes/CancelDowntime.rb +11 -0
  25. data/examples/v2/downtimes/CreateDowntime.rb +26 -0
  26. data/examples/v2/downtimes/GetDowntime.rb +11 -0
  27. data/examples/v2/downtimes/ListDowntimes.rb +8 -0
  28. data/examples/v2/downtimes/ListMonitorDowntimes.rb +8 -0
  29. data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +8 -0
  30. data/examples/v2/downtimes/UpdateDowntime.rb +21 -0
  31. data/examples/v2/logs/ListLogsGet_2034110533.rb +3 -1
  32. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.rb +10 -0
  33. data/examples/v2/spans/AggregateSpans.rb +25 -0
  34. data/examples/v2/spans/ListSpans.rb +25 -0
  35. data/examples/v2/spans/ListSpansGet.rb +5 -0
  36. data/examples/v2/spans/ListSpansGet_1130763422.rb +8 -0
  37. data/examples/v2/spans/ListSpans_3495563906.rb +25 -0
  38. data/lib/datadog_api_client/configuration.rb +6 -0
  39. data/lib/datadog_api_client/inflector.rb +87 -0
  40. data/lib/datadog_api_client/v1/models/change_widget_request.rb +1 -1
  41. data/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_data_source.rb +26 -0
  42. data/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb +150 -0
  43. data/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +2 -1
  44. data/lib/datadog_api_client/v1/models/formula_and_function_response_format.rb +2 -1
  45. data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb +11 -1
  46. data/lib/datadog_api_client/v1/models/geomap_widget_request.rb +24 -2
  47. data/lib/datadog_api_client/v1/models/ip_prefixes_remote_configuration.rb +94 -0
  48. data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
  49. data/lib/datadog_api_client/v1/models/organization_settings.rb +8 -0
  50. data/lib/datadog_api_client/v1/models/query_value_widget_request.rb +1 -1
  51. data/lib/datadog_api_client/v1/models/scatterplot_table_request.rb +1 -1
  52. data/lib/datadog_api_client/v1/models/sunburst_widget_request.rb +1 -1
  53. data/lib/datadog_api_client/v1/models/table_widget_request.rb +1 -1
  54. data/lib/datadog_api_client/v1/models/timeseries_widget_request.rb +1 -1
  55. data/lib/datadog_api_client/v1/models/toplist_widget_request.rb +1 -1
  56. data/lib/datadog_api_client/v1/models/tree_map_widget_request.rb +1 -1
  57. data/lib/datadog_api_client/v1/models/user.rb +8 -0
  58. data/lib/datadog_api_client/v1/models/widget_display_type.rb +1 -0
  59. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +2 -0
  60. data/lib/datadog_api_client/v2/api/downtimes_api.rb +462 -0
  61. data/lib/datadog_api_client/v2/api/logs_api.rb +2 -2
  62. data/lib/datadog_api_client/v2/api/metrics_api.rb +1 -1
  63. data/lib/datadog_api_client/v2/api/rum_api.rb +2 -2
  64. data/lib/datadog_api_client/v2/api/spans_api.rb +294 -0
  65. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event_pipeline.rb +1 -1
  66. data/lib/datadog_api_client/v2/models/cloud_configuration_rule_create_payload.rb +13 -1
  67. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +41 -1
  68. data/lib/datadog_api_client/v2/models/confluent_account_resource_attributes.rb +11 -1
  69. data/lib/datadog_api_client/v2/models/confluent_resource_request_attributes.rb +11 -1
  70. data/lib/datadog_api_client/v2/models/confluent_resource_response_attributes.rb +21 -1
  71. data/lib/datadog_api_client/v2/models/dashboard_list_item.rb +12 -1
  72. data/lib/datadog_api_client/v2/models/downtime_create_request.rb +98 -0
  73. data/lib/datadog_api_client/v2/models/downtime_create_request_attributes.rb +194 -0
  74. data/lib/datadog_api_client/v2/models/downtime_create_request_data.rb +119 -0
  75. data/lib/datadog_api_client/v2/models/downtime_included_monitor_type.rb +26 -0
  76. data/lib/datadog_api_client/v2/models/downtime_meta.rb +80 -0
  77. data/lib/datadog_api_client/v2/models/downtime_meta_page.rb +80 -0
  78. data/lib/datadog_api_client/v2/models/downtime_monitor_identifier.rb +63 -0
  79. data/lib/datadog_api_client/v2/models/downtime_monitor_identifier_id.rb +98 -0
  80. data/lib/datadog_api_client/v2/models/downtime_monitor_identifier_tags.rb +107 -0
  81. data/lib/datadog_api_client/v2/models/downtime_monitor_included_attributes.rb +80 -0
  82. data/lib/datadog_api_client/v2/models/downtime_monitor_included_item.rb +100 -0
  83. data/lib/datadog_api_client/v2/models/downtime_notify_end_state_actions.rb +27 -0
  84. data/lib/datadog_api_client/v2/models/downtime_notify_end_state_types.rb +28 -0
  85. data/lib/datadog_api_client/v2/models/downtime_relationships.rb +90 -0
  86. data/lib/datadog_api_client/v2/models/downtime_relationships_created_by.rb +88 -0
  87. data/lib/datadog_api_client/v2/models/downtime_relationships_created_by_data.rb +90 -0
  88. data/lib/datadog_api_client/v2/models/downtime_relationships_monitor.rb +88 -0
  89. data/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb +90 -0
  90. data/lib/datadog_api_client/v2/models/downtime_resource_type.rb +26 -0
  91. data/lib/datadog_api_client/v2/models/downtime_response.rb +95 -0
  92. data/lib/datadog_api_client/v2/models/downtime_response_attributes.rb +208 -0
  93. data/lib/datadog_api_client/v2/models/downtime_response_data.rb +110 -0
  94. data/lib/datadog_api_client/v2/models/downtime_response_included_item.rb +63 -0
  95. data/lib/datadog_api_client/v2/models/downtime_schedule_create_request.rb +63 -0
  96. data/lib/datadog_api_client/v2/models/downtime_schedule_current_downtime_response.rb +100 -0
  97. data/lib/datadog_api_client/v2/models/downtime_schedule_one_time_create_update_request.rb +101 -0
  98. data/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb +98 -0
  99. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_create_update_request.rb +143 -0
  100. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_response.rb +106 -0
  101. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_create_request.rb +110 -0
  102. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_response.rb +131 -0
  103. data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_update_request.rb +92 -0
  104. data/lib/datadog_api_client/v2/models/downtime_schedule_response.rb +65 -0
  105. data/lib/datadog_api_client/v2/models/downtime_schedule_update_request.rb +63 -0
  106. data/lib/datadog_api_client/v2/models/downtime_status.rb +29 -0
  107. data/lib/datadog_api_client/v2/models/downtime_update_request.rb +98 -0
  108. data/lib/datadog_api_client/v2/models/downtime_update_request_attributes.rb +165 -0
  109. data/lib/datadog_api_client/v2/models/downtime_update_request_data.rb +140 -0
  110. data/lib/datadog_api_client/v2/models/event_response_attributes.rb +11 -1
  111. data/lib/datadog_api_client/v2/models/events_group_by_sort.rb +1 -1
  112. data/lib/datadog_api_client/v2/models/events_response_metadata.rb +11 -1
  113. data/lib/datadog_api_client/v2/models/list_downtimes_response.rb +104 -0
  114. data/lib/datadog_api_client/v2/models/metrics_aggregator.rb +1 -1
  115. data/lib/datadog_api_client/v2/models/metrics_scalar_query.rb +1 -1
  116. data/lib/datadog_api_client/v2/models/monitor_downtime_match_resource_type.rb +26 -0
  117. data/lib/datadog_api_client/v2/models/monitor_downtime_match_response.rb +92 -0
  118. data/lib/datadog_api_client/v2/models/monitor_downtime_match_response_attributes.rb +120 -0
  119. data/lib/datadog_api_client/v2/models/monitor_downtime_match_response_data.rb +108 -0
  120. data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +2 -1
  121. data/lib/datadog_api_client/v2/models/rum_application_list.rb +11 -1
  122. data/lib/datadog_api_client/v2/models/service_definition_data.rb +11 -1
  123. data/lib/datadog_api_client/v2/models/service_definition_meta.rb +36 -4
  124. data/lib/datadog_api_client/v2/models/service_definition_meta_warnings.rb +100 -0
  125. data/lib/datadog_api_client/v2/models/span.rb +100 -0
  126. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket.rb +100 -0
  127. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_attributes.rb +100 -0
  128. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_type.rb +26 -0
  129. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value.rb +64 -0
  130. data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value_timeseries_point.rb +90 -0
  131. data/lib/datadog_api_client/v2/models/spans_aggregate_data.rb +90 -0
  132. data/lib/datadog_api_client/v2/models/spans_aggregate_request.rb +80 -0
  133. data/lib/datadog_api_client/v2/models/spans_aggregate_request_attributes.rb +115 -0
  134. data/lib/datadog_api_client/v2/models/spans_aggregate_request_type.rb +26 -0
  135. data/lib/datadog_api_client/v2/models/spans_aggregate_response.rb +92 -0
  136. data/lib/datadog_api_client/v2/models/spans_aggregate_response_metadata.rb +113 -0
  137. data/lib/datadog_api_client/v2/models/spans_aggregate_response_status.rb +27 -0
  138. data/lib/datadog_api_client/v2/models/spans_aggregate_sort.rb +110 -0
  139. data/lib/datadog_api_client/v2/models/spans_aggregate_sort_type.rb +27 -0
  140. data/lib/datadog_api_client/v2/models/spans_aggregation_function.rb +37 -0
  141. data/lib/datadog_api_client/v2/models/spans_attributes.rb +244 -0
  142. data/lib/datadog_api_client/v2/models/spans_compute.rb +129 -0
  143. data/lib/datadog_api_client/v2/models/spans_compute_type.rb +27 -0
  144. data/lib/datadog_api_client/v2/models/spans_group_by.rb +149 -0
  145. data/lib/datadog_api_client/v2/models/spans_group_by_histogram.rb +143 -0
  146. data/lib/datadog_api_client/v2/models/spans_group_by_missing.rb +63 -0
  147. data/lib/datadog_api_client/v2/models/spans_group_by_total.rb +64 -0
  148. data/lib/datadog_api_client/v2/models/spans_list_request.rb +80 -0
  149. data/lib/datadog_api_client/v2/models/spans_list_request_attributes.rb +111 -0
  150. data/lib/datadog_api_client/v2/models/spans_list_request_data.rb +90 -0
  151. data/lib/datadog_api_client/v2/models/spans_list_request_page.rb +108 -0
  152. data/lib/datadog_api_client/v2/models/spans_list_request_type.rb +26 -0
  153. data/lib/datadog_api_client/v2/models/spans_list_response.rb +102 -0
  154. data/lib/datadog_api_client/v2/models/spans_list_response_links.rb +81 -0
  155. data/lib/datadog_api_client/v2/models/spans_list_response_metadata.rb +123 -0
  156. data/lib/datadog_api_client/v2/models/spans_query_filter.rb +100 -0
  157. data/lib/datadog_api_client/v2/models/spans_query_options.rb +91 -0
  158. data/lib/datadog_api_client/v2/models/spans_response_metadata_page.rb +81 -0
  159. data/lib/datadog_api_client/v2/models/spans_sort.rb +27 -0
  160. data/lib/datadog_api_client/v2/models/spans_sort_order.rb +27 -0
  161. data/lib/datadog_api_client/v2/models/spans_type.rb +26 -0
  162. data/lib/datadog_api_client/v2/models/spans_warning.rb +100 -0
  163. data/lib/datadog_api_client/v2/models/user_invitation_response_data.rb +11 -1
  164. data/lib/datadog_api_client/version.rb +1 -1
  165. metadata +105 -2
@@ -0,0 +1,100 @@
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
+ # Spans aggregate.
21
+ class SpansAggregateBucket
22
+ include BaseGenericModel
23
+
24
+ # A bucket values.
25
+ attr_accessor :attributes
26
+
27
+ # ID of the spans aggregate.
28
+ attr_accessor :id
29
+
30
+ # The spans aggregate bucket type.
31
+ attr_accessor :type
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'attributes' => :'attributes',
38
+ :'id' => :'id',
39
+ :'type' => :'type'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'attributes' => :'SpansAggregateBucketAttributes',
48
+ :'id' => :'String',
49
+ :'type' => :'SpansAggregateBucketType'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param attributes [Hash] Model attributes in the form of hash
55
+ # @!visibility private
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateBucket` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateBucket`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'attributes')
70
+ self.attributes = attributes[:'attributes']
71
+ end
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'type')
78
+ self.type = attributes[:'type']
79
+ end
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
+ attributes == o.attributes &&
89
+ id == o.id &&
90
+ type == o.type
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [attributes, id, type].hash
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,100 @@
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 bucket values.
21
+ class SpansAggregateBucketAttributes
22
+ include BaseGenericModel
23
+
24
+ # The key, value pairs for each group by.
25
+ attr_accessor :by
26
+
27
+ # The compute data.
28
+ attr_accessor :compute
29
+
30
+ # A map of the metric name -> value for regular compute or list of values for a timeseries.
31
+ attr_accessor :computes
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'by' => :'by',
38
+ :'compute' => :'compute',
39
+ :'computes' => :'computes'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'by' => :'Hash<String, Object>',
48
+ :'compute' => :'Object',
49
+ :'computes' => :'Hash<String, SpansAggregateBucketValue>'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param attributes [Hash] Model attributes in the form of hash
55
+ # @!visibility private
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SpansAggregateBucketAttributes` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SpansAggregateBucketAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'by')
70
+ self.by = attributes[:'by']
71
+ end
72
+
73
+ if attributes.key?(:'compute')
74
+ self.compute = attributes[:'compute']
75
+ end
76
+
77
+ if attributes.key?(:'computes')
78
+ self.computes = attributes[:'computes']
79
+ end
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
+ by == o.by &&
89
+ compute == o.compute &&
90
+ computes == o.computes
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [by, compute, computes].hash
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,26 @@
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 spans aggregate bucket type.
21
+ class SpansAggregateBucketType
22
+ include BaseEnumModel
23
+
24
+ BUCKET = "bucket".freeze
25
+ end
26
+ end
@@ -0,0 +1,64 @@
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 bucket value, can be either a timeseries or a single value.
21
+ module SpansAggregateBucketValue
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
+ :'String',
30
+ :'Float',
31
+ :'Array<SpansAggregateBucketValueTimeseriesPoint>'
32
+ ]
33
+ end
34
+ # Builds the object
35
+ # @param data [Mixed] Data to be matched against the list of oneOf items
36
+ # @return [Object] Returns the model or the data itself
37
+ def build(data)
38
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
39
+ # Note:
40
+ # - We do not attempt to check whether exactly one item matches.
41
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
42
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
43
+ # - TODO: scalar values are de facto behaving as if they were nullable.
44
+ # - TODO: logging when debugging is set.
45
+ openapi_one_of.each do |klass|
46
+ begin
47
+ next if klass == :AnyType # "nullable: true"
48
+ typed_data = find_and_cast_into_type(klass, data)
49
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
50
+ return typed_data if typed_data
51
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
52
+ end
53
+ end
54
+
55
+ if openapi_one_of.include?(:AnyType)
56
+ data
57
+ else
58
+ self._unparsed = true
59
+ DatadogAPIClient::UnparsedObject.new(data)
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,90 @@
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 timeseries point.
21
+ class SpansAggregateBucketValueTimeseriesPoint
22
+ include BaseGenericModel
23
+
24
+ # The time value for this point.
25
+ attr_accessor :time
26
+
27
+ # The value for this point.
28
+ attr_accessor :value
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'time' => :'time',
35
+ :'value' => :'value'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'time' => :'String',
44
+ :'value' => :'Float'
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::SpansAggregateBucketValueTimeseriesPoint` 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::SpansAggregateBucketValueTimeseriesPoint`. 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?(:'time')
65
+ self.time = attributes[:'time']
66
+ end
67
+
68
+ if attributes.key?(:'value')
69
+ self.value = attributes[:'value']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ time == o.time &&
80
+ value == o.value
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [time, value].hash
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,90 @@
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 object containing the query content.
21
+ class SpansAggregateData
22
+ include BaseGenericModel
23
+
24
+ # The object containing all the query parameters.
25
+ attr_accessor :attributes
26
+
27
+ # The type of resource. The value should always be aggregate_request.
28
+ attr_accessor :type
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'attributes' => :'attributes',
35
+ :'type' => :'type'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'attributes' => :'SpansAggregateRequestAttributes',
44
+ :'type' => :'SpansAggregateRequestType'
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::SpansAggregateData` 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::SpansAggregateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'attributes')
65
+ self.attributes = attributes[:'attributes']
66
+ end
67
+
68
+ if attributes.key?(:'type')
69
+ self.type = attributes[:'type']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ attributes == o.attributes &&
80
+ type == o.type
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [attributes, type].hash
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,80 @@
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 object sent with the request to retrieve a list of aggregated spans from your organization.
21
+ class SpansAggregateRequest
22
+ include BaseGenericModel
23
+
24
+ # The object containing the query content.
25
+ attr_accessor :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'SpansAggregateData'
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::SpansAggregateRequest` 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::SpansAggregateRequest`. 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
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ data == o.data
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [data].hash
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,115 @@
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 object containing all the query parameters.
21
+ class SpansAggregateRequestAttributes
22
+ include BaseGenericModel
23
+
24
+ # The list of metrics or timeseries to compute for the retrieved buckets.
25
+ attr_accessor :compute
26
+
27
+ # The search and filter query settings.
28
+ attr_accessor :filter
29
+
30
+ # The rules for the group by.
31
+ attr_accessor :group_by
32
+
33
+ # Global query options that are used during the query.
34
+ # Note: You should only supply timezone or time offset but not both otherwise the query will fail.
35
+ attr_accessor :options
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'compute' => :'compute',
42
+ :'filter' => :'filter',
43
+ :'group_by' => :'group_by',
44
+ :'options' => :'options'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ # @!visibility private
50
+ def self.openapi_types
51
+ {
52
+ :'compute' => :'Array<SpansCompute>',
53
+ :'filter' => :'SpansQueryFilter',
54
+ :'group_by' => :'Array<SpansGroupBy>',
55
+ :'options' => :'SpansQueryOptions'
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::SpansAggregateRequestAttributes` 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::SpansAggregateRequestAttributes`. 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?(:'compute')
76
+ if (value = attributes[:'compute']).is_a?(Array)
77
+ self.compute = value
78
+ end
79
+ end
80
+
81
+ if attributes.key?(:'filter')
82
+ self.filter = attributes[:'filter']
83
+ end
84
+
85
+ if attributes.key?(:'group_by')
86
+ if (value = attributes[:'group_by']).is_a?(Array)
87
+ self.group_by = value
88
+ end
89
+ end
90
+
91
+ if attributes.key?(:'options')
92
+ self.options = attributes[:'options']
93
+ end
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param o [Object] Object to be compared
98
+ # @!visibility private
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ compute == o.compute &&
103
+ filter == o.filter &&
104
+ group_by == o.group_by &&
105
+ options == o.options
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Integer] Hash code
110
+ # @!visibility private
111
+ def hash
112
+ [compute, filter, group_by, options].hash
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,26 @@
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 type of resource. The value should always be aggregate_request.
21
+ class SpansAggregateRequestType
22
+ include BaseEnumModel
23
+
24
+ AGGREGATE_REQUEST = "aggregate_request".freeze
25
+ end
26
+ end