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.
- checksums.yaml +4 -4
- data/.apigentools-info +6 -6
- data/.generator/conftest.py +7 -0
- data/.generator/poetry.lock +45 -75
- data/.generator/pyproject.toml +7 -7
- data/.generator/schemas/v1/openapi.yaml +76 -3
- data/.generator/schemas/v2/openapi.yaml +2328 -459
- data/.generator/src/generator/formatter.py +9 -3
- data/.generator/src/generator/openapi.py +4 -2
- data/.github/workflows/test_integration.yml +7 -1
- data/.pre-commit-config.yaml +2 -2
- data/CHANGELOG.md +31 -0
- data/examples/v1/dashboards/CreateDashboard_1284514532.rb +43 -0
- data/examples/v1/dashboards/CreateDashboard_2261785072.rb +47 -0
- data/examples/v1/dashboards/CreateDashboard_3513586382.rb +74 -0
- data/examples/v1/dashboards/CreateDashboard_3562282606.rb +1 -0
- data/examples/v1/organizations/UpdateOrg.rb +1 -1
- data/examples/v1/users/CreateUser.rb +1 -1
- data/examples/v1/users/CreateUser_266604071.rb +13 -0
- data/examples/v1/users/UpdateUser.rb +1 -1
- data/examples/v2/confluent-cloud/CreateConfluentAccount.rb +1 -0
- data/examples/v2/confluent-cloud/CreateConfluentResource.rb +1 -0
- data/examples/v2/confluent-cloud/UpdateConfluentResource.rb +1 -0
- data/examples/v2/downtimes/CancelDowntime.rb +11 -0
- data/examples/v2/downtimes/CreateDowntime.rb +26 -0
- data/examples/v2/downtimes/GetDowntime.rb +11 -0
- data/examples/v2/downtimes/ListDowntimes.rb +8 -0
- data/examples/v2/downtimes/ListMonitorDowntimes.rb +8 -0
- data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +8 -0
- data/examples/v2/downtimes/UpdateDowntime.rb +21 -0
- data/examples/v2/logs/ListLogsGet_2034110533.rb +3 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.rb +10 -0
- data/examples/v2/spans/AggregateSpans.rb +25 -0
- data/examples/v2/spans/ListSpans.rb +25 -0
- data/examples/v2/spans/ListSpansGet.rb +5 -0
- data/examples/v2/spans/ListSpansGet_1130763422.rb +8 -0
- data/examples/v2/spans/ListSpans_3495563906.rb +25 -0
- data/lib/datadog_api_client/configuration.rb +6 -0
- data/lib/datadog_api_client/inflector.rb +87 -0
- data/lib/datadog_api_client/v1/models/change_widget_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_data_source.rb +26 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb +150 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +2 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_response_format.rb +2 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb +11 -1
- data/lib/datadog_api_client/v1/models/geomap_widget_request.rb +24 -2
- data/lib/datadog_api_client/v1/models/ip_prefixes_remote_configuration.rb +94 -0
- data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
- data/lib/datadog_api_client/v1/models/organization_settings.rb +8 -0
- data/lib/datadog_api_client/v1/models/query_value_widget_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/scatterplot_table_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/sunburst_widget_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/table_widget_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/timeseries_widget_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/toplist_widget_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/tree_map_widget_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/user.rb +8 -0
- data/lib/datadog_api_client/v1/models/widget_display_type.rb +1 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +2 -0
- data/lib/datadog_api_client/v2/api/downtimes_api.rb +462 -0
- data/lib/datadog_api_client/v2/api/logs_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/rum_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/spans_api.rb +294 -0
- data/lib/datadog_api_client/v2/models/ci_app_pipeline_event_pipeline.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_configuration_rule_create_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +41 -1
- data/lib/datadog_api_client/v2/models/confluent_account_resource_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/confluent_resource_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/confluent_resource_response_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/dashboard_list_item.rb +12 -1
- data/lib/datadog_api_client/v2/models/downtime_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/downtime_create_request_attributes.rb +194 -0
- data/lib/datadog_api_client/v2/models/downtime_create_request_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/downtime_included_monitor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/downtime_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/downtime_meta_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/downtime_monitor_identifier.rb +63 -0
- data/lib/datadog_api_client/v2/models/downtime_monitor_identifier_id.rb +98 -0
- data/lib/datadog_api_client/v2/models/downtime_monitor_identifier_tags.rb +107 -0
- data/lib/datadog_api_client/v2/models/downtime_monitor_included_attributes.rb +80 -0
- data/lib/datadog_api_client/v2/models/downtime_monitor_included_item.rb +100 -0
- data/lib/datadog_api_client/v2/models/downtime_notify_end_state_actions.rb +27 -0
- data/lib/datadog_api_client/v2/models/downtime_notify_end_state_types.rb +28 -0
- data/lib/datadog_api_client/v2/models/downtime_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/downtime_relationships_created_by.rb +88 -0
- data/lib/datadog_api_client/v2/models/downtime_relationships_created_by_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/downtime_relationships_monitor.rb +88 -0
- data/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/downtime_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/downtime_response.rb +95 -0
- data/lib/datadog_api_client/v2/models/downtime_response_attributes.rb +208 -0
- data/lib/datadog_api_client/v2/models/downtime_response_data.rb +110 -0
- data/lib/datadog_api_client/v2/models/downtime_response_included_item.rb +63 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_create_request.rb +63 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_current_downtime_response.rb +100 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_one_time_create_update_request.rb +101 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_create_update_request.rb +143 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_recurrence_response.rb +106 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_create_request.rb +110 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_response.rb +131 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_recurrences_update_request.rb +92 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_response.rb +65 -0
- data/lib/datadog_api_client/v2/models/downtime_schedule_update_request.rb +63 -0
- data/lib/datadog_api_client/v2/models/downtime_status.rb +29 -0
- data/lib/datadog_api_client/v2/models/downtime_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/downtime_update_request_attributes.rb +165 -0
- data/lib/datadog_api_client/v2/models/downtime_update_request_data.rb +140 -0
- data/lib/datadog_api_client/v2/models/event_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/events_group_by_sort.rb +1 -1
- data/lib/datadog_api_client/v2/models/events_response_metadata.rb +11 -1
- data/lib/datadog_api_client/v2/models/list_downtimes_response.rb +104 -0
- data/lib/datadog_api_client/v2/models/metrics_aggregator.rb +1 -1
- data/lib/datadog_api_client/v2/models/metrics_scalar_query.rb +1 -1
- data/lib/datadog_api_client/v2/models/monitor_downtime_match_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_downtime_match_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/monitor_downtime_match_response_attributes.rb +120 -0
- data/lib/datadog_api_client/v2/models/monitor_downtime_match_response_data.rb +108 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +2 -1
- data/lib/datadog_api_client/v2/models/rum_application_list.rb +11 -1
- data/lib/datadog_api_client/v2/models/service_definition_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/service_definition_meta.rb +36 -4
- data/lib/datadog_api_client/v2/models/service_definition_meta_warnings.rb +100 -0
- data/lib/datadog_api_client/v2/models/span.rb +100 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_bucket.rb +100 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_attributes.rb +100 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value.rb +64 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_bucket_value_timeseries_point.rb +90 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_request_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_response_metadata.rb +113 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_response_status.rb +27 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_sort.rb +110 -0
- data/lib/datadog_api_client/v2/models/spans_aggregate_sort_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/spans_aggregation_function.rb +37 -0
- data/lib/datadog_api_client/v2/models/spans_attributes.rb +244 -0
- data/lib/datadog_api_client/v2/models/spans_compute.rb +129 -0
- data/lib/datadog_api_client/v2/models/spans_compute_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/spans_group_by.rb +149 -0
- data/lib/datadog_api_client/v2/models/spans_group_by_histogram.rb +143 -0
- data/lib/datadog_api_client/v2/models/spans_group_by_missing.rb +63 -0
- data/lib/datadog_api_client/v2/models/spans_group_by_total.rb +64 -0
- data/lib/datadog_api_client/v2/models/spans_list_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/spans_list_request_attributes.rb +111 -0
- data/lib/datadog_api_client/v2/models/spans_list_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/spans_list_request_page.rb +108 -0
- data/lib/datadog_api_client/v2/models/spans_list_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/spans_list_response.rb +102 -0
- data/lib/datadog_api_client/v2/models/spans_list_response_links.rb +81 -0
- data/lib/datadog_api_client/v2/models/spans_list_response_metadata.rb +123 -0
- data/lib/datadog_api_client/v2/models/spans_query_filter.rb +100 -0
- data/lib/datadog_api_client/v2/models/spans_query_options.rb +91 -0
- data/lib/datadog_api_client/v2/models/spans_response_metadata_page.rb +81 -0
- data/lib/datadog_api_client/v2/models/spans_sort.rb +27 -0
- data/lib/datadog_api_client/v2/models/spans_sort_order.rb +27 -0
- data/lib/datadog_api_client/v2/models/spans_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/spans_warning.rb +100 -0
- data/lib/datadog_api_client/v2/models/user_invitation_response_data.rb +11 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +105 -2
@@ -33,6 +33,9 @@ module DatadogAPIClient::V2
|
|
33
33
|
# ID of the dashboard.
|
34
34
|
attr_reader :id
|
35
35
|
|
36
|
+
# The short name of the integration.
|
37
|
+
attr_accessor :integration_id
|
38
|
+
|
36
39
|
# Whether or not the dashboard is in the favorites.
|
37
40
|
attr_accessor :is_favorite
|
38
41
|
|
@@ -65,6 +68,7 @@ module DatadogAPIClient::V2
|
|
65
68
|
:'created' => :'created',
|
66
69
|
:'icon' => :'icon',
|
67
70
|
:'id' => :'id',
|
71
|
+
:'integration_id' => :'integration_id',
|
68
72
|
:'is_favorite' => :'is_favorite',
|
69
73
|
:'is_read_only' => :'is_read_only',
|
70
74
|
:'is_shared' => :'is_shared',
|
@@ -84,6 +88,7 @@ module DatadogAPIClient::V2
|
|
84
88
|
:'created' => :'Time',
|
85
89
|
:'icon' => :'String',
|
86
90
|
:'id' => :'String',
|
91
|
+
:'integration_id' => :'String',
|
87
92
|
:'is_favorite' => :'Boolean',
|
88
93
|
:'is_read_only' => :'Boolean',
|
89
94
|
:'is_shared' => :'Boolean',
|
@@ -100,6 +105,7 @@ module DatadogAPIClient::V2
|
|
100
105
|
def self.openapi_nullable
|
101
106
|
Set.new([
|
102
107
|
:'icon',
|
108
|
+
:'integration_id',
|
103
109
|
])
|
104
110
|
end
|
105
111
|
|
@@ -135,6 +141,10 @@ module DatadogAPIClient::V2
|
|
135
141
|
self.id = attributes[:'id']
|
136
142
|
end
|
137
143
|
|
144
|
+
if attributes.key?(:'integration_id')
|
145
|
+
self.integration_id = attributes[:'integration_id']
|
146
|
+
end
|
147
|
+
|
138
148
|
if attributes.key?(:'is_favorite')
|
139
149
|
self.is_favorite = attributes[:'is_favorite']
|
140
150
|
end
|
@@ -218,6 +228,7 @@ module DatadogAPIClient::V2
|
|
218
228
|
created == o.created &&
|
219
229
|
icon == o.icon &&
|
220
230
|
id == o.id &&
|
231
|
+
integration_id == o.integration_id &&
|
221
232
|
is_favorite == o.is_favorite &&
|
222
233
|
is_read_only == o.is_read_only &&
|
223
234
|
is_shared == o.is_shared &&
|
@@ -232,7 +243,7 @@ module DatadogAPIClient::V2
|
|
232
243
|
# @return [Integer] Hash code
|
233
244
|
# @!visibility private
|
234
245
|
def hash
|
235
|
-
[author, created, icon, id, is_favorite, is_read_only, is_shared, modified, popularity, title, type, url].hash
|
246
|
+
[author, created, icon, id, integration_id, is_favorite, is_read_only, is_shared, modified, popularity, title, type, url].hash
|
236
247
|
end
|
237
248
|
end
|
238
249
|
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Request for creating a downtime.
|
21
|
+
class DowntimeCreateRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Object to create a downtime.
|
25
|
+
attr_reader :data
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'data' => :'data'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'data' => :'DowntimeCreateRequestData'
|
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::DowntimeCreateRequest` 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::DowntimeCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'data')
|
60
|
+
self.data = attributes[:'data']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
# @!visibility private
|
67
|
+
def valid?
|
68
|
+
return false if @data.nil?
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Custom attribute writer method with validation
|
73
|
+
# @param data [Object] Object to be assigned
|
74
|
+
# @!visibility private
|
75
|
+
def data=(data)
|
76
|
+
if data.nil?
|
77
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
78
|
+
end
|
79
|
+
@data = data
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param o [Object] Object to be compared
|
84
|
+
# @!visibility private
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
data == o.data
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
# @!visibility private
|
94
|
+
def hash
|
95
|
+
[data].hash
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,194 @@
|
|
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
|
+
# Downtime details.
|
21
|
+
class DowntimeCreateRequestAttributes
|
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_reader :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_reader :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' => :'DowntimeScheduleCreateRequest',
|
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::DowntimeCreateRequestAttributes` 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::DowntimeCreateRequestAttributes`. 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
|
+
# Check to see if the all the properties in the model are valid
|
143
|
+
# @return true if the model is valid
|
144
|
+
# @!visibility private
|
145
|
+
def valid?
|
146
|
+
return false if @monitor_identifier.nil?
|
147
|
+
return false if @scope.nil?
|
148
|
+
true
|
149
|
+
end
|
150
|
+
|
151
|
+
# Custom attribute writer method with validation
|
152
|
+
# @param monitor_identifier [Object] Object to be assigned
|
153
|
+
# @!visibility private
|
154
|
+
def monitor_identifier=(monitor_identifier)
|
155
|
+
if monitor_identifier.nil?
|
156
|
+
fail ArgumentError, 'invalid value for "monitor_identifier", monitor_identifier cannot be nil.'
|
157
|
+
end
|
158
|
+
@monitor_identifier = monitor_identifier
|
159
|
+
end
|
160
|
+
|
161
|
+
# Custom attribute writer method with validation
|
162
|
+
# @param scope [Object] Object to be assigned
|
163
|
+
# @!visibility private
|
164
|
+
def scope=(scope)
|
165
|
+
if scope.nil?
|
166
|
+
fail ArgumentError, 'invalid value for "scope", scope cannot be nil.'
|
167
|
+
end
|
168
|
+
@scope = scope
|
169
|
+
end
|
170
|
+
|
171
|
+
# Checks equality by comparing each attribute.
|
172
|
+
# @param o [Object] Object to be compared
|
173
|
+
# @!visibility private
|
174
|
+
def ==(o)
|
175
|
+
return true if self.equal?(o)
|
176
|
+
self.class == o.class &&
|
177
|
+
display_timezone == o.display_timezone &&
|
178
|
+
message == o.message &&
|
179
|
+
monitor_identifier == o.monitor_identifier &&
|
180
|
+
mute_first_recovery_notification == o.mute_first_recovery_notification &&
|
181
|
+
notify_end_states == o.notify_end_states &&
|
182
|
+
notify_end_types == o.notify_end_types &&
|
183
|
+
schedule == o.schedule &&
|
184
|
+
scope == o.scope
|
185
|
+
end
|
186
|
+
|
187
|
+
# Calculates hash code according to all attributes.
|
188
|
+
# @return [Integer] Hash code
|
189
|
+
# @!visibility private
|
190
|
+
def hash
|
191
|
+
[display_timezone, message, monitor_identifier, mute_first_recovery_notification, notify_end_states, notify_end_types, schedule, scope].hash
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
@@ -0,0 +1,119 @@
|
|
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 create a downtime.
|
21
|
+
class DowntimeCreateRequestData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Downtime details.
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# Downtime resource type.
|
28
|
+
attr_reader :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' => :'DowntimeCreateRequestAttributes',
|
44
|
+
:'type' => :'DowntimeResourceType'
|
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::DowntimeCreateRequestData` 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::DowntimeCreateRequestData`. 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
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
# @!visibility private
|
76
|
+
def valid?
|
77
|
+
return false if @attributes.nil?
|
78
|
+
return false if @type.nil?
|
79
|
+
true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Custom attribute writer method with validation
|
83
|
+
# @param attributes [Object] Object to be assigned
|
84
|
+
# @!visibility private
|
85
|
+
def attributes=(attributes)
|
86
|
+
if attributes.nil?
|
87
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
88
|
+
end
|
89
|
+
@attributes = attributes
|
90
|
+
end
|
91
|
+
|
92
|
+
# Custom attribute writer method with validation
|
93
|
+
# @param type [Object] Object to be assigned
|
94
|
+
# @!visibility private
|
95
|
+
def type=(type)
|
96
|
+
if type.nil?
|
97
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
98
|
+
end
|
99
|
+
@type = type
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param o [Object] Object to be compared
|
104
|
+
# @!visibility private
|
105
|
+
def ==(o)
|
106
|
+
return true if self.equal?(o)
|
107
|
+
self.class == o.class &&
|
108
|
+
attributes == o.attributes &&
|
109
|
+
type == o.type
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Integer] Hash code
|
114
|
+
# @!visibility private
|
115
|
+
def hash
|
116
|
+
[attributes, type].hash
|
117
|
+
end
|
118
|
+
end
|
119
|
+
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
|
+
# Monitor resource type.
|
21
|
+
class DowntimeIncludedMonitorType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
MONITORS = "monitors".freeze
|
25
|
+
end
|
26
|
+
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
|
+
# Pagination metadata returned by the API.
|
21
|
+
class DowntimeMeta
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Object containing the total filtered count.
|
25
|
+
attr_accessor :page
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'page' => :'page'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'page' => :'DowntimeMetaPage'
|
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::DowntimeMeta` 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::DowntimeMeta`. 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?(:'page')
|
60
|
+
self.page = attributes[:'page']
|
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
|
+
page == o.page
|
71
|
+
end
|
72
|
+
|
73
|
+
# Calculates hash code according to all attributes.
|
74
|
+
# @return [Integer] Hash code
|
75
|
+
# @!visibility private
|
76
|
+
def hash
|
77
|
+
[page].hash
|
78
|
+
end
|
79
|
+
end
|
80
|
+
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
|
+
# Object containing the total filtered count.
|
21
|
+
class DowntimeMetaPage
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Total count of elements matched by the filter.
|
25
|
+
attr_accessor :total_filtered_count
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'total_filtered_count' => :'total_filtered_count'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'total_filtered_count' => :'Integer'
|
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::DowntimeMetaPage` 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::DowntimeMetaPage`. 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?(:'total_filtered_count')
|
60
|
+
self.total_filtered_count = attributes[:'total_filtered_count']
|
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
|
+
total_filtered_count == o.total_filtered_count
|
71
|
+
end
|
72
|
+
|
73
|
+
# Calculates hash code according to all attributes.
|
74
|
+
# @return [Integer] Hash code
|
75
|
+
# @!visibility private
|
76
|
+
def hash
|
77
|
+
[total_filtered_count].hash
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|