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,165 @@
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
+ # Attributes of the downtime to update.
21
+ class DowntimeUpdateRequestAttributes
22
+ include BaseGenericModel
23
+
24
+ # The timezone in which to display the downtime's start and end times in Datadog applications. This is not used
25
+ # as an offset for scheduling.
26
+ attr_accessor :display_timezone
27
+
28
+ # A message to include with notifications for this downtime. Email notifications can be sent to specific users
29
+ # by using the same `@username` notation as events.
30
+ attr_accessor :message
31
+
32
+ # Monitor identifier for the downtime.
33
+ attr_accessor :monitor_identifier
34
+
35
+ # If the first recovery notification during a downtime should be muted.
36
+ attr_accessor :mute_first_recovery_notification
37
+
38
+ # States that will trigger a monitor notification when the `notify_end_types` action occurs.
39
+ attr_accessor :notify_end_states
40
+
41
+ # Actions that will trigger a monitor notification if the downtime is in the `notify_end_types` state.
42
+ attr_accessor :notify_end_types
43
+
44
+ # Schedule for the downtime.
45
+ attr_accessor :schedule
46
+
47
+ # The scope to which the downtime applies. Must follow the [common search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/).
48
+ attr_accessor :scope
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ # @!visibility private
52
+ def self.attribute_map
53
+ {
54
+ :'display_timezone' => :'display_timezone',
55
+ :'message' => :'message',
56
+ :'monitor_identifier' => :'monitor_identifier',
57
+ :'mute_first_recovery_notification' => :'mute_first_recovery_notification',
58
+ :'notify_end_states' => :'notify_end_states',
59
+ :'notify_end_types' => :'notify_end_types',
60
+ :'schedule' => :'schedule',
61
+ :'scope' => :'scope'
62
+ }
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ # @!visibility private
67
+ def self.openapi_types
68
+ {
69
+ :'display_timezone' => :'String',
70
+ :'message' => :'String',
71
+ :'monitor_identifier' => :'DowntimeMonitorIdentifier',
72
+ :'mute_first_recovery_notification' => :'Boolean',
73
+ :'notify_end_states' => :'Array<DowntimeNotifyEndStateTypes>',
74
+ :'notify_end_types' => :'Array<DowntimeNotifyEndStateActions>',
75
+ :'schedule' => :'DowntimeScheduleUpdateRequest',
76
+ :'scope' => :'String'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ # @!visibility private
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ :'display_timezone',
85
+ :'message',
86
+ ])
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param attributes [Hash] Model attributes in the form of hash
91
+ # @!visibility private
92
+ def initialize(attributes = {})
93
+ if (!attributes.is_a?(Hash))
94
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeUpdateRequestAttributes` initialize method"
95
+ end
96
+
97
+ # check to see if the attribute exists and convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!self.class.attribute_map.key?(k.to_sym))
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeUpdateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
+ end
102
+ h[k.to_sym] = v
103
+ }
104
+
105
+ if attributes.key?(:'display_timezone')
106
+ self.display_timezone = attributes[:'display_timezone']
107
+ end
108
+
109
+ if attributes.key?(:'message')
110
+ self.message = attributes[:'message']
111
+ end
112
+
113
+ if attributes.key?(:'monitor_identifier')
114
+ self.monitor_identifier = attributes[:'monitor_identifier']
115
+ end
116
+
117
+ if attributes.key?(:'mute_first_recovery_notification')
118
+ self.mute_first_recovery_notification = attributes[:'mute_first_recovery_notification']
119
+ end
120
+
121
+ if attributes.key?(:'notify_end_states')
122
+ if (value = attributes[:'notify_end_states']).is_a?(Array)
123
+ self.notify_end_states = value
124
+ end
125
+ end
126
+
127
+ if attributes.key?(:'notify_end_types')
128
+ if (value = attributes[:'notify_end_types']).is_a?(Array)
129
+ self.notify_end_types = value
130
+ end
131
+ end
132
+
133
+ if attributes.key?(:'schedule')
134
+ self.schedule = attributes[:'schedule']
135
+ end
136
+
137
+ if attributes.key?(:'scope')
138
+ self.scope = attributes[:'scope']
139
+ end
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param o [Object] Object to be compared
144
+ # @!visibility private
145
+ def ==(o)
146
+ return true if self.equal?(o)
147
+ self.class == o.class &&
148
+ display_timezone == o.display_timezone &&
149
+ message == o.message &&
150
+ monitor_identifier == o.monitor_identifier &&
151
+ mute_first_recovery_notification == o.mute_first_recovery_notification &&
152
+ notify_end_states == o.notify_end_states &&
153
+ notify_end_types == o.notify_end_types &&
154
+ schedule == o.schedule &&
155
+ scope == o.scope
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ # @!visibility private
161
+ def hash
162
+ [display_timezone, message, monitor_identifier, mute_first_recovery_notification, notify_end_states, notify_end_types, schedule, scope].hash
163
+ end
164
+ end
165
+ end
@@ -0,0 +1,140 @@
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
+ # Object to update a downtime.
21
+ class DowntimeUpdateRequestData
22
+ include BaseGenericModel
23
+
24
+ # Attributes of the downtime to update.
25
+ attr_reader :attributes
26
+
27
+ # ID of this downtime.
28
+ attr_reader :id
29
+
30
+ # Downtime resource type.
31
+ attr_reader :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' => :'DowntimeUpdateRequestAttributes',
48
+ :'id' => :'String',
49
+ :'type' => :'DowntimeResourceType'
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::DowntimeUpdateRequestData` 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::DowntimeUpdateRequestData`. 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
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ # @!visibility private
85
+ def valid?
86
+ return false if @attributes.nil?
87
+ return false if @id.nil?
88
+ return false if @type.nil?
89
+ true
90
+ end
91
+
92
+ # Custom attribute writer method with validation
93
+ # @param attributes [Object] Object to be assigned
94
+ # @!visibility private
95
+ def attributes=(attributes)
96
+ if attributes.nil?
97
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
98
+ end
99
+ @attributes = attributes
100
+ end
101
+
102
+ # Custom attribute writer method with validation
103
+ # @param id [Object] Object to be assigned
104
+ # @!visibility private
105
+ def id=(id)
106
+ if id.nil?
107
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
108
+ end
109
+ @id = id
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param type [Object] Object to be assigned
114
+ # @!visibility private
115
+ def type=(type)
116
+ if type.nil?
117
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
118
+ end
119
+ @type = type
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param o [Object] Object to be compared
124
+ # @!visibility private
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ attributes == o.attributes &&
129
+ id == o.id &&
130
+ type == o.type
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ # @!visibility private
136
+ def hash
137
+ [attributes, id, type].hash
138
+ end
139
+ end
140
+ end
@@ -24,6 +24,9 @@ module DatadogAPIClient::V2
24
24
  # Object description of attributes from your event.
25
25
  attr_accessor :attributes
26
26
 
27
+ # The message of the event.
28
+ attr_accessor :message
29
+
27
30
  # An array of tags associated with the event.
28
31
  attr_accessor :tags
29
32
 
@@ -35,6 +38,7 @@ module DatadogAPIClient::V2
35
38
  def self.attribute_map
36
39
  {
37
40
  :'attributes' => :'attributes',
41
+ :'message' => :'message',
38
42
  :'tags' => :'tags',
39
43
  :'timestamp' => :'timestamp'
40
44
  }
@@ -45,6 +49,7 @@ module DatadogAPIClient::V2
45
49
  def self.openapi_types
46
50
  {
47
51
  :'attributes' => :'EventAttributes',
52
+ :'message' => :'String',
48
53
  :'tags' => :'Array<String>',
49
54
  :'timestamp' => :'Time'
50
55
  }
@@ -70,6 +75,10 @@ module DatadogAPIClient::V2
70
75
  self.attributes = attributes[:'attributes']
71
76
  end
72
77
 
78
+ if attributes.key?(:'message')
79
+ self.message = attributes[:'message']
80
+ end
81
+
73
82
  if attributes.key?(:'tags')
74
83
  if (value = attributes[:'tags']).is_a?(Array)
75
84
  self.tags = value
@@ -88,6 +97,7 @@ module DatadogAPIClient::V2
88
97
  return true if self.equal?(o)
89
98
  self.class == o.class &&
90
99
  attributes == o.attributes &&
100
+ message == o.message &&
91
101
  tags == o.tags &&
92
102
  timestamp == o.timestamp
93
103
  end
@@ -96,7 +106,7 @@ module DatadogAPIClient::V2
96
106
  # @return [Integer] Hash code
97
107
  # @!visibility private
98
108
  def hash
99
- [attributes, tags, timestamp].hash
109
+ [attributes, message, tags, timestamp].hash
100
110
  end
101
111
  end
102
112
  end
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # The type of aggregation that can be performed on events-based queries.
25
25
  attr_reader :aggregation
26
26
 
27
- # Metric whose calculated value should be used to define the sort order of a query's results.
27
+ # The metric's calculated value which should be used to define the sort order of a query's results.
28
28
  attr_accessor :metric
29
29
 
30
30
  # Direction of sort.
@@ -30,6 +30,9 @@ module DatadogAPIClient::V2
30
30
  # The identifier of the request.
31
31
  attr_accessor :request_id
32
32
 
33
+ # The request status.
34
+ attr_accessor :status
35
+
33
36
  # A list of warnings (non-fatal errors) encountered. Partial results might be returned if
34
37
  # warnings are present in the response.
35
38
  attr_accessor :warnings
@@ -41,6 +44,7 @@ module DatadogAPIClient::V2
41
44
  :'elapsed' => :'elapsed',
42
45
  :'page' => :'page',
43
46
  :'request_id' => :'request_id',
47
+ :'status' => :'status',
44
48
  :'warnings' => :'warnings'
45
49
  }
46
50
  end
@@ -52,6 +56,7 @@ module DatadogAPIClient::V2
52
56
  :'elapsed' => :'Integer',
53
57
  :'page' => :'EventsResponseMetadataPage',
54
58
  :'request_id' => :'String',
59
+ :'status' => :'String',
55
60
  :'warnings' => :'Array<EventsWarning>'
56
61
  }
57
62
  end
@@ -84,6 +89,10 @@ module DatadogAPIClient::V2
84
89
  self.request_id = attributes[:'request_id']
85
90
  end
86
91
 
92
+ if attributes.key?(:'status')
93
+ self.status = attributes[:'status']
94
+ end
95
+
87
96
  if attributes.key?(:'warnings')
88
97
  if (value = attributes[:'warnings']).is_a?(Array)
89
98
  self.warnings = value
@@ -100,6 +109,7 @@ module DatadogAPIClient::V2
100
109
  elapsed == o.elapsed &&
101
110
  page == o.page &&
102
111
  request_id == o.request_id &&
112
+ status == o.status &&
103
113
  warnings == o.warnings
104
114
  end
105
115
 
@@ -107,7 +117,7 @@ module DatadogAPIClient::V2
107
117
  # @return [Integer] Hash code
108
118
  # @!visibility private
109
119
  def hash
110
- [elapsed, page, request_id, warnings].hash
120
+ [elapsed, page, request_id, status, warnings].hash
111
121
  end
112
122
  end
113
123
  end
@@ -0,0 +1,104 @@
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
+ # Response for retrieving all downtimes.
21
+ class ListDowntimesResponse
22
+ include BaseGenericModel
23
+
24
+ # An array of downtimes.
25
+ attr_accessor :data
26
+
27
+ # Array of objects related to the downtimes.
28
+ attr_accessor :included
29
+
30
+ # Pagination metadata returned by the API.
31
+ attr_accessor :meta
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'data' => :'data',
38
+ :'included' => :'included',
39
+ :'meta' => :'meta'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'data' => :'Array<DowntimeResponseData>',
48
+ :'included' => :'Array<DowntimeResponseIncludedItem>',
49
+ :'meta' => :'DowntimeMeta'
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::ListDowntimesResponse` 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::ListDowntimesResponse`. 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?(:'data')
70
+ if (value = attributes[:'data']).is_a?(Array)
71
+ self.data = value
72
+ end
73
+ end
74
+
75
+ if attributes.key?(:'included')
76
+ if (value = attributes[:'included']).is_a?(Array)
77
+ self.included = value
78
+ end
79
+ end
80
+
81
+ if attributes.key?(:'meta')
82
+ self.meta = attributes[:'meta']
83
+ end
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param o [Object] Object to be compared
88
+ # @!visibility private
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ data == o.data &&
93
+ included == o.included &&
94
+ meta == o.meta
95
+ end
96
+
97
+ # Calculates hash code according to all attributes.
98
+ # @return [Integer] Hash code
99
+ # @!visibility private
100
+ def hash
101
+ [data, included, meta].hash
102
+ end
103
+ end
104
+ end
@@ -17,7 +17,7 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # The type of aggregation that can be performed on metrics queries.
20
+ # The type of aggregation that can be performed on metrics-based queries.
21
21
  class MetricsAggregator
22
22
  include BaseEnumModel
23
23
 
@@ -21,7 +21,7 @@ module DatadogAPIClient::V2
21
21
  class MetricsScalarQuery
22
22
  include BaseGenericModel
23
23
 
24
- # The type of aggregation that can be performed on metrics queries.
24
+ # The type of aggregation that can be performed on metrics-based queries.
25
25
  attr_reader :aggregator
26
26
 
27
27
  # A data source that is powered by the Metrics platform.
@@ -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
+ # Monitor Downtime Match resource type.
21
+ class MonitorDowntimeMatchResourceType
22
+ include BaseEnumModel
23
+
24
+ DOWNTIME_MATCH = "downtime_match".freeze
25
+ end
26
+ end
@@ -0,0 +1,92 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Response for retrieving all downtime matches for a monitor.
21
+ class MonitorDowntimeMatchResponse
22
+ include BaseGenericModel
23
+
24
+ # An array of downtime matches.
25
+ attr_accessor :data
26
+
27
+ # Pagination metadata returned by the API.
28
+ attr_accessor :meta
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'data' => :'data',
35
+ :'meta' => :'meta'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'data' => :'Array<MonitorDowntimeMatchResponseData>',
44
+ :'meta' => :'DowntimeMeta'
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::MonitorDowntimeMatchResponse` 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::MonitorDowntimeMatchResponse`. 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?(:'data')
65
+ if (value = attributes[:'data']).is_a?(Array)
66
+ self.data = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'meta')
71
+ self.meta = attributes[:'meta']
72
+ end
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param o [Object] Object to be compared
77
+ # @!visibility private
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ data == o.data &&
82
+ meta == o.meta
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ # @!visibility private
88
+ def hash
89
+ [data, meta].hash
90
+ end
91
+ end
92
+ end